Getting firewire audio work on Linux

December 19, 2006

My requirements for an audio interface where basically: low-latency, good pre-amps and DA/AD converters, and having more than two outputs. And well it had to be an external interface to use with my laptop (macbook), work with Linux, and below 400 eur.

I need low-latency for live gigs. I use to play bass and some synths with Guillamino, but I really want to incorporate soft synths, and live material processing with sooperlooper, supercollider and freewheeling.

For latency reasons I discarded buying a USB interface. Also it’s a plus that nowadays music shops have plenty of new firewire interfaces.

When recording music, monitoring or hearing an audio mix that is independent of what is being recorded is a must. Since I’m aiming to have a really portable recording station I don’t want to rely on external mixing desk. So I needed at least 4 outputs and flexible routing.

Firewire support for Linux is in its early stage but growing steadily. I knew about the freebob project when Pieter Palmers presented it at Linux Audio Conference 2005. Freebob is a Linux driver (by now only a JACK backend; alsa driver is planed) for devices based on the bebob chip. Fortunately many audio interfaces are based on this chip.

My choice: Focusrite Saffire (LE)

Edirol FA-101 and ESI QuataFire 610 also looked good and where options I also considered. But in comparison, Saffire bought more features (and hopefully sound quality) for its price. I’ve to say it is fantastic to have a huge two-story audio-gear supermarket (Alfasoni) near my flat in Barcelona. And their prices are generally lower than any other store in the city. Saffire (LE) was 323 eur plus taxes. Not bad.

Saffire (LE) audio interface have 6 ins and 8 outs (including digital spdif), and good quality audio (at least this is my first impression in a home-studio environment, and Focusrite have a reputation on its high-end gear).

focusrite saffire le. front and rear

In Linux, you don’t have an app for controlling the internal audio routing, but you can access all 6 ins and 8 outs with JACK, and with a ridiculous latency you can do all monitoring routing with JACK, so no big deal. Another happy surprise was to find that firewire provides enough power for the device. You only need to plug the power adapter for enabling phantom feed for condenser mics.

How to enable freebob driver in Ubuntu

That can be a little tricky. If your distribution doesn’t come with libfreebob package you’ll need to compile this library (and some dependencies) from the source and then rebuild libjack from subversion sources. But that’s not the end of the hassle. You’ll probably find (as I did) that the new compiled (svn) libjack is not compatible with already installed libjack and applications (I think they use different client/server protocols so the incompatibility have sense). Of course, I was not happy at all having to recompile all my jack applications so I looked at fixing the libjack .deb package from its source package.

Luckily, I found that enabling freebob in Ubuntu Feisty is really easy. Feisty is currently the testing/developing Ubuntu version, due for april 2007, so it’s not intended users who need a solid, reliable OS. However, since I have a macbook and the Feisty kernel supports macintel hardware much better than current Ubuntu Edgy, installing Feisty was a decision I already took. And I’ve had no crashes and had a good experience, so far.

So, the good news is that in Feisty you already have libfreebob0 in universe repository. The bad new is that, however, jackd comes with freebob driver disabled. Note that freebob is not a driver you can plug-in but is it built-in with jack. I believe it’s a packaging bug and very simple to resolve (though still in unconfirmed state).
Update: (January 25th) it seems that this problem has been resolved in new ubuntu-feisty libjack package (its already compiled against libfreebob). So ignore the next steps for compiling jackd from sources.

So here goes the how-to for enabling freebob in jackd maintaining all jack-apps compatible:

Enable universe binary and source repositories and install libfreebob-dev
$ sudo apt-get libfreebob0-dev
Download and compile libjack from source package. It can be done with a single instruction:
$ sudo sudo apt-get -b source libjack0.100.0-dev
Is very likely that you’ll need to install several -dev packages for compiling this source package. But don’t worry, the error message specify all those packages. After installing them, try again.
Then install all new created .deb packages:
$ sudo dpkg -i *.deb

Now if you do
$ jackd -d freebob
you’ll see that –though it still doesn’t work– at least it is using the freebob driver.

The rationale behind that is that the autoconfiguration of libjack enables freebob driver if it finds the the freebob library and headers installed. But libfreebob0 dependency is not enforced in its debian/rules, that’s why binary package have freebob disabled. And since Feisty already have libfreebob I think it should be enforced.

Fixing /dev/raw1304 permissions

Let’s fix the before-mentioned error. Doing jackd -d freebob I got:

Freebob using Firewire port 0, node -1
Ieee1394Service::initialize: Could not get 1394 handle: Permission denied
Is ieee1394 and raw1394 driver loaded?
Fatal (devicemanager.cpp)[68] initialize: Could not initialize Ieee1349Service object
Fatal (freebob.cpp)[69] freebob_new_handle: Could not initialize device manager
FreeBoB ERR: FREEBOB: Error creating virtual device

That’s because a normal user does not have access to raw1394
$ ls -l /dev/raw1394
crw-rw---- 1 root disk 171, 0 2006-12-17 16:10 /dev/raw1394

Changing permissions
$ sudo chmod o+rw /dev/raw1394
solves the problem. However after a new reboot the permissions have been reset. A permanent and easy way to solve this is adding your user into the disk group.
$ sudo gedit /etc/group
In my case, the username is parumi so I edited the group file like this: “disk:x:6:parumi”
Update: $ sudo adduser parumi disk is the right way instead of directly editing /etc/group. Thanks Maarten de Boer for this feedback.

Another solution is using udev rules like explained in this linux-audio-user thread

After that, login again and you should be able use jackd -d freebob and all installed jack-apps. Finally, this screenshot shows qjacktl connection window with the Focusrite Saffire (LE) 6 inputs and 8 outputs.

qjackctl showing Focusrite Saffire (LE) 6 ins and 8 outs

Advertisements

64 Responses to “Getting firewire audio work on Linux”

  1. Djerek Says:

    Hi,

    I ran into similiar trouble with raw1394 permissions on fedora core 6. Do you know how to change permissions on this distro? I tried adding myself to the disk group, but that didn’t fix the problem.

    Thanks in advance,

    Djerek

  2. Ray Brooks Says:

    Djerek,
    Did you manage to get this working on FC6? I’m trying to use an Edirol FA101 over an IEEE1394b PCMCIA card without success so far. I can get the libfreebob test to work and display the card and I can get jack to run and display all the ins and outs but I can’t actually get anything to play on it; applications (xmms, mixxx) just hang. :( After several days I’m about to give up and try this Ubuntu method.

    TIA

    Ray

  3. John R. Says:

    Your post got me past the permissions issues, but now I am looking at an error message like this:

    JACK compiled with System V SHM support.
    loading driver ..
    Freebob using Firewire port 0, node -1
    Root node has no children!
    Root node has no children!
    FreeBoB ERR: FREEBOB: Error creating virtual device
    cannot load driver module freebob
    no message buffer overruns

    have you ever seen this or know what it is? Thanks.

  4. Pau Arumi Says:

    Ray, John,
    I’m sorry I cannot help you with either of your problems.
    If you have not already done it, I suggest you to ask in one of these mailing-list (and maybe report back if you solve it)

    linux-audio-users mailing-list:
    http://www.music.columbia.edu/mailman/listinfo/linux-audio-user/

    jack-devel mailing-list:
    https://lists.sourceforge.net/lists/listinfo/jackit-devel

    There are many freebob users there, and the authors use to answer related questions as well.

  5. Ray Brooks Says:

    I found the problem! I was on the wrong track… had everything (firewire libraries, jack, freebob) compiled from SVN and still no joy. Then I found a post on another forum about IBM thinkpads (what I have) mixing up IRQ handling for PCI (and therefore PCMCIA) devices when ACPI was enabled. Removed PCI power handling from the bios options and hey presto! Hope this helps someone.

    Ray

  6. Djerek Says:

    Ray,

    Still in the same place. Glad you were able to figure it out on your end. I’m giving it a shot here too:

    http://sourceforge.net/mailarchive/forum.php?thread_id=31343267&forum_id=42046

    -Djerek

  7. Pieter Says:

    Dear all,

    The best place to ask your FreeBoB questions would be the freebob-devel mailing list:

    http://sourceforge.net/mail/?group_id=117802

    Greets,

    Pieter

  8. Pau Arumi Says:

    Pieter,
    my fault. I wasn’t able to see the freebob-devel link from the freebob web the first time.
    Thanks to point this out.

  9. Jonathan Says:

    Pau Arumi,

    Have you had any problems upgrading libjack? As soon as I did an apt-get update, i was being told that there was a new libjack to upgrade to. I guess I could just try it and see what happens. BTW this worked perfectly.

  10. Pau Arumi Says:

    Jonathan, that’s because your compiled and installed jack package is the same version as the one in repositories (and for some reason the remote package is considered newer than the installed). If you reinstall the remote one you’ll go back to the initial jack install (without freebob)

    The solution is to update the debian/changelog file of the decompressed jack source package. A simple way to do that is editing the changelog, doing a copy of the last entry and updating the final version number from “-1” to “-2”.
    Then, to recompile the sources go to the jack source directory and run “dpkg-buildpackage -rfakeroot -b”. And to install the .debs “sudo dpkg -i ../*.deb”

  11. John R. Says:

    The answer is here for anyone that ever googles across this. Thanks for all the help everyone.

    http://justincaseyouwerecurious.blogspot.com/2007/01/presonus-firepod-linux-ieee1394-jackd.html

  12. johnny Says:

    This is really great info. Does anyone know of a firewire device that will give more output channels? I need 8 inputs and 14 analog outs for my project.


  13. […] Got the FA-66, and got it working almost immediately, in Debian Etch, with a vanilla kernel, and no problems, using this as a guide. […]

  14. nilux Says:

    I just upgraded to Feisty, but i have an error at this stage :

    sudo apt-get -b source libjack0.100.0-dev
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to find a source package for jack-audio-connection-kit

    any idea?

  15. Pau Arumi Says:

    nilux, have you enabled the universe source repository?
    (to do this uncomment a line containing “univers” and starting with “deb-src” in /etc/apt/sources.list)

  16. nilux Says:

    Damn, that’s it :p I had only the binary universe repo enabled..but now, after having installed the building dependencies
    i have another problem; the compilation process ends this way : http://pastebin.com/866942

  17. nilux Says:

    Well, it seems that freebob is now part of the feisty jack libjack package by default! The compilation didn’t work, but when i launch qjackctl, freebob is in the driver list, and it works, without doing anything!

  18. Pau Arumi Says:

    It does seems so! this is good news :-)

    $ apt-cache show libjack0.100.0-0
    […]
    Source: jack-audio-connection-kit
    Version: 0.102.20-1
    Depends: libasound2 (>> 1.0.12), libc6 (>= 2.3.2.ds1-11), libc6 (>= 2.5-0ubuntu1), libfreebob0 (>= 1.0.0)

    I’ll update the blog entry asap. However the ubuntu bug is still open, I’ll ask if there are pending issues.

  19. grae Says:

    Hi, can you give me some information on how you went about installing feisty on your mac? I have an imac that I would like to try it out on but I’m not sure what the best approach is.

    btw.. your instructions here got me going with my dell laptop and edirol fa-101…THANKS!

    grae

  20. Pau Arumi Says:

    grae,
    my last install was a feisty herd4. i followed this tutorial and all went smooth.
    https://help.ubuntu.com/community/MacBook
    note that some steps are marked as not needed for feisty.
    good luck!

  21. Ben Booth Says:

    Hi,

    I also bought a Saffire LE and am trying to get it to work with Freebob. I got audio working, but I cannot get any MIDI input to work. I tried it out in Windows and it works just fine. If I connect Freebob midi in to aseqdump, it doesn’t register any midi events. Has anyone else come across this same problem with the Saffire LE?

    Thanks

  22. Mark Says:

    Hello, hopefully you can help me after a lot of research I didn’t make much progress. I got myself a Saffire LE, too and I am running it on Ubuntu Gutsy with a real-time kernel. But my input latency is not good at all. I didn’t measure it but when I connected a mic and connected it to my first out in Jack I can hear that the sound comes out with a pretty high latency. My Freebob settings are: rt-priority 89, frames/period 32, sample-rate 96000, and periods/buffer 5.
    Further only the analog outputs 5 and 6 work and Jack only lists outputs 1-6. I don’t need the digital one anyways but the whole thing doesn’t seem to work as it is supposed to.
    I hope you can help me. – Mark

  23. parumi Says:

    Mark,
    my advice is to ask for help in a frebob/faddo mailing list. For example:
    https://lists.sourceforge.net/lists/listinfo/freebob-devel
    or irc channel #ffado at irc.freenode.net
    I think that the minimum latency is somehow limited by the firewire protocol to something like 1024. But not sure about it. Better ask the developers.

    So your Saffire LE works on Gutsy? That’s new to me because I experienced problems with the Saffire Pro and Gutsy’s freebob and assumed that the same problem applied to Saffire LE. Pieter Palmer, the freebob/ffado developer, showed me how to fix it (in the code). I’ll blog about it soon.

  24. Mark Says:

    Thanks, I can’t wait to try it out since I want to test xwax which really requires more than 2 outputs and a good latency. – Mark

  25. Adam Says:

    Hi,

    I’m fairly new to Linux recording and have been trying to get a Saffire LE to work on Gusty. I’m having two main problems that I hope someone can help me with:

    1. Can’t change sampling rate via Jack Control. Seems to be stuck at 48kHz no matter what I set in Jack Control (shows up as 48kHz in Ardour as well).

    2. Although I can see all the audio connections in Jack control and record input into Ardour, I get no sound out of the Headphone jack on the Saffire.

    Could these problems be related to the fact that I have not yet interfaced the Saffire with a Windows machine?

    Thanks in advance,
    Adam

  26. parumi Says:

    I deduce that jackd starts correctly with a Saffire LE in Gutsy. With a Saffire Pro I could not even start jackd. I explain how to solve it in my last post.

    I would interface it first with a windows or mac to upgrade the firmware to the last version first (using the last drivers from the web).

    About the 48KHz, I believe it’s not possible to change it with current freebob.

    You’ll probably get better feedback at freebob-devel
    https://lists.sourceforge.net/lists/listinfo/freebob-devel

    Good luck.
    Pau

  27. Marcel Says:

    Hola Pau,

    I’m thinking of purchasing one of those cards that you mentioned, Edirol FA-101 or Focusrite Saffire LE. I’m going to buy it in Alfasoni as well. Today the price is practically the same. So, what did it drive you to that choice? What functions/qualities do you think were better in the second one? I’m using Ubuntu Studio so I guess won’t have all those problems with jack ’cause freebob/ffado is natively compiled in the OS.

    PD: Gràcies per endavant. Realment m’interessa saber què en penses abans de decidirme.

    Salut i software lliure!

  28. parumi Says:

    Hi Marcel,

    I think that at the time of my purchase the FA-101 was not in the shop. I only remember considering the FA-66, which is similar to the saffire in number of in/out channels.

    I took the later mainly because subjective reasons: I tried one at my workplace and was not very satisfied with its sound quality, specially with a recording test. On the other hand, focusrite is a hi-end brand and the saffire seemed to offer good preamps and converters. I also liked the box design and control software.
    Though I’m satisfied with the saffire sound I didn’t made side-by side evaluations so I really can’t assure that I notice a difference in quality.

    But there is another reason for what I like saffire better: ventor support. As you can see at ffado web
    http://www.ffado.org/ saffire provided some hardware and all the specs the devs asks for.

    To conclude, Edirols are reported to work but Saffire is better supported since the devs have the hardware and all the specs (and information they ask). However, I’ve found some (fixable) problems with freebob and Saffire Pro 10 (we bought 2 of them at my work place) and freebob. This will be fixed in next release of ffado (aka freebob 2) drivers.

    About ubuntu studio packages (jack, etc) I think they are the regular ubuntu packages. I say so because ubuntustudio meta packages are available from my regular ubuntu deb sources.

    From Adam comments above I deduce that Saffire LE (mostly) works out-of the box in ubuntu 7,10. I’ll try with mine next week (I only use the Pro version lately).

    Pau

    PD: De res! content de conèixer a usuaris catalans d’audio amb linux :-)

  29. Marcel Says:

    Gràcies. I’ll wait a few more days thinking about.

    Marcel

  30. cryptout Says:

    Fixed the “no sound” problem. I bought a brand new Saffire LE Saturday and could not get any sounds out.

    Thanks to the comment above I got it running now.

    Quote “I would interface it first with a windows or mac to upgrade the firmware to the last version first (using the last drivers from the web).”

    After connecting it in Vista and starting the mixer app it initialized and I could then boot back in Ubuntu Studio and it worked straight away, no special drivers needed just a clean install.

  31. cryptout Says:

    Ohh almost forgot.

    Thank you!

  32. Brandon Says:

    Im so close to getting this to work. I have an Edirol FA-101. I have libfreebob and jack installed. I use qjacktl and I can see all the inputs and outputs but I can’t hear any sound out of the headphones. Im confused.

  33. Jenny Says:

    I have a Focusrite Sapphire LE but no sound out.

    I notice from the post above that cryptout “initialised” it in Windows.

    Does this mean that the device must be kept powered between using it in windoze and linux as I don’t have a windows machine and would have to keep it continually powered?


  34. […] project, which provides a driver which allows jackd to talk to the device. A bit of help from this page got me going. Important: you need to plug the power supply into the Inspire – the PCMCIA firewire […]

  35. christihuf Says:

    Tadalafil the prescription erectile dysfunction (ED) tablet clinically proven to both work fast (in as little as 30 minutes for some men) and work up to 36 hours vigara to canada ! For levitra order usa fast delivery Canada.. Save your money-buy cheap viagra tabs online… Fast to get viagra pills online. Find out more about levitra at the official cialias generic soft tabs site..

  36. hirokoged Says:

    Viagra the prescription erectile dysfunction (ED) tablet clinically proven to both work fast (in as little as 30 minutes for some men) and work up to 36 hours vigara generic dangers … For cialis levitra fast delivery Canada! No prescription required -buy priaprism pills on line! Easy to get priaprism pills online.. Find out more about cheap levitra at the official calis tablet site.

  37. Debty Says:

    Ahaan… I will follow.

  38. ernesto Says:

    Paul, how you can access the 5 & 6 inputs? i only can get 1-2 and 3-4 to work :(.

  39. ernesto Says:

    and nice work putting this al together :)

  40. coetsee Says:

    . Its all about chasing shadows.
    By that I mean latching on to this or that latest, most innovative idea that some self styled money making guru has put out in the hope it’ll go viral and make them a lot of money off the backs of all the headless chickens who will follow them blindly down a blind alley. Its a shame but a truism nonetheless that people will follow where someone they see as an expert leads. Even if they lead them to certain disaster, which is what most of the gurus tend to do to their flocks.
    The trick is to recognize a shadow when you see it!

    http://www.onlineuniversalwork.com


  41. This is definitely a good weblog post, I have learned a great deal.

  42. Vasily Says:

    Yo Yo super post


  43. Nice web + I never found parumi.wordpress.com before in my searches! Keep up your great work!


  44. […] jackd to talk to the device. A bit of help from this page got me going. Important: you need to plug the power supply into the Inspire […]


  45. sgarealestates provide you a comprehensive range of good quality real estate projects by all the reputed builders be it residential, commercial and retail . Besides we also serve you in leasing,selling, reselling of your properties and enjoying the returns there on. We offers you best deal of property in chandigarh, property in panchkula, property in zirakpur and property in mohali on reasonable rates.

  46. Nrtiikcs Says:

    Which university are you at? underage porn videos
    grhliz

  47. Tcyoejqw Says:

    perfect design thanks Lolita Rape unzbp

  48. Liknnmls Says:

    Will I get paid for overtime? Young Model Blue
    %-)

  49. Kfagjqmd Says:

    I came here to study http://ysadoraap.de.tl brooke and model i love her, sometimes you fantasize about something very picky (perfect mature MILF with those super big hentai boobs, blue eyes) and one day you find it in pornhub

  50. site Says:

    Have you given any kind of thought at all with translating your current website in to Chinese? I know a several of translaters here that will would help you do it for no cost if you want to contact me personally.


  51. Such are the ingredients of Adiphene that its one finest selling level is the shortage of dangerous
    uncomfortable side effects. Safety is also assured when taking Adiphene because of its
    natural ingredients, which means that serious side effects are unlikely to happen if taken as directed.
    The science behind Adiphene consists of 12
    of probably the most power fat preventing ingredients known.

  52. google Says:

    Google has been working hard to give the user
    more chart options, as well as better looking charts. Roll forward a few years
    and the advent of online collaboration technologies has
    led to a different style of collaboration, one which opens up to a wiki approach where contributions are welcomed and encouraged from all parties.
    By using the Internet and search terms, you can find out what is most interesting to your readers and capitalize on those topics by writing about them on your
    blog and website.

  53. google Says:

    In order to promote the website, the web master must always adhere to the general rules in search engine optimization. Roll
    forward a few years and the advent of online collaboration technologies
    has led to a different style of collaboration, one which opens up to a wiki approach
    where contributions are welcomed and encouraged from all parties.
    Perhaps it’s better not be using these social networks, they say they keep people connected, but only in a virtual world,
    it probably prevents a lot of people from going outside and really connecting.

  54. google Says:

    In order to promote the website, the web master must always adhere to
    the general rules in search engine optimization. People have different views, but you
    can never know who to trust. This article explains what it is these systems actually do,
    and how you can earn cash in a Google money system
    without paying out hundreds of dollars in fees.

  55. diet pills Says:

    In summary, if you need to lose weight, go anywhere and complete boot
    camp class. Glucomannan has a particular means to soak up water and swell inside the stomach.
    Uptil now no individual has actually been captured with
    any negative effects.

  56. ppc agencies Says:

    It’s hard to find well-informed people on this topic, however, you sound like
    you know what you’re talking about! Thanks

  57. Eddy Goodlet Says:

    This piece of writing offers clear idea in favor of the new people of blogging, that truly how to do running a blog.|

  58. Tory Bustard Says:

    Basic Programs For Antivirus Coupon Studied 2025


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: