go home
UserOptions JumpSearch HelpPage
LiLAQ?: improving Linux Audio Quality

These are old tips on how to deal with audio dropouts on a non-LowLatency kernel. It is not recommended that you follow these tips, unless you really have to. The LowLatency solution is better.

The general strategy was:

Reduce System Activity.

Here are some specific tips on how to do that. These were originally contributed by Ralf Schlatterbeck, Michael Stutz, Michael Brown, and Jim Jackson.

The driver you're using may have some options that could help. For instance, the OSS-Free kernel driver has a dma buffersize compile-time option. This should be set as high as it can go. If you're still having problems, it's time to look at what else is running on your system. You may be able to trim a lot of fat.

struct audio_buf_info info; if (ioctl(audio, getspace, &info) < 0) { / error message and/or exit / } -- pr fprintf ( stderr , "Allocated %d fragments of size %d\n" , info.fragstotal , info.fragsize );

A work-around for this bug (probably already fixed in later kernels ?) is to explicitly free the buffer space by allocating a large amount of user-memory, I call the following code before recording audio to reset the buffer cache (This is for my 32MB 486, you may or may not want to increase the amount of allocated memory on a larger machine -- try it out):

#include main() { char p = malloc(1024 1024 32); int i; for (i=0; i<1024 32; i++) { p[i*1024] = 0; } }

Page history Last edited Fri, 22 Feb 2008 23:44:15 -0600 Edit this page