You are not logged in.

#1 2020-10-19 22:02:51

sirplatypus
Member
Registered: 2017-09-17
Posts: 25

Crackling when changing volume with slider

I just posted another thread a few weeks ago dealing with an issue where I had periodic sound glitching on my Dragonfly Red usb dac.  Changing from radeon to amdgpu as my graphics driver fixed that issue, only for me to immediately notice a new one.  I'm not sure if the problem existed before or not, I only noticed it after the fix.  Whenever I change the sound volume using a slider, whether it's pavucontrol (controlling spotify), spotify, or youtube, there is a light crackling as I move the slider.  This only happens when audio is actively playing.  This occurs whether I plug my headphones into my dac or into the motherboard itself.  When I tried playing through my usb speaker and dragging the volume slider, spotify appeared to force reload with the message "PA Connection Refused - Trying to Reconnect", and then after that I get no audio until I restart the app.  The crackling is far worse on the speaker than the headphones.  Another slight issue I am having is a light popping sound whenever I pause and unpause audio.  This also happens on the headphones when plugged into either the motherboard or the dac.  I also noticed that whenever I open pulseeffects and use the equalizer, I get periodic glitching in my sound, although I figure I'll deal with that as a separate issue another time.

Does anyone have any idea what may be causing these issues?

edit:

Going back and doing a few more tests, I noticed that if I rapidly drag the output device volume slider in pavucontrol there's no crackling, it seems to only be when application volumes change.  Also for some reason when I went back and tried the speaker again, it still crackled terribly but did not crash this time.

edit 2:
This also happens on my debian laptop.

Last edited by sirplatypus (2020-10-21 19:24:11)


Learning Dvorak was entirely worth it, solely because of the looks on people’s faces when they borrow my computers.

Offline

#2 2020-10-22 11:09:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,738

Re: Crackling when changing volume with slider

Afaik this is a long standing issue with how the calculation works and too rapid/small volume increments. Because you basically have to throw away and recacalculate  all the samples. It doesn't happen with the device sliders because that can fall back to hardware implementations/there's a certain buffer allocated for the soundcard anyway.

I remember a interesting discussion regarding this on a gitlab issue/ merge request that I seem to be unable to find anymore. It's not quite as trivial as one might assume to properly do this.

Found it, even contains actual code one could patch pulse with as a test: https://gitlab.freedesktop.org/pulseaud … quests/120

The slight popping sound during pause/unpause could be dependant on the audio players implementation, what are you using here? If pause means that the pulse stream gets closed it could mean that (assuming you aren't playing anything else at the same time) pulse has nothing left do and releases the device (... so that other things can access it if needed) and thus power saving or so kicking in which might lead to a pop when playback is picked up again. This should be generally avoidable if you remove/unload the module-suspend-on-idle in your /etc/pulse/default.pa (... with the "obvious" caveat of having relevantly increased power draw due to keeping the card in an active state all the time)

Last edited by V1del (2020-10-22 11:23:48)

Offline

Board footer

Powered by FluxBB