[alsa-devel] Question about "control names"

Clemens Ladisch clemens at ladisch.de
Fri May 23 14:02:42 CEST 2008


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


More information about the Alsa-devel mailing list