diyAudio logo

LINUX Audio MAudioTransit


Changelog: Revision 2.2: 06/05/09 soundcheck : cleanup

The M-Audio Transit is not listed as officially supported by ALSA. Though it's quite easy to get
it going, if you know how it's done! ;)

The great thing with this card is that it runs asynchronous USB at 44.1 and 48khz (at 16bit only!).
At 24/96khz it will run in adaptive mode.

The standard installation won't work!!!!!!!! You need to follow below instructions.
Below will work under Ubuntu Intrepid, Jaunty and other recent Debian/Ubuntu/Mint derivates.

One of the problems under Linux is that you can't configure the Input/Output modes and Latency settings.
The pity - under Windows I experienced slight sound improvements when reducing the on-card latency. (I am trying to figure out how to do that under Linux)

HW-TWEAK-Potential:

I'd recommend to apply some small tweaks for a much better perfomance:
Seperate powersupply, new coupling caps, new buffer cap and new output opamp (I use Maxim MAX4477ASA). Optional: Gavanical isolation with Opticis USB Fibre USB Cable


If you find errors in below description drop me a comment in the Linux Audio thread or drop me a mail via
the members list of the forum.

I hope that my instructions are readable and executable even for Linux Newbies.

The driver installation itself shouldn't take longer then 10 minutes.

Hint: Perhaps you'd try to install yourself an Ubuntu Studio first. It's done in an hour. This will give you a perfect base for running Audio on a PC.


The M-Audio Transit get its firmware downloaded everytime the PC is started up.
Clemens Ladisch (pretty much involved in ALSA development) has written a piece of software for Linux managing this. The madfuload binary loads the M-Audio firmware
down to the device as soon as UDEV detects the device.

The Madfu package 1.2, as you download it from Sourceforge, is coming with the Transit firmware - there is no need to get it from the M-Audio homepage.
As said above. The 1.2 default installation comes with some flaws. You need to apply below changes.


I. Download the Madfu driver from here https://sourceforge.net/project/showfiles.php?group_id=87777&package_id=94170
II. Installation (type below commands - everything proceeding the $-prompt) in a terminal - You'll find the terminal-application under Menu "Accessories" )
(Note: You can even drag and drop below strings into a terminal with the latest Gnome release - I'd recommend to try it this way to avoid typos, of course you need to fill in your local parameters for expressions I put in <> )

0. $ cd <your-downloaddir>
1. $ sudo cp madfu* /usr/src
2. $ cd /usr/src
3. $ sudo apt-get install build-essential
4. $ sudo tar xvf madfu*
5. $ cd madfuload-1.2
6. $ sudo ./configure --prefix=/usr
7. $ sudo make
8. $ sudo make install


III. Workaround:
The current Madfu version 1.2. is not in line with current Ubuntu UDEV (UDEV handles all devices, naming, hotplugging, etc. under Linux) environment. One line (rule) has to be changed in the Madfu UDEV-rules file.
Just to explain what below line does: If the system recognizes a device with vendor and product ID 763/2806 (Transit), it starts the madfuload program downloading the ma006100.bin firmware file. Just for fun type $ lsusb and you'll see that ID.

Let's get it done:

1. sudo gedit /etc/udev/rules.d/42-mad*

The line with the Transit rule starting with

ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/2806/* .....

you need to swap with

ACTION=="add", SUBSYSTEM=="usb", ENV{PRODUCT}=="763/2806/*", RUN+="/usr/sbin/madfuload -l -3 -f /usr/share/usb/maudio/ma006100.bin -D $env{DEVNAME}"

save an exit.

DONE.

Note: There is a new firmware available: ma006101.bin Let me know if you want that one. It is not part of the 1.2 package.

OPTIONAL configurations:

IV. Now I'll show you how to fix the card index, if you run an internal and an external (USB) soundcard. You want to make sure that the system doesn't randomly assigns indexes to your cards.
You need to find out what driver you're currently using for your internal card.
Type in a Terminal
$ cat /proc/asound/cards
it'll show you the driver. E.g. HDA-Intel
Now -- to fix the indexes you do:

1. $ sudo gedit /etc/modprobe.d/alsa-base (Note: Under Jaunty/Mint Gloria the file is called alsa-base.conf)

Go down to the "options" section at the bottom. You should add or edit it as shown below (the lines usually exists with index=-2, if they are not there - add them)

options snd-hda-intel index=0
options snd-usb-audio index=1 nrpacks=1

save and exit.

If your primary card driver is a different then snd-hda-intel , use that one of course.

Please note also the added option nrpacks=1 for the USB driver. This fixes a static package-number of 1 per UsbRequestBlock?.
This will increase the transmission-linearity. You'll notice that in terms of sound improvement.

V. Shutdown the PC and connect your M-Audio
VI. Fire the system up and check in a terminal with $aplay -l or $cat /proc/asound/cards if the system has recognised the Transit.
VII. I bet it has! Here we go.
VIII. Some hints to get started quickly with a decent Linux Audio application called Audacious and to use the realtime kernel of Ubuntu Studio.

NOTE: In case Audacious is not found on the system install it with
$ sudo apt-get install audacious

Now we need to get the user permissions to run processes with realtime priority:
sudo cp /etc/security/limits.conf /etc/security/limits.conf.bak
sudo echo "@audio - rtprio 99" >> /etc/security/limits.conf
sudo echo "@audio - nice -19" >> /etc/security/limits.conf
sudo echo "@audio - memlock unlimited" >> /etc/security/limits.conf
(all users belonging to the group "audio" will have the permission to run rt-priorities.)


Continue:

Start Audacious with realtime priority (Ubuntu Studio comes with a realtime kernel!) from a terminal with

$ chrt -f -p 90 /usr/bin/audacious


The Audacious Window should appear:

* Right-Click on the window-header and enter preferences/audio
* Select under "Output Plugin Preferences" Transit hw:1,0
* Advanced buffer size change as small as possible
* Back in the main audio preferences, set the Buffer Size to 0
* At the very bottom you select "Bypass all of signal processing if possible"

That should be it.

IX. Now choose your reference song.

OPTION1:

X.To get the sound even better - copy your audio files into shared memory (RAM-Disk 50% of available RAM max - it is dynamically allocated)- for a full CD you'd need 2GB RAM, otherwise if there is not enough space available you need to copy single files into shared memory.

$ cd <your-music-dir>
$ cp *wav /dev/shm

Start Audacious as described above and select the songs from the /dev/shm directory


I hope above is not too complicated for the NON-Hacker type of guy. However I think it's worth trying it.

Above USB and Audacious tweaks are not exclusive to M-Audio Transit only of course.


OPTION2:

Lookup my MPD Wiki. MPD will even perform better than Audacious.

Enjoy. ;)