ha7ilm / qtcsdr

It turns your Raspberry Pi 2 and RTL-SDR into an amateur radio transceiver! (Released under BSD license.)
300 stars 75 forks source link

USB sound card issue #2

Open codergitrf opened 8 years ago

codergitrf commented 8 years ago

Hi, my usb sound card shows up as device 0, but when I run sudo arecord -f S16_LE -r48000 -c1 -D 0 | csdr mono2stereo_i16 > ~/test_audio.raw

to test the audio card I get an error of

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM 0 arecord: main:722: audio open error: No such file or directory

Any ideas???

ha7ilm commented 8 years ago

Hi @mikerobertsn,

0 is not likely to be a valid device ID.

Try using:

aplay -L

You will see multiple entries. For me this is the correct one for the USB device:

hw:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    Direct hardware device without any conversions

...from this, the part that you need as the ALSA device ID is:

 hw:CARD=Device,DEV=0

Then you can try arecord again:

arecord -f S16_LE -r48000 -c1 -D hw:CARD=Device,DEV=0 | csdr mono2stereo_i16  > ~/test_audio.raw

Does this help?