ols: fixed parallel stage triggers

Stage count was always getting incremented one more than
actual stages, and this caused a extra stage with zero'ed data
probe lines to have the start bit field.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
ols: add test mode support

ols allows both external and internal test patterns at ~20khz
which are helpful for unit tests and demos.

pattern=internal -> route pattern internally to all 32 pins
                      (input otherwise disabled)

pattern=external -> generates pattern on unbuffered pins 16:31
                      (which can be looped back to the buffered pins 0:15)

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
ols: add external clock support

Add external clock support that allows you to use the tracing
targets bus clock line for sampling.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
ols: Properly initialize entire single-sample buffer before start

The single sample buffer, up to 4 bytes long, was not getting initialized
on (every) acquisition start, only after the first full sample was in.
This caused the first sample to potentially hold garbage.
ols: Fix RLE count handling

The high bit of the sample, denoting this is a count, was not getting
properly cleared. This resulted in an inevitably negative count, and
corruption of the sample buffer before it was transferred to the
frontend.
ols: Display noise filter flag

Show if noise filter is on. This is important to be
sure is off for demux mode.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
ols: add swap channels feature

Allow channel groups to be swapped. This is useful
for demux at 200mhz with the unbuffered channels.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
ols: combine demux samples

demux mode allows DDR sampling which disables group 2 & 3
and thus samples group 0 & 1 to sample on rising and falling of
the clock.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
rigol-ds1xx2: newer Linux kernels have USBTMC in /sys/class/usbmisc
ols: fixed channel limit check

For demux mode we half the channels. Previous check method broke
the OLS randomly and but it in a bad state.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
output/analog: Support all known MQFLAGs.
serial.c: Drop unneeded <glob.h>.

This is no longer used, and also it is not available on Android and thus
breaks cross-compilation for Android.

Thanks Marcus Comstedt <marcus@mc.pp.se> for reporting.
fs9922: Fix typo.
es51922/fs9721/fs9922/metex14: Use diode MQFLAG.

This fixes #141.
Voltcraft VC-830: Fix diode mode handling.

This DMM is not using the standard bits in the FS9922 protocol/structure
to indicate the "volt" and "diode mode" flags. Instead, it only sets the
user-defined bit "z1" to indicate both "diode mode" and "volt".

This fixes #142.
Properly initialize session
New API function sr_session_dev_list()

This exposes the list of devices added to the session. In the case of
loading a session from file, these struct sr_dev_inst are otherwise
not exposed to the frontend. See bug 145.
proto: Add missing prototype in proto.h

Add missing prototype sr_session_dev_list that was
breaking the Pulseview build.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
configure.ac: Properly use $HW_ENABLED_DEFAULT everywhere.

Otherwise --enable-all-drivers / --disable-all-drivers doesn't work
correctly.
ols: Moved FLAG_FILTER to demux check

Demux mode was having filter mode set which it doesn't
support per FPGA demon core docs.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>