FAQ016
From the ALSA wiki
| The FAQs have been reorganized. The new location of this question is FAQ#My sound crackles when the system is under load. How can I improve that? |
My sound crackles when the system is under load. How can I improve that?
There might be a multitude of reasons for this behavior: PCI/ISA interrupt issues, buggy drivers, etc. As a first step you should try updating ALSA, then play around with different slots for the soundcard. Also, in the case of xruns, maybe a kernel with Low-Latency/Preemptible patches might help. Removing uneeded daemons from startup -- look at documentation.
Try to renice processes (make processes more nice):
To renice means to set the priority to a higher or lower level (Give a program more or less execution time). For example if I was using an application like Audacity (Audio Editing) I could do a "ps aux |grep audacity" and find which process id number was and then do a renice -10 process ID#. This will change the priority of a process higher. Making an application priority higher or lower can mean the difference between good recordings or awful recordings. You may want to lower some priority and make some programs more background in nature (positive numbers can do this).
Try turning off logging (do you need your network monitored every second on your linux multimedia box?):
linux logs everything; while normally it is not a good idea to turn off loging, it will smooth the system out if you remove any system log daemons (last resort, but works). Audio and Video do not "like" things sharing CPU time and linux is not good at scheduling realtime events. In many distributions it is called "services" and it is just a matter of noting which logging "services" are running and remove them (You may want them back later). syslogd is a good example of a logging service.
Give different kernel schedulers a try:
Deadline seems to be the best bet -- I have had the least dropouts with the 2.6.7 kernel with USB MP3+ Soundblaster and several sound processing programs (ecamegapedal, ExEf, and Audacity with Jackdsp running at the same time with Jackit). Try different ones and see what happens. Mileage may very, as with anything.