All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Standard for Multichannel Mixer Control Names
@ 2007-03-17 21:51 Randy Cushman
  2007-03-19 14:38 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Cushman @ 2007-03-17 21:51 UTC (permalink / raw)
  To: alsa-devel

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.)

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"?

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?

Randy Cushman



-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] Standard for Multichannel Mixer Control Names
  2007-03-17 21:51 [RFC] Standard for Multichannel Mixer Control Names Randy Cushman
@ 2007-03-19 14:38 ` Takashi Iwai
  2007-03-19 15:22   ` Fons Adriaensen
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2007-03-19 14:38 UTC (permalink / raw)
  To: Randy Cushman; +Cc: alsa-devel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] Standard for Multichannel Mixer Control Names
  2007-03-19 15:22   ` Fons Adriaensen
@ 2007-03-19 15:20     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2007-03-19 15:20 UTC (permalink / raw)
  To: Fons Adriaensen; +Cc: alsa-devel

At Mon, 19 Mar 2007 16:22:21 +0100,
Fons Adriaensen wrote:
> 
> On Mon, Mar 19, 2007 at 03:38:47PM +0100, Takashi Iwai wrote:
> 
> > The master PCM volume control
> > 	PCM
> > 
> > The PCM surround volume controls (optional)
> > 	PCM Front
> > 	PCM Surround
> > 	PCM Center
> > 	PCM LFE
> > 	PCM Side
> 
> 
> Could be just me, but whenever see a mixer control named "PCM" I have 
> to think about what it could be. "PCM" refers to a signal format, not
> to a source or destination of audio data. It's a complete misnomer for
> a mixer control. 

Agreed.  (In Windows, it's usually called "Wave" - that's not quite
intuitive, though :)

But renaming this is indeed a big change because the current apps /
desktop systems assume these control names.  It was a bad decision,
which we have to live with...


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] Standard for Multichannel Mixer Control Names
  2007-03-19 14:38 ` Takashi Iwai
@ 2007-03-19 15:22   ` Fons Adriaensen
  2007-03-19 15:20     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Fons Adriaensen @ 2007-03-19 15:22 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

On Mon, Mar 19, 2007 at 03:38:47PM +0100, Takashi Iwai wrote:

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


Could be just me, but whenever see a mixer control named "PCM" I have 
to think about what it could be. "PCM" refers to a signal format, not
to a source or destination of audio data. It's a complete misnomer for
a mixer control. 


-- 
FA

Follie! Follie! Delirio vano è questo !



-------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-19 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-17 21:51 [RFC] Standard for Multichannel Mixer Control Names Randy Cushman
2007-03-19 14:38 ` Takashi Iwai
2007-03-19 15:22   ` Fons Adriaensen
2007-03-19 15:20     ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.