* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
[not found] <alpine.DEB.2.00.1103240135291.1780@chris-desktop.fen.aptivate.org>
@ 2011-03-24 1:43 ` Wu Fengguang
2011-03-24 9:36 ` Chris Wilson
0 siblings, 1 reply; 19+ messages in thread
From: Wu Fengguang @ 2011-03-24 1:43 UTC (permalink / raw)
To: Chris Wilson
Cc: alsa-devel, matt.jared, andy.kopp, Takashi Iwai, dan.d.kogan,
PeiSen Hou
Hi Chris,
Would you run http://www.alsa-project.org/alsa-info.sh and email the
results?
Thanks,
Fengguang
On Thu, Mar 24, 2011 at 01:35:54AM +0000, Chris Wilson wrote:
> ---------- Forwarded message ----------
> Date: Thu, 24 Mar 2011 00:49:55 +0000 (GMT)
> From: Chris Wilson <chris@qwirx.com>
> To: Takashi Iwai <tiwai@suse.de>, PeiSen Hou <pshou@realtek.com.tw>,
> matt.jared@intel.com, andy.kopp@intel.com, dan.d.kogan@intel.com
> Subject: Loud pops from Intel HDA onboard sound, may damage speakers
>
> Dear sirs,
>
> I'm writing to you as the named contacts in hda_intel.c in the Linux
> kernel. Please let me know if I should contact someone else instead.
>
> I refer to this downstream bug on Ubuntu Launchpad, which I am
> hereby taking upstream:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/184632
>
> I have a desktop system (Fujitsu P9900) with the onboard sound
> connected to my hi-fi amplifier, driven by snd_hda_intel. The audio
> chipset is:
>
> 00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset
> High Definition Audio (rev 05)
>
> The sound card outputs loud popping sounds whenever I suspend and
> resume it. One of them is loud or severe enough to cause my hi-fi
> amplifier to go into automatic shutdown mode, and I'm worried that
> it may damage my speakers.
>
> If I enable power_save=1, as suggested by powertop, then this
> happens about 2 seconds after any audio finishes playing as well, so
> I suspect it's related to putting the sound card in or out of
> suspend mode.
>
> The pops seem to be happening to others who have this chipset as
> well, as seen on the bug report, but they seem mostly to be using
> laptops or otherwise not bothered by potential damage to their
> speakers.
>
> I would really appreciate it if you could help me to find a way to
> avoid these pops, for example by muting the audio output before
> shutting down the DAC? I think it would be great if this could make
> it into the standard kernel driver.
>
> Many thanks in advance,
>
> Chris Wilson.
> --
> _____ __ _
> \ __/ / ,__(_)_ | Chris Wilson <chris+sig@qwirx.com> Cambs UK |
> / (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
> \__/_/_/_//_/___/ | We are GNU : free your mind & your software |
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-24 1:43 ` Loud pops from Intel HDA onboard sound, may damage speakers (fwd) Wu Fengguang
@ 2011-03-24 9:36 ` Chris Wilson
2011-03-24 9:58 ` Takashi Iwai
0 siblings, 1 reply; 19+ messages in thread
From: Chris Wilson @ 2011-03-24 9:36 UTC (permalink / raw)
To: Wu Fengguang
Cc: alsa-devel, matt.jared, andy.kopp, Takashi Iwai, dan.d.kogan,
PeiSen Hou
Hi Fengguang,
On Thu, 24 Mar 2011, Wu Fengguang wrote:
> Would you run http://www.alsa-project.org/alsa-info.sh and email the
> results?
Sure, you can find them at
http://www.alsa-project.org/db/?f=e74111db9a689dc1fd9808916eebbe51aa447d99.
I also hear loud pops during this script's run, but not loud or severe
enough to trip out my amplifier.
Thank you for taking an interest :)
Cheers, Chris.
--
_____ __ _
\ __/ / ,__(_)_ | Chris Wilson <chris+sig@qwirx.com> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-24 9:36 ` Chris Wilson
@ 2011-03-24 9:58 ` Takashi Iwai
2011-03-24 12:05 ` Chris Wilson
0 siblings, 1 reply; 19+ messages in thread
From: Takashi Iwai @ 2011-03-24 9:58 UTC (permalink / raw)
To: Chris Wilson
Cc: alsa-devel, matt.jared, andy.kopp, dan.d.kogan, Wu Fengguang,
PeiSen Hou
At Thu, 24 Mar 2011 09:36:00 +0000 (GMT),
Chris Wilson wrote:
>
> Hi Fengguang,
>
> On Thu, 24 Mar 2011, Wu Fengguang wrote:
>
> > Would you run http://www.alsa-project.org/alsa-info.sh and email the
> > results?
>
> Sure, you can find them at
> http://www.alsa-project.org/db/?f=e74111db9a689dc1fd9808916eebbe51aa447d99.
>
> I also hear loud pops during this script's run, but not loud or severe
> enough to trip out my amplifier.
Does this happen with 2.6.38 kernel, too?
Takashi
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-24 9:58 ` Takashi Iwai
@ 2011-03-24 12:05 ` Chris Wilson
2011-03-24 12:09 ` Takashi Iwai
0 siblings, 1 reply; 19+ messages in thread
From: Chris Wilson @ 2011-03-24 12:05 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, matt.jared, andy.kopp, dan.d.kogan, Wu Fengguang,
PeiSen Hou
Hi Takashi,
On Thu, 24 Mar 2011, Takashi Iwai wrote:
> > Sure, you can find them at
> > http://www.alsa-project.org/db/?f=e74111db9a689dc1fd9808916eebbe51aa447d99.
> >
> > I also hear loud pops during this script's run, but not loud or severe
> > enough to trip out my amplifier.
>
> Does this happen with 2.6.38 kernel, too?
I have not tried yet, do you have reason to think it may have changed
since 2.6.32?
Can I build just the sound driver without replacing the whole kernel?
Cheers, Chris.
--
_____ __ _
\ __/ / ,__(_)_ | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\ _/_/_/_//_/___/ | Stop nuclear war http://www.nuclearrisk.org |
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-24 12:05 ` Chris Wilson
@ 2011-03-24 12:09 ` Takashi Iwai
2011-03-24 22:41 ` Chris Wilson
0 siblings, 1 reply; 19+ messages in thread
From: Takashi Iwai @ 2011-03-24 12:09 UTC (permalink / raw)
To: Chris Wilson
Cc: alsa-devel, matt.jared, andy.kopp, dan.d.kogan, Wu Fengguang,
PeiSen Hou
At Thu, 24 Mar 2011 12:05:52 +0000 (GMT),
Chris Wilson wrote:
>
> Hi Takashi,
>
> On Thu, 24 Mar 2011, Takashi Iwai wrote:
>
> > > Sure, you can find them at
> > > http://www.alsa-project.org/db/?f=e74111db9a689dc1fd9808916eebbe51aa447d99.
> > >
> > > I also hear loud pops during this script's run, but not loud or severe
> > > enough to trip out my amplifier.
> >
> > Does this happen with 2.6.38 kernel, too?
>
> I have not tried yet, do you have reason to think it may have changed
> since 2.6.32?
Lots of changes since 2.6.32. I won't be surprised if any of them hits.
> Can I build just the sound driver without replacing the whole kernel?
You can try alsa-driver tarball.
Takashi
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-24 12:09 ` Takashi Iwai
@ 2011-03-24 22:41 ` Chris Wilson
2011-03-25 7:00 ` Takashi Iwai
0 siblings, 1 reply; 19+ messages in thread
From: Chris Wilson @ 2011-03-24 22:41 UTC (permalink / raw)
To: Takashi Iwai; +Cc: PeiSen Hou, alsa-devel, Wu Fengguang, dan.d.kogan, andy.kopp
Hi Takashi and all,
On Thu, 24 Mar 2011, Takashi Iwai wrote:
>>> Does this happen with 2.6.38 kernel, too?
>>
>> I have not tried yet, do you have reason to think it may have changed
>> since 2.6.32?
>
> Lots of changes since 2.6.32. I won't be surprised if any of them hits.
>
>> Can I build just the sound driver without replacing the whole kernel?
>
> You can try alsa-driver tarball.
Unfortunately, I can confirm that stock 2.6.38 does NOT resolve the pops
on suspend and resume.
I was able to build a driver from the alsa-driver tarball, but it refused
to load on the Ubuntu 2.6.32 kernel due to unresolved symbols for reasons
unknown.
Cheers, Chris.
--
_____ __ _
\ __/ / ,__(_)_ | Chris Wilson <chris+sig@qwirx.com> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-24 22:41 ` Chris Wilson
@ 2011-03-25 7:00 ` Takashi Iwai
2011-03-25 7:43 ` Kailang
2011-03-25 23:40 ` Chris Wilson
0 siblings, 2 replies; 19+ messages in thread
From: Takashi Iwai @ 2011-03-25 7:00 UTC (permalink / raw)
To: Chris Wilson
Cc: alsa-devel, Kailang Yang, andy.kopp, dan.d.kogan, Wu Fengguang,
PeiSen Hou
At Thu, 24 Mar 2011 22:41:47 +0000 (GMT),
Chris Wilson wrote:
>
> Hi Takashi and all,
>
> On Thu, 24 Mar 2011, Takashi Iwai wrote:
>
> >>> Does this happen with 2.6.38 kernel, too?
> >>
> >> I have not tried yet, do you have reason to think it may have changed
> >> since 2.6.32?
> >
> > Lots of changes since 2.6.32. I won't be surprised if any of them hits.
> >
> >> Can I build just the sound driver without replacing the whole kernel?
> >
> > You can try alsa-driver tarball.
>
> Unfortunately, I can confirm that stock 2.6.38 does NOT resolve the pops
> on suspend and resume.
OK, then did you try to set option power_save_controller=0 for
snd-hda-intel?
ALC269 has some workarounds using COEF magic. Maybe there is a
similar trick for ALC663. Kailang, do you know of it?
thanks,
Takashi
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-25 7:00 ` Takashi Iwai
@ 2011-03-25 7:43 ` Kailang
2011-03-25 7:52 ` Takashi Iwai
2011-03-25 23:40 ` Chris Wilson
1 sibling, 1 reply; 19+ messages in thread
From: Kailang @ 2011-03-25 7:43 UTC (permalink / raw)
To: Takashi Iwai, Chris Wilson
Cc: Pshou, alsa-devel, Wu Fengguang, dan.d.kogan, andy.kopp
> ALC269 has some workarounds using COEF magic. Maybe there is a
> similar trick for ALC663. Kailang, do you know of it?
ALC663 has no this control bits like ALC269.
But it can use EAPD to control it.
The EAPD pull low before suspend.
When the resume back, run the EAPD to pull high first.
I could send the patch for you later.
Kailang
----- Original Message -----
From: Takashi Iwai
To: Chris Wilson
Cc: Wu Fengguang ; Pshou ; Kailang ; andy.kopp@intel.com ;
dan.d.kogan@intel.com ; alsa-devel@alsa-project.org
Sent: Friday, March 25, 2011 3:00 PM
Subject: Re: Loud pops from Intel HDA onboard sound, may damage speakers
(fwd)
At Thu, 24 Mar 2011 22:41:47 +0000 (GMT),
Chris Wilson wrote:
>
> Hi Takashi and all,
>
> On Thu, 24 Mar 2011, Takashi Iwai wrote:
>
> >>> Does this happen with 2.6.38 kernel, too?
> >>
> >> I have not tried yet, do you have reason to think it may have changed
> >> since 2.6.32?
> >
> > Lots of changes since 2.6.32. I won't be surprised if any of them hits.
> >
> >> Can I build just the sound driver without replacing the whole kernel?
> >
> > You can try alsa-driver tarball.
>
> Unfortunately, I can confirm that stock 2.6.38 does NOT resolve the pops
> on suspend and resume.
OK, then did you try to set option power_save_controller=0 for
snd-hda-intel?
ALC269 has some workarounds using COEF magic. Maybe there is a
similar trick for ALC663. Kailang, do you know of it?
thanks,
Takashi
------Please consider the environment before printing this e-mail.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-25 7:43 ` Kailang
@ 2011-03-25 7:52 ` Takashi Iwai
2011-03-25 8:05 ` Kailang
0 siblings, 1 reply; 19+ messages in thread
From: Takashi Iwai @ 2011-03-25 7:52 UTC (permalink / raw)
To: Kailang
Cc: alsa-devel, andy.kopp, dan.d.kogan, Pshou, Wu Fengguang,
Chris Wilson
At Fri, 25 Mar 2011 15:43:55 +0800,
Kailang wrote:
>
>
> > ALC269 has some workarounds using COEF magic. Maybe there is a
> > similar trick for ALC663. Kailang, do you know of it?
>
> ALC663 has no this control bits like ALC269.
> But it can use EAPD to control it.
> The EAPD pull low before suspend.
> When the resume back, run the EAPD to pull high first.
>
> I could send the patch for you later.
Thanks.
I vaguely remember that this was tried for other codecs but didn't
give good results (rather worse). Anyway let's check again.
Takashi
>
> Kailang
>
> ----- Original Message -----
> From: Takashi Iwai
> To: Chris Wilson
> Cc: Wu Fengguang ; Pshou ; Kailang ; andy.kopp@intel.com ;
> dan.d.kogan@intel.com ; alsa-devel@alsa-project.org
> Sent: Friday, March 25, 2011 3:00 PM
> Subject: Re: Loud pops from Intel HDA onboard sound, may damage speakers
> (fwd)
>
>
> At Thu, 24 Mar 2011 22:41:47 +0000 (GMT),
> Chris Wilson wrote:
> >
> > Hi Takashi and all,
> >
> > On Thu, 24 Mar 2011, Takashi Iwai wrote:
> >
> > >>> Does this happen with 2.6.38 kernel, too?
> > >>
> > >> I have not tried yet, do you have reason to think it may have changed
> > >> since 2.6.32?
> > >
> > > Lots of changes since 2.6.32. I won't be surprised if any of them hits.
> > >
> > >> Can I build just the sound driver without replacing the whole kernel?
> > >
> > > You can try alsa-driver tarball.
> >
> > Unfortunately, I can confirm that stock 2.6.38 does NOT resolve the pops
> > on suspend and resume.
>
> OK, then did you try to set option power_save_controller=0 for
> snd-hda-intel?
>
> ALC269 has some workarounds using COEF magic. Maybe there is a
> similar trick for ALC663. Kailang, do you know of it?
>
>
> thanks,
>
> Takashi
>
> ------Please consider the environment before printing this e-mail.
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-25 7:52 ` Takashi Iwai
@ 2011-03-25 8:05 ` Kailang
2011-03-25 8:13 ` Takashi Iwai
0 siblings, 1 reply; 19+ messages in thread
From: Kailang @ 2011-03-25 8:05 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, andy.kopp, dan.d.kogan, Pshou, Wu Fengguang,
Chris Wilson
[-- Attachment #1: Type: text/plain, Size: 2471 bytes --]
Hi Takashi,
Attachment was the patch that refference by snapshot 2011.03.25.
Fixed & Update List:
patch_realtek.c
- ALC662
- Fixed ALC66x pop noise on suspend and resume.
This patch that I test on Acer NB. The result is better than before.
Could you know how to pull EAPD to low on power down state?
Best Regards,
Kailang
----- Original Message -----
From: Takashi Iwai
To: Kailang
Cc: Chris Wilson ; Wu Fengguang ; Pshou ; andy.kopp@intel.com ;
dan.d.kogan@intel.com ; alsa-devel@alsa-project.org
Sent: Friday, March 25, 2011 3:52 PM
Subject: Re: Loud pops from Intel HDA onboard sound, may damage speakers
(fwd)
At Fri, 25 Mar 2011 15:43:55 +0800,
Kailang wrote:
>
>
> > ALC269 has some workarounds using COEF magic. Maybe there is a
> > similar trick for ALC663. Kailang, do you know of it?
>
> ALC663 has no this control bits like ALC269.
> But it can use EAPD to control it.
> The EAPD pull low before suspend.
> When the resume back, run the EAPD to pull high first.
>
> I could send the patch for you later.
Thanks.
I vaguely remember that this was tried for other codecs but didn't
give good results (rather worse). Anyway let's check again.
Takashi
>
> Kailang
>
> ----- Original Message -----
> From: Takashi Iwai
> To: Chris Wilson
> Cc: Wu Fengguang ; Pshou ; Kailang ; andy.kopp@intel.com ;
> dan.d.kogan@intel.com ; alsa-devel@alsa-project.org
> Sent: Friday, March 25, 2011 3:00 PM
> Subject: Re: Loud pops from Intel HDA onboard sound, may damage speakers
> (fwd)
>
>
> At Thu, 24 Mar 2011 22:41:47 +0000 (GMT),
> Chris Wilson wrote:
> >
> > Hi Takashi and all,
> >
> > On Thu, 24 Mar 2011, Takashi Iwai wrote:
> >
> > >>> Does this happen with 2.6.38 kernel, too?
> > >>
> > >> I have not tried yet, do you have reason to think it may have changed
> > >> since 2.6.32?
> > >
> > > Lots of changes since 2.6.32. I won't be surprised if any of them
> > > hits.
> > >
> > >> Can I build just the sound driver without replacing the whole kernel?
> > >
> > > You can try alsa-driver tarball.
> >
> > Unfortunately, I can confirm that stock 2.6.38 does NOT resolve the pops
> > on suspend and resume.
>
> OK, then did you try to set option power_save_controller=0 for
> snd-hda-intel?
>
> ALC269 has some workarounds using COEF magic. Maybe there is a
> similar trick for ALC663. Kailang, do you know of it?
>
>
> thanks,
>
> Takashi
>
> ------Please consider the environment before printing this e-mail.
>
[-- Attachment #2: patch_realtek.diff --]
[-- Type: application/octet-stream, Size: 1367 bytes --]
--- patch_realtek.c.20110325 2011-03-25 15:54:03.000000000 +0800
+++ patch_realtek.c 2011-03-25 15:54:42.000000000 +0800
@@ -19494,6 +19494,33 @@ static const struct alc_model_fixup alc6
{}
};
+#ifdef CONFIG_SND_HDA_POWER_SAVE
+static int alc662_suspend(struct hda_codec *codec, pm_message_t state)
+{
+ struct alc_spec *spec = codec->spec;
+
+ set_eapd(codec, 0x14, 0);
+ set_eapd(codec, 0x15, 0);
+ msleep(200);
+
+ alc_shutup(codec);
+ if (spec && spec->power_hook)
+ spec->power_hook(codec);
+ return 0;
+}
+#endif /* CONFIG_SND_HDA_POWER_SAVE */
+#ifdef SND_HDA_NEEDS_RESUME
+static int alc662_resume(struct hda_codec *codec)
+{
+ msleep(150);
+ codec->patch_ops.init(codec);
+ msleep(150);
+ snd_hda_codec_resume_amp(codec);
+ snd_hda_codec_resume_cache(codec);
+ hda_call_check_power_status(codec, 0x01);
+ return 0;
+}
+#endif /* SND_HDA_NEEDS_RESUME */
static int patch_alc662(struct hda_codec *codec)
{
@@ -19594,6 +19621,12 @@ static int patch_alc662(struct hda_codec
alc_apply_fixup(codec, ALC_FIXUP_ACT_PROBE);
codec->patch_ops = alc_patch_ops;
+#ifdef CONFIG_SND_HDA_POWER_SAVE
+ codec->patch_ops.suspend = alc662_suspend;
+#endif
+#ifdef SND_HDA_NEEDS_RESUME
+ codec->patch_ops.resume = alc662_resume;
+#endif
if (board_config == ALC662_AUTO)
spec->init_hook = alc662_auto_init;
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-25 8:05 ` Kailang
@ 2011-03-25 8:13 ` Takashi Iwai
2011-03-25 8:22 ` Kailang
[not found] ` <alpine.DEB.2.00.1103261413390.2926@chris-desktop.fen.aptivate.org>
0 siblings, 2 replies; 19+ messages in thread
From: Takashi Iwai @ 2011-03-25 8:13 UTC (permalink / raw)
To: Kailang
Cc: alsa-devel, andy.kopp, dan.d.kogan, Pshou, Wu Fengguang,
Chris Wilson
At Fri, 25 Mar 2011 16:05:48 +0800,
Kailang wrote:
>
> Hi Takashi,
>
> Attachment was the patch that refference by snapshot 2011.03.25.
>
> Fixed & Update List:
> patch_realtek.c
> - ALC662
> - Fixed ALC66x pop noise on suspend and resume.
>
> This patch that I test on Acer NB. The result is better than before.
> Could you know how to pull EAPD to low on power down state?
We should add hook alc_shutup(). It's called also at shutdown path.
For example, add spec->shutup callback, and move the eapd and delay
into there. ALC269 PM changes can be changed similarly.
An open question is how to handle the wake-up (resume) case.
I see you added two delays. Do they give significant difference?
I'm wondering whether the second delay gives any difference.
The first one is the point just after power-state change, so it
can influence. But the second delay is for...?
thanks,
Takashi
>
> Best Regards,
> Kailang
>
> ----- Original Message -----
> From: Takashi Iwai
> To: Kailang
> Cc: Chris Wilson ; Wu Fengguang ; Pshou ; andy.kopp@intel.com ;
> dan.d.kogan@intel.com ; alsa-devel@alsa-project.org
> Sent: Friday, March 25, 2011 3:52 PM
> Subject: Re: Loud pops from Intel HDA onboard sound, may damage speakers
> (fwd)
>
>
> At Fri, 25 Mar 2011 15:43:55 +0800,
> Kailang wrote:
> >
> >
> > > ALC269 has some workarounds using COEF magic. Maybe there is a
> > > similar trick for ALC663. Kailang, do you know of it?
> >
> > ALC663 has no this control bits like ALC269.
> > But it can use EAPD to control it.
> > The EAPD pull low before suspend.
> > When the resume back, run the EAPD to pull high first.
> >
> > I could send the patch for you later.
>
> Thanks.
>
> I vaguely remember that this was tried for other codecs but didn't
> give good results (rather worse). Anyway let's check again.
>
>
> Takashi
>
> >
> > Kailang
> >
> > ----- Original Message -----
> > From: Takashi Iwai
> > To: Chris Wilson
> > Cc: Wu Fengguang ; Pshou ; Kailang ; andy.kopp@intel.com ;
> > dan.d.kogan@intel.com ; alsa-devel@alsa-project.org
> > Sent: Friday, March 25, 2011 3:00 PM
> > Subject: Re: Loud pops from Intel HDA onboard sound, may damage speakers
> > (fwd)
> >
> >
> > At Thu, 24 Mar 2011 22:41:47 +0000 (GMT),
> > Chris Wilson wrote:
> > >
> > > Hi Takashi and all,
> > >
> > > On Thu, 24 Mar 2011, Takashi Iwai wrote:
> > >
> > > >>> Does this happen with 2.6.38 kernel, too?
> > > >>
> > > >> I have not tried yet, do you have reason to think it may have changed
> > > >> since 2.6.32?
> > > >
> > > > Lots of changes since 2.6.32. I won't be surprised if any of them
> > > > hits.
> > > >
> > > >> Can I build just the sound driver without replacing the whole kernel?
> > > >
> > > > You can try alsa-driver tarball.
> > >
> > > Unfortunately, I can confirm that stock 2.6.38 does NOT resolve the pops
> > > on suspend and resume.
> >
> > OK, then did you try to set option power_save_controller=0 for
> > snd-hda-intel?
> >
> > ALC269 has some workarounds using COEF magic. Maybe there is a
> > similar trick for ALC663. Kailang, do you know of it?
> >
> >
> > thanks,
> >
> > Takashi
> >
> > ------Please consider the environment before printing this e-mail.
> >
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-25 8:13 ` Takashi Iwai
@ 2011-03-25 8:22 ` Kailang
[not found] ` <alpine.DEB.2.00.1103261413390.2926@chris-desktop.fen.aptivate.org>
1 sibling, 0 replies; 19+ messages in thread
From: Kailang @ 2011-03-25 8:22 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, andy.kopp, dan.d.kogan, Pshou, Wu Fengguang,
Chris Wilson
Hi Takashi,
Maybe second delay is unnecessary.
I am reference from windows.
Some IC need to have second delay after initial.
Kailang
----- Original Message -----
From: Takashi Iwai
To: Kailang
Cc: Chris Wilson ; Wu Fengguang ; Pshou ; andy.kopp@intel.com ;
dan.d.kogan@intel.com ; alsa-devel@alsa-project.org
Sent: Friday, March 25, 2011 4:13 PM
Subject: Re: Loud pops from Intel HDA onboard sound, may damage speakers
(fwd)
At Fri, 25 Mar 2011 16:05:48 +0800,
Kailang wrote:
>
> Hi Takashi,
>
> Attachment was the patch that refference by snapshot 2011.03.25.
>
> Fixed & Update List:
> patch_realtek.c
> - ALC662
> - Fixed ALC66x pop noise on suspend and resume.
>
> This patch that I test on Acer NB. The result is better than before.
> Could you know how to pull EAPD to low on power down state?
We should add hook alc_shutup(). It's called also at shutdown path.
For example, add spec->shutup callback, and move the eapd and delay
into there. ALC269 PM changes can be changed similarly.
An open question is how to handle the wake-up (resume) case.
I see you added two delays. Do they give significant difference?
I'm wondering whether the second delay gives any difference.
The first one is the point just after power-state change, so it
can influence. But the second delay is for...?
thanks,
Takashi
>
> Best Regards,
> Kailang
>
> ----- Original Message -----
> From: Takashi Iwai
> To: Kailang
> Cc: Chris Wilson ; Wu Fengguang ; Pshou ; andy.kopp@intel.com ;
> dan.d.kogan@intel.com ; alsa-devel@alsa-project.org
> Sent: Friday, March 25, 2011 3:52 PM
> Subject: Re: Loud pops from Intel HDA onboard sound, may damage speakers
> (fwd)
>
>
> At Fri, 25 Mar 2011 15:43:55 +0800,
> Kailang wrote:
> >
> >
> > > ALC269 has some workarounds using COEF magic. Maybe there is a
> > > similar trick for ALC663. Kailang, do you know of it?
> >
> > ALC663 has no this control bits like ALC269.
> > But it can use EAPD to control it.
> > The EAPD pull low before suspend.
> > When the resume back, run the EAPD to pull high first.
> >
> > I could send the patch for you later.
>
> Thanks.
>
> I vaguely remember that this was tried for other codecs but didn't
> give good results (rather worse). Anyway let's check again.
>
>
> Takashi
>
> >
> > Kailang
> >
> > ----- Original Message -----
> > From: Takashi Iwai
> > To: Chris Wilson
> > Cc: Wu Fengguang ; Pshou ; Kailang ; andy.kopp@intel.com ;
> > dan.d.kogan@intel.com ; alsa-devel@alsa-project.org
> > Sent: Friday, March 25, 2011 3:00 PM
> > Subject: Re: Loud pops from Intel HDA onboard sound, may damage speakers
> > (fwd)
> >
> >
> > At Thu, 24 Mar 2011 22:41:47 +0000 (GMT),
> > Chris Wilson wrote:
> > >
> > > Hi Takashi and all,
> > >
> > > On Thu, 24 Mar 2011, Takashi Iwai wrote:
> > >
> > > >>> Does this happen with 2.6.38 kernel, too?
> > > >>
> > > >> I have not tried yet, do you have reason to think it may have
> > > >> changed
> > > >> since 2.6.32?
> > > >
> > > > Lots of changes since 2.6.32. I won't be surprised if any of them
> > > > hits.
> > > >
> > > >> Can I build just the sound driver without replacing the whole
> > > >> kernel?
> > > >
> > > > You can try alsa-driver tarball.
> > >
> > > Unfortunately, I can confirm that stock 2.6.38 does NOT resolve the
> > > pops
> > > on suspend and resume.
> >
> > OK, then did you try to set option power_save_controller=0 for
> > snd-hda-intel?
> >
> > ALC269 has some workarounds using COEF magic. Maybe there is a
> > similar trick for ALC663. Kailang, do you know of it?
> >
> >
> > thanks,
> >
> > Takashi
> >
> > ------Please consider the environment before printing this e-mail.
> >
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-25 7:00 ` Takashi Iwai
2011-03-25 7:43 ` Kailang
@ 2011-03-25 23:40 ` Chris Wilson
2011-03-26 8:35 ` Takashi Iwai
1 sibling, 1 reply; 19+ messages in thread
From: Chris Wilson @ 2011-03-25 23:40 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, Kailang Yang, andy.kopp, dan.d.kogan, Wu Fengguang,
PeiSen Hou
Hi Takashi,
On Fri, 25 Mar 2011, Takashi Iwai wrote:
>> Unfortunately, I can confirm that stock 2.6.38 does NOT resolve the
>> pops on suspend and resume.
>
> OK, then did you try to set option power_save_controller=0 for
> snd-hda-intel?
I tried this by adding the following line to
/etc/modprobe.d/alsa-base.conf:
options snd-hda-intel power_save_controller=0
and after a reboot, I still get the same pops on suspend and resume. Is
there some way to check dynamically whether the settings of the driver
match what's configured here?
Cheers, Chris.
--
_____ __ _
\ __/ / ,__(_)_ | Chris Wilson <chris+sig@qwirx.com> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-25 23:40 ` Chris Wilson
@ 2011-03-26 8:35 ` Takashi Iwai
2011-03-26 12:12 ` Chris Wilson
0 siblings, 1 reply; 19+ messages in thread
From: Takashi Iwai @ 2011-03-26 8:35 UTC (permalink / raw)
To: Chris Wilson
Cc: alsa-devel, Kailang Yang, andy.kopp, dan.d.kogan, Wu Fengguang,
PeiSen Hou
At Fri, 25 Mar 2011 23:40:42 +0000 (GMT),
Chris Wilson wrote:
>
> Hi Takashi,
>
> On Fri, 25 Mar 2011, Takashi Iwai wrote:
>
> >> Unfortunately, I can confirm that stock 2.6.38 does NOT resolve the
> >> pops on suspend and resume.
> >
> > OK, then did you try to set option power_save_controller=0 for
> > snd-hda-intel?
>
> I tried this by adding the following line to
> /etc/modprobe.d/alsa-base.conf:
>
> options snd-hda-intel power_save_controller=0
>
> and after a reboot, I still get the same pops on suspend and resume. Is
> there some way to check dynamically whether the settings of the driver
> match what's configured here?
The actual value is shown in /sys/module/snd_hda_intel/parameters/*.
Takashi
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-26 8:35 ` Takashi Iwai
@ 2011-03-26 12:12 ` Chris Wilson
2011-03-26 12:22 ` Takashi Iwai
0 siblings, 1 reply; 19+ messages in thread
From: Chris Wilson @ 2011-03-26 12:12 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, Kailang Yang, andy.kopp, dan.d.kogan, Wu Fengguang,
PeiSen Hou
Hi Takashi,
On Sat, 26 Mar 2011, Takashi Iwai wrote:
> At Fri, 25 Mar 2011 23:40:42 +0000 (GMT),
>>>> Unfortunately, I can confirm that stock 2.6.38 does NOT resolve the
>>>> pops on suspend and resume.
>>>
>>> OK, then did you try to set option power_save_controller=0 for
>>> snd-hda-intel?
>>
>> I tried this by adding the following line to
>> /etc/modprobe.d/alsa-base.conf:
>>
>> options snd-hda-intel power_save_controller=0
>>
>> and after a reboot, I still get the same pops on suspend and resume. Is
>> there some way to check dynamically whether the settings of the driver
>> match what's configured here?
>
> The actual value is shown in /sys/module/snd_hda_intel/parameters/*.
Thanks, it shows the value "N", is that the same as "0"?
chris@chris-desktop:~$ cat
/sys/module/snd_hda_intel/parameters/power_save_controller
N
Cheers, Chris.
--
_____ __ _
\ __/ / ,__(_)_ | Chris Wilson <chris+sig@qwirx.com> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-26 12:12 ` Chris Wilson
@ 2011-03-26 12:22 ` Takashi Iwai
2011-03-26 12:29 ` Chris Wilson
0 siblings, 1 reply; 19+ messages in thread
From: Takashi Iwai @ 2011-03-26 12:22 UTC (permalink / raw)
To: Chris Wilson
Cc: alsa-devel, Kailang Yang, andy.kopp, dan.d.kogan, Wu Fengguang,
PeiSen Hou
At Sat, 26 Mar 2011 12:12:46 +0000 (GMT),
Chris Wilson wrote:
>
> Hi Takashi,
>
> On Sat, 26 Mar 2011, Takashi Iwai wrote:
> > At Fri, 25 Mar 2011 23:40:42 +0000 (GMT),
>
> >>>> Unfortunately, I can confirm that stock 2.6.38 does NOT resolve the
> >>>> pops on suspend and resume.
> >>>
> >>> OK, then did you try to set option power_save_controller=0 for
> >>> snd-hda-intel?
> >>
> >> I tried this by adding the following line to
> >> /etc/modprobe.d/alsa-base.conf:
> >>
> >> options snd-hda-intel power_save_controller=0
> >>
> >> and after a reboot, I still get the same pops on suspend and resume. Is
> >> there some way to check dynamically whether the settings of the driver
> >> match what's configured here?
> >
> > The actual value is shown in /sys/module/snd_hda_intel/parameters/*.
>
> Thanks, it shows the value "N", is that the same as "0"?
Yes.
Did you already try Kailang's patch?
Takashi
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-26 12:22 ` Takashi Iwai
@ 2011-03-26 12:29 ` Chris Wilson
2011-03-26 12:34 ` Takashi Iwai
0 siblings, 1 reply; 19+ messages in thread
From: Chris Wilson @ 2011-03-26 12:29 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, Kailang Yang, andy.kopp, dan.d.kogan, Wu Fengguang,
PeiSen Hou
Hi Takashi,
On Sat, 26 Mar 2011, Takashi Iwai wrote:
> Did you already try Kailang's patch?
No, he didn't send it to me, I don't have it.
Cheers, Chris.
--
_____ __ _
\ __/ / ,__(_)_ | Chris Wilson <chris+sig@qwirx.com> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
2011-03-26 12:29 ` Chris Wilson
@ 2011-03-26 12:34 ` Takashi Iwai
0 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2011-03-26 12:34 UTC (permalink / raw)
To: Chris Wilson
Cc: alsa-devel, Kailang Yang, andy.kopp, dan.d.kogan, Wu Fengguang,
PeiSen Hou
At Sat, 26 Mar 2011 12:29:21 +0000 (GMT),
Chris Wilson wrote:
>
> Hi Takashi,
>
> On Sat, 26 Mar 2011, Takashi Iwai wrote:
>
> > Did you already try Kailang's patch?
>
> No, he didn't send it to me, I don't have it.
He did. You were certainly in Cc list.
Check your spam folder whether his post was wrongly sorted.
It happens often as he is using non-latin coding.
Takashi
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
[not found] ` <alpine.DEB.2.00.1103270325470.2484@chris-desktop.fen.aptivate.org>
@ 2011-03-29 13:16 ` Takashi Iwai
0 siblings, 0 replies; 19+ messages in thread
From: Takashi Iwai @ 2011-03-29 13:16 UTC (permalink / raw)
To: Chris Wilson; +Cc: alsa-devel, Kailang
At Sun, 27 Mar 2011 03:27:28 +0100 (BST),
Chris Wilson wrote:
>
> Hi Takashi,
>
> On Sat, 26 Mar 2011, Takashi Iwai wrote:
>
> > I attached below. This is no final version and we are working on it. But
> > it'd be helpful if you can test it whether it solves the issue.
>
> Thanks for sending the patch :) I think it makes some progress towards
> solving the issue. On suspend I now get only one pop instead of two, and
> none on resume. The pop that I still get on suspend is the one that causes
> my amplifier to trip out (which was the second one previously).
Good to hear of improvements.
I cleaned up the patch a bit. Could you try the patch below instead?
I removed the second msleep() in the resume callback, supposedly it's
irrelevant. If you get a noise again in the resume path, try to add
msleep(150) after codec->patch_ops.init() in alc_resume().
The remaining noise in the suspend path is still unclear.
We have one place that we do NOT turn down the power to D3 -- in
hda_set_power_state() in hda_codec.c, D3-transition is skipped on a
widget with EAPD control. It's interesting whether any widgets hit
this.
Otherwise, we may need to check which call actually gives the noise.
You can put a printk() and a long timeout at each line, and watch the
kernel message....
thanks,
Takashi
---
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 12c6f45..29eb397 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -375,6 +375,7 @@ struct alc_spec {
#ifdef CONFIG_SND_HDA_POWER_SAVE
void (*power_hook)(struct hda_codec *codec);
#endif
+ void (*shutup)(struct hda_codec *codec);
/* for pin sensing */
unsigned int sense_updated: 1;
@@ -1236,6 +1237,15 @@ static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on)
on ? 2 : 0);
}
+static void alc_eapd_shutup(struct hda_codec *codec)
+{
+ struct alc_spec *spec = codec->spec;
+
+ set_eapd(codec, 0x14, 0);
+ set_eapd(codec, 0x15, 0);
+ msleep(200);
+}
+
static void alc_auto_init_amp(struct hda_codec *codec, int type)
{
unsigned int tmp;
@@ -4193,6 +4203,10 @@ static int alc_build_pcms(struct hda_codec *codec)
static inline void alc_shutup(struct hda_codec *codec)
{
+ struct alc_spec *spec = codec->spec;
+
+ if (spec && spec->shutup)
+ spec->shutup(codec);
snd_hda_shutup_pins(codec);
}
@@ -4263,6 +4277,7 @@ static int alc_suspend(struct hda_codec *codec, pm_message_t state)
#ifdef SND_HDA_NEEDS_RESUME
static int alc_resume(struct hda_codec *codec)
{
+ msleep(150); /* to avoid pop noise */
codec->patch_ops.init(codec);
snd_hda_codec_resume_amp(codec);
snd_hda_codec_resume_cache(codec);
@@ -13018,6 +13033,7 @@ static int patch_alc262(struct hda_codec *codec)
codec->patch_ops = alc_patch_ops;
if (board_config == ALC262_AUTO)
spec->init_hook = alc262_auto_init;
+ spec->shutup = alc_eapd_shutup;
alc_init_jacks(codec);
#ifdef CONFIG_SND_HDA_POWER_SAVE
@@ -14092,6 +14108,7 @@ static int patch_alc268(struct hda_codec *codec)
codec->patch_ops = alc_patch_ops;
if (board_config == ALC268_AUTO)
spec->init_hook = alc268_auto_init;
+ spec->shutup = alc_eapd_shutup;
alc_init_jacks(codec);
@@ -17410,6 +17418,8 @@ static int patch_alc861vd(struct hda_codec *codec)
if (board_config == ALC861VD_AUTO)
spec->init_hook = alc861vd_auto_init;
+ spec->shutup = alc_eapd_shutup;
+
#ifdef CONFIG_SND_HDA_POWER_SAVE
if (!spec->loopback.amplist)
spec->loopback.amplist = alc861vd_loopbacks;
@@ -19611,6 +19621,7 @@ static int patch_alc662(struct hda_codec *codec)
codec->patch_ops = alc_patch_ops;
if (board_config == ALC662_AUTO)
spec->init_hook = alc662_auto_init;
+ spec->shutup = alc_eapd_shutup;
alc_init_jacks(codec);
^ permalink raw reply related [flat|nested] 19+ messages in thread
end of thread, other threads:[~2011-03-29 13:16 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <alpine.DEB.2.00.1103240135291.1780@chris-desktop.fen.aptivate.org>
2011-03-24 1:43 ` Loud pops from Intel HDA onboard sound, may damage speakers (fwd) Wu Fengguang
2011-03-24 9:36 ` Chris Wilson
2011-03-24 9:58 ` Takashi Iwai
2011-03-24 12:05 ` Chris Wilson
2011-03-24 12:09 ` Takashi Iwai
2011-03-24 22:41 ` Chris Wilson
2011-03-25 7:00 ` Takashi Iwai
2011-03-25 7:43 ` Kailang
2011-03-25 7:52 ` Takashi Iwai
2011-03-25 8:05 ` Kailang
2011-03-25 8:13 ` Takashi Iwai
2011-03-25 8:22 ` Kailang
[not found] ` <alpine.DEB.2.00.1103261413390.2926@chris-desktop.fen.aptivate.org>
[not found] ` <s5h1v1tu2za.wl%tiwai@suse.de>
[not found] ` <alpine.DEB.2.00.1103270325470.2484@chris-desktop.fen.aptivate.org>
2011-03-29 13:16 ` Takashi Iwai
2011-03-25 23:40 ` Chris Wilson
2011-03-26 8:35 ` Takashi Iwai
2011-03-26 12:12 ` Chris Wilson
2011-03-26 12:22 ` Takashi Iwai
2011-03-26 12:29 ` Chris Wilson
2011-03-26 12:34 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.