LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Blogs > GlennsPref
User Name
Password

Notices

Rate this Entry

Real-Time Audio part 4, final.

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

Get set_rlimits...(set_rlimits is only one of a few programms that enables this type of functionallity)

http://www.physics.adelaide.edu.au/~...mits-1.3.0.tgz
http://www.physics.adelaide.edu.au/~jwoithe/

Quote:
“This file sets the maximum priorities which set_rlimits can set for
a given program when executed by a given user or group.
The program specified must include an absolute path.”
Uncompress it with...
tar xf *

Run...

make clean && make

and when your ready to install it, run...
make install

Now get ready with you favourite editor, with root privileges

to edit some system files...

vi is a good one. ;-)

usually /etc/set_rlimits.conf

We want access to the @audio group and any of it's members (or a username),
Note: you should be a member of that group.

The next is the absolute address to the binary, then the nice level, real-time priority,
and memlock for the binary to run in.

/etc/set_rlimits.conf
Code:
@audio /usr/bin/jackd nice=-1 rtprio=80 memlock=100000
@audio /usr/bin/qjackctl nice=-1 rtprio=79 memlock=100000
@audio /usr/bin/ardour nice=-1 rtprio=78 memlock=400000
#@audio /	=-1	rtprio=		memlock=
@audio /usr/bin/hydrogen nice=-1 rtprio=76 memlock=100000
@audio /usr/bin/rosegarden nice=-1 rtprio=75 memlock=100000
@audio /usr/bin/vkeydb nice=-1 rtprio=74 memlock=100000
@audio /usr/bin/qsynth nice=-1 rtprio=73 memlock=100000
/etc/security/limits.conf (if ardour complains about memory limits)
Code:
@audio - rtprio 99
@audio - memlock 500000
@audio - nice -10
/etc/sysctl.conf for …
Code:
#checking inotify max_user_watches... too small. For Real-time Audio...
#** /proc/sys/fs/inotify/max_user_watches is smaller than 524288
#** increase it by adding 'fs.inotify.max_user_watches = 524288' to /etc/sysctl.conf and rebooting
#   For more information, see http://wiki.linuxmusicians.com/doku.php?id=system_configuration#sysctl.conf
fs.inotify.max_user_watches = 524288
and any others mentioned in the perl script, like tmp fs listing.

Set up the server path in qjackctl to read, set_rlimits jackd

I also preceded the music programs commands with this as well, by editing the icon properties.

Type in set_rlimits jackd to start the server from a prompt.

Check with the video and perl script to check everything is as it should be. There are references to
some of the pages I have trolled through to assemble this document, and you can check those for
configuring the kernel, Alsa, and checking the hardware.

Repeated links from above...
Kernel http://proaudio.tuxfamily.org/wiki/i...owto_RT_Kernel

Alsa http://ubuntuforums.org/archive/index.php/t-908845.html
Contributed to by the Ubuntu community and Blablack in particular

Note: The UA-4FX page has more command line utility examples for debugging.
http://alsa.opensrc.org/index.php/Edirol_UA-4FX

Which links to the previous ua-25 page.
http://alsa.opensrc.org/index.php/Edirol_UA-25
http://alsa.opensrc.org/index.php/Edirol_UA-25EX


Outcomes
Before starting with jackd

jack with 64 frames per second and a buffer of 4 periods, at 44.1kHz 16bit
latency is about 5.6msec but jack has drop-outs in the audio chain,
X runs...

After set_rlimits jackd

jack with 64 frames per second and a buffer of 2 periods, at 44.1kHz 16bit
gets about 2.6msec, with no x runs
(x runs = audio-processing lock-ups causing drop-outs, caused by resource scheduling).

I try to get in a habit of using one resolution most of the time,
after all, CD quality is still 44.1kHz/16bit.
:-)

Check for basic system sounds, configure kernel for virtualBox and nVidia Graphics re-installation

After going through all of this, you won't want Mandriva Automatically Upgrading
your kernel for you.
To change this behaviour for urpmi (and drakrpm?) go to /etc/urpmi/skip.list
Use the config help in that file, /^kernel*/ you need to be root to save it.
Smart has a version lock, where you can lock packages by version from the smart GUI, nice.


So we have not covered installing the programs, but I figure there's other documents about that already.

I used Audacity to check the audio recording and playback systems during the kernel configs.
(without jackd running)

Thank you to the contributors of Alsa, Ubuntu, Linux Journal Magazine, www.atomicmpc.com.au
and www.LinuxQuestions.org and you too (for reading).

I have tried to reference others work where I could, and give credit where it is due.

I apologise for any omissions, and accept any useful criticism, amendments will be made as they
become available and or relevant.

Thank you
Regards Glenn (GlennsPref) 27/01/2009
Posted in Uncategorized
Views 2102 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 03:38 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