How to Get Your M-Audio ProjectMix I/O Working in Linux

**UPDATE**

As of Linux Kernel 3.19, Takashi’s work (GitHub) has been merged in. This means that on any recent Linux installation, installing the drivers shouldn’t be necessary. You can skip right to installing FFADO from source and setting up a jack sink in pulseaudio.

Introduction

This is something that I wanted to do for quite a while. I’ve never really used Linux for music production because I prefer Windows and OSX software such as Pro Tools, but it’s nice to be able to listen to music while I code. And Linux is so much nicer to develop code for than Windows. This tutorial will focus on setting the desk up on a Linux Mint/Ubuntu environment.

So first off, what we are going to do is install a new kernel module which allows our Linux system to communicate with the ProjectMix (thanks to Takashi Sakamoto for that), then create a Jack sink into which we feed all of our PulseAudio sound. We’ll also be using FFADO (http://www.ffado.org/) to control the internal mixer in the ProjectMix.

Prerequisites

We’re going to need several things installed before we even begin to set this up. First off, you’ll need the latest version of “Git”. Open up a terminal and install it with the following command:

 sudo apt-get install git 

We’ll also need to set up some build dependencies for FFADO. This is going to involve adding some source repositories. Open up /etc/apt/sources.list as root with the following:

 sudo gedit /etc/apt/sources.list 

Add the following lines to it. On Ubuntu, replace “saucy” with whatever version you are using. On Mint, I’ve found that it really doesn’t matter as far as FFADO build dependencies go.

deb http://us.archive.ubuntu.com/ubuntu/ saucy universe

deb-src http://us.archive.ubuntu.com/ubuntu/ saucy universe

Finally, you’ll want to update aptitude and install the build dependencies:

sudo apt-get update
sudo apt-get install build-dep libffado2
sudo apt-get install scons

Getting the Source Code and Building

We’ll start by grabbing the code for the ProjectMix driver module from GitHub and the FFADO source code from ffado.org. I’d also recommend that you create a “ProjectMix” folder to keep everything tidy.

git clone https://github.com/takaswie/snd-firewire-improve.git
wget http://www.ffado.org/files/libffado-2.2.1.tgz
tar -xvzf libffado-2.2.1.tgz

Okay, now that we have the source code and it’s extracted. We have to build and install it. We’ll start with the driver module:

sudo ln -s $(pwd)/snd-firewire-improve/ /usr/src/alsa-firewire-3.11
sudo dkms install alsa-firewire/3.11

That’s the main step complete. ALSA can now communicate with the ProjectMix. You can actually test this by rebooting your machine, and you will hear “pops” coming from the speakers as the driver sets the sample rate of the sound card.

This would now be a good opportunity to install qjackctl, as you will need it to configure the sample rate and routing of the sound card in future.


sudo apt-get install qjackctl

And with that, it’s time to install FFADO. It will have nothing to do with streaming audio to the device, but it is necessary for controlling the ProjectMix internal mixer. You can build and install it with the following commands.


cd libffado-2.2.1

sudo scons install

At this point it would be a good idea to check that you can stream audio to your device. Reboot and start up qjackctl. Go into settings and select ProjectMix as your interface under ALSA, then press the start button. Open up ffado-mixer, either in a terminal window or just click the icon in your menu, then set your output to “Aux 1/2”. Make sure your speakers are plugged into outputs 1 and 2 on the device and put the volume fader in ffado-mixer to a reasonable level. You can test the audio output by opening up any audio software that supports Jack and playing some audio through it.

Hear some sound? Great, let’s continue and set up your Jack sink for PulseAudio (this will allow desktop applications to send sound to the card). Don’t hear anything or are you having any other issues? Leave a comment below and I’ll do my best to help.

PulseAudio and Jack

Admittedly this isn’t the most ideal way to do things, but until Linux has something like CoreAudio for OSX, it will have to do. We’ll start by killing the PulseAudio service until we finish setting everything up or else it will just get in the way. This is quite simple to do.

Start by opening your PulseAudio client configuration as root:


sudo gedit /etc/pulse/client.conf

Add the line “autospawn = no”. Save it, but don’t close it yet.

Open another terminal window/tab and enter the following command:


pulseaudio --kill

This will stop the service while we install the jack-sink module. Install it with the following command:


sudo apt-get install pulseaudio-module-jack

You’ll now need to edit your PulseAudio configuration to load the new module when it starts. Open up your configuration file:


sudo gedit /etc/pulse/default.pa

Add the following line:

load-module module-jack-sink

Save it and close. Finally, go back to your “client.conf” and erase the “autospawn=no” line that we added earlier, save it and then close.

The Moment of Truth

That’s the setup completed. Close everything and reboot your computer.

Don’t panic if you don’t hear any sound immediately. Make sure you go into your sound settings and set the output to the jack sink that we installed. It should appear just like any other soundcard that you have. Also, make sure that you open ffado-mixer and set the output to “Aux 1/2”.

Test the sound output by loading up any application that uses PulseAudio. Even playing a YouTube video will do. Hopefully this will be all that you need to do. It’s also worth noting that if you do wish to use your ProjectMix for audio recording/mixing on Linux, applications like Ardour will work just fine alongside your PulseAudio sink.

If you have any issues or concerns, comment below and I’ll do my best to help.

Hope this has been of some use!

Advertisements

20 thoughts on “How to Get Your M-Audio ProjectMix I/O Working in Linux

  1. Hello wornwinter and thank you for your guide. I’m using an M-Audio Firewire 410 and I’d been able to follow your guide until the installation of FFADO.
    The problem I have is that I can’t select my FW410 as my interface under ALSA in Qjackctl, I don’t have that option! Do you have any idea about how to fix this? I can get some sound only with audacity…
    Many thanks in advance
    Michele

    PS. I’ve followed your guide carefully, step by step. My OS is Mint Linux 17.1 Cinnamon, fresh install.

    • Are you routing sound directly to ALSA from Audacity?

      Could you cd to /proc/asound/[name of your soundcard] and send me a zip/tar of any files in there and I can take a look at it for you?

      Also are you making sure to choose ALSA in qjackctl?

      Not really sure what’s going on, but if you can send me the contents of that asound directory I can probably help further. Sounds like a driver issue more than anything.

  2. Yes, I am routing sound directly to ALSA from Audacity and it works perfectly.
    Also in Qjackctl ALSA is the selected driver (it was like that by default).

    I’m sending you the folder in a .zip file, via email. The folder named as the soundcard, /F410, is only a link to a folder named /card2, which is also located in /asound.

    • Just had a look at the file you sent. It doesn’t seem to be a driver issue. Everything’s being detected by the driver correctly it seems.

      What options do you get in qJackCtl under input and output devices when you choose ALSA?

  3. Under “Output”, I get:

    hw:Generic HD-Audio Generic (hw:0)
    hw:Generic,3 HDMI 0 (hw:0,3)

    hw:C525 HD Webcam C525 (hw:1)

    hw:F410 FW 410 (hw:2)
    hw:F410,0 FW 410 PCM (hw:2,0)

    Under “Input”:

    hw:Generic HD-Audio Generic (hw:0)

    hw:C525 HD Webcam C525 (hw:1)
    hw:C525,0 USB Audio (hw:1,0)

    hw:F410 FW 410 (hw:2)
    hw:F410,0 FW 410 PCM (hw:2,0)

    So in a way I have the impression that Jack does see the device, but the inputs and outputs are not listed when I click on “Connect”.

    • Personally, I only ever had it working as a sound card. However, the MIDI ports are supported in the driver, so it should be quite simple to get it working as a control surface.

  4. Hello wornwinter,
    thanks for your nice guide. I’m using an M-Audio Firewire 410 and I’ve followed your guide carefully, step by step but I have problems to install the libffado-2.2.1. In the terminal I get the following report:

    Checking for a working C-compiler (cached) yes
    Checking for a working C++-compiler (cached) yes
    Checking for pkg-config (at least version 0.0.0)… (cached) yes
    Checking jackd version… 1.9.10
    Installed Jack Audio Connection Kit (JACK) supports FFADO setbuffersize API
    Checking for libraw1394 (2.0.5 or higher)… (cached) yes
    Checking for libconfig++ (0 or higher)… (cached) yes
    Checking for libxml++-2.6 (2.13.0 or higher)… (cached) yes
    Checking for libiec61883 (1.1.0 or higher)… (cached) yes
    Checking for lrint(3.2) in C library m… (cached) yes
    Checking for lrintf(3.2) in C library m… (cached) yes
    Checking whether ‘which pyuic4’ executes (cached) no
    Checking whether ‘xdg-desktop-menu –help’ executes (cached) yes

    I couldn’t find all the prerequisites (‘pyuic4’ and the python-modules ‘dbus’
    and ‘PyQt4’, the packages could be named like dbus-python and PyQt) to build the
    mixer.
    Therefor the qt4 mixer will not get installed.

    Checking for dbus-1 (1.0 or higher)… (cached) no
    Checking for dbus-c++-1 (0 or higher)… (cached) no
    Checking for alsa (0 or higher)… (cached) no

    One of the dbus-headers, the dbus-c++-headers and/or the application
    ‘dbusxx-xml2cpp’ where not found. The dbus-server for ffado will therefore not
    be built.

    Trying to find the system triple: (cached) i686-pc-linux-gnu
    Doing a debug build
    Detected DIST_TARGET = i686
    User space is 32-bit
    Doing a 32-bit i686 build for Intel(R) Pentium(R) M processor 1.60GHz
    sh: 1: svnversion: not found
    scons: done reading SConscript files.
    scons: Building targets …
    scons: `install’ is up to date.
    scons: done building targets.

    My OS is Ubuntu Studio Trusty Thar 14.04.3

    Do you have any idea what’s going wrong?

    Best regards: Enrico

    • Did you make sure to do the “sudo apt-get install build-dep libffado2”
      step?

      If so, try “sudo apt-get install libdbus-c++-bin”.

      dbusxx-xml2cpp is a part of that package.

  5. Takashi’s work was merged into the linux kernel in 3.19 – I’ve not tested that as I jumped straight to 4.x kernels in Ubuntu 15.10 + KX Studio which work with the Projectmix as standard 🙂

    I’ve not fully investigated control surface side yet, but it’s not as simple as selecting Logic mode to get it to work with Ardour (or Mixbus). I had no luck with that. It probably needs a custom midi map writing. I’ll come back and update you if I get around to doing it.

    • If you set up the ProjectMix as a Mackie Control, it works fine in Ardour. I’m using Ardour 4.6 with Fedora 23 at the moment and everything I’ve tried works perfectly. I’m rather impressed with it. I was pretty happy to dump Cubase, even though I think it’s a really nice DAW. I’d rather just keep everything I do in Linux and stop having to reboot to be creative. 😉

    • I saw that! Just e-mailed him there thanking him for all his hard work.

      I’ll maybe have a play about with getting the control surface part of things to work in Ardour. Let me know how it goes.

  6. Hi,
    I have a problem to install scons under libffado-2.2.1: the terminal says that libraw1394, libxml++-2.6 and libiec61883 are missing, but I checked and they are installed already. What can I do?
    Thank you in advance.

  7. Hi, I’ve got most things working, it seems, but I have a weird issue where routing mixes to the headphone outs seems to _add_ the channels rather than routing them to left/right. As you can imagine, the issues are interesting and varied.

    Have you had any experience with such problems?

    Mackie control seems to work just fine, though, as do most audio I/O.

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