[he.fi:/] · archive · bchunk · cricket utils · slookup · splitmastream · clusse · htpp · mailgw · photos

Edirol UA-5 on Linux

I am successfully using the Edirol UA-5 USB Audio Capture device on Linux. The device can run in two modes, 'advanced' and 'basic'. The mode is switched using a small switch on the back of the device, and the device needs to be powered off and on after the mode change. The sample rate is switched using a knob on the front of the device, and again, the device needs to be rebooted after the change.

In the 'basic' mode, the device looks like a standard USB audio device, and it can be used using generic USB audio drivers (which come with most operating systems these days), no Edirol drivers are required. The downside is that the generic USB audio protocol only does 16 bits, 44.1 or 48 kHz. The 'basic' mode is supported by both the 'audio' module (kernel/drivers/usb/audio.o) in the Linux 2.4 and 2.6 OSS drivers, and the Alsa 'snd-usb-audio' module (included with Linux 2.6).

In the 'advanced' mode, the device uses a slightly different protocol, which supports 24 bit resolution and 44.1/48/96 kHz sample rates. It cannot do full-duplex (recording and playback at the same time) at 96 kHz, so the sample rate knob has separate '96 kHz PLAY' and '96 kHz REC' positions. The advanced mode is supported by the current Alsa 'snd-usb-audio' module (as included with Linux 2.6 - i've tested with 2.6.3-rc2), and Edirol-provided ASIO or WDM drivers on other operating systems.

As the device can only support one sample rate and resolution at a time, and since alsa will not do sample rate or bit depth conversions for you, you have to record and playback with the correct configuration. Signed 24 bit little-endian samples (S24_3LE) for advanced mode, and 16 bit samples (S16_LE) for basic mode.

To record in 24 bit 96 kHz using Alsa (assuming your UA-5 is card number 2 in /proc/asound/cards, ie. -D hw:2), run:

arecord -D hw:2 -c 2 -r 96000 -f S24_3LE foo.wav
To playback the same file, run:
aplay -D hw:2 foo.wav
The device appears to work with JACK and applications supported by it (ardour, etc), too.

I have also opened up the UA-5 and documented some findings and modified my unit to work as a stand-alone A/D converter.

Heikki Hannikainen <hessu at hes.iki.fi>  
Last modified: Monday, 16-Aug-2004 13:02:30 EEST