2

I've an external USB sound card (in my case it's a TerraTec Aureon 7.1 USB). I've looped the earphone-out to the line-in using a 3.5mm jack cable. I'm interested in starting the playback of a MP2 audio file on the filesystem and, through this loop, recording it in at least WAV format.

Now, the machine is Ubuntu 12.04.05 LTS with linux 3.2.0-77-x64 kernel. It is a server installation with all the multimedia stuff ripped out. I had to install manually alsa-base, alsa-utils, sox, libsox-fmt-all, ffmpeg codecs, etc..

What I'm trying to do, with little success, is to use 'aplay' and 'arecord' from alsa-utils like this:

# aplay -v -f S16_LE -D hw:1,0 -c2 -r 48000 original.mp2 &
# arecord -v -f S16_LE -D hw:1,0 -c2 -r 44100 output.wav

I don't think it would work at all, because arecord seems to go indefinitely until I do a CTRL-C or something. Am I wrong on some syntax or it's just not the instrument I need? In this case is there a more useful, better tool to pipe the playback and the simultaneous recording?

Anyway, my biggest problem is that the audio card still doesn't seem to be fully configured. I got the "hw:1,0" addressing from /proc/asound/cards , but I'm not sure it's OK because the aplay doesn't output anything to the phone-out (I tested by plugging my earphones). I have the following output:

# cat /proc/asound/cards
 1 [USB            ]: USB-Audio - Aureon 7.1 USB
                      Aureon 7.1 USB at usb-0000:00:14.0-1, full speed

but if I do lsusb i get the following:

# lsusb
......
Bus 003 Device 002: ID 0ccd:00b1 TerraTec Electronics GmbH
......

I cannot understand the mismatch, or maybe they're not supposed to match? Anyway, I had to add my user to the 'audio' group and reboot the system to make the card appear in the /proc/asound/cards list. Note that the system is a server, so no internal audio chipset is available.

Any help is appreciated! Thanks!

  • What mismatch? Try running alsamixer -c1 do adjust mixer controls. – CL. Mar 10 '15 at 17:07
  • I thought that "Bus x, device y" would match with the 1,0 assignment for the audio board, but apparently it has nothing to do with it. – CaptainPhlegm Mar 11 '15 at 10:44
  • I just found the solution: the playback problem was due because aplay and arecord can work only with .wav or RAW file type, and I was giving in input a MP2 file. Also: the arecord time can be scripted with -d parameter to last for the same length of the aplay input. Doing this fixes, it works for me :) – CaptainPhlegm Mar 11 '15 at 10:46
  • It may be useful to see JACK, qjackctl to have a complete control of audio flow (input, ourput wires of multiple audio aplications). – JJoao Sep 3 '15 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.