]> sigrok.org Git - libsigrok.git/commit - hardware/fx2lafw/protocol.h
sr: fx2lafw: Abort pending transfers when sampling is stopped
authorLars-Peter Clausen <redacted>
Tue, 3 Jul 2012 21:58:38 +0000 (23:58 +0200)
committerBert Vermeulen <redacted>
Tue, 3 Jul 2012 23:11:50 +0000 (01:11 +0200)
commit0caa1ef0cb0b2231e232a7d1681e4e13fe838035
treee2a92462bf425edef8df4d3bb22a683ec251e0da
parentca3d84cca1d2f7427f8c5266717cb787d2346e16
sr: fx2lafw: Abort pending transfers when sampling is stopped

The recent reworks of the fx2lafw made sure that the total buffer size is large
enough hold 500ms of data. This was done to improve performance and stability.
That the timeout value for a transfer was also increased to over 500ms, a side
effect of this is that when sampling is stopped there will be a additional delay
of 500ms. This is because the driver waits for all transfers to be freed
before it sends a SR_DF_END packet. Once sampling has stopped this will only
happen once a transfer times out. This patch cancels all pending transfers when
sampling is stopped, this will cause them to be freed almost immediately and the
additional delay will disappear.

Also make sure, that if we know, that we just have received the last transfer to
not resubmit this transfer again.

Signed-off-by: Lars-Peter Clausen <redacted>
hardware/fx2lafw/fx2lafw.c
hardware/fx2lafw/fx2lafw.h