Skip to contentSkip to conversation

ALC658 rev 0 - a problem with Rear Right

DISCUSSION Dan Aloni 3 participants 13 messages Mar 5, 2005 – Mar 7, 2005

lore
Share & tools
lore

Dan Aloni

author
#0 lore raw

Hello,

Somewhere between 2.6.8 and 2.6.11 my alc658 (rev 0) card stopped outputing audio on the Rear Right speaker. Of course I checked the cables and there's nothing wrong with the speaker.

I tried to play around with volume controls, but got nothing.

I test with 'speaker-test -Dplug:surround51 -c6 -s 4'.

I also tried to revert specific parts in sound/pci/ac97 and got nothing.

Assuming that I'm a capable kernel hacker, do you have any advice about how to debug this?

Signature · 9 lines
Dan Aloni
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
author
#1 lore raw
Quoted 6 lines · Dan Aloni

Hello,

Somewhere between 2.6.8 and 2.6.11 my alc658 (rev 0) card stopped outputing audio on the Rear Right speaker. Of course I checked the cables and there's nothing wrong with the speaker.

[..]

Quoted 2 lines

Assuming that I'm a capable kernel hacker, do you have any advice about how to debug this?

I've isolated the problem to the difference between these two versions:

    alsa-driver-1.0.8rc1
    alsa-driver-1.0.8rc2

By experimentation the changes between rc1 and rc2 have caused the problem.

Signature · 9 lines
Dan Aloni
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
author
#2 lore raw
Quoted 11 lines · Dan Aloni
Quoted 6 lines · Dan Aloni

Hello,

Somewhere between 2.6.8 and 2.6.11 my alc658 (rev 0) card stopped outputing audio on the Rear Right speaker. Of course I checked the cables and there's nothing wrong with the speaker.

[..]

Quoted 2 lines

Assuming that I'm a capable kernel hacker, do you have any advice about how to debug this?

Quoted 8 lines

I've isolated the problem to the difference between these two versions:

    alsa-driver-1.0.8rc1
    alsa-driver-1.0.8rc2

By experimentation the changes between rc1 and rc2 have caused the problem.

After a more few experiments, I was able to further isolate the changes that caused the problem.

The problem was introduced in the following changeset, which was supposed to cleanup things but accidently broke something.

"[ALSA] Clean up and fix stereo mutes" :

http://linus.bkbits.net:8080/linux-2.5/cset@41da4592A-ipuvcg54DHv3jB__kcaA?nav=index.html|src/|src/sound|src/sound/pci|src/sound/pci/ac97|related/sound/pci/ac97/ac97_codec.c

If you need assistance, please tell me.

Signature · 9 lines
Dan Aloni
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#3 lore raw
Quoted 4 lines · Dan Aloni

The problem was introduced in the following changeset, which was supposed to cleanup things but accidently broke something.

"[ALSA] Clean up and fix stereo mutes" :

Most AC'97 codecs have one mute bit for both channels, but some can have one for each channel (that's called "stereo mute").

It seems the new driver enables the stereo mute bits, but then forgets to unmute the second channel.

Does anything happen if you toggle both mute bits in alsamixer?

Regards,
Clemens

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

author
#4 lore raw
Quoted 6 lines · Clemens Ladisch
Quoted 4 lines · Dan Aloni

The problem was introduced in the following changeset, which was supposed to cleanup things but accidently broke something.

"[ALSA] Clean up and fix stereo mutes" :

Quoted 7 lines

Most AC'97 codecs have one mute bit for both channels, but some can have one for each channel (that's called "stereo mute").

It seems the new driver enables the stereo mute bits, but then forgets to unmute the second channel.

Does anything happen if you toggle both mute bits in alsamixer?

Using alsamixer I am unable to mute any channel by itself - it always mutes or unmutes boths channels at the same time (I tried any possible combination of m M, < or >). However if I revert the changeset I am able to control each channel alone using < or > and there's no problem.

Signature · 9 lines
Dan Aloni
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#5 lore raw

At Mon, 7 Mar 2005 17:39:21 +0200,

Quoted 14 lines · Dan Aloni
Quoted 12 lines · Clemens Ladisch
Quoted 4 lines · Dan Aloni

The problem was introduced in the following changeset, which was supposed to cleanup things but accidently broke something.

"[ALSA] Clean up and fix stereo mutes" :

Most AC'97 codecs have one mute bit for both channels, but some can have one for each channel (that's called "stereo mute").

It seems the new driver enables the stereo mute bits, but then forgets to unmute the second channel.

Quoted 7 lines
Quoted 1 line

Does anything happen if you toggle both mute bits in alsamixer?

Using alsamixer I am unable to mute any channel by itself - it always mutes or unmutes boths channels at the same time (I tried any possible combination of m M, < or >). However if I revert the changeset I am able to control each channel alone using < or > and there's no problem.

Hmm, are you sure that it's ALC658? AFAIK, the codec doesn't support the stereo mutes (at least ALSA code doesn't enable it).

Takashi

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

author
#6 lore raw
Quoted 18 lines · Takashi Iwai

At Mon, 7 Mar 2005 17:39:21 +0200,

Quoted 16 lines · Dan Aloni
Quoted 13 lines · Clemens Ladisch
Quoted 4 lines · Dan Aloni

The problem was introduced in the following changeset, which was supposed to cleanup things but accidently broke something.

"[ALSA] Clean up and fix stereo mutes" :

Most AC'97 codecs have one mute bit for both channels, but some can have one for each channel (that's called "stereo mute").

It seems the new driver enables the stereo mute bits, but then forgets to unmute the second channel.

Does anything happen if you toggle both mute bits in alsamixer?

Quoted 8 lines
Quoted 5 lines

Using alsamixer I am unable to mute any channel by itself - it always mutes or unmutes boths channels at the same time (I tried any possible combination of m M, < or >). However if I revert the changeset I am able to control each channel alone using < or > and there's no problem.

Hmm, are you sure that it's ALC658? AFAIK, the codec doesn't support the stereo mutes (at least ALSA code doesn't enable it).

Unless the driver misidentifies the chipset, this is ALC658.

More info:

cat /proc/asound/cards

0 [ICH5 ]: ICH4 - Intel ICH5

                     Intel ICH5 with ALC658 at 0xfc101000, irq 201

cat /proc/asound/card0/intel8x0

Intel8x0

Global control : 0xc0200002
Global status : 0x10700000
SDM : 0x0000002a
AC'97 codecs ready : tertiary
AC'97 codecs SDIN : 2 0 0

cat /proc/asound/pcm

00-00: Intel ICH : Intel ICH5 : playback 1 : capture 1 00-01: Intel ICH - MIC ADC : Intel ICH5 - MIC ADC : capture 1 00-02: Intel ICH - MIC2 ADC : Intel ICH5 - MIC2 ADC : capture 1 00-03: Intel ICH - ADC2 : Intel ICH5 - ADC2 : capture 1 00-04: Intel ICH - IEC958 : Intel ICH5 - IEC958 : playback 1

cat /proc/asound/card0/codec97\#0/ac97\#0-0

0-0/0: Realtek ALC658 rev 0

Revision : 0x00
Compat. Class : 0x00
Subsys. Vendor ID: 0x8086
Subsys. ID : 0x1234

Capabilities     :
DAC resolution   : 20-bit
ADC resolution   : 18-bit
3D enhancement   : No 3D Stereo Enhancement

Current setup
Mic gain : +0dB [+0dB]
POP path : pre 3D
Sim. stereo : off

3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1

ADC/DAC loopback : off
Double rate slots: 7/8
Extended ID : codec=0 rev=2 LDAC SDAC CDAC DSA=0 SPDIF DRA VRA
Extended status : SPCV LDAC SDAC CDAC SPDIF=10/11 VRA
PCM front DAC : 48000Hz
PCM Surr DAC : 48000Hz
PCM LFE DAC : 48000Hz
PCM ADC : 48000Hz
SPDIF Control : Consumer PCM Copyright Category=0x22 Generation=1 Rate=48kHz

cat /proc/asound/card0/codec97\#0/ac97\#0-0+regs
0:00 = 0180
0:02 = 1010
0:04 = 0000
0:06 = 0000
0:08 = 0000
0:0a = 801e
0:0c = 801f
0:0e = 831f
0:10 = 9f1f
0:12 = 9f1f
0:14 = 0000
0:16 = 9f1f
0:18 = 1313
0:1a = 0000
0:1c = 0000
0:1e = 8000
0:20 = 0400
0:22 = 0000
0:24 = 0000
0:26 = 000f
0:28 = 09c7
0:2a = 05f1
0:2c = bb80
0:2e = bb80
0:30 = bb80
0:32 = bb80
0:34 = bb80
0:36 = 110e
0:38 = 1212
0:3a = 2a20
0:3c = 0000
0:3e = 0000
0:40 = 0000
0:42 = 0000
0:44 = 0000
0:46 = 0000
0:48 = 0000
0:4a = 0000
0:4c = 0000
0:4e = 0000
0:50 = 0000
0:52 = 0000
0:54 = 0000
0:56 = 0000
0:58 = 0000
0:5a = 0000
0:5c = 0000
0:5e = 0000
0:60 = 0000
0:62 = 0000
0:64 = 0808
0:66 = 0808
0:68 = 0aea
0:6a = 8600
0:6c = 3601
0:6e = 0002
0:70 = 0008
0:72 = 0000
0:74 = 0105
0:76 = 0000
0:78 = 0007
0:7a = 50b0
0:7c = 414c
0:7e = 4780

Signature · 9 lines
Dan Aloni
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#7 lore raw

At Mon, 7 Mar 2005 18:57:02 +0200,

Quoted 26 lines · Dan Aloni
Quoted 24 lines · Takashi Iwai

At Mon, 7 Mar 2005 17:39:21 +0200,

Quoted 21 lines · Dan Aloni
Quoted 6 lines · Clemens Ladisch
Quoted 4 lines · Dan Aloni

The problem was introduced in the following changeset, which was supposed to cleanup things but accidently broke something.

"[ALSA] Clean up and fix stereo mutes" :

Quoted 7 lines

Most AC'97 codecs have one mute bit for both channels, but some can have one for each channel (that's called "stereo mute").

It seems the new driver enables the stereo mute bits, but then forgets to unmute the second channel.

Does anything happen if you toggle both mute bits in alsamixer?

Using alsamixer I am unable to mute any channel by itself - it always mutes or unmutes boths channels at the same time (I tried any possible combination of m M, < or >). However if I revert the changeset I am able to control each channel alone using < or > and there's no problem.

Quoted 4 lines
Quoted 2 lines

Hmm, are you sure that it's ALC658? AFAIK, the codec doesn't support the stereo mutes (at least ALSA code doesn't enable it).

Unless the driver misidentifies the chipset, this is ALC658.

Oh yes, indeed. It's strange that the older version did have the stereo mute controls.

Could you compare the contents of /proc/asound/card0/codec97#0/ac97#0-0+regs file between the older ("working") and the latest versions?

If any difference is found, try to change the value by writing via proc interface, e.g.

	echo 02 8080 > /proc/asound/card0/codec97#0/ac97#0-0+regs

(this feature is enabled only when you compile with CONFIG_SND_DEBUG)

thanks,

Takashi

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

author
#8 lore raw
Quoted 31 lines · Takashi Iwai

At Mon, 7 Mar 2005 18:57:02 +0200,

Quoted 29 lines · Dan Aloni
Quoted 26 lines · Takashi Iwai

At Mon, 7 Mar 2005 17:39:21 +0200,

Quoted 14 lines · Dan Aloni
Quoted 12 lines · Clemens Ladisch
Quoted 4 lines · Dan Aloni

The problem was introduced in the following changeset, which was supposed to cleanup things but accidently broke something.

"[ALSA] Clean up and fix stereo mutes" :

Most AC'97 codecs have one mute bit for both channels, but some can have one for each channel (that's called "stereo mute").

It seems the new driver enables the stereo mute bits, but then forgets to unmute the second channel.

Quoted 7 lines
Quoted 1 line

Does anything happen if you toggle both mute bits in alsamixer?

Using alsamixer I am unable to mute any channel by itself - it always mutes or unmutes boths channels at the same time (I tried any possible combination of m M, < or >). However if I revert the changeset I am able to control each channel alone using < or > and there's no problem.

Hmm, are you sure that it's ALC658? AFAIK, the codec doesn't support the stereo mutes (at least ALSA code doesn't enable it).

Quoted 8 lines
Quoted 1 line

Unless the driver misidentifies the chipset, this is ALC658.

Oh yes, indeed. It's strange that the older version did have the stereo mute controls.

Could you compare the contents of /proc/asound/card0/codec97#0/ac97#0-0+regs file between the older ("working") and the latest versions?

I compared and saw no changes in the registers between the latest version and my version with the reverted changeset.

Quoted 6 lines

If any difference is found, try to change the value by writing via proc interface, e.g.

	echo 02 8080 > /proc/asound/card0/codec97#0/ac97#0-0+regs

(this feature is enabled only when you compile with CONFIG_SND_DEBUG)

This apparently has no effect - still no sound from the speaker.

Plus, if I do 'cat /proc/asound/card0/codec97#0/ac97#0-0+regs', then 0:02 still shows 8000 despite the command above.

Signature · 9 lines
Dan Aloni
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#9 lore raw

At Mon, 7 Mar 2005 20:24:14 +0200,

Quoted 38 lines · Dan Aloni
Quoted 36 lines · Takashi Iwai

At Mon, 7 Mar 2005 18:57:02 +0200,

Quoted 26 lines · Dan Aloni
Quoted 24 lines · Takashi Iwai

At Mon, 7 Mar 2005 17:39:21 +0200,

Quoted 21 lines · Dan Aloni
Quoted 6 lines · Clemens Ladisch
Quoted 4 lines · Dan Aloni

The problem was introduced in the following changeset, which was supposed to cleanup things but accidently broke something.

"[ALSA] Clean up and fix stereo mutes" :

Quoted 7 lines

Most AC'97 codecs have one mute bit for both channels, but some can have one for each channel (that's called "stereo mute").

It seems the new driver enables the stereo mute bits, but then forgets to unmute the second channel.

Does anything happen if you toggle both mute bits in alsamixer?

Using alsamixer I am unable to mute any channel by itself - it always mutes or unmutes boths channels at the same time (I tried any possible combination of m M, < or >). However if I revert the changeset I am able to control each channel alone using < or > and there's no problem.

Quoted 4 lines
Quoted 2 lines

Hmm, are you sure that it's ALC658? AFAIK, the codec doesn't support the stereo mutes (at least ALSA code doesn't enable it).

Unless the driver misidentifies the chipset, this is ALC658.

Oh yes, indeed. It's strange that the older version did have the stereo mute controls.

Quoted 6 lines
Quoted 3 lines

Could you compare the contents of /proc/asound/card0/codec97#0/ac97#0-0+regs file between the older ("working") and the latest versions?

I compared and saw no changes in the registers between the latest version and my version with the reverted changeset.

Hmm, interesting.

Just to be sure (I'm back from the travel shortly ago, so might be missing something): the problem persists only on the surround right channel?

And you could mute on/off of "Surround" left/right channels via alsamixer independently in the older version?

Quoted 11 lines
Quoted 6 lines

If any difference is found, try to change the value by writing via proc interface, e.g.

	echo 02 8080 > /proc/asound/card0/codec97#0/ac97#0-0+regs

(this feature is enabled only when you compile with CONFIG_SND_DEBUG)

This apparently has no effect - still no sound from the speaker.

Plus, if I do 'cat /proc/asound/card0/codec97#0/ac97#0-0+regs', then 0:02 still shows 8000 despite the command above.

Of course it shouldn't change. The master register doesn't support stereo mute bits indeed (according to the datasheet). The above is just an example to show how to write a register value...

Takashi

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

author
#10 lore raw
Quoted 44 lines · Takashi Iwai

At Mon, 7 Mar 2005 20:24:14 +0200,

Quoted 42 lines · Dan Aloni
Quoted 39 lines · Takashi Iwai

At Mon, 7 Mar 2005 18:57:02 +0200,

Quoted 26 lines · Dan Aloni
Quoted 24 lines · Takashi Iwai

At Mon, 7 Mar 2005 17:39:21 +0200,

Quoted 21 lines · Dan Aloni
Quoted 6 lines · Clemens Ladisch
Quoted 4 lines · Dan Aloni

The problem was introduced in the following changeset, which was supposed to cleanup things but accidently broke something.

"[ALSA] Clean up and fix stereo mutes" :

Quoted 7 lines

Most AC'97 codecs have one mute bit for both channels, but some can have one for each channel (that's called "stereo mute").

It seems the new driver enables the stereo mute bits, but then forgets to unmute the second channel.

Does anything happen if you toggle both mute bits in alsamixer?

Using alsamixer I am unable to mute any channel by itself - it always mutes or unmutes boths channels at the same time (I tried any possible combination of m M, < or >). However if I revert the changeset I am able to control each channel alone using < or > and there's no problem.

Quoted 4 lines
Quoted 2 lines

Hmm, are you sure that it's ALC658? AFAIK, the codec doesn't support the stereo mutes (at least ALSA code doesn't enable it).

Unless the driver misidentifies the chipset, this is ALC658.

Oh yes, indeed. It's strange that the older version did have the stereo mute controls.

Could you compare the contents of /proc/asound/card0/codec97#0/ac97#0-0+regs file between the older ("working") and the latest versions?

Quoted 8 lines
Quoted 2 lines

I compared and saw no changes in the registers between the latest version and my version with the reverted changeset.

Hmm, interesting.

Just to be sure (I'm back from the travel shortly ago, so might be missing something): the problem persists only on the surround right channel?

Yes, only that channel.

Quoted 2 lines

And you could mute on/off of "Surround" left/right channels via alsamixer independently in the older version?

I can only mute both at the same time with the latest version, but I can mute each channel alone with the working version.

Signature · 9 lines
Dan Aloni
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#11 lore raw

At Mon, 7 Mar 2005 20:55:14 +0200,

Quoted 55 lines · Dan Aloni
Quoted 44 lines · Takashi Iwai

At Mon, 7 Mar 2005 20:24:14 +0200,

Quoted 42 lines · Dan Aloni
Quoted 39 lines · Takashi Iwai

At Mon, 7 Mar 2005 18:57:02 +0200,

Quoted 26 lines · Dan Aloni
Quoted 24 lines · Takashi Iwai

At Mon, 7 Mar 2005 17:39:21 +0200,

Quoted 21 lines · Dan Aloni
Quoted 6 lines · Clemens Ladisch
Quoted 4 lines · Dan Aloni

The problem was introduced in the following changeset, which was supposed to cleanup things but accidently broke something.

"[ALSA] Clean up and fix stereo mutes" :

Quoted 7 lines

Most AC'97 codecs have one mute bit for both channels, but some can have one for each channel (that's called "stereo mute").

It seems the new driver enables the stereo mute bits, but then forgets to unmute the second channel.

Does anything happen if you toggle both mute bits in alsamixer?

Using alsamixer I am unable to mute any channel by itself - it always mutes or unmutes boths channels at the same time (I tried any possible combination of m M, < or >). However if I revert the changeset I am able to control each channel alone using < or > and there's no problem.

Quoted 4 lines
Quoted 2 lines

Hmm, are you sure that it's ALC658? AFAIK, the codec doesn't support the stereo mutes (at least ALSA code doesn't enable it).

Unless the driver misidentifies the chipset, this is ALC658.

Oh yes, indeed. It's strange that the older version did have the stereo mute controls.

Could you compare the contents of /proc/asound/card0/codec97#0/ac97#0-0+regs file between the older ("working") and the latest versions?

Quoted 8 lines
Quoted 2 lines

I compared and saw no changes in the registers between the latest version and my version with the reverted changeset.

Hmm, interesting.

Just to be sure (I'm back from the travel shortly ago, so might be missing something): the problem persists only on the surround right channel?

Quoted 7 lines

Yes, only that channel.

Quoted 2 lines

And you could mute on/off of "Surround" left/right channels via alsamixer independently in the older version?

I can only mute both at the same time with the latest version, but I can mute each channel alone with the working version.

OK. Then please try the attached patch. This will enable the stereo mutes on the surround volume control again.

thanks,

Takashi

Index: alsa-kernel/pci/ac97/ac97_codec.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v retrieving revision 1.165

pci/ac97/ac97_codec.c +8 -5
diff -u -r1.165 ac97_codec.c
@@ -1184,7 +1184,7 @@
 /*
  * create mute switch(es) for normal stereo controls
  */
-static int snd_ac97_cmute_new(snd_card_t *card, char *name, int reg, ac97_t *ac97)
+static int snd_ac97_cmute_new_stereo(snd_card_t *card, char *name, int reg, int check_stereo, ac97_t *ac97)
 {
 	snd_kcontrol_t *kctl;
 	int err;
@@ -1195,7 +1195,7 @@
 
 	mute_mask = 0x8000;
 	val = snd_ac97_read(ac97, reg);
-	if (ac97->flags & AC97_STEREO_MUTES) {
+	if (check_stereo || (ac97->flags & AC97_STEREO_MUTES)) {
 		/* check whether both mute bits work */
 		val1 = val | 0x8080;
 		snd_ac97_write(ac97, reg, val1);
@@ -1253,7 +1253,7 @@
 /*
  * create a mute-switch and a volume for normal stereo/mono controls
  */
-static int snd_ac97_cmix_new(snd_card_t *card, const char *pfx, int reg, ac97_t *ac97)
+static int snd_ac97_cmix_new_stereo(snd_card_t *card, const char *pfx, int reg, int check_stereo, ac97_t *ac97)
 {
 	int err;
 	char name[44];
@@ -1264,7 +1264,7 @@
 
 	if (snd_ac97_try_bit(ac97, reg, 15)) {
 		sprintf(name, "%s Switch", pfx);
-		if ((err = snd_ac97_cmute_new(card, name, reg, ac97)) < 0)
+		if ((err = snd_ac97_cmute_new_stereo(card, name, reg, check_stereo, ac97)) < 0)
 			return err;
 	}
 	check_volume_resolution(ac97, reg, &lo_max, &hi_max);
@@ -1276,6 +1276,8 @@
 	return 0;
 }
 
+#define snd_ac97_cmix_new(card, pfx, reg, ac97)	snd_ac97_cmix_new_stereo(card, pfx, reg, 0, ac97)
+#define snd_ac97_cmute_new(card, name, reg, ac97)	snd_ac97_cmute_new_stereo(card, name, reg, 0, ac97)
 
 static unsigned int snd_ac97_determine_spdif_rates(ac97_t *ac97);
 
@@ -1326,7 +1328,8 @@
 
 	/* build surround controls */
 	if (snd_ac97_try_volume_mix(ac97, AC97_SURROUND_MASTER)) {
-		if ((err = snd_ac97_cmix_new(card, "Surround Playback", AC97_SURROUND_MASTER, ac97)) < 0)
+		/* Surround Master (0x38) is with stereo mutes */
+		if ((err = snd_ac97_cmix_new_stereo(card, "Surround Playback", AC97_SURROUND_MASTER, 1, ac97)) < 0)
 			return err;
 	}
 
author
#12 lore raw
Quoted 62 lines · Takashi Iwai

At Mon, 7 Mar 2005 20:55:14 +0200,

Quoted 60 lines · Dan Aloni
Quoted 44 lines · Takashi Iwai

At Mon, 7 Mar 2005 20:24:14 +0200,

Quoted 42 lines · Dan Aloni
Quoted 39 lines · Takashi Iwai

At Mon, 7 Mar 2005 18:57:02 +0200,

Quoted 26 lines · Dan Aloni
Quoted 24 lines · Takashi Iwai

At Mon, 7 Mar 2005 17:39:21 +0200,

Quoted 21 lines · Dan Aloni
Quoted 6 lines · Clemens Ladisch
Quoted 4 lines · Dan Aloni

The problem was introduced in the following changeset, which was supposed to cleanup things but accidently broke something.

"[ALSA] Clean up and fix stereo mutes" :

Quoted 7 lines

Most AC'97 codecs have one mute bit for both channels, but some can have one for each channel (that's called "stereo mute").

It seems the new driver enables the stereo mute bits, but then forgets to unmute the second channel.

Does anything happen if you toggle both mute bits in alsamixer?

Using alsamixer I am unable to mute any channel by itself - it always mutes or unmutes boths channels at the same time (I tried any possible combination of m M, < or >). However if I revert the changeset I am able to control each channel alone using < or > and there's no problem.

Quoted 4 lines
Quoted 2 lines

Hmm, are you sure that it's ALC658? AFAIK, the codec doesn't support the stereo mutes (at least ALSA code doesn't enable it).

Unless the driver misidentifies the chipset, this is ALC658.

Oh yes, indeed. It's strange that the older version did have the stereo mute controls.

Could you compare the contents of /proc/asound/card0/codec97#0/ac97#0-0+regs file between the older ("working") and the latest versions?

Quoted 8 lines
Quoted 2 lines

I compared and saw no changes in the registers between the latest version and my version with the reverted changeset.

Hmm, interesting.

Just to be sure (I'm back from the travel shortly ago, so might be missing something): the problem persists only on the surround right channel?

Yes, only that channel.

Quoted 2 lines

And you could mute on/off of "Surround" left/right channels via alsamixer independently in the older version?

Quoted 7 lines
Quoted 2 lines

I can only mute both at the same time with the latest version, but I can mute each channel alone with the working version.

[..]

OK. Then please try the attached patch. This will enable the stereo mutes on the surround volume control again.

Works. Thanks,

Signature · 9 lines
Dan Aloni
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click