[alsa-devel] How to name controls

Takashi Iwai tiwai at suse.de
Wed Sep 5 15:39:02 CEST 2007

At Mon, 3 Sep 2007 14:46:11 -0700 (PDT),
Trent Piepho wrote:
> I'm trying to improve the audio controls for the cx88-alsa driver, but I'm
> not sure what names I'm supposed to use.
> Currently, the driver has a single control called "Capture Volume", but it
> doesn't adjust the volume of the captured audio, so I don't think this name
> is correct.
> The audio routing looks something like this.  Keep in mind that this is a
> TV capture chip and the drviers only support audio capture, not playback.
> Analog In       Source Mute
>  VV                  V
>  ||                  |
>  ||     o-----o      |
>  ||     |     |    ----
>  \`=====| ADC |----|  |---+------------------------> Audio DMA
>         |     |    ----   |
>         o-----o           |
>                         -----
>   Digital Volume________\   /
>                          \ /
>                           V           o-----o
>                           |    ----   |     |
>                           \----|  |---| DAC |======> Analog Out
>                                ----   |     |
>   DAC Mute-----------------------^    o-----o
> Basically, there is an analog input (from the TV tuner), and a line out.
> The analog input goes through ADC -> DAC steps and then to the line out.
> There are three controls, one volume and two mute switches.  One switch
> causes the source to be muted, the other only mutes the line out.  The
> volume only controls the line out.
> So what should I call these controls?  Do I call the volume "Playback
> Volume"?  The chip doesn't support playback, so that seems confusing.  It's
> more like "Pass-through Volume", but that's not an option.  And what do I
> call the source mute switch?  "Capture Switch"?  That doesn't seem quite
> right either, since it doesn't just mute capture, but also mutes the
> pass-through audio.

Basically "Capture" and "Playback" in the control element names just
indicate the direction rather than the functionality.  The analog-loop
back is handled usually "XXX Playback Volume" in many drivers/codecs.
Hence I think it's fine with "Playback Volume" in this case.

The "Capture Volume" and "Capture Switch" are difficult in this case.
They are for both playback and capture indeed.

In general, you can choose any name for mixer elements, thus "TV Input
Volume" or whatever can be used.  The only problem would be that such
a name isn't mapped to the OSS-emulation code automatically.

I think normal "Capture Volume" would be acceptable in the end.  It
doesn't strictly match with the function of the name, but at least
it's a so common name that most apps (including mixer) support it.
This must be the biggest advantage.


More information about the Alsa-devel mailing list