Re: [RFC] Standard for Multichannel Mixer Control Names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Sat, 17 Mar 2007 17:51:54 -0400,
Randy Cushman wrote:
> 
> In an exchange with Takashi regarding my proposal for changing some 
> mixer control names, he recommended that I start a thread in attempt to 
> reach consensus regarding a convention/standard for mixer control names 
> in ALSA.
> 
> My name-changing effort was complicated by the fact that, as Takashi put 
> it:  "Many apps assume either 'Master' or 'PCM' mixer exists."
> 
> (Background:  The only multichannel audio adapter to which I have access 
> for testing is an Analog Devices AD1986A CODEC attached to an AC '97 
> chipset on a motherboard.)
> 
> In desiring to rename controls, I assumed that the AC '97 multichannel 
> driver control names represented an ALSA standard.  Actually I don't 
> know how other drivers name their multichannel controls.  (The AC '97 
> driver generically uses "Master" playback to control the front channel 
> pin attenuation, and "PCM" playback to control multichannel DAC levels 
> into the mixer.  "Surround", "Center" and "LFE" playback controls adjust 
> pin attenuation for the respective channels.)
> 
> The AD1986/AD1986A CODECs are at variance with the AC '97 standard, 
> causing "Master" playback to control pin attenuation for all channels, 
> "PCM" playback to control only the front channel DAC levels, and 
> "Surround", "Center" and "LFE" playback controls to affect DAC levels 
> for their respective channels.  Hence my original reasoning that these 
> control names are inappropriate.
> 
> (Other AD AC '97 multichannel CODECs are even less intuitive regarding 
> their control usage, but in the interest of brevity I'll save that 
> discussion for later.)

Yes.

> Questions:
> 
> What is the function of playback controls "Master" and "PCM" for 
> multichannel CODECs driven by modules other than snd_ac97_codec?  Which 
> control controls the front channels only, and which controls all 
> channels?  What is the function of playback controls with names such as 
> "Surround", "Center", and "LFE"?

In the common sense, "Master" should influence on output volumes of
_all_ channels.  Similarly, "PCM" should influence on output of PCM
(no loopback) of all channels.

The cause of the current evilness started from the AC97 definition in
the later revision.  It keeps the Master register only for the front
output.  Meanwhile the AD introduced its own mode so that MASTER
controls all channels, and the confusion is deeper.

(IIRC, "PCM" is applied to all channels even on normal AC97 mode,
right?)

> Does ALSA need to standardize mixer control names, or should we continue 
> to use whatever names are convenient for a given chipset/CODEC?  What 
> standard should we use?

IMO, the current behavior ("Master" only affects front) is buggy.
A master is a master is a master.  It should be fixed in the end.
Of course, we'll have compatibility problem once if it gets fixed, but
THIS is a real fix, so let it be so.

In summary:

The master volume control
	Master

The surround volume controls (optional)
	Front
	Surround
	Center
	LFE
	Side

Another volume output (optional)
	Headphone	(should be dependent on master, too?)

The master PCM volume control
	PCM

The PCM surround volume controls (optional)
	PCM Front
	PCM Surround
	PCM Center
	PCM LFE
	PCM Side

If anything is missing, please add here.


Now, a bit deep thought related with messy hardware details.

In the case of native AC97 behavior, both cases would require a
virtual volume/switch.  That is, in addition to "Master" (which is a
virtual one), we'll have "Front", "Headphone", "Surround", "Center"
and "LFE".  Then the register 0x02 will be a clipped value of "Master"
+ "Front".

In the case of AD-mode, we'll have no "Front".  So either 0x02 or 0x04
can be "Master" / "Headphone".  (Which register is used can be
adjusted via ac97_quirk, too.)

So far so good.  But, there are hardwares that have no output volume
controls.  How should we handle?  Creating alsa-lib softvol mixer?
(Currently, "PCM" is created as a softvol element.)

The similar question goes to PCM.  Is it mandatory?


Another question is how to implement this.

1. Fix in the driver level
2. Fix in the alsa-lib level

Well, this can be decided later...


Any comments welcome.


Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux