Automating the Tascam US-122 in Ubuntu 9.04

I gave away my Tascam US-122 usb audio interface some time ago, and immediately missed having it to play around with. I wouldn’t call myself a musician, but I do think it is fun to plug a guitar into the computer, fire up qjackctl and jackrack and see what kinda weird noises I can get the computer to make. So this weekend I picked one up on craigslist pretty cheap and thought I would see about automating the installation with a shell script.

I have altered this script it should now run fine with sudo (rather than full root) privileges, and that the script should be run on a fully updated Ubuntu Studio distribution running the Real Time kernel.

When the packages are done installing, reboot and be sure to select the Real Time kernel at the boot menu. It will be the one that ends with ‘rt’. It is important to be running the correct kernel because the script compiles firmware for the running kernel. Next log in to the desktop plug the US-122 into an open usb port. Open a terminal window and type;

sudo

After making sure that the file has executable permission you can just drag and drop it into the open terminal window and hit ‘Enter’. Or, you can just type ‘/bin/bash ‘ and just drop the file in without checking and then hit the ‘Enter’ key. When the script is completed running, close the terminal window, you should now have a functioning device, with the lights lit up, and it will automatically work every time you plug it in.

*Edit
After playing around a bit I became somewhat put-off by the horrible audio recording performance of Ubuntu, even with the realtime kernel. It seems that I am not the only person to notice this, others have noted that Ubuntu with the Studio packages installed behaves much worse than a fresh install from an actual Ubuntu Studio DVD. And the consensus seems to be that 64Studio works much better. So on the testimonials of others I went ahead and installed 64Studio, and it does indeed run much more smoothly (after I fixed the broken xorg.conf), and since both Ubuntu and 64Studio are built from debian GNU Linux the script above worked with it as well.

Post navigation

22 thoughts on “Automating the Tascam US-122 in Ubuntu 9.04”

Hi, I have a Lionstracs Mediastation running Kubuntu 10.10 Linux. I don’t understand the working of Linux , it is new for me. i want to install my US 122 on my mediastation. Does the information you gave to install the US 122 also works on my system?

Yes, it should work with any debian/ubuntu derived distribution (such as Kubuntu). I believe that I tested this on 10.10, but perhaps I am mistaken. Let me know if you have any problems with the script.

Romeo, the post is pretty self explanetory, however it is slightly outdated; the realtime patches have been integrated into the mainline kernel so there is really nothing extra that needs to be installed (as far as a realtime kernel etc goes).

Just update the system, and then run this script with the tascam plugged in. When the script completes you should see the lights blink on and the device is ready to use; from this point on the tascam will be plug and play since the script installs the firmware and writes a configuration file for it.

Thank you very much for this info but again I beg you to help me, because I do not know ANYTHING from the LINUXsysytem and I have to record a demo-cd for my band this week. So..please, can you explain what you mean with “update the system” ( what must I do?) and “run the script”? ( How do I run the script?)

I am not trying to be a jerk or anything but there really isn’t anything I can add to better explain what needs to be done. I will summerize the instructions here:

1) open a terminal
2) run the following command:sudo apt-get update && sudo apt-get upgrade
3) run the script, in the terminal window type:sudo

press the space bar and then drag the downloaded script onto the terminal window, this should produce something like this in the terminal:sudo /home/romeo/Downloads/tascam.sh

it may complain about executable permissions, in which case right-click the downloaded script (tascam.sh) and select ‘Properties’ from the menu and then select the ‘Permissions’ tab and check the ‘Execute’ box were it says ‘Allow executing file as a program’ then close the dialog to change the permissions. Now step 3 should work, of course you could check the permssions before trying step 3 (recommended).

the script may take some time to run, it should provide progress messages as it completes its tasks, and if it doesn’t work it should produce and error message and tell you were to look for an error log (/tmp/tascam/tascam_error.txt)

At what point is the script stopping, or is it not stopping but just getting stuck? does it provide any message to indicate what went wrong if it is stopping on its own?

If the script isn’t actually crashing but just not running all the way through, it should still create a log file that may shed some light on what is going on. The log file is located at /tmp/tascam/tascam_log.txt and is deleted upon successful commpletion of the script.

Apologies Romeo, I just gave the script a run on 12.04 and it seems that some time in the last couple of years (since the last time I ran the script) things have changed breaking the script. I can’t get to it right now but I will rewrite it sometime in the next few day; there are other things to change with it as well.

hi 1bnr,
so much thanks for your help, I apreciate!!! No, the sript is not stopping.

The cursor seems to working because before the cursor ( where you must type something in the terminal) is a sort of activity. I see some fast movements of a slash, dots, triangle etc just besides the cursor. But it takes very long and ther is nothing afterwards than.
I can’t wait till you fix the update . i need it very much..Thanks again..

I poked around at it last night and the new process is considerabling simpler. Now all the software can be installed via repositories. Until I get the script worked out you could try the following:
1) install medibuntu repositories:instructions here, it is not to dificult, just a little copy and paste into the terminal.
2) install alsa-firmware:sudo apt-get install alsa-firmware
3) load the firmware:sudo usx2yloader

The US-122 should light up and become functional.

P.S. Without a proper udev configuration file step 3 will need to be rerun everytime the US-122 is plugged in or the computer is restarted.

P.P.S It may be that step 1 is not neccessary on a Lionstrac workstation; I would be surprised if they didn’t come with the medibuntu repository pre installed, although I was unable to find out from their website.

I looks like you need to enable the ‘universe’ repositories as well. In terminal type:

kdesudo kate /etc/apt/sources.list

this will open up the repository list, look for the lines that have universe in them and remove the ‘#’ from the begining of these lines. The ‘#’ tell the computer to ignore these lines and you want the computer to read them instead. With these changes made, save the file and close the text editor. Alternatively this can be accomplished from an update or package manager software (probably Muon or KpackageKit) by checking a box in the configuration, but I am not sure exactly how since I don’t use kde.

With Universe enabled:

sudo apt-get update && sudo apt-get upgrade

then try again to install the medibuntu repositories (the following is all one line, right-click in the box, select all and paste it in the terminal/konsole):

The US-122 should now be up and running. I will try to get the script this weekend and mabe by then have a Kubuntu 10.10 system to test it on as well.

EDIT

Just reread your last comment, it appears that you entered the command to install the medibuntu repositories wrong, just copy the entire command as one line and paste it into the terminal window. It may be that universe repositories are not needed after all, although they do have handy things like mp3 and other copyrighted codecs in them.

I have no good luck. i did what you said but my Konsole gives this:root@mediastation:/home/mediastation# kdesudo kate/etc/apt/sources list
The program ‘kdesudo’ is currently not installed. You can install it by typing:
apt-get install kdesudo
You will have to enable the component called ‘main’
root@mediastation:/home/mediastation# apt-get install kdesudo
Reading package lists… Done
Building dependency tree… 50Building dependency tree… 50Building dependency tree
Reading state information… 0Reading state information… 3Reading state information… Done
E: Unable to locate package kdesudo
root@mediastation:/home/mediastation# kdesudo kate /etc/apt/sources.list
The program ‘kdesudo’ is currently not installed. You can install it by typing:
apt-get install kdesudo
You will have to enable the component called ‘main’
root@mediastation:/home/mediastation# udo apt-get update && sudo apt-get upgrade
The program ‘udo’ is currently not installed. You can install it by typing:
apt-get install udo
You will have to enable the component called ‘universe’
root@mediastation:/home/mediastation#

It seems that it can’t locate my KDE…
Linux is very difficult for me…… To much headache too install something..

But otherwise a very stable system..

I am glad you are helping me. This will make me wiser in Linux, but Ithink it take years before I can understand the method.

first, is the Lionstrac mediastation connected to the internet? this is very important since the software repositories are located on remote servers. Second, there is no application named ‘udo’; this error message:

The program ‘udo’ is currently not installed. You can install it by typing:

is the result of your missing part of the command that installs the medibuntu repository. Look at the instructions for installing medibuntu again; the command should all be on one line, it will get word wrapped in the terminal (as well as on blogs/wikis so it looks like more than one, but it is really all one line) but this is not a problem, it just can’t contain any line-returns (caused by the enter key).

Additionally the error message:

You will have to enable the component called ‘main’

leads me to believe that all the repositories have been disabled, probably to prevent updates from accidentally breaking the system (if it isn’t broken don’t fix/update it). However this also prevents you from installing software that has not been included. Another theory is that Lionstrac has their own customized versions of software that they test and host on their own repositories replacing the main repository. If you don’t have the necessary knowledge to figure these things out on your own I would urge you to seek professional help with this. I don’t mind helping, but it seems that this piece of equipment is complex and unique enough that some ‘hands on’ time is likely needed to figure out what needs to be done. With out proper investigation and preparation, changes to the software could have disastrous effects on the performance of the device.

Hi 1bnr, thanks for all the help you gave me. I think indeed that Lionstracs has a kind of protection-system. I tried evrything… but no succeeding. It is very frustating! If you can’t help me, I think nobody can.. Your knowledgement of LIUXsystems is great..

Again..thank you for all the support . I will forget to use the TASCAM with the MEDIASTATION and try to solve this big problem another way. I even cannot use the build-in soundcard of the Lionstracs..I can’t find the soundcard anywhere in JACK…

I didn’t get to rewriting that script this weekend, but I did try the instructions that I posted above on a kubuntu 10.10 system and they worked without a hitch; If you get somebody that knows Linux to look at the Lionstrac they should be able to get the US-122 to work.

Hi 1bnr,
I can’t succeed to make anything work depending on the built in computersoundcard from Lionstracs Mediastation. The only possibility is the TASCAM US 122. I hope you can write something to make it work.

Hello 1bnr and Romeo,
I found this thread via google and just want to let you know, that I successfully installed the US 122 via medibuntu and packages on Ubuntu 11.10. Thanks for your efforts!
Regards
Martin

Hi Romeo, I installed the medibuntu package, I just followed the instructions obove, plugged everything in and started the script “sudo usx2yloader”, it is required that everything is connected incl. mic
Regards Martin