From: Gerhard Sittig Date: Sun, 20 Feb 2022 08:32:14 +0000 (+0100) Subject: kingst-la2016: experiment with USB bulk size and pool count X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ffcf1e455d51c1a96a67193edc8a7ad0a4d44b81;p=libsigrok.git kingst-la2016: experiment with USB bulk size and pool count The previous implementation used a pool of 32 USB bulk transfers of up to 256KiB size each. Using a pool did speedup capture data downloads, using more transfers or larger buffers would not make a difference. Slightly reduce the total memory consumption again, change the setup to 8 transfers of up to 512KiB each, which results in a total of 4MiB for pending USB communication. These numbers are as arbitrary as any other. No attempt was made to automatically derive the values from acquisition parameters like samplerate and samples count. --- diff --git a/src/hardware/kingst-la2016/protocol.h b/src/hardware/kingst-la2016/protocol.h index bbb44c33..2f28d57b 100644 --- a/src/hardware/kingst-la2016/protocol.h +++ b/src/hardware/kingst-la2016/protocol.h @@ -45,8 +45,8 @@ * but libusb does not expose this function. Typically, max size is 2MB. */ #define LA2016_EP6_PKTSZ 512 /* Max packet size of USB endpoint 6. */ -#define LA2016_USB_BUFSZ (256 * 2 * LA2016_EP6_PKTSZ) /* 256KiB buffer. */ -#define LA2016_USB_XFER_COUNT 32 /* Size of USB bulk transfers pool. */ +#define LA2016_USB_BUFSZ (512 * 1024) /* 512KiB buffer. */ +#define LA2016_USB_XFER_COUNT 8 /* Size of USB bulk transfers pool. */ /* USB communication timeout during regular operation. */ #define DEFAULT_TIMEOUT_MS 200