I use a 2.6.26.5 (see my .config). In fact, I upgrade the kernel each time a new release is out. I will assume you are confident in building/installing a Linux kernel. With 2.6.x it is generally no more than doing:
$ make menuconfig
$ make
$ su
# make modules_install
# make install
# vi /boot/grub/menu.lst
But to build a Linux Audio Kernel there is some more work to do.
Realtime Preemption Ingo Molnar's Linux kernel patch which tries to improve realtime performance of the Linux kernel.
![]() | With my configuration and the last Linux kernel (2.6.26.5) I work without needing this patch. |
Always download the last release here. Then apply it:
$ cd /usr/src/ $ wget http://people.redhat.com/mingo/realtime-preempt/patch-2.6.26.5-rt9 $ rm linux $ mv linux-2.6.26.5 linux-2.6.26.5-rt9 $ ln -s linux-2.6.26.5-rt9 linux $ cd linux/ $ patch -p1 < ../patch-2.6.26.5-rt9
Patch should apply without fatal problems. Messages like Hunk #3 succeeded at 652 (offset 1 line). are ok. Search for outputs like Failed. The most common failure is on the Makefile file. Just edit it by hand and add -rt9 at the end of the EXTRAVERSION variable.
![]() | Do not forget to adapt those samples to your own configuration (especially for the "PCI devices" section). |
The most important items for a vanilla Linux kernel (not patched with Ingo's RT patch) are:
Processor type and features --->
Preemption Model (Preemptible Kernel (Low-Latency Desktop)) --->
[*] Preempt The Big Kernel Lock
Timer frequency (1000 HZ) --->
Device Drivers --->
Character devices --->
<M> Enhanced Real Time Clock Support
<M> Generic /dev/rtc emulation
[*] Extended RTC operation
<M> Real Time Clock --->
[*] /sys/class/rtc/rtcN (sysfs)
[*] /proc/driver/rtc (procfs for rtc0)
[*] /dev/rtcN (character devices)
<M> PC-style 'CMOS'
Sound --->
<M> Sound card support
Advanced Linux Sound Architecture --->
<M> Advanced Linux Sound Architecture
<M> Sequencer support
<M> Sequencer dummy client
<M> OSS Mixer API
<M> OSS PCM (digital audio) API
<M> RTC Timer support
[*] Use RTC as default sequencer timer
Generic devices --->
<M> Virtual MIDI soundcard
PCI devices --->
<M> RME Hammerfall DSP Audio
Security options --->
[*] Enable different security models
<M> Default Linux Capabilities
For a kernel patched with Ingo's RT patch the differences are:
General setup --->
[*] Enable concurrent radix tree operations
[*] Enabled optimistic locking
Processor type and features --->
[*] Enable priority boosting of RCU read-side critical sections
Also for RT patch you must uncheck the folloging options:
Processor type and features --->
[ ] Enable tracing for RCU - currently stats in debugfs
Device Drivers --->
Character devices --->
[ ] Real Time Clock Histogram Support
< > Parallel Port Based Latency Measurement Device
Kernel hacking --->
[ ] Wakeup latency timing
[ ] Non-preemptible critical section latency timing
[ ] Interrupts-off critical section latency timing
Install modules and kernel and edit the /etc/modules file to add the following content, depending on your hardware:
rtc
snd-rtctimer
snd-hdsp
snd-hwdep
snd-page-alloc
snd-pcm
snd-rawmidi
snd-seq
snd-seq_device
snd-seq_midi
snd-seq_midi_event
snd-timer
Most of these modules depend on others that will be automatically loaded.
Most of time you would also raise the value of the max-user-freq kernel value. To do so you can either:
Use sysctl by editing /etc/sysctl.conf and adding the following line:
dev.rtc.max-user-freq=1024
Once the file is updated, reload the configuration by running sysctl -p as root user.
Directly write the value into /proc/sys/dev/rtc/max-user-freq at boot time:
echo 1024 > /proc/sys/dev/rtc/max-user-freq
Now just reboot on your new kernel.