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

You may be wondering if there is a particular version of the Linux kernel that you need to run to get good audio results.

RTLinux vs. Linux with LowLatency patches

RTLinux is designed for time-critical applications; many audio developers feel that it's overkill, and that Linux with some relatively simple LowLatencyPatches can meet our needs.

Here is a message from Eric S. Teidemann explaining why it matters, on the LinuxAudioDev? mailing list:


The question was: "Has anybody made a comparision of the performance of a standard process vs a realtime process (ie using sched_setscheduler) vs rt-linux vs linux kernel with patches? "

Eric S. Teidemann replied:

" I've done all of that..with various kernel versions and patches except rtlinux. You can pretty much count on occasional dropouts > 50ms on stock linux. pre-2.2.8 is even worse. Using linux 2.2.10 and the latest (non-public) patches this comes down to 3ms ...and at that point it starts to become processor rather than disk dependent so I should say that that's on my amd k6-2/350.

rtlinux apparently can provide sample-level latency even while a stock linux is doing wacky things (I have no reason to doubt David Olofson on this). However, rtlinux has a completely different development architecutre than POSIX (some commonality is emerging due to David's efforts, but differences will remain)*. Also, as soon as a single element of control goes through standard linux then control latency is at the mercy of standard linux even if data latency is maintained by rtlinux."

--Eric S. Teidemann


David Olofson jumped in and commented on the preceding paragraph:

"Just two notes on RTLinux and POSIX:

1) The new API is based on the "Minimal Realtime System Profile", which means it has the open/read/write/... calls, but just basic device I/O rather than full file system support. That's not "completely different from posix", as stated by Eric S. Teidemann. (See example below from my DPI package. Note that the kernel module specific stuff could be replaced with some nice stdio style wrapper if desired.)

2) The Driver Programming Interface I'm working on ... is using the same API as the standard RTLinux distro. It affects only drivers - not applications. The POSIX I/O layer is already there..."

David also provided "Some RTLinux application code: (Beta, of course, and not very well tested... It runs rock solid with buffer=32 prewrite=4 fragshift=5 here. :-)", which I've placed here: OlofsonC

Page history Last edited Fri, 22 Feb 2008 01:39:39 -0600 Edit this page