Skip to contentSkip to conversation

RFC: Enhance AD AC '97 mixer control names

DISCUSSION Randy Cushman 2 participants 5 messages Mar 9, 2007 – Mar 16, 2007

lore
Share & tools
lore
#0 lore raw

The Analog Devices multichannel AC '97 CODECs are configured in ALSA to use ADI Compatibility Mode (aka AC '97 No Compatibility Mode). Because of this, the function of some "Playback" controls differ from the AC '97 standard. I propose renaming the controls to more closely match their function. If no one objects, I will prepare a patch for this. Details follow:

(For each table I will identify the controls using the default AC '97 names.)

Standard AC '97 control functions:
Master - Front pin attenuation
Headphone - Headphone pin attenuation
PCM - Multichannel DAC level
Surround - Surround pin attenuation
Center - Center pin attenuation
LFE - LFE pin attenuation

Names currently assigned for the AD1888, AD1980 and AD1985 CODECs (the AD1986 currently uses the default names):
Master - Master Surround
Headphone - Master
PCM - PCM
Surround - Surround
Center - Center
LFE - LFE

ADI function for AD1888, AD1980 and AD1985 CODECs:
Master - Front, Center and LFE pin attenuation
Headphone - Surround or Headphone pin attenuation
(These CODECs have shared pins that are used for either Surround or Headphone)
PCM - Front channel DAC level
Surround - Surround channel DAC level
Center - Center channel DAC level
LFE - LFE channel DAC level

ADI function for AD1986 CODEC:
Master - Multichannel pin attenuation
Headphone - Headphone pin attenuation
PCM - Front channel DAC level
Surround - Surround channel DAC level
Center - Center channel DAC level
LFE - LFE channel DAC level

Proposed control names for AD1888, AD1980 and AD1985 CODECs:
Master - Master (Front, Center and LFE)
Headphone - Surround or Headphone
PCM - PCM Front
Surround - PCM Surround
Center - PCM Center
LFE - PCM LFE

Proposed control names for AD1986 CODEC:
Master - Master Multichannel
Headphone - Headphone
PCM - PCM Front
Surround - PCM Surround
Center - PCM Center
LFE - PCM LFE

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 Fri, 09 Mar 2007 10:53:49 -0500,

Quoted 54 lines · Randy Cushman

The Analog Devices multichannel AC '97 CODECs are configured in ALSA to use ADI Compatibility Mode (aka AC '97 No Compatibility Mode). Because of this, the function of some "Playback" controls differ from the AC '97 standard. I propose renaming the controls to more closely match their function. If no one objects, I will prepare a patch for this. Details follow:

(For each table I will identify the controls using the default AC '97 names.)

Standard AC '97 control functions:
Master - Front pin attenuation
Headphone - Headphone pin attenuation
PCM - Multichannel DAC level
Surround - Surround pin attenuation
Center - Center pin attenuation
LFE - LFE pin attenuation

Names currently assigned for the AD1888, AD1980 and AD1985 CODECs (the AD1986 currently uses the default names):
Master - Master Surround
Headphone - Master
PCM - PCM
Surround - Surround
Center - Center
LFE - LFE

ADI function for AD1888, AD1980 and AD1985 CODECs:
Master - Front, Center and LFE pin attenuation
Headphone - Surround or Headphone pin attenuation
(These CODECs have shared pins that are used for either Surround or Headphone)
PCM - Front channel DAC level
Surround - Surround channel DAC level
Center - Center channel DAC level
LFE - LFE channel DAC level

ADI function for AD1986 CODEC:
Master - Multichannel pin attenuation
Headphone - Headphone pin attenuation
PCM - Front channel DAC level
Surround - Surround channel DAC level
Center - Center channel DAC level
LFE - LFE channel DAC level

Proposed control names for AD1888, AD1980 and AD1985 CODECs:
Master - Master (Front, Center and LFE)
Headphone - Surround or Headphone
PCM - PCM Front
Surround - PCM Surround
Center - PCM Center
LFE - PCM LFE

Quoted 7 lines

Proposed control names for AD1986 CODEC:
Master - Master Multichannel
Headphone - Headphone
PCM - PCM Front
Surround - PCM Surround
Center - PCM Center
LFE - PCM LFE

Sounds good to me.

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

Inexplicable mixer control creation

In attempting to implement my proposed mixer control name changes (see "[Alsa-devel] RFC: Enhance AD AC '97 mixer control names") I have encountered behavior that makes no sense to me: If module snd_ac97_codec does not create a control with the name 'PCM Playback Volume' then something else creates a control with that name. Not surprisingly, this phantom control serves no useful purpose in my environment, as it has no affect on AC '97 control registers.

Configuration details: Using Fedora Core 5 kernel 2.6.18-1.2239.fc5 (i686) with the latest ALSA-driver source from Mercurial.

Details:
- I have ruled out the possibility that module snd_ac97_codec or snd_intel8x0 could be creating the control, because the following steps cause the control to disappear:

# modprobe -r snd_intel8x0
# modprobe -r snd_ac97_codec
# modprobe snd_ac97_codec
# modprobe snd_intel8x0
- I have also ruled out (using calls to printk) the possibility of the 
control being created via calls to snd_ac97_cnew(), 
snd_ac97_cmute_new_stereo() or snd_ac97_cvol_new().
- The phantom control appears after booting to runlevel 3 or 5.
- If removed using the above modprobe commands, the phantom control will 
appear after logging into a KDE session.
- If removed using the above modprobe commands, the phantom control does 
not appear after logging into a Gnome session.

Any suggestions for how I might track down the source of this phantom control would be welcome.

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

#3 lore raw

Re: Inexplicable mixer control creation

At Tue, 13 Mar 2007 20:21:08 -0400,

Quoted 8 lines · Randy Cushman

In attempting to implement my proposed mixer control name changes (see "[Alsa-devel] RFC: Enhance AD AC '97 mixer control names") I have encountered behavior that makes no sense to me: If module snd_ac97_codec does not create a control with the name 'PCM Playback Volume' then something else creates a control with that name. Not surprisingly, this phantom control serves no useful purpose in my environment, as it has no affect on AC '97 control registers.

This is done by softvol plugin used in the default configuration for many onboard chip drivers. See alsa-lib/src/conf/cards/*.conf.

That's actually a point that I missed. Many apps assume either "Master" or "PCM" mixer exists. Thus, removing PCM isn't nice for them.

Now I'm considering whether changing the volume names in the driver level is actually a better choice. It's basically simpler, and I prefer a simpler solution. OTOH, it may bring other messes because of the name incompatibility like above. So, the cleanest solution would be some mangling in the user-space, i.e. inside alsa-lib. But, it's a bit harder way.

So, before doing this -- we have to *seriously* consider to get consensus what control names should be used as standard and how they behave. Maybe better to start another thread for discussing this...

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

#4 lore raw

Re: Inexplicable mixer control creation

Quoted 10 lines · Takashi Iwai

At Tue, 13 Mar 2007 20:21:08 -0400,

Quoted 2 lines · Randy Cushman

In attempting to implement my proposed mixer control name changes (see "[Alsa-devel] RFC: Enhance AD AC '97 mixer control names") I have encountered behavior that makes no sense to me: If module snd_ac97_codec does not create a control with the name 'PCM Playback Volume' then something else creates a control with that name. Not surprisingly, this phantom control serves no useful purpose in my environment, as it has no affect on AC '97 control registers.

This is done by softvol plugin used in the default configuration for many onboard chip drivers. See alsa-lib/src/conf/cards/*.conf.

I haven't spent much time in alsa-lib. I'll take a look.

This may be a good time to mention that I am unable to access the Mercurial repository. If I try to access http://hg-mirror.alsa-project.org in a web browser or use the "hg clone" command, I get "HTTP Error 403: Forbidden". Curiously, I can "hg diff" repositories I cloned previously. (I opened bugtrack ticket #2956 this morning.)

In the mean time, I'll look at alsa-lib-1.0.14rc3.

Quoted 5 lines

That's actually a point that I missed. Many apps assume either "Master" or "PCM" mixer exists. Thus, removing PCM isn't nice for them.

Quoted 8 lines

Now I'm considering whether changing the volume names in the driver level is actually a better choice. It's basically simpler, and I prefer a simpler solution. OTOH, it may bring other messes because of the name incompatibility like above. So, the cleanest solution would be some mangling in the user-space, i.e. inside alsa-lib. But, it's a bit harder way.

I was planning to change the names by calling snd_ac97_rename_vol_ctl() from functions patch_ad1986_specific(), etc. in ac97_patch.c. I'll explore the alsa-lib approach.

Quoted 5 lines

So, before doing this -- we have to *seriously* consider to get consensus what control names should be used as standard and how they behave. Maybe better to start another thread for discussing this...

I can start another thread.

Quoted 4 lines

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel