Don't call callback or submit new transfers once s...
by Martin Ling 3 years 3 months
Don't call callback or submit new transfers once streaming stops.

This stops the RX callback from being called again with further data
once it has returned nonzero, or after a transfer had an error status.
125bf9f7
Clear streaming flag if we didn't resubmit a trans...
by Martin Ling 3 years 3 months
Clear streaming flag if we didn't resubmit a transfer.

If result < 0 here, libusb_submit_transfer returned an error, so we
need to shut down.

If !resubmit, then cancel_transfers() was already called by one of the
stop or close functions, so streaming is already false.
6720e56f
Don't exit transfer thread if an error occurs.
by Martin Ling 3 years 3 months
Don't exit transfer thread if an error occurs.

In the case of a libusb error, we still need the transfer thread
running, in order to handle outstanding cancellations and to signal the
condition variable when that is done.
9e1cb5c0
Merge pull request #1067 from Matioupi/master
by Martin Ling 3 years 3 months
Merge pull request #1067 from Matioupi/master

proposal to fix regression in 4c9fcf86651232c2104b57510a0ac86cf86123e4 #1057
d3e4e9b6
fix regression in 4c9fcf86651232c2104b57510a0ac86c...
by Mathieu Peyréga 3 years 3 months
fix regression in 4c9fcf86651232c2104b57510a0ac86cf86123e4
a8a66187
Merge pull request #1063 from metayan/fast-exit
by Martin Ling 3 years 3 months
Merge pull request #1063 from metayan/fast-exit

Ensure fast exit
8b9a33d4
Cleaner fast exit
by Yan 3 years 3 months
Cleaner fast exit

Interrupt the event handling thread instead of waiting for timeout.
790de7f4
Ensure fast exit
by Yan 3 years 3 months
Ensure fast exit

transfer_threadproc has a timeout of half a second, so
when kill_transfer_thread tries to pthread_join, it often
has to wait until the timeout kicks in.

With this fix, we ensure that a final request is made after
request_exit has been called, so that transfer_threadproc can exit its
loop in a fast and clean manner.
7ff92b3b
Merge pull request #982 from martinling/bug-180
by Michael Ossmann 3 years 4 months
Merge pull request #982 from martinling/bug-180

Firmware sample buffer management overhaul, including safe handling of TX underruns
3344ea8f
Fix overlapping register allocations.
by Martin Ling 3 years 4 months
ad321643
Report a bug