LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Blogs > GlennsPref
User Name
Password

Notices

Rate this Entry

Real-Time Audio part 3

Posted 01-26-2009 at 11:15 PM by GlennsPref

Next is the rt kernel patch...
Note: You only need to do this if you have not installed the rt kernel source from the rpm,
as mentioned above, if you did you can skip this Patching section and continue on to the
configuring the kernel section of this document.

Patch the kernel with the RT patch

manual patch method,

from the video. (includes applications rt permissions and access with set_rlimits)...
http://www.linuxjournal.com/video/hy...al-time-kernel

download and patch any rt diffs.
I could not find a real-time patch for the new 2.6.28.x-kernel at...
http://rt.et.redhat.com/download/


You might find that you need to revise what kernel .ver you need to use, as I did,
Once I realised this I used the rpm method instead. Same versions, less work and the
“Mandriva tweaks and proprietary drivers”.

Download the patch (a .bz2 file in this case)to an appropriate place...
/usr/src/linux/patch-2.6.26.8-rt13.bz2 (or whatever version you require)

cd to the src dir (or where you saved the file to)...
cd /usr/src/linux

run bzip2 -d for the .bz2 file to unpack it in the src directory...
bzip2 -d patch-2.6.26.8-rt13.bz2

Now patch the kernel by running...
patch -p1 < patch-2.6.26.8-rt13

Now you're ready to configure the kernel, which will bring the patches to fruition
and allow for making other changes (the perl script suggestions).

Configuring the kernel

We'll need to configure further, We'll integrate the patch, type...
cd /usr/src/linux

running make oldconfig will only ask NEW questions not answered in the old (current) config
file.(/boot/config)...
make oldconfig

say yes to the real-time preemption question, preempt_rcu and preempt_rcu_Boost and any deps
(none I noticed).

You can say no to the others or leave them as dynamic loading modules. (depending on the age of
this document, Jan2009)

Some questions may be debugging apps, but generally you really won't want a lot of low level
apps running taking notes and writing reports while you're trying to record and sequence sounds.
So you can probably leave the debugging and kernel hacking out or unchanged if you like.
I turned off “Kernel_Debugging” as a whole.

This Gentoo guide is concise, (ignoring distro centric commands and) look for the selections to change in the kernel.
http://proaudio.tuxfamily.org/wiki/i...owto_RT_Kernel

Once that is finished, you can run the build sequence...

Another way to do this is with with a GUI, make xconfig or make menuconfig you can get right
down to the nitty gritty of selections, with a search function, with your mouse and you can
browse around. :-)

cd /usr/src/linux

Note: I would run “make oldconfig” first, answering the questions then save. Then...
make xconfig or make menuconfig.

check to see if rt has been enabled,
Search for “real-time preemption” and “preempt_rcu” and any deps (preempt_rcu_Boost),

you can probably leave the debugging and kernel hacking out or unchanged if you like.

Make sure the snd_usb_audio module is loaded in the config.[USB_AUDIO]

I also look for spcaxxx module for my webcam, and option module for usb_storage
“usb hdspa modem”.
I check to see if the agpgart modules are dynamic not static for my amd/nVidia combo.
I also check for write access to ntfs file systems.

Save your config then exit the xconfig app.
make sure you save the config file with the save button/icon and exit xconfig program.

That should save the config file to the default place... /usr/src/linux/somewhere.
You'll see on the shell, “saved config file to....”(Be sure you know where it is).

Config complete.

Compiling the kernel
Note: The rolling of the kernel (compiling) takes longest, up to 2 hours on most machines
It has been recommended to me not to run any other memory or filesystem intensive
applications on the system while the compiling is being carried out.

Otherwise type...
make all && make modules_install && make install

Note: make all, this does... make dep && make clean bzImage modules

Reboot selecting the new kernel, should be automatic with grub2 Mandriva system...
Shutdown -r now

Note: If you want this to run during the night, let say, and to shut down automatically
when the process is complete, type this instead...
make all && make modules_install && make install && shutdown -h now

Then go to work, or bed and check it when you return.

If you get errors, or stoppages, please ask before you reboot to the new kernel, you can always
fall back to the old kernel if you have booting problems.

Other than the package manager references, this is a good guide for any distro...IMO
Gentoo guide...
http://proaudio.tuxfamily.org/wiki/i...owto_RT_Kernel

Compile complete.

I got this from a Linux-Journal video tutorial(.flv) called

Hyper_Low-Latency_Audio_with_a_Real-Time_Kernel_Linux_Journa.flv
ref. http://www.linuxjournal.com/video/hy...al-time-kernel

To configure the system applications use the alsa examples...
http://alsa.opensrc.org/index.php/Ed..._system_rights
Posted in Uncategorized
Views 697 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 05:51 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration