Sunday, June 13, 2010

Insights in getting M-Audio Firewire Solo to work

I got M-Audio Firewire Solo running in Ubuntu 10.4 in a Dell M1530 laptop. I had a lot of troubles, I even tried using ffado and jack from svn, the way the folks at ffado.org
are recommending at the Wiki, but that way didn't work, but it turned better because I am using the packages available at the Ubuntu repository.

Steps:

I started with a vanilla Ubuntu 10.04 installation updated with the last updates available at June 13 00:00 GMT

The first step I did was install Ardour:

sudo apt-get install ardour


I started simple, I was expecting this to install jack, and maybe ffado. It did install Jack, and libffado 2.0
It asked me if I wanted to run Jack in realtime mode, which I replied yes, and made a file in /etc/security/limits.d called audio.conf which contains:

# generated by jackd's postinst.
#
# Do not edit this file by hand, use
#
# dpkg-reconfigure -p high jackd
#
# instead.
@audio - rtprio 99
@audio - memlock unlimited
#@audio - nice -19
  • rtprio is the maximum real time priority in the CPU, 99% is allocated.
  • memlock is the amount of memory that can be allocated to the process, but if you run jackd in command line it will tell you that allocating unlimited memory is dangerous and recommends allocating the real amount of ram available
  • nice changes the priority in the kernel scheduler, -20 is the highest and 20 is the lowest.

Another thing you will need is that your user is able to read and write to "/dev/raw1394" which is your Firewire interface, I am not sure why is not done automatically.
if you do:

ls -al /dev/raw1394
The default Ubuntu 10.04 config will show:

crw-rw---- 1 root root 171, 0 2008-10-21 00:50 /dev/raw1394
which is not good because only the root user can read and write to the interface

We correct this by doing:

echo (KERNEL=="raw1394*", GROUP="audio") >> /etc/udev/rules.d/50-raw1394.rules
We add our account to the audio group:

adduser -a -G audio accountname
Then run:

sudo apt-get install ffado-tools ffado-dbus-server ffado-mixer-qt4 linux-rt
When it finishes I recommend you to reboot and start with the Linux realtime kernel you just installed, when you are back in the desktop, try running ffado-dbus-server or you can go ahead and try Jack with Ardour or install another "Jack enabled" software.

This is my configuration in Jack:

Configuration in Jack


I can confirm that audio playback works well, I can't speak of capture because I don't have stuff to test with, I use it very rarely with friends, you probably noticed
I have high latency, for me is not a problem because I rarely use the audio interface for recording, but in this website: http://westcoastsuccess.wordpress.com/2008/03/23/m-audio-firewire-solo-ubuntu/ Cheers Westcoastsuccess.


By the way, the FFADO Wiki is another great place.

An important thing that remember is that in Jack the M-Audio Firewire Solo appears as "system" and it has 4 playback channels, the first 2 ones are Left and Right but in SPDIF, 3 and 4 are Left and Right channel of Line Out.

Wish you good luck and waiting for feedback.

Very important notes:

  • By some reason, ffado-mixer-qt4 is not able to connect to ffado-dbus-server, I don't know if the package is broken or if is this version of faddo-mixer-qt4, with the SVN, (That by the way I could not get playback working, even when everything appeared being good, but just no sound coming) ffado-mixer would say "Please wait, reconfiguring audio interface" so I guess is just because there is still not support to control the mixer in Linux, you have to change the Mixer in Windows, don't turn off the audio interface, and start Linux. I think for people who record this
  • would be completely annoying, but in my case I use the audio interface as a DAC for getting my music to a receiver, so I don't mess with the volume in the audio interface, just in the amplifier though so it doesn't bother me much.
  • If you have a video card like a NVIDIA or ATI, with propietary hardware drivers, I'd advise to uninstall them just to see if that is not what is making the audio interface to work. Here it works with the propietary NVIDIA driver, but with the Jack configuration I am presenting here and having appearance effects on, it causes shuttering and even has caused Jack to stop, I tweaked a bit the jack settings (but with the sacrifice of more latency) and I am also experimenting with /etc/security/limits.d/audio.conf settings
  • In Windows when I am using wireless, I get shutters and distortion. I have the Intel IPW3945 wireless card, and I can confirm that in Ubuntu audio playback is not affected, I am not sure about capturing, but probably it would be advisable to disable it while recording.
Edit: The problems with video cards and wireless cards interfering is not only in M-Audio cards, this is a quite universal problem.

The last 2 problems are supposedly because the devices share the same IRQ, there is information about it in the knowledge base of M-Audio.

If someone is curious my CPU Process is around 1.2% and 1.5% when is in use RT icon flickers (Should not it be always on?)

Annoyances:

  • Audacious with jack worked for me but the output is very low, so if you have problems with certain software, it would be wise to try another version or another software
  • Research a way to patch everything that goes to Pulseaudio to Jack. (I already have seen some options, but they involve editing conf files and I'd like a seemless way to select if I am going to patch everything to Jack, or simply use the HDA Intel Interface. (If Jack is stopped, HDA Intel works perfectly, and I have seen reported some cases of it not working in RT Kernel) Probably the solution for being able to change painlessly will be writing a script. (It would be cool to run automatically start it while Gnome is getting started, and being able to check if the interface is plugged in, better integration, maybe we can brainstorm something regarding that) :)
  • Having Jack on the status bar, can it be moved to tray? (Moving it to another workspace is not so bad, though)


Versions used:

  • Kernel 2.6.31-10-rt
  • jackd (0.118+svn3796-1ubuntu2)
  • libffado 2.0.0 built Mar 31 2010
  • ffado-dbus server 2.0.0-1ubuntu1
  • jackd-firewire (0.118+svn3796-1ubuntu2
  • ffado-mixer-qt4 (2.0.0-1ubuntu1)