[alsa-devel] HP Pavilion dv5000 ATIIXP / AC97 fixes?

Takashi Iwai tiwai at suse.de
Mon Sep 17 12:44:54 CEST 2007


At Fri, 14 Sep 2007 22:08:47 +0100,
Craig Shelley wrote:
> 
> 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!


> To make the mute LED work on the mute button:
> 
> diff -Nru a/sound/pci/atiixp.c b/sound/pci/atiixp.c
> --- a/sound/pci/atiixp.c        2007-09-14 15:21:32.000000000 +0100
> +++ b/sound/pci/atiixp.c        2007-09-14 20:56:27.000000000 +0100
> @@ -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 */
> };

That's fine...

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

Hm, but this isn't to be applied as is.  The code would influence on
the case with power-saving mode.


> 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

So, preventing vref-off seems like the key.
How about the patch below?


Takashi

diff -r f128daf7129b pci/ac97/ac97_codec.c
--- a/pci/ac97/ac97_codec.c	Mon Sep 17 09:41:36 2007 +0200
+++ b/pci/ac97/ac97_codec.c	Mon Sep 17 12:42:32 2007 +0200
@@ -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 */


More information about the Alsa-devel mailing list