HP Pavilion dv5000 ATIIXP / AC97 fixes?
Hi,
I am not on this list, so please cc me on replies...
With kernel version 2.6.22.3 I found 2 issues with the audio that were solved by applying the patches below. Please note that this is most likely not the correct fix for these issues.
To make the mute LED work on the mute button:
sound/pci/atiixp.c 2007-09-14 20:56:27.000000000 +0100 renamed from sound/pci/atiixp.c 2007-09-14 15:21:32.000000000 +0100 +6 -0
@@ -1389,6 +1389,12 @@ .name = "HP nx6125", .type = AC97_TUNE_MUTE_LED }, + { + .subvendor = 0x103c, + .subdevice = 0x30a4, + .name = "HP Pavilion dv5000", + .type = AC97_TUNE_HP_MUTE_LED + }, { } /* terminator */
};
To stop the loud pop/click sound on suspend/resume:
diff -Nru a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
--- a/sound/pci/ac97/ac97_codec.c 2007-08-15 17:25:39.000000000
+0100
+++ b/sound/pci/ac97/ac97_codec.c 2007-09-14 21:08:40.000000000
+0100
@@ -2287,7 +2287,7 @@
power |= AC97_PD_PR0 | AC97_PD_PR1; /* ADC & DAC powerdown
*/
snd_ac97_write(ac97, AC97_POWERDOWN, power);
udelay(100);
- power |= AC97_PD_PR2 | AC97_PD_PR3; /* Analog Mixer
powerdown */
+ power |= AC97_PD_PR2; /* Analog Mixer powerdown */
snd_ac97_write(ac97, AC97_POWERDOWN, power);
if (ac97_is_power_save_mode(ac97)) {
udelay(100);The loud pop/click sound appeared after upgrading from kernel 2.6.16.2 to 2.6.22.3, and the critical difference between these versions is:
2.6.16.2: (ac97_codec.c line 2135)
power |= 0x0400; /* Analog Mixer powerdown (Vref on) */
2.6.22.3: (ac97_codec.c line 2290)
power |= AC97_PD_PR2 | AC97_PD_PR3; /* Analog Mixer powerdown */
Where:
#define AC97_PD_PR2 0x0400 /* Power down Mixer (Vref still on) */ #define AC97_PD_PR3 0x0800 /* Power down Mixer (Vref off) */
My guess is that this loud click may be caused by some kind of DC offset because an equivalent noise occurs while rebooting after hibernating using hibernate -r
regards,
Signature · 3 lines
Craig Shelley EMail: [email protected] Jabber: [email protected]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Fri, 14 Sep 2007 22:08:47 +0100,
Quoted 8 lines · Craig Shelley
Hi,
I am not on this list, so please cc me on replies...
With kernel version 2.6.22.3 I found 2 issues with the audio that were solved by applying the patches below. Please note that this is most likely not the correct fix for these issues.
Thanks for the patch!
Quoted 7 lines
To make the mute LED work on the mute button:
diff -Nru
a/sound/pci/atiixp.cb/sound/pci/atiixp.csound/pci/atiixp.c 2007-09-14 20:56:27.000000000 +0100 renamed from sound/pci/atiixp.c 2007-09-14 15:21:32.000000000 +0100 +0
-0@@ -1389,6 +1389,12 @@ .name = "HP nx6125",
sound/pci/atiixp.c 2007-09-14 20:56:27.000000000 +0100 line 1399
Quoted 10 lines
sound/pci/atiixp.c 2007-09-14 20:56:27.000000000 +0100 renamed from sound/pci/atiixp.c 2007-09-14 15:21:32.000000000 +0100 +6
-0.type = AC97_TUNE_MUTE_LED }, + { + .subvendor = 0x103c, + .subdevice = 0x30a4, + .name = "HP Pavilion dv5000", + .type = AC97_TUNE_HP_MUTE_LED + }, { } /* terminator */ };
That's fine...
Quoted 15 lines
To stop the loud pop/click sound on suspend/resume:
diff -Nru
a/sound/pci/ac97/ac97_codec.cb/sound/pci/ac97/ac97_codec.c
---a/sound/pci/ac97/ac97_codec.c2007-08-15 17:25:39.000000000
+0100
+++b/sound/pci/ac97/ac97_codec.c2007-09-14 21:08:40.000000000
+0100sound/pci/atiixp.c 2007-09-14 20:56:27.000000000 +0100 renamed from sound/pci/atiixp.c 2007-09-14 15:21:32.000000000 +0100 +0
-1@@ -2287,7 +2287,7 @@ power |= AC97_PD_PR0 | AC97_PD_PR1; /* ADC & DAC powerdown */ snd_ac97_write(ac97, AC97_POWERDOWN, power); udelay(100); - power |= AC97_PD_PR2 | AC97_PD_PR3; /* Analog Mixerpowerdown */
+ power |=AC97_PD_PR2; /* Analog Mixer powerdown */
Quoted 3 lines
snd_ac97_write(ac97, AC97_POWERDOWN, power);
if (ac97_is_power_save_mode(ac97)) {
udelay(100);Hm, but this isn't to be applied as is. The code would influence on the case with power-saving mode.
Quoted 9 lines
The loud pop/click sound appeared after upgrading from kernel 2.6.16.2 to 2.6.22.3, and the critical difference between these versions is:
2.6.16.2: (
ac97_codec.cline 2135)
power |=0x0400; /* Analog Mixer powerdown (Vref on) */2.6.22.3: (
ac97_codec.cline 2290)
power |=AC97_PD_PR2|AC97_PD_PR3; /* Analog Mixer powerdown */
Quoted 7 lines
Where:
#defineAC97_PD_PR20x0400/* Power down Mixer (Vref still on) */ #defineAC97_PD_PR30x0800/* Power down Mixer (Vref off) */My guess is that this loud click may be caused by some kind of DC offset because an equivalent noise occurs while rebooting after hibernating using hibernate -r
So, preventing vref-off seems like the key.
How about the patch below?
Takashi
pci/ac97/ac97_codec.c +3 -1
@@ -2288,9 +2288,11 @@ static void snd_ac97_powerdown(struct sn power |=AC97_PD_PR0 |AC97_PD_PR1 ;/* ADC & DAC powerdown */ snd_ac97_write (ac97,AC97_POWERDOWN , power);udelay (100 ); - power |=AC97_PD_PR2 |AC97_PD_PR3 ;/* Analog Mixer powerdown */ + power |=AC97_PD_PR2 ;/* Analog Mixer powerdown (Vref on) */ snd_ac97_write (ac97,AC97_POWERDOWN , power);if (ac97_is_power_save_mode (ac97)) { + power |=AC97_PD_PR3 ;/* Analog Mixer powerdown */ +snd_ac97_write (ac97,AC97_POWERDOWN , power);udelay (100 );/* AC-link powerdown, internal Clk disable */ /* FIXME: this may cause click noises on some boards */