Re: [alsa-devel] Loud pops from Intel HDA onboard sound, may damage speakers (fwd)
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 |
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.
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
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.
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
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.
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
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.
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.
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.
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.
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.
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.
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
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.
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
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.
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
participants (4)
-
Chris Wilson
-
Kailang
-
Takashi Iwai
-
Wu Fengguang