]> sigrok.org Git - libsigrok.git/log
libsigrok.git
11 years agoMade sr_config_list driver argument a const pointer
Joel Holdsworth [Mon, 28 Jan 2013 20:26:37 +0000 (20:26 +0000)]
Made sr_config_list driver argument a const pointer

11 years agoMade sr_config_get driver argument a const pointer
Joel Holdsworth [Mon, 28 Jan 2013 20:25:56 +0000 (20:25 +0000)]
Made sr_config_get driver argument a const pointer

11 years agoserial.c: NetBSD doesn't have OFILL.
Uwe Hermann [Sun, 27 Jan 2013 00:23:01 +0000 (01:23 +0100)]
serial.c: NetBSD doesn't have OFILL.

11 years agoCode cleanup.
Bert Vermeulen [Sat, 26 Jan 2013 00:18:19 +0000 (01:18 +0100)]
Code cleanup.

11 years agoRemove sr_driver_hwcap_exists().
Bert Vermeulen [Fri, 25 Jan 2013 19:41:49 +0000 (20:41 +0100)]
Remove sr_driver_hwcap_exists().

11 years agoRename sr_dev_has_hwcap() to sr_dev_has_option().
Bert Vermeulen [Fri, 25 Jan 2013 15:20:40 +0000 (16:20 +0100)]
Rename sr_dev_has_hwcap() to sr_dev_has_option().

11 years agodrivers: Trim unused config_get() calls
Bert Vermeulen [Fri, 25 Jan 2013 15:05:48 +0000 (16:05 +0100)]
drivers: Trim unused config_get() calls

None of the driver config_get/set/list calls are required.

11 years agoRename sr_info_get() to sr_config_get().
Bert Vermeulen [Fri, 25 Jan 2013 14:48:44 +0000 (15:48 +0100)]
Rename sr_info_get() to sr_config_get().

11 years agoRename sr_dev_config_set() to sr_config_set()
Bert Vermeulen [Fri, 25 Jan 2013 14:38:57 +0000 (15:38 +0100)]
Rename sr_dev_config_set() to sr_config_set()

11 years agoHeader cleanup.
Bert Vermeulen [Fri, 25 Jan 2013 14:16:39 +0000 (15:16 +0100)]
Header cleanup.

11 years agoDeprecate SR_DI_HWOPTS.
Bert Vermeulen [Fri, 25 Jan 2013 14:09:20 +0000 (15:09 +0100)]
Deprecate SR_DI_HWOPTS.

This is replaced by SR_CONF_SCAN_OPTIONS.

11 years agoDeprecate SR_DI_HWCAPS.
Bert Vermeulen [Fri, 25 Jan 2013 14:01:49 +0000 (15:01 +0100)]
Deprecate SR_DI_HWCAPS.

This is replaced by SR_CONF_DEVICE_OPTIONS.

11 years agoDeprecate SR_DI_TRIGGER_TYPES.
Bert Vermeulen [Fri, 25 Jan 2013 10:52:27 +0000 (11:52 +0100)]
Deprecate SR_DI_TRIGGER_TYPES.

This is replaced by SR_CONF_TRIGGER_TYPE.

11 years agoDeprecate SR_DI_TRIGGER_SOURCES.
Bert Vermeulen [Fri, 25 Jan 2013 10:25:32 +0000 (11:25 +0100)]
Deprecate SR_DI_TRIGGER_SOURCES.

This is replaced by SR_CONF_TRIGGER_SOURCE.

11 years agoDeprecate SR_DI_TIMEBASES.
Bert Vermeulen [Fri, 25 Jan 2013 10:22:20 +0000 (11:22 +0100)]
Deprecate SR_DI_TIMEBASES.

This is replaced by SR_CONF_TIMEBASE.

11 years agoDeprecate SR_DI_FILTERS.
Bert Vermeulen [Fri, 25 Jan 2013 10:19:12 +0000 (11:19 +0100)]
Deprecate SR_DI_FILTERS.

This is replaced by SR_CONF_FILTER.

11 years agoDeprecate SR_DI_VDIVS.
Bert Vermeulen [Fri, 25 Jan 2013 10:13:49 +0000 (11:13 +0100)]
Deprecate SR_DI_VDIVS.

This is replaced by SR_CONF_VDIV.

11 years agoDeprecate SR_DI_COUPLING.
Bert Vermeulen [Fri, 25 Jan 2013 10:04:27 +0000 (11:04 +0100)]
Deprecate SR_DI_COUPLING.

This is replaced by SR_CONF_COUPLING.

11 years agoDeprecate SR_DI_BUFFERSIZES.
Bert Vermeulen [Fri, 25 Jan 2013 09:58:37 +0000 (10:58 +0100)]
Deprecate SR_DI_BUFFERSIZES.

This is replaced by SR_CONF_BUFFERSIZE.

11 years agoDeprecate SR_DI_PATTERNS.
Bert Vermeulen [Fri, 25 Jan 2013 02:38:44 +0000 (03:38 +0100)]
Deprecate SR_DI_PATTERNS.

This is replaced by SR_CONF_PATTERN_MODE.

11 years agoDeprecate SR_DI_CUR_SAMPLERATE.
Bert Vermeulen [Fri, 25 Jan 2013 02:17:36 +0000 (03:17 +0100)]
Deprecate SR_DI_CUR_SAMPLERATE.

This is replaced by SR_CONF_SAMPLERATE.

11 years agodeprecate SR_DI_SAMPLERATES
Bert Vermeulen [Fri, 25 Jan 2013 01:39:58 +0000 (02:39 +0100)]
deprecate SR_DI_SAMPLERATES

This is replaced by a call to config_list() with id SR_CONF_SAMPLERATE.

11 years agodrivers: implement config_list()
Bert Vermeulen [Fri, 25 Jan 2013 01:32:05 +0000 (02:32 +0100)]
drivers: implement config_list()

11 years agoNew driver API function: config_list()
Bert Vermeulen [Fri, 25 Jan 2013 00:24:42 +0000 (01:24 +0100)]
New driver API function: config_list()

This takes an sr_config key and returns a list of possible values for
that key to be submitted with config_set(). The format of the list and
its contents is dependent on the key.

This will replace the SR_DI_* keys that returned such a list before,
such as SR_DI_SAMPLERATES.

11 years agodrivers: rename and reorganize config get/set
Bert Vermeulen [Thu, 24 Jan 2013 18:19:09 +0000 (19:19 +0100)]
drivers: rename and reorganize config get/set

The driver API calls info_get() and dev_config_set() have been renamed
to config_get() and config_set(), respectively.

11 years agoAlways interleave analog data with all enabled probes.
Bert Vermeulen [Wed, 23 Jan 2013 02:40:44 +0000 (03:40 +0100)]
Always interleave analog data with all enabled probes.

The new "probes" field in sr_datafeed_analog contains a copy
of all enabled struct sr_probe.

11 years agoserial: more serial processing flags to turn off
Bert Vermeulen [Wed, 23 Jan 2013 01:32:58 +0000 (02:32 +0100)]
serial: more serial processing flags to turn off

11 years agoHeader cleanup: remove unused structs.
Bert Vermeulen [Tue, 22 Jan 2013 10:18:18 +0000 (11:18 +0100)]
Header cleanup: remove unused structs.

11 years agouni-t-dmm: use new sr_config struct
Bert Vermeulen [Mon, 21 Jan 2013 22:40:09 +0000 (23:40 +0100)]
uni-t-dmm: use new sr_config struct

11 years agoRename SR_HWOPT_* and SR_HWCAP_* to SR_CONF_*
Bert Vermeulen [Mon, 21 Jan 2013 22:22:47 +0000 (23:22 +0100)]
Rename SR_HWOPT_* and SR_HWCAP_* to SR_CONF_*

11 years agoUnify all SR_HWOPT_* and SR_HWCAP_* enums.
Bert Vermeulen [Mon, 21 Jan 2013 20:58:19 +0000 (21:58 +0100)]
Unify all SR_HWOPT_* and SR_HWCAP_* enums.

Only two functions remain for accessing meta info on the keys:
sr_config_info_get() and sr_config_info_name_get().

11 years agoNo need to send a metapacket when loading a sigrok file.
Bert Vermeulen [Sun, 20 Jan 2013 15:38:28 +0000 (16:38 +0100)]
No need to send a metapacket when loading a sigrok file.

11 years agoAdjust session debugging to the new SR_DF_META packets.
Bert Vermeulen [Sun, 20 Jan 2013 15:37:23 +0000 (16:37 +0100)]
Adjust session debugging to the new SR_DF_META packets.

11 years agoDeprecate SR_HWOPT_MODEL
Bert Vermeulen [Sun, 20 Jan 2013 15:36:35 +0000 (16:36 +0100)]
Deprecate SR_HWOPT_MODEL

This was only ever used for the defunct genericdmm driver.

11 years agoUse new struct sr_config_info for option metadata
Bert Vermeulen [Sun, 20 Jan 2013 15:35:25 +0000 (16:35 +0100)]
Use new struct sr_config_info for option metadata

11 years agoAdd small helper for creating struct sr_config
Bert Vermeulen [Sun, 20 Jan 2013 15:34:38 +0000 (16:34 +0100)]
Add small helper for creating struct sr_config

11 years agoAdjust option helpers to new sr_config struct
Bert Vermeulen [Sun, 20 Jan 2013 15:33:24 +0000 (16:33 +0100)]
Adjust option helpers to new sr_config struct

11 years agoUse new SR_DF_META packet.
Bert Vermeulen [Sun, 20 Jan 2013 14:45:09 +0000 (15:45 +0100)]
Use new SR_DF_META packet.

Since input modules determine a samplerate by reading from their
file format (or having it overridden with an option), they need
to pass this up to the frontend.

11 years agofree USB config descriptor after use
Bert Vermeulen [Sat, 19 Jan 2013 12:20:34 +0000 (13:20 +0100)]
free USB config descriptor after use

11 years agodrivers: use new sr_config struct
Bert Vermeulen [Sun, 6 Jan 2013 16:41:30 +0000 (17:41 +0100)]
drivers: use new sr_config struct

Sending an SR_DF_META packet at the start of every stream is not
mandatory; the frontend should ask for what it needs, and any extra
information the driver wants to send will come in due time.

11 years agounify sr_datafeed_meta_* into one struct containing sr_config
Bert Vermeulen [Sun, 6 Jan 2013 15:37:41 +0000 (16:37 +0100)]
unify sr_datafeed_meta_* into one struct containing sr_config

struct sr_config is the new name for sr_hwopt. Its companion meta
struct, sr_hwcap_option, was renamed sr_config_info.

11 years agoserial.c: Fix copy-paste error.
Uwe Hermann [Mon, 21 Jan 2013 00:47:30 +0000 (01:47 +0100)]
serial.c: Fix copy-paste error.

Thanks Bert Vermeulen for reporting.

11 years agouni-t-dmm: Quickfix for UNI-T UT61D.
Uwe Hermann [Mon, 21 Jan 2013 00:45:02 +0000 (01:45 +0100)]
uni-t-dmm: Quickfix for UNI-T UT61D.

This is a temporary fix only, since a major rework of uni-t-dmm is being
done at the moment, soon to be merged.

11 years agoAdd missing "ULL" suffixes.
Uwe Hermann [Sat, 19 Jan 2013 21:00:39 +0000 (22:00 +0100)]
Add missing "ULL" suffixes.

These numbers are larger than 32bit, mark them as ULL to avoid compile
failures on 32bit systems.

11 years agouni-t-dmm: Expose hwopts.
Uwe Hermann [Sun, 20 Jan 2013 18:57:04 +0000 (19:57 +0100)]
uni-t-dmm: Expose hwopts.

11 years agouni-t-dmm: Fix scanning, properly use new sr_usb_find().
Uwe Hermann [Sun, 20 Jan 2013 18:55:33 +0000 (19:55 +0100)]
uni-t-dmm: Fix scanning, properly use new sr_usb_find().

11 years agoRemove non-error hw_info_get() messages.
Uwe Hermann [Sun, 20 Jan 2013 17:48:02 +0000 (18:48 +0100)]
Remove non-error hw_info_get() messages.

Currently hw_info_get() can receive requests for entries (info_id) that
the specific driver doesn't support. That is (right now) a valid
use-case and not an error (might change later, though).

Thus, for now, don't output messages for such requests at all (certainly
not as sr_err() where they show up in e.g. sigrok-cli output per default).

11 years agoudev: Add UNI-T UT-D04 multimeter cable entry.
Uwe Hermann [Sun, 20 Jan 2013 17:47:35 +0000 (18:47 +0100)]
udev: Add UNI-T UT-D04 multimeter cable entry.

11 years agoconfigure.ac: Drop AC_PROG_CXX.
Uwe Hermann [Sat, 19 Jan 2013 20:20:56 +0000 (21:20 +0100)]
configure.ac: Drop AC_PROG_CXX.

We don't need a C++ compiler for libsigrok, so don't check for one.

This would cause a build failure on all systems where there is a C compiler
but no C++ compiler installed.

11 years agoREADME: Document alsa (optional) library.
Uwe Hermann [Sat, 19 Jan 2013 18:13:52 +0000 (19:13 +0100)]
README: Document alsa (optional) library.

11 years agoserial.c: OpenBSD doesn't have B460800.
Uwe Hermann [Sat, 19 Jan 2013 14:55:22 +0000 (15:55 +0100)]
serial.c: OpenBSD doesn't have B460800.

11 years agoconfigure.ac: Drop gthread check, no longer used.
Uwe Hermann [Wed, 16 Jan 2013 00:31:46 +0000 (01:31 +0100)]
configure.ac: Drop gthread check, no longer used.

We no longer use gthread (its only user was the 'demo' driver), so drop
the 'configure' check for it.

The libsigrok.pc pkg-config file is still correct, since the 'configure'
result propagates there automatically.

11 years agoalsa: Silence ALSA scanning process.
Uwe Hermann [Tue, 15 Jan 2013 23:02:24 +0000 (00:02 +0100)]
alsa: Silence ALSA scanning process.

Errors while opening or configuring ALSA devices during scan for devices
should not be shown by default (i.e., no sr_err() usage). Non-working
or non-accessible devices (due to permissions or other reasons) will
simply not show up in frontends. Use sr_dbg() instead of sr_err().

11 years agoGet rid of obsolete SR_DI_NUM_PROBES and SR_DI_PROBE_NAMES.
Bert Vermeulen [Tue, 15 Jan 2013 16:20:57 +0000 (17:20 +0100)]
Get rid of obsolete SR_DI_NUM_PROBES and SR_DI_PROBE_NAMES.

Frontends should use the probe list in the device's sr_dev_inst
to get this information.

11 years agoMakefile.am: Fix typo in 'ChangeLog' target.
Uwe Hermann [Mon, 14 Jan 2013 10:13:58 +0000 (11:13 +0100)]
Makefile.am: Fix typo in 'ChangeLog' target.

11 years agocosmetics
Bert Vermeulen [Sun, 13 Jan 2013 23:59:46 +0000 (00:59 +0100)]
cosmetics

11 years agoadd --disable-all-drivers option
Bert Vermeulen [Sun, 13 Jan 2013 23:52:55 +0000 (00:52 +0100)]
add --disable-all-drivers option

Can be overridden by driver --enable options to build only those drivers.

11 years agorigol-ds1xx2: More selective Rigol DS1xx2 scan
Bert Vermeulen [Sun, 13 Jan 2013 21:42:21 +0000 (22:42 +0100)]
rigol-ds1xx2: More selective Rigol DS1xx2 scan

Patch submitted by Martin Ling.

11 years agocleanup of obsolete definition
Bert Vermeulen [Sun, 13 Jan 2013 17:07:05 +0000 (18:07 +0100)]
cleanup of obsolete definition

11 years agosr_session_save(): don't use datastore
Bert Vermeulen [Tue, 8 Jan 2013 01:51:03 +0000 (02:51 +0100)]
sr_session_save(): don't use datastore

11 years agoremove datastore functionality
Bert Vermeulen [Mon, 7 Jan 2013 01:10:33 +0000 (02:10 +0100)]
remove datastore functionality

Keeping a copy of acquired data is up to the frontend, not libsigrok.

11 years agouse a dynamically expanding probe list
Bert Vermeulen [Mon, 7 Jan 2013 00:52:02 +0000 (01:52 +0100)]
use a dynamically expanding probe list

11 years agofx2lafw: Say if chip is old FX2 or FX2LP
Alexandru Gagniuc [Sun, 6 Jan 2013 15:31:30 +0000 (09:31 -0600)]
fx2lafw: Say if chip is old FX2 or FX2LP

Look at the extracted REVID, and print out if it is an FX2 (non-LP), or FX2LP.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agolink-mso19: Use more portable g_htons().
Uwe Hermann [Tue, 8 Jan 2013 02:12:01 +0000 (03:12 +0100)]
link-mso19: Use more portable g_htons().

Not all systems provide <arpa/inet.h> and/or htons(). Use portable and
always available g_htons() from glib instead.

11 years agolink-mso19: Fix a bunch of compiler warnings.
Uwe Hermann [Tue, 8 Jan 2013 02:02:53 +0000 (03:02 +0100)]
link-mso19: Fix a bunch of compiler warnings.

11 years agolink-mso19: Fix white-space, cosmetics, coding-style.
Uwe Hermann [Tue, 8 Jan 2013 01:48:49 +0000 (02:48 +0100)]
link-mso19: Fix white-space, cosmetics, coding-style.

Fix the bare minumum of whitespace/indentation/coding-style via
automatic 'indent' run, followed by some minor manual fixes.
Some more fixes and cleanups might follow later.

11 years agolink-mso19: Fix (C) lines.
Uwe Hermann [Tue, 8 Jan 2013 01:30:40 +0000 (02:30 +0100)]
link-mso19: Fix (C) lines.

Bring back the original (C) lines from before the split into api.c
and protocol.[ch].

Add "Copyright (C) 2013 Lior Elazary <redacted>" since there
were nontrivial changes to those files.

11 years agoconfigure.ac: Enable Link Instruments MSO-19.
Uwe Hermann [Tue, 8 Jan 2013 00:27:11 +0000 (01:27 +0100)]
configure.ac: Enable Link Instruments MSO-19.

This driver now compiles again and (partially) seems to work, so enable it.

11 years agoAdded limit samples Eveything seems to work find up to 1024 samples
lelazary [Mon, 7 Jan 2013 15:49:31 +0000 (07:49 -0800)]
Added limit samples Eveything seems to work find up to 1024 samples

11 years agoRewrote the trigger config. Added trigger position and trigger slope
lelazary [Sun, 6 Jan 2013 17:46:01 +0000 (09:46 -0800)]
Rewrote the trigger config. Added trigger position and trigger slope

11 years agoEveything seems to work now except for triggers.
lelazary [Sun, 6 Jan 2013 02:12:45 +0000 (18:12 -0800)]
Eveything seems to work now except for triggers.

11 years agoMore cleanup. Communication with mso19 is working, but its not triggering. Need to...
lelazary [Sat, 5 Jan 2013 17:29:00 +0000 (09:29 -0800)]
More cleanup. Communication with mso19 is working, but its not triggering. Need to check why.

11 years agoAdded flow control to serial configuration to support xon/xoff for link-mso19
lelazary [Sat, 5 Jan 2013 17:00:52 +0000 (09:00 -0800)]
Added flow control to serial configuration to support xon/xoff for link-mso19

11 years agoAdded missing mso functions
lelazary [Sat, 5 Jan 2013 01:22:15 +0000 (17:22 -0800)]
Added missing mso functions

11 years agoRemoving the old link-mso19 files and changing makefile
lelazary [Sat, 5 Jan 2013 01:05:17 +0000 (17:05 -0800)]
Removing the old link-mso19 files and changing makefile

11 years agoRewrote the link-mso19.c into api and protocol. Still need to test and cleanup some...
lelazary [Sat, 5 Jan 2013 01:03:20 +0000 (17:03 -0800)]
Rewrote the link-mso19.c into api and protocol. Still need to test and cleanup some more

11 years agoAdd gnuplot_rigol_ds1xx2.gpi gnuplot script.
Uwe Hermann [Thu, 3 Jan 2013 18:17:51 +0000 (19:17 +0100)]
Add gnuplot_rigol_ds1xx2.gpi gnuplot script.

This is a very simple gnuplot script for testing the Rigol DS1xx2 driver.
It currently has various issues and limitations (e.g. only one channel
is displayed, the scaling is not usable, and so on) to be fixed later.

11 years agorigol-ds1xx2: Cosmetics, whitespace.
Uwe Hermann [Thu, 3 Jan 2013 18:04:11 +0000 (19:04 +0100)]
rigol-ds1xx2: Cosmetics, whitespace.

11 years agorigol-ds1xx2: Autoprobe for usbtmc devices on Linux.
Martin Ling [Sun, 30 Dec 2012 14:29:00 +0000 (15:29 +0100)]
rigol-ds1xx2: Autoprobe for usbtmc devices on Linux.

11 years agorigol-ds1xx2: Fix setting trigger parameters.
Martin Ling [Sun, 30 Dec 2012 13:17:08 +0000 (14:17 +0100)]
rigol-ds1xx2: Fix setting trigger parameters.

11 years agorigol-ds1xx2: Assorted parameter setting fixes.
Martin Ling [Sun, 30 Dec 2012 13:06:58 +0000 (14:06 +0100)]
rigol-ds1xx2: Assorted parameter setting fixes.

11 years agorigol-ds1xx2: First working version.
Martin Ling [Sun, 30 Dec 2012 03:17:56 +0000 (04:17 +0100)]
rigol-ds1xx2: First working version.

Currently hardcoded to use /dev/usbtmc1. Analog data readout works.

11 years agorigol-ds1xx2: Initial driver skeleton.
Martin Ling [Sat, 29 Dec 2012 21:22:10 +0000 (22:22 +0100)]
rigol-ds1xx2: Initial driver skeleton.

11 years agools: Implement SR_DI_HWOPTS.
Uwe Hermann [Thu, 3 Jan 2013 01:15:27 +0000 (02:15 +0100)]
ols: Implement SR_DI_HWOPTS.

11 years agoserial-dmm: Add UNI-T UT61E support (UT-D02 cable).
Uwe Hermann [Wed, 26 Dec 2012 00:53:50 +0000 (01:53 +0100)]
serial-dmm: Add UNI-T UT61E support (UT-D02 cable).

11 years agoAdd Cyrustek ES51922 DMM chip parser.
Uwe Hermann [Wed, 7 Nov 2012 18:10:36 +0000 (19:10 +0100)]
Add Cyrustek ES51922 DMM chip parser.

11 years agoalsa: Add some more samplerates.
Uwe Hermann [Mon, 31 Dec 2012 23:33:05 +0000 (00:33 +0100)]
alsa: Add some more samplerates.

Add some more samplerates that seem to be supported by some devices
(found via random grepping of alsa and kernel sources).

11 years agoalsa: Add missing % for PRIu64.
Uwe Hermann [Mon, 31 Dec 2012 22:31:48 +0000 (23:31 +0100)]
alsa: Add missing % for PRIu64.

11 years agoalsa: Improved error reporting.
Uwe Hermann [Mon, 31 Dec 2012 22:31:31 +0000 (23:31 +0100)]
alsa: Improved error reporting.

11 years agoalsa: Cosmetics, coding style, typos.
Uwe Hermann [Mon, 31 Dec 2012 21:54:17 +0000 (22:54 +0100)]
alsa: Cosmetics, coding style, typos.

11 years agoalsa: Find supported samplerates during device scan
Alexandru Gagniuc [Wed, 26 Dec 2012 18:11:33 +0000 (12:11 -0600)]
alsa: Find supported samplerates during device scan

Since we are using the 'hw' interface of ALSA, we don't have the luxury of
samplerate conversion, given by the 'plughw' interface. If we try to set a
samplerate that is not supported, ALSA will just throw an error.

We can test for the supported samplerates, and create a list of supported
samplerates, then limit the selection to only those values. The frontend can
query the list of supported samplerates.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoalsa: Fix sample acquisition and send normalized values
Alexandru Gagniuc [Sun, 23 Dec 2012 18:57:37 +0000 (12:57 -0600)]
alsa: Fix sample acquisition and send normalized values

The alsa driver requested signed 16-bit integers from ALSA, but casted them to
to an unsigned 16bit before finally casting them to a float. The end result was
that half of the wave would be clipped off.
We also requested data in little endian format. ALSA can be instructed to send
data with the correct endianness for the platform, without needing to worry
about what that is.

This patch attempts three points, which, together, fix the acquisition:
1) Request data from ALSA without specifying endianness; ALSA will handle the
endianness.
2) Simplify the int16_t to float loop by using straightforward indexes.
3) Normalize every value before sending it on the session bus.

NOTE: If testing with PulseView, it will appear as if sigrok is sending all
zeroes. sigrok is sending correct data, but since the data is normalized,
PulseView will incorrectly plot it as a straight line.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoalsa: Scan all soundcards and create a sigrok device per input
Alexandru Gagniuc [Thu, 20 Dec 2012 19:47:09 +0000 (13:47 -0600)]
alsa: Scan all soundcards and create a sigrok device per input

The alsa driver only works with device "default". This limits the driver's
scope to whatever device ALSA deems to be "default". It is desirable to have
access to all ALSA devices from sigrok.

Change the alsa device scan so that:
Each alsa device (not alsa card) gets its own sigrok device
For example,
    hw:1,0 == sigrok device 0
    hw:1,1 == sigrok device 1
    hw:2,0 == sigrok device 2
    hw:2,1 == sigrok device 3
    hw:2,2 == sigrok device 4
    [...]

We don't currently look at alsa subdevices. We only use subdevice 0.
Every input device will have its own channels (left, right, etc). Each of
those channels gets mapped to a different sigrok probe. A device with 4
channels will have 4 probes from sigrok's perspective.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoalsa: Do not use snd_pcm_hw_params_set_rate_near()
Alexandru Gagniuc [Thu, 27 Dec 2012 02:14:54 +0000 (20:14 -0600)]
alsa: Do not use snd_pcm_hw_params_set_rate_near()

snd_pcm_hw_params_set_rate_near() will try to use the samplerate closest to the
given value, potentially starting the acquisition with a different samplerate
than the one specified.

Instead, use snd_pcm_hw_params_set_rate(). It will return an error if the
samplerate is not supported by the hardware, which is arguably better than
collecting data with a different samplerate than the one specified.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agors9lcd: Add missing 'break;'
Alexandru Gagniuc [Mon, 31 Dec 2012 21:14:49 +0000 (15:14 -0600)]
rs9lcd: Add missing 'break;'

A break was missing for "case MODE_AMP_WIDTH:" in sr_rs9lcd_parse().

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoasix-sigma: Fix two compiler warnings.
Uwe Hermann [Mon, 31 Dec 2012 20:21:39 +0000 (21:21 +0100)]
asix-sigma: Fix two compiler warnings.

asix-sigma.c:648:9: warning: 'ret' may be used uninitialized in this
function [-Wmaybe-uninitialized]

asix-sigma.c:1337:20: warning: 'triggerselect' may be used uninitialized
in this function [-Wmaybe-uninitialized]

11 years agosession: Fix compiler warning.
Uwe Hermann [Mon, 31 Dec 2012 20:05:11 +0000 (21:05 +0100)]
session: Fix compiler warning.

session.c:258:6: warning: 'ret' may be used uninitialized in this
function [-Wmaybe-uninitialized]

11 years agovictor-dmm: Fix compiler warning.
Uwe Hermann [Mon, 31 Dec 2012 20:03:45 +0000 (21:03 +0100)]
victor-dmm: Fix compiler warning.

protocol.c:106:10: warning: 'factor' may be used uninitialized in this
function [-Wmaybe-uninitialized]

11 years agonexus-osciprime: Fix compiler warning.
Uwe Hermann [Mon, 31 Dec 2012 20:02:14 +0000 (21:02 +0100)]
nexus-osciprime: Fix compiler warning.

protocol.c:26:46: warning: unused parameter 'fd' [-Wunused-parameter]

11 years agouni-t-dmm: Fix compiler warning.
Uwe Hermann [Mon, 31 Dec 2012 20:01:53 +0000 (21:01 +0100)]
uni-t-dmm: Fix compiler warning.

protocol.c:84:5: warning: 'ret' may be used uninitialized in this
function [-Wmaybe-uninitialized]