[alsa-devel] How to name controls
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.
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.
Takashi
On Wed, 5 Sep 2007, Takashi Iwai wrote:
At Mon, 3 Sep 2007 14:46:11 -0700 (PDT), Trent Piepho wrote:
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.
Ok, thanks. The direction is clear when one has audio going to or from an ALSA pcm device, but in the case of a pass-through it's not obvious. I see that the ca0106 driver has a control named "CAPTURE feedback Playback Volume" that works the same way as the cx88 volume control. Since cx88 only has the one control, I'll just name it "Playback Volume".
participants (2)
-
Takashi Iwai
-
Trent Piepho