Summary: | Strong noise (unintelligible) when playing through the analog output using mmap | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | Mario Sanchez Prada <msanchez> |
Component: | alsa | Assignee: | pulseaudio-bugs |
Status: | RESOLVED NOTOURBUG | QA Contact: | pulseaudio-bugs |
Severity: | normal | ||
Priority: | medium | CC: | cosimoc, diwic, lennart |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Output of alsa-info.sh
Output of pactl list Output of pactl info Output of dmesg when loading the snd-hda-intel module |
Description
Mario Sanchez Prada
2014-12-10 19:09:36 UTC
Created attachment 110687 [details]
Output of pactl list
Created attachment 110688 [details]
Output of pactl info
I still have the feeling this is kernel/driver/hw related. At least we have this message in the log: [ 327.857108] hda-intel 0000:00:1b.0: Unstable LPIB (17628 >= 4408); disabling LPIB delay counting Could you tell if this is related to when the error happens for the first time? Also, when this error is happening, do you have *constant* entries in the debug log about rewinds? It's natural to have them when you change volume, but not for them to persist after the volume change is completed. Ah, actually I remember a noise once appearing after changing the volume constantly for a while. This was for an AMD Hudson chip though, so not sure if it is related, but feel free to try option snd-hda-intel enable_msi=0 ...same procedure as when you tried the position fix stuff (reboot to test). Created attachment 110736 [details] Output of dmesg when loading the snd-hda-intel module (In reply to David Henningsson from comment #3) > I still have the feeling this is kernel/driver/hw related. At least we have > this message in the log: > > [ 327.857108] hda-intel 0000:00:1b.0: Unstable LPIB (17628 >= 4408); > disabling LPIB delay counting > > Could you tell if this is related to when the error happens for the first > time? I can't really tell, as I could not see anymore that message in the output of dmesg after trying this morning (even if I managed to reproduce the noise again). The only output I can see in dmesg happens at the time of loading the snd-hda-intel module, which I'm attaching right now. > Also, when this error is happening, do you have *constant* entries in the > debug log about rewinds? It's natural to have them when you change volume, > but not for them to persist after the volume change is completed. No constant entries, only when changing the volume or when switching between output devices (headphones <-> HDMI). By the way, sometimes it's harder than other times for me to get the noise by simply modifying the volume (although I eventually get the noise anyway), but when that happens just switching to HDMI and then back to headphones usually makes me get the noise easily (after no more than 1-3 attempts, normally). Not sure how relevant this is to the discussion, but I thought I would mention it because I saw rewinds are also involved when switching between outputs. (In reply to David Henningsson from comment #4) > Ah, actually I remember a noise once appearing after changing the volume > constantly for a while. This was for an AMD Hudson chip though, so not sure > if it is related, but feel free to try > > option snd-hda-intel enable_msi=0 > > ...same procedure as when you tried the position fix stuff (reboot to test). I've tried that too, but did not work either. Thanks for the tip anyway, that's something I certainly hadn't tried yet. I'm now in the process of carefully checking the mmap path (down into the kernel if needed too) to see whether I can figure out the culprit at a more fine-grained level. After so much testing and gdb debugging today I finally identified the problem in alsa-lib, after following the lead from the experiment mentioned in "Note 1", and it seems to be caused by the call to snd_pcm_mmap_begin() returning the wrong memory chunks in the areas array, leading to the strange noise mentioned. With that in mind, I started looking inside of alsa-lib, and found significant differences between the latest code in the 0.28 release and the one I've available in my environment, which is quite older (0.25). And even better, I found that just upgrading to that newer version of alsa-lib would get rid of the noise, so indeed it seems the problem was there! I've devoted a bit more of time to try to find the specific changeset and it seems that the the fix for bug 64299 is the one fixing this specific: http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=f2d39afe6139ab16aa2aeea0f51f32db79ab1262 I found that commit by simply looking at the changelog and looking for things related to either mmap or rewinds, and then applying it locally to my package as a patch on top, so I'm pretty certain that it fixes the problem. Still, I would appreciate if someone (maybe David, as the author) could comment on whether this makes sense, so we can maybe resolve this bug as a duplicate or invalid. I think this makes sense, yes. Thanks for the follow-up. I e, the bug starts happening when you switch output or change volume, and in these cases PulseAudio fires one or more rewinds, and the patch fixes an issue that is rewind related. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.