1.3. Linux Kernel

I use a (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.

1.3.1. Realtime Preemption patch

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 ( 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-
$ rm linux
$ mv linux- linux-
$ ln -s linux- linux
$ cd linux/
$ patch -p1 < ../patch-

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.

1.3.2. Configuration


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

1.3.3. Installation

Install modules and kernel and edit the /etc/modules file to add the following content, depending on your hardware:


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:

Now just reboot on your new kernel.