Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 331615 - media-sound/pulseaudio volume adjustments cause hissing / glitching
Summary: media-sound/pulseaudio volume adjustments cause hissing / glitching
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-08 06:16 UTC by Xepher
Modified: 2010-11-26 04:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xepher 2010-08-08 06:16:46 UTC
Alright, this is highly specific, but highly repeatable.

When I adjust the sound volume, using the default pulseaudio master volume mixer controls, many settings result in a high frequency hissing. A sort of "tinny" noise, like poorly encoded mp3s. I manually opened up the underlying alsa device mixer and I notice that, when adjusting the pulse volume, it actually adjusts the alsa-master volume for the most part, but the alsa-pcm volume fluctuates between 98 and 100 percent. Near as I can tell, pulse is using alsa-master for main control, but if it can't hit the exact volume it wants, it also adjusts alsa-pcm for "fine" control. The increments on alsa-pcm channel are 0.2db, whereas the increments on alsa-master are 1.0db, so that makes sense. If I choose a pulse volume where it sets alsa-pcm to 100% (-0.0db) the sound is fine. But any other settings result in hissing. However, if I use "alsamixer -D hw:0" to manually adjust alsa-pcm and/or alsa-master (in any combination) I can't reproduce the effect, hence why I feel this is a pulseaudio bug, not alsa. My guess is that pulse is attempting to directly set alsa-pcm using some even smaller (and not directly supported) increment.

My workaround is to use the main pulse-volume control to set the volume (via the multimedia keys on my keyboard) and I then assigned the unused web/home button on my keyboard to call "amixer -D hw set PCM 255" which just resets alsa-pcm to 100% (the less-than-1db change doesn't bother me.) I just hit that key after each time I adjust the sound, and it removes all hissing, but obviously that's not a long term solution.

Reproducible: Always

Steps to Reproduce:
1. Use pulseaudio
2. Adjust pulse master volume randomly
3. Hissing occurs except at a select few points (such as 100%).

Actual Results:  
Hissing, ruining all sound quality.

Expected Results:  
Sound should be constant quality, despite volume setting.

I have nvidia 680i onboard sound. That's the alsa hda-intel driver, specifically for the MCP55 chip. I'm using kernel 2.6.34 (though it's been occuring since 2.6.32) with builtin alsa drivers. Pulseaudio is currently 0.9.21.2-r1 I've also tried the tsched=0 suggestion mentioned for other pulseaudio glitches, to no effect.
Comment 1 James Le Cuirot gentoo-dev 2010-09-11 10:36:46 UTC
You're not alone. I'm seeing this with Realtek-based hda-intel onboard sound.
Comment 2 Arun Raghavan (RETIRED) gentoo-dev 2010-11-03 11:43:12 UTC
How many channels do you guys have in your setup? There were some fixes in PA recently for software volume scaling with a non-standard number of channels.
Comment 3 James Le Cuirot gentoo-dev 2010-11-03 14:25:36 UTC
6, as it 5.1. But I've stopped seeing this issue since getting a different card.
Comment 4 Xepher 2010-11-03 19:08:03 UTC
(In reply to comment #2)
> How many channels do you guys have in your setup? There were some fixes in PA
> recently for software volume scaling with a non-standard number of channels.
> 

5.1 here as well. As the sucker is part of my motherboard, I'd rather not replace it. :-)

I'm not sure that software scaling has anything to do with it though, since (as I mentioned above) changing the hardware (alsa PCM) level fixes it. Of course, on modern systems, I'm never quite sure what's really "hardware" vs. "software" anymore.
Comment 5 Arun Raghavan (RETIRED) gentoo-dev 2010-11-03 19:24:13 UTC
I suspect that this patch from stable-queue should fix your problems:

http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=a8d76e99ff0b13f424b44433fb169df6735a5842

There should be a new release containing this patch soon. In the mean time, an easy way to check if this fixes the problem is to set the environment variable PULSE_NO_SIMD=1 before (re)starting PulseAudio.
Comment 6 Xepher 2010-11-03 22:24:06 UTC
PULSE_NO_SIMD=1 does seem to fix it. Woot! I can deal with that as a workaround for now. Hopefully the next release doesn't take another year. :-)
Comment 7 Arun Raghavan (RETIRED) gentoo-dev 2010-11-04 04:55:39 UTC
(In reply to comment #6)
> PULSE_NO_SIMD=1 does seem to fix it. Woot! I can deal with that as a workaround
> for now. Hopefully the next release doesn't take another year. :-)

Should be a lot sooner than that :)
Comment 8 Arun Raghavan (RETIRED) gentoo-dev 2010-11-26 04:14:34 UTC
Should be fixed with 0.9.22 which is now in CVS.