[alsa-devel] hardware-dependent features

Eliot Blennerhassett linux at audioscience.com
Mon Nov 12 23:28:12 CET 2007

I would also advocate using controls...

Daniel Mack wrote:
> Hi Clemens,
> On Nov 12, 2007, at 6:26 PM, Clemens Ladisch wrote:
>> I've used three 'mixer' controls for the three LEDs of the SB Audigy 2
>> NX.  Whether this is a good idea depends on how many LEDs there  
>> are, and
>> how one might want to use them.  Are there LED displays, i.e.,  
>> multiple
>> LEDs in a row?
> Depends. There is one device which has 4 user-assignable LEDs, 

4 boolean controls

$ amixer cset 'Led 3' on

> others have up to >35 LEDs which can be dimmed in 64 steps, yet

Is that 64 steps each, or all together?
(i.e one dim control + 35 booleans, or 35 dim controls)

> another one has 7-segment LED displays.

integer or enumerated control.

> What I would like to achieve is a conventient way of accessing them,
> probably from the command line via some procfs or sysfs manner so
> users can even use scripts to switch them on and off if they like.
>> I think the displays could by controlled by mixer controls of type
>> "bytes".  Usual mixer applications can't handle those, but this is
>> quite hardware dependent anway ...
> But is that really where it belongs to? I would think that LEDs and
> input functions are not related to audio and thus should be handled
> by some other, more appropriate or maybe even proprietary subsystem.

> There are some features which have influcence on the audio
> behaviour since they affect the way the signal is processed, but
> LEDs are certainly not, are they?

I would think of them as "controls" on the device rather than "mixer".
you have options of enumerated, integer, boolean, (or bytes)

In addition you can specify an index as well as a name.

"Led", index=23
or "Led 23"

I'm not sure if you can add controls to an "interface" other than
"MIXER" (ie. "CARD")
Other ALSA devs please answer...


More information about the Alsa-devel mailing list