Trozmagon Feb 22 @ 1:32am
*SOLVED* Audio crackling in Steam BPM only
Hi guys, I need a little help.

I've just spent the last few days rebuilding my HTPC into and XBMC/Steam box and everything on it is working perfectly except that when I launch steam in BPM the audio is crackling so much that it's unbearable.

It's only happening in BPM, it's fine in DM and games, even games launched from BPM. XBMC and desktop sounds are fine, it is completely isolated to just BPM.

I'm running the latest XBMCbuntu and I'm using PulseAudio with an ALSA sink in /ect/pulse/default.pa

load-module module-alsa-sink device=hw:0,3 tsched=0
load-module module-alsa-sink device=hw:0,7 tsched=0

This is used for pulseaudio Simultaneous output through HDMI which again works fine in everything else, and my asound.conf is empty

Other than that there are no major changes related to audio that could cause this.

Hardware:
3ghz Intel core 2 duo dual core.
4gb ram.
Nvidia GXT 910 with latest drivers (also tried older drivers with same result).
250gb hdd.

If you need any other information please let me know but I would really love some help with this.


Thanks in advance.
Last edited by Trozmagon; Feb 23 @ 2:22am
Showing 1-6 of 6 comments
< >
Trozmagon Feb 22 @ 1:36am 
Also just to add I'm not an overly advanced Linux user but I know my way around okay.
MNKyDeth Feb 22 @ 3:41am 
It has been a good while since I last tried to use Pulseaudio. But I know when I did try to use it, it was the cause of audio lag and crackling. Simply disabling it and using alsa without pulseaudio always fixed my issues.

I know I know, boo on me. I am not spewing hate just simply making a suggestion for something to try. If it works, hey great, if not, re-enable Pulse and try other solutions.
Cybertao Feb 22 @ 4:19am 
My Pulseaudio issues were solved by recompiling my kernel with a larger soundbuffer value.

However I usually run a self-compiled vanilla kernel, hadn't originally configured it with a large enough buffer for Pulse (the default is too small), don't know what size the buffer is in the kernel provided by the distro you are using, and it's hardly a user friendly fix.
It's not likely you really need it so yeah, just uninstall Pulse and see where that gets you.
Trozmagon Feb 23 @ 2:21am 
Thanks guys but disabling Pulse isn't really an option because of XBMCs tendency to lock out the sound card when using ALSA it would cause steam to not have any audio when switching between the two.

I have solved the issue though and hopefully this will help someone else:

Inside /etc/pulse/daemon.conf change this line and uncomment it

default-sample-rate = 48000

and change

default-fragment-size-msec = 10 to default-fragment-size-msec = 5

Thanks for the suggestions anyway guys ;)
MedicByCall Feb 23 @ 7:49am 
By disabling PULSE you have to reconfigure .alsarc because if re-sampling input-sources to one output-source. Therefore without pulse and without any configuration only ALSA will not work.

I really hope that the sound system of linux will be made easier to handle in future.
Kranky K. Krackpot Feb 23 @ 8:05am 
Originally posted by MedicByCall:
By disabling PULSE you have to reconfigure .alsarc because if re-sampling input-sources to one output-source. Therefore without pulse and without any configuration only ALSA will not work.

I really hope that the sound system of linux will be made easier to handle in future.
It's not "resampling", it's "mixing" or rather "multiplexing". Alsa have a software mixer, and it's even enabled by default, as some here say. Resampling is possible too. As well as many other interesting things,
The problem with crackling PA with onboard chips is probably because SND_HDA_PREALLOC_SIZE in kernel is set to 64Kb, that is too little for PA:
config SND_HDA_PREALLOC_SIZE
int "Pre-allocated buffer size for HD-audio driver"
range 0 32768
default 64
help
Specifies the default pre-allocated buffer-size in kB for the
HD-audio driver. A larger buffer (e.g. 2048) is preferred
for systems using PulseAudio. The default 64 is chosen just
for compatibility reasons.

Note that the pre-allocation size can be changed dynamically
via a proc file (/proc/asound/card*/pcm*/sub*/prealloc), too.
Anyway, it will be earier only if all PCs will use the one and only audio chip...
Showing 1-6 of 6 comments
< >
Per page: 15 30 50