Skip to contentSkip to conversation

Best default values for "External Amplifier" and "Audigy Analog/Digital Output Jack"

DISCUSSION Thomas Hood 6 participants 15 messages Sep 18, 2005 – Sep 20, 2005

lore
Share & tools
lore
#0 lore raw

Hello. I am one of those responsible for packaging ALSA for Debian.

Does anyone have documentation of which machines require "External Amplifier" to be on and which ones require EA to be off in order for sound to be emitted in the simplest or most common machine configuration?

I have the same question about the "Audigy Analog/Digital Output Jack".

In Debian and Ubuntu we get complaints from users that sound "doesn't work". After some investigation it turns out that either EA or AADOJ is set incorrectly. Unlike other controls, it seems that there is no one setting for these that is a "sane" value for all machines. So it seems that when our script is asked to set sane values, the script will have to choose a value depending on the computer model. But we have no list of which models require the one setting and which models require the other. We thought that perhaps the ALSA developers have such a list.

What we would actually prefer is that the driver do this work and initialize EA and AADOJ to "sane" values---if necessary depending on the computer model.

Signature · 8 lines
Thomas Hood


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
#1 lore raw
Quoted 17 lines · Thomas Hood

Hello. I am one of those responsible for packaging ALSA for Debian.

Does anyone have documentation of which machines require "External Amplifier" to be on and which ones require EA to be off in order for sound to be emitted in the simplest or most common machine configuration?

I have the same question about the "Audigy Analog/Digital Output Jack".

In Debian and Ubuntu we get complaints from users that sound "doesn't work". After some investigation it turns out that either EA or AADOJ is set incorrectly. Unlike other controls, it seems that there is no one setting for these that is a "sane" value for all machines. So it seems that when our script is asked to set sane values, the script will have to choose a value depending on the computer model. But we have no list of which models require the one setting and which models require the other. We thought that perhaps the ALSA developers have such a list.

Quoted 2 lines

What we would actually prefer is that the driver do this work and initialize EA and AADOJ to "sane" values---if necessary depending on the computer model.

Thomas,

There is no real answer to your question. All motherboards and sound cards that might contain the same sound chips, do not have the same connections with the outside world. So, for some, setting EA to 1 enables sound, for others setting EA to 0 enables sound etc. The only way we can overcome this is on a case by case basis. We add code to the driver so that it recognises a particular motherboard, and set it correctly for that particular motherboard.
So, the best way to fix this problem will be to raise an ALSA bug on https://bugtrack.alsa-project.org/alsa-bug/ or on the kernel bug tracker with full details of the motherboard and the sound chips involved, and it will eventually be fixed.

We would need the following:
The default settings, when not working:
amixer contents
cat /proc/asound/card0/codec97#0/ac97#0-0
cat /proc/asound/card0/codec97#0/ac97#0-0+regs

The settings when working correctly:
amixer contents
cat /proc/asound/card0/codec97#0/ac97#0-0
cat /proc/asound/card0/codec97#0/ac97#0-0+regs
lspci -vvn

James

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#2 lore raw
Quoted 4 lines · James Courtier-Dutton

So, the best way to fix this problem will be to raise an ALSA bug on
https://bugtrack.alsa-project.org/alsa-bug/ or on the kernel bug tracker with full details of the motherboard and the sound chips involved, and it will eventually be fixed.

OK

You told me what information is needed for "External Amplifier". This was:

* The default settings, when not working:
+ The output of "amixer"
+ the contents /proc/asound/card0/codec97#0/ac97#0-0
+ the contents of /proc/asound/card0/codec97#0/ac97#0-0+regs
* The settings when working correctly:
+ The output of "amixer"
+ the contents /proc/asound/card0/codec97#0/ac97#0-0
+ the contents of /proc/asound/card0/codec97#0/ac97#0-0+regs
* The output of "lspci -vvn"

What information is needed in order to deal with the "Audigy Analog/Digital Output Jack" case?

Signature · 9 lines
Thomas Hood



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
#3 lore raw
Quoted 20 lines · Thomas Hood
Quoted 4 lines · James Courtier-Dutton

So, the best way to fix this problem will be to raise an ALSA bug on
https://bugtrack.alsa-project.org/alsa-bug/ or on the kernel bug tracker with full details of the motherboard and the sound chips involved, and it will eventually be fixed.

OK

You told me what information is needed for "External Amplifier". This was:

* The default settings, when not working:
+ The output of "amixer"
+ the contents /proc/asound/card0/codec97#0/ac97#0-0
+ the contents of /proc/asound/card0/codec97#0/ac97#0-0+regs
* The settings when working correctly:
+ The output of "amixer"
+ the contents /proc/asound/card0/codec97#0/ac97#0-0
+ the contents of /proc/asound/card0/codec97#0/ac97#0-0+regs
* The output of "lspci -vvn"

Quoted 4 lines

What information is needed in order to deal with the "Audigy Analog/Digital Output Jack" case?

AFAIK, the behaviour of the switch is consistent accross all the audigy cards. If you're using Digital Speakers connected to the digital output of the card, you have to set it. Otherwise, don't set it. It's setup dependant. IMHO you can't do anything about that. [ IIRC, even the OSS driver has this 'problem'. ]

Regards,
Arnaud Patard

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#4 lore raw
Quoted 5 lines · Arnaud Patard (Rtp)

AFAIK, the behaviour of the switch is consistent accross all the audigy cards. If you're using Digital Speakers connected to the digital output of the card, you have to set it. Otherwise, don't set it. It's setup dependant. IMHO you can't do anything about that. [ IIRC, even the OSS driver has this 'problem'. ]

some drivers have a sense mixer element.

cannot more drivers be patched in order to have such a behavior (if possible)?

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#8 lore raw
In reply to James Courtier-Dutton
Quoted 11 lines · James Courtier-Dutton
Quoted 11 lines

Hello. I am one of those responsible for packaging ALSA for Debian. Does anyone have documentation of which machines require "External Amplifier" to be on and which ones require EA to be off in order for sound to be emitted in the simplest or most common machine configuration?
I have the same question about the "Audigy Analog/Digital Output Jack".
In Debian and Ubuntu we get complaints from users that sound "doesn't work". After some investigation it turns out that either EA or AADOJ is set incorrectly. Unlike other controls, it seems that there is no one setting for these that is a "sane" value for

Quoted 8 lines
Quoted 8 lines

all machines. So it seems that when our script is asked to set sane values, the script will have to choose a value depending on the computer model. But we have no list of which models require the one setting and which models require the other. We thought that perhaps the ALSA developers have such a list. What we would actually prefer is that the driver do this work and initialize EA and AADOJ to "sane" values---if necessary depending on the computer model.

i second that. we have the same problem in Mandriva.
in the old days, we leave alsa as it and thus we got quite a lot of complaints about non working sound (aka the mixer was fully muted by alsa policy)

then we unmute everything the way we did for OSS drivers and set the sound levels to 66%.

this resulted in quite some happy users but new complaints (though less than before) b/c unmutting some mixer element was bad (larsen, no sound, sound distortion, ...).
so we blacklisted some mixer elements we leave muted.

but some mixer elements (mainly external amplifier and "*analog/digital output jack") are bug prone since if we enable them, some users will be happy but others won't.
if we disable them, the later'll be happy but the former won't be anymore.

Quoted 4 lines

There is no real answer to your question. All motherboards and sound cards that might contain the same sound chips, do not have the same connections with the outside world. So, for some, setting EA to 1 enables sound, for others setting EA to 0 enables sound etc.

in the future, we may switch to an ignore policy for such mixer elements and let the driver put a sane default value. then "bogus" sound-card owners should fill a bug report as you resquested so that new subids entries get added to the drivers.

Quoted 7 lines

The only way we can overcome this is on a case by case basis. We add code to the driver so that it recognises a particular motherboard, and set it correctly for that particular motherboard.
So, the best way to fix this problem will be to raise an ALSA bug on
https://bugtrack.alsa-project.org/alsa-bug/ or on the kernel bug tracker with full details of the motherboard and the sound chips involved, and it will eventually be fixed.

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#9 lore raw
Quoted 1 line · Thierry Vignaud

i second that.

Here are the controls that are (currently) set in the ALSA initscript in Debian. I would appreciate it if you could give me a similar list of controls that are set by Mandriva.

from /etc/init.d/alsa-utils:

        unmute_and_set_level "Master" "80%"
        unmute_and_set_level "Master Digital" "80%"   # E.g., cs4237B
        unmute_and_set_level "Playback" "80%"
        unmute_and_set_level "Headphone" "70%"
        unmute_and_set_level "PCM" "80%"
        unmute_and_set_level "PCM,1" "80%"   # E.g., ess1969
        unmute_and_set_level "DAC" "80%"     # E.g., envy24, cs46xx
        unmute_and_set_level "DAC,0" "80%"   # E.g., envy24
        unmute_and_set_level "DAC,1" "80%"   # E.g., envy24
        unmute_and_set_level "Synth" "80%"
        unmute_and_set_level "CD" "80%"

        mute_and_zero_level "Mic"

        # Intel P4P800-MX  (Ubuntu bug #5813)
        switch_control "Master Playback Switch" on

        # Trident/YMFPCI/emu10k1:
        unmute_and_set_level "Wave" "80%"
        unmute_and_set_level "Music" "80%"
        unmute_and_set_level "AC97" "80%"

        # DRC:
        unmute_and_set_level "Dynamic Range Compression" "80%"

        # Required at least for Via 823x hardware on DFI K8M800-MLVF
        switch_control "IEC958 Capture Monitor" off

        # Required on some notebooks with ICH4:
        switch_control "Headphone Jack Sense" off
        switch_control "Line Jack Sense" off
Signature · 8 lines
Thomas Hood


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
#5 lore raw
In reply to Thierry Vignaud
Quoted 8 lines · Thierry Vignaud
Quoted 5 lines · Arnaud Patard (Rtp)

AFAIK, the behaviour of the switch is consistent accross all the audigy cards. If you're using Digital Speakers connected to the digital output of the card, you have to set it. Otherwise, don't set it. It's setup dependant. IMHO you can't do anything about that. [ IIRC, even the OSS driver has this 'problem'. ]

Quoted 4 lines

some drivers have a sense mixer element.

cannot more drivers be patched in order to have such a behavior (if possible)?

At least, on the audigy player/gamer, the connector used for the digital out is also used for analog out (see
http://fr.europe.creative.com/support/downloads/download2.asp?manualID=807&Product_ID=237&regionID=3&Product_Name=Audigy+Gamer)
. Thus detecting if there's a cable connected or not to set the 'Audigy Analog/Digital Output Jack' switch won't work.

Regards,
Arnaud

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#10 lore raw
In reply to Thomas Hood
Quoted 5 lines · Thomas Hood
Quoted 1 line

i second that.

Here are the controls that are (currently) set in the ALSA initscript in Debian. I would appreciate it if you could give me a similar list of controls that are set by Mandriva.

cf http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/soft/sound-scripts/

the "initialize sound level script" is alsa_default.pl whose latest version is:
http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/soft/sound-scripts/alsa_default.pl?rev=1.28&content-type=text/x-cvsweb-markup

it's called by reset_sound:
http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/soft/sound-scripts/reset_sound?rev=1.3&content-type=text/x-cvsweb-markup

reset_sound is called by an udev rule (alsa.rules which runs alsa.dev) or by sound init script (if not using udev) on the first boot. It can also be directly run by the end user to reinitialize its sound level to what we set up on the first boot (ie if he messed up his config)

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#11 lore raw

At Mon, 19 Sep 2005 15:03:42 +0200,

Quoted 16 lines · Thierry Vignaud
Quoted 5 lines · Thomas Hood
Quoted 1 line

i second that.

Here are the controls that are (currently) set in the ALSA initscript in Debian. I would appreciate it if you could give me a similar list of controls that are set by Mandriva.

cf http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/soft/sound-scripts/

the "initialize sound level script" is alsa_default.pl whose latest version is:
http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/soft/sound-scripts/alsa_default.pl?rev=1.28&content-type=text/x-cvsweb-markup

Quoted 7 lines

it's called by reset_sound:
http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/soft/sound-scripts/reset_sound?rev=1.3&content-type=text/x-cvsweb-markup

reset_sound is called by an udev rule (alsa.rules which runs alsa.dev) or by sound init script (if not using udev) on the first boot. It can also be directly run by the end user to reinitialize its sound level to what we set up on the first boot (ie if he messed up his config)

Maybe a good idea to add a small program/script to alsa-utils package. Calling amixer at each time is also not clever. amixer should have the functionality to run commands sequentially, e.g. reading from stdin.

Takashi

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#12 lore raw
Quoted 2 lines · Takashi Iwai

Maybe a good idea to add a small program/script to alsa-utils package.

Yes, that would be nice. Then we could all contribute to its maintenance. Note that alsaconf should run this script instead of resetting mixer levels itself.

Signature · 8 lines
Thomas Hood


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
#6 lore raw
In reply to Arnaud Patard (Rtp)
Quoted 25 lines · Arnaud Patard (Rtp)
Quoted 9 lines · Thierry Vignaud
Quoted 5 lines · Arnaud Patard (Rtp)

AFAIK, the behaviour of the switch is consistent accross all the audigy cards. If you're using Digital Speakers connected to the digital output of the card, you have to set it. Otherwise, don't set it. It's setup dependant. IMHO you can't do anything about that. [ IIRC, even the OSS driver has this 'problem'. ]

Quoted 4 lines

some drivers have a sense mixer element.

cannot more drivers be patched in order to have such a behavior (if possible)?

At least, on the audigy player/gamer, the connector used for the digital out is also used for analog out (see
http://fr.europe.creative.com/support/downloads/download2.asp?manualID=807&Product_ID=237&regionID=3&Product_Name=Audigy+Gamer)
. Thus detecting if there's a cable connected or not to set the 'Audigy Analog/Digital Output Jack' switch won't work.

Quoted 3 lines

Regards,
Arnaud

This sounds like we need to add an extra configuration that the user can do with the help of a simple command line or GUI tool.
This extra user supplied information will be "speaker arrangement".
I suggested this a long time ago, but never got round to deciding how best to do it. Maybe a new mixer control element that is present irrespective of the sound card being used, and that can also be read by the driver to configure itself. The driver would present somehow to the GUI app the range of options the user has, and the user would then simply select the option they are using.
e.g.
1) SPDIF digital output
2) 5.1 Surround sound.
3) ... etc.

After selecting the option they think is right, there would be a simple click button saying "test" at which point it tries sending some sound out of the speakers.

We must, in all cases, identify which features are bugs in the drivers, and which have to be implemented as user space applications.

The "External Amplifier" setting is a driver bug, but requires special case quirks for each and every different sound card using the same sound chip. This setting should default to getting sound from the speakers, and not from the headphones.

The "Audigy Analog/Digital Output Jack" is directly related to "speaker-arrangement" as a single jack is shared between being an analog lfe/center speaker jack, and a spdif digital output jack.

The "External Amplifier" is only half the problem. There are motherboards with sound chips that if we send sound to the "front" channels nothing comes from the speakers on laptop A, but it works fine for laptop B. It turns out that sending sound to the "center/lfe" actually produces sound from the "front" speakers on laptop A.

So, in summary, instead of each distribution trying to write work arounds and scripts to get over the problem, they should in fact be raising bug reports with the alsa bug tracking system, so that they can be fixed.

I think that maybe there should be a kernel module option to get the sound cards to default to either "mute" or "50%" sound levels. Then no scripts would be needed, and only a single module option would fix the problem for everybody.

So, please everybody, help us fix the problems instead of trying all sorts of workarounds!!!

James

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#13 lore raw
In reply to Thierry Vignaud
Quoted 2 lines · Thierry Vignaud

(aka the mixer was fully muted by
alsa policy)

This is not "ALSA policy". This is ALSA refusing to put policy in the kernel ;-)

Lee

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#7 lore raw
In reply to Arnaud Patard (Rtp)
Quoted 5 lines · Arnaud Patard

At least, on the audigy player/gamer, the connector used for the digital out is also used for analog out (see
http://fr.europe.creative.com/support/downloads/download2.asp?manualID=807&Product_ID=237&regionID=3&Product_Name=Audigy+Gamer)
. Thus detecting if there's a cable connected or not to set the 'Audigy Analog/Digital Output Jack' switch won't work.

The Windows driver probably has a timer check the SPDIF valid bits for that channel every second and switches this setting accordingly.

Lee

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

#14 lore raw
In reply to Lee Revell
Quoted 4 lines · Lee Revell
Quoted 1 line

(aka the mixer was fully muted by alsa policy)

This is not "ALSA policy". This is ALSA refusing to put policy in the kernel ;-)

this is still a policy per se. :-)

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php