]> sigrok.org Git - libsigrok.git/commit - hardware/alsa/api.c
alsa: Scan all soundcards and create a sigrok device per input
authorAlexandru Gagniuc <redacted>
Thu, 20 Dec 2012 19:47:09 +0000 (13:47 -0600)
committerUwe Hermann <redacted>
Mon, 31 Dec 2012 23:37:17 +0000 (00:37 +0100)
commit6944b2d02f23cf562574d3d1b37a2d698bdbde4e
treec56f868b450b80f45b77e5088b656db1c9186770
parent0d6ff1039447c35fa8b423ee02468e62a5064cab
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>
hardware/alsa/api.c
hardware/alsa/protocol.c
hardware/alsa/protocol.h