Commit Graph

1254 Commits

Author SHA1 Message Date
Uwe Hermann 73365eaed0 uni-t-dmm: Expose hwopts. 2013-01-20 19:57:04 +01:00
Uwe Hermann 388f9d3e25 uni-t-dmm: Fix scanning, properly use new sr_usb_find(). 2013-01-20 19:55:33 +01:00
Uwe Hermann 4ebd48b352 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).
2013-01-20 18:48:02 +01:00
Uwe Hermann a978eda2c9 udev: Add UNI-T UT-D04 multimeter cable entry. 2013-01-20 18:47:35 +01:00
Uwe Hermann 7d39e2105f 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.
2013-01-19 21:20:56 +01:00
Uwe Hermann 294245ecf2 README: Document alsa (optional) library. 2013-01-19 19:13:52 +01:00
Uwe Hermann b97cbca6c9 serial.c: OpenBSD doesn't have B460800. 2013-01-19 15:55:22 +01:00
Uwe Hermann 262dd3e47d 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.
2013-01-16 01:31:46 +01:00
Uwe Hermann 3d6de074a4 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().
2013-01-16 00:02:24 +01:00
Bert Vermeulen 6b8d6f93bb 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.
2013-01-15 17:42:23 +01:00
Uwe Hermann bd58d8f3ec Makefile.am: Fix typo in 'ChangeLog' target. 2013-01-14 11:13:58 +01:00
Bert Vermeulen 8a22e8c0ff cosmetics 2013-01-14 00:59:46 +01:00
Bert Vermeulen dbf2482ec1 add --disable-all-drivers option
Can be overridden by driver --enable options to build only those drivers.
2013-01-14 00:52:55 +01:00
Bert Vermeulen 512bb890df rigol-ds1xx2: More selective Rigol DS1xx2 scan
Patch submitted by Martin Ling.
2013-01-13 22:42:21 +01:00
Bert Vermeulen 5635705c83 cleanup of obsolete definition 2013-01-13 18:07:05 +01:00
Bert Vermeulen 18bc270461 sr_session_save(): don't use datastore 2013-01-08 14:14:44 +01:00
Bert Vermeulen 6936ee4206 remove datastore functionality
Keeping a copy of acquired data is up to the frontend, not libsigrok.
2013-01-08 14:14:44 +01:00
Bert Vermeulen 305de92e9d use a dynamically expanding probe list 2013-01-08 14:14:44 +01:00
Alexandru Gagniuc cbc80f8f8a 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 <mr.nuke.me@gmail.com>
2013-01-08 03:44:36 +01:00
Uwe Hermann a24e9d0484 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.
2013-01-08 03:13:45 +01:00
Uwe Hermann 753d722f34 link-mso19: Fix a bunch of compiler warnings. 2013-01-08 03:13:14 +01:00
Uwe Hermann 00b44ccb8b 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.
2013-01-08 03:13:08 +01:00
Uwe Hermann f48cef7897 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 <lelazary@yahoo.com>" since there
were nontrivial changes to those files.
2013-01-08 02:30:40 +01:00
Uwe Hermann 8472ae868e configure.ac: Enable Link Instruments MSO-19.
This driver now compiles again and (partially) seems to work, so enable it.
2013-01-08 01:27:11 +01:00
lelazary eb913174ab Added limit samples Eveything seems to work find up to 1024 samples 2013-01-08 01:00:14 +01:00
lelazary 087a9161ff Rewrote the trigger config. Added trigger position and trigger slope 2013-01-08 01:00:14 +01:00
lelazary 5a24e89ca4 Eveything seems to work now except for triggers. 2013-01-08 01:00:14 +01:00
lelazary 4db2aaffe7 More cleanup. Communication with mso19 is working, but its not triggering. Need to check why. 2013-01-08 01:00:13 +01:00
lelazary 26ddb5baca Added flow control to serial configuration to support xon/xoff for link-mso19 2013-01-08 01:00:13 +01:00
lelazary 4b719338cc Added missing mso functions 2013-01-08 01:00:13 +01:00
lelazary def5c35c4c Removing the old link-mso19 files and changing makefile 2013-01-08 01:00:13 +01:00
lelazary df92e5cf6b Rewrote the link-mso19.c into api and protocol. Still need to test and cleanup some more 2013-01-08 01:00:13 +01:00
Uwe Hermann 26e6ef346d 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.
2013-01-03 19:17:51 +01:00
Uwe Hermann 29d957ceae rigol-ds1xx2: Cosmetics, whitespace. 2013-01-03 19:04:11 +01:00
Martin Ling fb6e5ba8c7 rigol-ds1xx2: Autoprobe for usbtmc devices on Linux. 2013-01-03 18:41:29 +01:00
Martin Ling 4e108ace13 rigol-ds1xx2: Fix setting trigger parameters. 2013-01-03 18:41:29 +01:00
Martin Ling 542843f76f rigol-ds1xx2: Assorted parameter setting fixes. 2013-01-03 18:41:29 +01:00
Martin Ling e0b7d23ce8 rigol-ds1xx2: First working version.
Currently hardcoded to use /dev/usbtmc1. Analog data readout works.
2013-01-03 18:41:29 +01:00
Martin Ling f4816ac6cc rigol-ds1xx2: Initial driver skeleton. 2013-01-03 18:41:28 +01:00
Uwe Hermann aeabd30820 ols: Implement SR_DI_HWOPTS. 2013-01-03 02:15:27 +01:00
Uwe Hermann 986fde755d serial-dmm: Add UNI-T UT61E support (UT-D02 cable). 2013-01-03 01:13:57 +01:00
Uwe Hermann fe0c0b98c6 Add Cyrustek ES51922 DMM chip parser. 2013-01-03 01:13:06 +01:00
Uwe Hermann 21d3d4ee87 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).
2013-01-01 00:37:18 +01:00
Uwe Hermann a1b9a9bf44 alsa: Add missing % for PRIu64. 2013-01-01 00:37:17 +01:00
Uwe Hermann 52ba6e05d5 alsa: Improved error reporting. 2013-01-01 00:37:17 +01:00
Uwe Hermann 721ecf3d97 alsa: Cosmetics, coding style, typos. 2013-01-01 00:37:17 +01:00
Alexandru Gagniuc 65faa197ae 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 <mr.nuke.me@gmail.com>
2013-01-01 00:37:17 +01:00
Alexandru Gagniuc 729850c9e7 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 <mr.nuke.me@gmail.com>
2013-01-01 00:37:17 +01:00
Alexandru Gagniuc 6944b2d02f 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 <mr.nuke.me@gmail.com>
2013-01-01 00:37:17 +01:00
Alexandru Gagniuc 0d6ff10394 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 <mr.nuke.me@gmail.com>
2013-01-01 00:37:17 +01:00