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).