Greetings,
I am back now, and had the opportunity to get this all working with Mandriva 2010 Beta, so I was reminded of all the issues and thought I would share it with you. Some commands must be run as the root user, while others can be run as a normal user. I have tried to show this in the example commands by boldfacing the user name in the command line examples. Every attempt has been made to be complete and accurate, but please feed back with any questions or comments so that I can put together a comprehensive PDF that everyone can use and enjoy!
Using the US122L with Linux to create a true Digital Audio Workstation:
1) Use a recent kernel and you will not need to patch the kernel:
Code:
[root@stormbringer ~]# uname -r
2.6.31.4-desktop586-0.rc2.1mnb
[The first three numbers seperated by the dots are all we care about (e.g. 2.6.31 in this case; the fourth is a minor revision number and the rest are distribution and platform specific]
(2.6.28 or greater should work "out of the box")
2) Make sure you use ALSA 1.0.18 or greater:
Code:
[root@stormbringer ~]# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.20.
3) Tell ALSA about the availability of the US122L over the USB bus by creating a
/etc/asound.conf file, making sure to change the 2 to whatever number maps to your US122l in the output of cat /proc/asound/cards:
Code:
[jdines@stormbringer ~]$ cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xfe9fc000 irq 21
1 [US122L ]: USB US-122L - TASCAM US-122L
TASCAM US-122L (644:800e if 0 at 002/005)
Code:
[root@stormbringer ~]# cat /etc/asound.conf
pcm.usb_stream {
@args [ CARD ]
@args.CARD {
type string
default "YOUR_CARD_NUMBER_HERE"
}
type usb_stream
card $CARD
}
Alternatively, you should be able to create a .asoundrc file in your users home directory, e.g. :
Code:
# The usb_stream plugin configuration
pcm.!usb_stream {
@args [ CARD ]
@args.CARD {
type string
default "1"
}
type usb_stream
card $CARD
}
4) Test it using
aplay and
arecord:
Simple Loopback:
Quote:
ARGS="-MDusb_stream:1 -fS24_3LE -r44100 -c2 --period-size=640" ; arecord $ARGS | aplay $ARGS
|
(Note that if your card number is not 1 in /proc/asound/cards output replace the 1 with the correct number, such as the following if your card number is 2 for example ...)
Quote:
ARGS="-MDusb_stream:2 -fS24_3LE -r44100 -c2 --period-size=640" ; arecord $ARGS | aplay $ARGS
|
Code:
[jdines@stormbringer ~]$ ARGS="-MDusb_stream:1 -fS24_3LE -r44100 -c2 --period-size=640" ; arecord $ARGS | aplay $ARGS
Recording WAVE 'stdin' : Signed 24 bit Little Endian in 3bytes, Rate 44100 Hz, Stereo
Playing WAVE 'stdin' : Signed 24 bit Little Endian in 3bytes, Rate 44100 Hz, Stereo
^CAborted by signal Interrupt...
Aborted by signal Interrupt...
Record Something: (use control-c to break when done)
Quote:
ARGS="-MDusb_stream:1 -fS24_3LE -r44100 -c2 --period-size=640" ; arecord $ARGS > test-sound-from-us122l.wav
|
Play it Back:
Code:
[jdines@stormbringer ~]$ aplay -MDusb_stream:1 -fS24_3LE -r44100 -c2 -twav --period-size=640 test-recording-from-us122l.wav
Playing WAVE 'test-recording-from-us122l.wav' : Signed 24 bit Little Endian in 3bytes, Rate 44100 Hz, Stereo
Ardour Use / Using the JACK Audio Connection Kit:
Once the card is working you will probably want to use it with Ardour (
http://ardour.org/). Obviously you will need to install it using your distributions repository. Here is what you need to know to get started:
Telling JACK to use the US122l:
Ardour makes use of the JACK Audio Connection Kit (
http://jackaudio.org/)
Your distrubution probably has a GUI based control interface available, e.g.
qjackctl for KDE based distributions. You can install such a GUI interface or
jackd can be started from the command line (see
man jackd for the options to pass to
jackstart)
However you start the JACK daemon
jackd, be sure to tell
jackd to use
usb_stream:1 (or whatever your card number as reported by
/proc/asound/cards) and if you use the
--realtime option be sure to read the notes below regarding enabling your user account to start
jackd in realtime mode.
Allowing Use of JACK in realtime mode:
1) Make sure your user is a member of the
audio group
2) Make sure you have the following lines setting the
audio group limits for realtime priority (
rtprio),
nice value, and
memlock limit in your /etc/security/limits.conf file:
Code:
[root@stormbringer ~]# tail /etc/security/limits.conf
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
* - rtprio 0
* - nice 0
@audio - rtprio 50
@audio - nice -10
@audio - memlock 250000
# End of file
(Edit
/etc/security/limits.conf as the
root user if needed)
References:
http://ardour.org/
http://jackaudio.org/
http://www.premiumorange.com/la-page...p?page=P030101
http://wiki.briata.org/doku.php