Re: [alsa-devel] Question about "control names"
On Friday 23 May 2008 11:36, Clemens Ladisch wrote:
Juergen Beisert wrote:
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
On Fri, May 23, 2008 at 12:01:41PM +0200, Juergen Beisert wrote:
On Friday 23 May 2008 11:36, Clemens Ladisch wrote:
Juergen Beisert wrote:
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:
Couldn't this be covered by providing TLV ranges for it?
Juergen Beisert wrote:
On Friday 23 May 2008 11:36, Clemens Ladisch wrote:
Juergen Beisert wrote:
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.
The only requirement for volume slider is that they are somewhat monotonic.
An enumerated control won't be considered a volume slider.
Its defined in dB and has some "holes" in it.
This doesn't matter; this can described, too.
What is the exact mapping?
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
participants (3)
-
Clemens Ladisch
-
Juergen Beisert
-
Mark Brown