We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd07bf1 commit c4eb607Copy full SHA for c4eb607
src/hardware/fx2lafw/protocol.c
@@ -617,6 +617,11 @@ static unsigned int get_number_of_transfers(struct dev_context *devc)
617
n = (500 * to_bytes_per_ms(devc->cur_samplerate, devc->unitsize) /
618
get_buffer_size(devc));
619
620
+ /* But no larger than 16M */
621
+ unsigned int nmax = MAX_BULK_REQUEST_SIZE / get_buffer_size(devc);
622
+ if (n > nmax)
623
+ n = nmax;
624
+
625
if (n > NUM_SIMUL_TRANSFERS)
626
return NUM_SIMUL_TRANSFERS;
627
src/hardware/fx2lafw/protocol.h
@@ -38,6 +38,7 @@
38
#define MAX_RENUM_DELAY_MS 3000
39
#define NUM_SIMUL_TRANSFERS 32
40
#define MAX_EMPTY_TRANSFERS (NUM_SIMUL_TRANSFERS * 2)
41
+#define MAX_BULK_REQUEST_SIZE 16000000
42
43
#define NUM_CHANNELS 16
44
0 commit comments