Running a Firewire Audio Device on Linux

QJackControl Firewire Settings

QJackControl Firewire Settings

Meanwhile I got the Phonic Helixboard Universal PHHB24U mixer connected to my Ubuntu Jaunty Jackalope powered Dell Precision M 4300 notebook via IEEE 1394 (aka firewire). The basic setup is simple for an experienced Linux user, but not straightforward for an average computer user. So here are some hints what to do to get such a device up and running.

Note: all the following commands need to be entered into a terminal window. This guide will not cover the usage of alternative graphical user interface applications. If you use the subsequently listed commands, do it at your own risk and responsibility. Some of them change settings of your operating system, possibly breaking your system and thus requiring a reinstallation if something goes wrong.

Most professional musicians (and the so called “prosumers”) use jack, the low latency realtime soundserver, and so do I. Jaunty gets shipped with jackd 0.116.1 which is sufficient for driving the Helixboard via firewire.

However, the shipped version of the ffado firewire audio driver is not. So the first step is to download, compile and install this package manually. If you fail with this task, you do not need to further continue.

First we will try to pull in some development files necessary to compile the ffado driver by typing apt-get build-dep libffado0 Then ensure to uninstall any existing version of ffado by typing sudo apt-get remove libffado0 libffado-dev.

Download the latest package from At the moment of this writing, the current package was FFADO 2.0 Release Candidate 2 (1.999.42). Unpack it to a temporary directory. Build it by typing scons && scons install in a terminal window in the source directory. Keep both the compiled code and the downloaded archive on your hard drive for possible later modifications.

Per default, users do not belong to the audio group, so you will need to add your username to the audio group. This can be accomplished by typing sudo usermod -a -G audio yourusernamegoeshere.

The next step is to grant realtime permissions to the audio group via PAM. The audio group needs to be added to (respectively modified in) the file /etc/security/limits.conf. I use vi to edit this file. You may want to use any other editor. Please note that, in either case, you’ll need root privileges to edit this file. Ensure it contains some lines like the following ones:
@audio - rtprio 99
@audio - memlock 250000
@audio - nice -10

Log out and in again the changes to take affect.

Now connect the mixer to the notebook using a firewire cable. Udev creates a device file called raw1394 in the /dev/ directory dynamically, which you can check by typing ls -l /dev/raw1394. The device file belongs to both the user and the group root, so it is likely that you are not allowed to access the device. The temporary fix (until the next reboot) is to change the group permissions of this file by typing sudo chown root:audio /dev/raw1394. Now the file should be readable and writable for anyone belonging to the audio group. The persistent fix is to create an udev rule file by typing sudo touch /etc/udev/rules.d/50-udev-firewire.rules. Edit this file and add the lines KERNEL=="raw1394", GROUP="audio" to it.

As a graphical frontend for jackd, I recommend QJackControl. Type apt-get install qjackctl to install it.

If you have been successful, everything now should be prepared. Configure QJackControl as seen in the screenshot above this posting. Then hold your breath and press the Start button in the main window of QJackControl. If everything is setup right now, it should start jackd without any complaint. Congratulations!

Things to do

  • I use audacious to playback audio files via jackd. To install it, type apt-get install audacious audacious-plugins-extra. Now choose the jack driver in its preferences dialog. Drag some audio files on it. Then use the audio connection panel of QJackControl to connect it to the outputs of the firewire mixer.
  • The next time you log in or power cycle the mixer, /dev/raw1394 will again belong to the user and group root, making the mixer inaccessible for you. In order to make the ownership of the audio group persistent, it needs to place some udev rules in /etc/udev/rules.d. Unfortunately I have not been successful yet. If you can share some idea, any comment is much appreciated.
  • I still get a lot of (audible) dropouts in the audio stream. This happens at random occasions, but also when you move the mouse, open windows, or the screensaver gets active. To circumvent those issues, it needs some further modifications to get better realtime performance. In the worst case this means I need to compile and install a home grown Linux kernel. The realtime kernel provided by Jaunty (apt-get install linux-rt) was unable to boot into the graphical user interface, neither with the nvidia nor with the nv driver in the configuration file /etc/X11/xorg.conf.
  • The setup is far from being stable. Besides the aforementioned notches, jackd also often tends to quit, requiring a restart of it and all the other audio applications. I wish that audio apps were able to reconnect to a lost jack connection automatically.
  • Making music. Well, admittedly, I am not playing my instruments much these days. My job, and writing software keep my busy enough.

Though Linux distributions are easy to use nowadays, there are still occasions where it’s still not that easy to get stuff done. I hope this posting helps some of you to get your equipment up and running on your Linux box.

2 thoughts on “Running a Firewire Audio Device on Linux

  1. Chris Clark

    In regards to the /dev/raw1394 ownership issues. You might want to check udev rules and see if you have file 40-permissions.rules. In my copy of this file there is a line assigning the raw1394 to the disk group, in my case i just changed the group to audio resolving my issue. I know this is late posting hope it helps someone.

Comments are closed.