Skip to contentSkip to conversation

Names for ALSA controls

DISCUSSION Juergen Beisert 2 participants 3 messages Jun 12, 2008 – Jun 13, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

when I register these mixer controls:

Line Playback Switch
Line Playback Route
Mono Playback Switch
Mono Playback Route
Phone Playback Switch
Phone Playback Route
Headphone Playback Switch
Headphone Playback Route
PCM Playback Switch
PCM Playback Volume
Line Bypass Capture Switch
Line Bypass Capture Volume
ADC Capture Route

Running "alsamixer" fails with:

ALSA lib simple_none.c:1218:(simple_add1) helem (MIXER,'Headphone Playback Switch',0,0,0) appears twice or more

It seems there are restrictions what kind of control name I can use for each control, but what restrictions? Are there better names for my output amplifiers? Each of it I can enable/disable (-> Switch) and select a source (-> Route) independently.

Regards,
Juergen

Signature · 5 lines
Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
    Handelsregister: Amtsgericht Hildesheim, HRA 2686
         Vertretung Sued/Muenchen, Germany
   Phone: +49-8766-939 228 |  Fax: +49-5121-206917-9
#1 lore raw

At Thu, 12 Jun 2008 11:58:19 +0200,

Quoted 19 lines · Juergen Beisert

Hi,

when I register these mixer controls:

Line Playback Switch
Line Playback Route
Mono Playback Switch
Mono Playback Route
Phone Playback Switch
Phone Playback Route
Headphone Playback Switch
Headphone Playback Route
PCM Playback Switch
PCM Playback Volume
Line Bypass Capture Switch
Line Bypass Capture Volume
ADC Capture Route

Quoted 8 lines

Running "alsamixer" fails with:

ALSA lib simple_none.c:1218:(simple_add1) helem (MIXER,'Headphone Playback Switch',0,0,0) appears twice or more

It seems there are restrictions what kind of control name I can use for each control, but what restrictions? Are there better names for my output amplifiers? Each of it I can enable/disable (-> Switch) and select a source (-> Route) independently.

You can use "xxx Source" instead of "xxx Route", I guess, as a workaround.

Takashi

#2 lore raw
Quoted 25 lines · Takashi Iwai

At Thu, 12 Jun 2008 11:58:19 +0200,

Quoted 23 lines · Juergen Beisert

Hi,

when I register these mixer controls:

Line Playback Switch
Line Playback Route
Mono Playback Switch
Mono Playback Route
Phone Playback Switch
Phone Playback Route
Headphone Playback Switch
Headphone Playback Route
PCM Playback Switch
PCM Playback Volume
Line Bypass Capture Switch
Line Bypass Capture Volume
ADC Capture Route

Running "alsamixer" fails with:

ALSA lib simple_none.c:1218:(simple_add1) helem (MIXER,'Headphone
Playback Switch',0,0,0) appears twice or more

Quoted 7 lines
Quoted 4 lines

It seems there are restrictions what kind of control name I can use for each control, but what restrictions? Are there better names for my output amplifiers? Each of it I can enable/disable (-> Switch) and select a source (-> Route) independently.

You can use "xxx Source" instead of "xxx Route", I guess, as a workaround.

I changed my controls to a single enumerated type instead of a switch and route. Now with shown words like "Off", "Source1", "Source2" its easier to understand, what this control does. Thanks for your hint.

Juergen

Signature · 5 lines
Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
    Handelsregister: Amtsgericht Hildesheim, HRA 2686
         Vertretung Sued/Muenchen, Germany
   Phone: +49-8766-939 228 |  Fax: +49-5121-206917-9