Skip to contentSkip to conversation

Standard for Multichannel Mixer Control Names

RFC Randy Cushman 3 participants 4 messages Mar 17, 2007 – Mar 19, 2007

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

At Sat, 17 Mar 2007 17:51:54 -0400,

Quoted 28 lines · Randy Cushman

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.

Quoted 3 lines

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

Quoted 7 lines

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

Quoted 3 lines

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

#2 lore raw
Quoted 9 lines · Takashi Iwai

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.

Signature · 11 lines
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
#3 lore raw

At Mon, 19 Mar 2007 16:22:21 +0100,

Quoted 14 lines · Fons Adriaensen
Quoted 9 lines · Takashi Iwai

The master PCM volume control
PCM

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

Quoted 4 lines

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