]> sigrok.org Git - libsigrok.git/commit
kingst-la2016: add support for streaming mode, works for 16 channels
authorGerhard Sittig <redacted>
Sun, 20 Feb 2022 09:06:09 +0000 (10:06 +0100)
committerGerhard Sittig <redacted>
Tue, 22 Feb 2022 20:53:20 +0000 (21:53 +0100)
commit0fbb464bdf0951228d4430794263bb48bc668821
treefde479dc6550f5d6377227fab5a50f8e70d93469
parentffcf1e455d51c1a96a67193edc8a7ad0a4d44b81
kingst-la2016: add support for streaming mode, works for 16 channels

Implement support for streaming mode and announce the SR_CONF_CONTINUOUS
config key. Automatically enable streaming mode for devices which don't
have local memory. Device identification, firmware download, and capture
setup are identical to "normal mode" as the vendor calls it. But the
sequence of submitting USB transfers by the host and starting capture
data transmission on the device differs. The phase of supervising the
hardware driven acquisition does not apply. Capture data is immediately
streamed to the host after initiating the acquisition.

The capture data memory layout dramatically differs. Samples are not
compressed, and samples taken at several points in time are kept in the
same memory cell. Processing is a little more expensive, bits need more
shuffling. Lack of compression makes the acquisition in stream mode
heavily depend on the reliability of USB bulk communication. The vendor
software assumes a 300Mbps boundary, and also enforces it by disabling
channels depending on the samplerate. The sigrok driver accepts any user
specified configuration, and merely warns for high amounts of traffic.
Local tests successfully communicated 320Mbps. Slow samplerates result
in slow arrival of more sample data, which periodically gets flushed to
improve usability. Thresholds when to start pushing may need tuning.

This implementation was tested with LA2016 and up to 16 channels. Other
devices are untested, especially LA1010 which lacks local memory and
thus exclusively supports streaming, and devices with 32 channels where
capture data memory layout may differ from devices with 16 channels (yet
to get verified).
src/hardware/kingst-la2016/api.c
src/hardware/kingst-la2016/protocol.c
src/hardware/kingst-la2016/protocol.h