Skip to contentSkip to conversation

Question about "control names"

DISCUSSION Juergen Beisert 3 participants 4 messages May 23, 2008 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

I'm playing with the control names of my "snd_kcontrol_new" controls. When I'm using "PCM Playback Switch" and "PCM Playback Volume" alsamixer shows me a slider with a switch at its bottom. That's what I expected.
But when I'm using a second set ("line in" to "line out" bypass), with "Line Bypass Capture Switch" and "Line Bypass Capture Volume" control names, its confusing (BTW: "Line Bypass Capture Volume" is of type SNDRV_CTL_ELEM_TYPE_ENUMERATED).

The "Line Bypass Capture Volume" control is shown on the [Playback] page with the name "Line Byp" and the default value. I can walk through the enumerated values. But the "Line Bypass Capture Switch" is shown on the [Capture] page in alsamixer as:

L R
CAPTUR

<Line Byp>

What does it mean? Problem of alsamixer or the name of this set?

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 10 lines · Clemens Ladisch
Quoted 7 lines · Juergen Beisert

I'm playing with the control names of my "snd_kcontrol_new" controls. When I'm using "PCM Playback Switch" and "PCM Playback Volume" alsamixer shows me a slider with a switch at its bottom. That's what I expected. But when I'm using a second set ("line in" to "line out" bypass), with "Line Bypass Capture Switch" and "Line Bypass Capture Volume" control names, its confusing (BTW: "Line Bypass Capture Volume" is of type SNDRV_CTL_ELEM_TYPE_ENUMERATED).

This may be caused by the control type. Why is the volume "enumerated"?

Its not linear. Its defined in dB and has some "holes" in it. When I change it to SNDRV_CTL_ELEM_TYPE_INTEGER I see the slider in the [Capture] screen, and also something at its bottom, but I can't switch anything:

   │▒▒│ 
   │▒▒│ 
   └──┘
  ------
     7

<Line Byp>

This I see in the [Playback] screen now with identical code but "PCM Playback Switch" and "PCM Playback Volume" as control names.

  │  │ 
  ├──┤ 
  │MM│ 
  └──┘ 

0<>0
PCM

If I change the "Line Bypass Capture ..." control names to "CD Playback ..." the control looks like the PCM one above.

Seems "Line Bypass Capture" is something alsamixer can't handle. Is there a better control name for such a feature? I can route "Line In" through a amplifier to "Line Out".

Juergen

Signature · 9 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
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#3 lore raw
Quoted 6 lines · Juergen Beisert
Quoted 4 lines · Clemens Ladisch
Quoted 2 lines · Juergen Beisert

names, its confusing (BTW: "Line Bypass Capture Volume" is of type SNDRV_CTL_ELEM_TYPE_ENUMERATED).

Quoted 6 lines
Quoted 1 line

This may be caused by the control type. Why is the volume "enumerated"?

Its not linear. Its defined in dB and has some "holes" in it. When I change it to SNDRV_CTL_ELEM_TYPE_INTEGER I see the slider in the [Capture] screen, and also something at its bottom, but I can't switch anything:

Couldn't this be covered by providing TLV ranges for it?

#4 lore raw
In reply to Juergen Beisert
Quoted 10 lines · Juergen Beisert
Quoted 9 lines · Clemens Ladisch
Quoted 7 lines · Juergen Beisert

I'm playing with the control names of my "snd_kcontrol_new" controls. When I'm using "PCM Playback Switch" and "PCM Playback Volume" alsamixer shows me a slider with a switch at its bottom. That's what I expected. But when I'm using a second set ("line in" to "line out" bypass), with "Line Bypass Capture Switch" and "Line Bypass Capture Volume" control names, its confusing (BTW: "Line Bypass Capture Volume" is of type SNDRV_CTL_ELEM_TYPE_ENUMERATED).

Quoted 3 lines
Quoted 1 line

This may be caused by the control type. Why is the volume "enumerated"?

Its not linear.

The only requirement for volume slider is that they are somewhat monotonic.

An enumerated control won't be considered a volume slider.

Quoted 1 line

Its defined in dB and has some "holes" in it.

This doesn't matter; this can described, too.

What is the exact mapping?

Quoted 11 lines

When I change it to SNDRV_CTL_ELEM_TYPE_INTEGER I see the slider in the [Capture] screen, and also something at its bottom, but I can't switch anything:

   │▒▒│
   │▒▒│
   └──┘
  ------
     7

<Line Byp>

The "------" indicates that this can be enabled for recording. Doesn't the space key work?

Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel