- 1 Introduction to Professional Audio (Pro Audio) in Linux
- 2 Tuning and Configuration
- 3 Hardware Specific Information
Introduction to Professional Audio (Pro Audio) in Linux
Modern Linux/GNU systems are more than capable of supporting your professional audio needs. Latencies of 5ms and down as low as 1ms can be achieved on a properly configured machine. There also are a wide variety of applications available to suit whatever task you may need to perform.
- Jack is a sound server that handles the communication between applications and sound cards,and has the ability to run in realtime. It is available in the jack-audio-connection-kit package. There are lots of other applications that work in conjunction with Jack, such as Jack-rack and Jack-eq. A fork of the Jack project optimized for SMP machines called Jackmp is available as well.
- LADSPA is a plugin system that provides professional reverbs and effects.
- Ardour is ideal for multitrack recording. Traverso and Qtractor are nice applications as well, and deserve support.
- Other applications that may be of interest include Rosegarden (audio and MIDI sequencer, score editor, and general-purpose music composition and editing application) and Hydrogen (an advanced drum machine/pattern editor with midi support).
- Linux equivalents to popular commercial software.
- The Arch Linux professional audio IRC channel on Freenode at #archaudio.
- This long-running thread http://bbs.archlinux.org/viewtopic.php?id=30547 has lots of useful information.
- The Official Archlinux Proaudio website at http://archaudio.org/ which includes forums and will soon serve as a binary repository.
The Madfire repo is no longer maintained.
Pro Audio packages are also available via SVN. These packages can be modified by the community, then checked and pushed to the ProAudio binary repo. This breaks the reliance on one maintainer keeping the builds up to date. Please contact us on the IRC channel if you would like to become a project member.
See the ProAudio repo at Google Code for more information.
Tuning and Configuration
The following are guides to get your system running properly. Keep in mind that all machines are different, and that the Linux world is a rapidly changing environment.
Verify that this line exists:
none /dev/shm tmpfs defaults 0 0
Adding the "noatime" option in /etc/fstab has been shown to improve disk performance.
Setting up Jack
Qjackctl is a nice frontend for Jack and is recommended. The most important settings are realtime,sample rate,frames/period and periods/buffer. Realtime should be enabled for any real work to be done. It is recommended to set periods/buffer to 2 for internal soundcards and 3 for usb-soundcards and intel-hda. Sample rate is dependent on you hardware, and the setting in jack MUST match the setting on your hardware. For example if I set jack to 48khz and my delta1010 is set to 96khz I will get xruns out of control. The key here is to find the lowest latency possible with no xruns, so experiment with frames/period and sample rate until you get in the zone. The other settings can be potentially useful as well, and are described excellently here: http://w3.linux-magazine.com/issue/67/JACK_Audio_Server.pdf
The jack project has a fork called jackmp that is designed for SMP machines. This is strongly recommended and will eventually become Jack2! Please use and report bugs!
Routing and Patchbays
This can be handled fairly easily directly from Qjackctl, or by the *really nice* Patchage front end.
Realtime Kernel ( kernel26rt )
There are patched kernels available in the proaudio repo as well as the AUR. The current versions seems to have some stability issues because of their experimental nature. Kernel 126.96.36.199 patched w/ patch-188.8.131.52-rt21 seems to be the best performing version at the moment.
A few notes on rt kernel configuration:
- Don't go crazy trying to get zero latency! Get set up reasonably and do some audio work!
- Rule of thumb: If you don't need it...shut it off!
ACPI and apm should be disabled, either in the config or by adding acpi=off to your bootloader. Disabling kernel debugging seems to reduce some overhead. If your system supports hyperthreading test the rt kernel w/ it disabled in the BIOS. Also verify that irq_balancing is disabled in the kernel as well.
The irqbalance package in the AUR is much better than the support in the kernel on multi cpu systems, and can really make a huge difference.
Realtime priority for users
You must be in the audio group for user realtime. The file /etc/security/limits.conf should look similar to this:
- @audio - rtprio 99
- @audio - nice -10
- @audio - memlock unlimited
This example is pushing it hard, but if you are getting good performance and not choking out other processes it's ok. Experiment.
Misc Information And Tips (Please Contribute!)
- Some daemons can start unexpectedly and cause a xrun! ls /var/run/daemons to see whats running and if you don't *need* it than kill it!
- Sometime IRQ issues can occur and cause problems. An example being the video card hogging the bus causing xruns. These issues can be fixed using the rtirq script.
Hardware Specific Information
This section is for details on using and configuring audio devices.
The M-Audio Delta 1010
This hardware requires that you install the alsa-tools package from the AUR, because it contains the envy24control program. Envy24control is a hardware level mixer/controller. You can use alsa-mixer but you will save yourself some hassle not to try it. Note that this section has no information on MIDI setup or usage.
Open the mixer application:
This application can be more then a bit confusing, and I am yet to find a reasonable tutorial for its use. That said, here is a working setup for multitracking with Ardour.
- Set all monitor inputs and monitor PCM's to around 20.
- Patchbay/router tab: Set all to PCM out.
- Hardware Settings: Verify that the Master Clock setting matches what is set in Qjackctl. If these do not match you will have xruns out of control!
The PreSonus Firepod
This hardware requires that you install the libffado beta or svn package from the AUR. You will also need these packages for FW control:
- Startup: Either from commandline or QjackCtl, the driver is called firewire.
- Specs: The card contains 8/8 preamp'ed XLR plus a stereo pair, in total 10 channels.
- Linking: Cards can be linked together without any problems.
- Hardware Settings: Nothing particular, tweak the settings in QjackCtl to your likings.
Volume levels are hardware and routing can be done through QjackCtl, even with more cards linked together, this is not a problem. The ffadomixer does not work with this card yet, hopefully in the future we can control more aspects of the card through a software interface like that.
If you manage to get a good setup for your system and would like to contribute, you can post your specifics here and in the Configuration/Tuning section in the archaudio forums at http://forums.archaudio.org/forum/configurationtuning