How do I select my USB Sound Card for output?


6 posts
by kaherdin » Sat Mar 02, 2013 2:47 pm
I have googled it, yes, and I've read these forums yes, and because I want to learn (acctually yes!) I am now asking;

I have a USB Sound Card plugged into my Raspbian setup. I have configured ALSA once before to maximise the volume output. The setup is right now beening used as a music render using gmrender-resurrect.
I want to select my USB Sound Card to be the output source of the sound to get rid of some clicks and popping noices when playing music.
- How do I select my usb sound card?

I can see it as "card 1" when doing lsusb and aplay -l and such but there are no step by step hints for me here to utilize to make this work for me.

Anyone care to help me out?
Posts: 5
Joined: Sat Feb 16, 2013 11:54 am
by malakai » Sat Mar 02, 2013 3:14 pm
http://lifehacker.com/5978594/turn-a-raspberry-pi-into-an-airplay-receiver-for-streaming-music-in-your-living-room has a lot of good stuff about USB Sound and I think
Code: Select all
amixer cset numid=3
will output to USB.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by kaherdin » Sat Mar 02, 2013 5:23 pm
This happend today for me

I modified /etc/modprobe.d/alsa-base.conf
sudo nano /etc/modprobe.d/alsa-base.conf

Code: Select all
options snd-usb-audio index=0


so that my hw:0,0 ist the USB soundcard

then
sudo nano /etc/asound.conf to;

Code: Select all
pcm.!default {
        type hw
        card 0
}

ctl.!default {
        type hw
        card 0
}

then sudo reboot

then I actually pulled the usb sound card while the RPI was on, and then I, reinserted it
sudo reboot again

and guess what, It now works. I know. Silly but hey, it floats my boat.
Posts: 5
Joined: Sat Feb 16, 2013 11:54 am
by dlgfm » Mon Mar 04, 2013 6:33 pm
Hello,

I am trying to get the USB audio working.
But I it does not work. When I do all this settings I only see the following output:

pi@raspberrypi ~ $ aplay police_s.wav
Wiedergabe: WAVE 'police_s.wav' : Unsigned 8 bit, Rate: 22000 Hz, mono
aplay: set_params:1081: Sample-Format nicht unterstützt
Available formats:
- S16_LE

But no sound is played.

Markus
Posts: 3
Joined: Mon Mar 04, 2013 6:21 pm
by kaherdin » Mon Mar 04, 2013 6:58 pm
dlgfm wrote:Hello,

I am trying to get the USB audio working.
But I it does not work. When I do all this settings I only see the following output:

pi@raspberrypi ~ $ aplay police_s.wav
Wiedergabe: WAVE 'police_s.wav' : Unsigned 8 bit, Rate: 22000 Hz, mono
aplay: set_params:1081: Sample-Format nicht unterstützt
Available formats:
- S16_LE

But no sound is played.

Markus

You tried lsusb? What does it say?
Posts: 5
Joined: Sat Feb 16, 2013 11:54 am
by Cloudcentric » Mon Mar 04, 2013 9:36 pm
dlgfm wrote:Hello,

I am trying to get the USB audio working.
But I it does not work. When I do all this settings I only see the following output:

pi@raspberrypi ~ $ aplay police_s.wav
Wiedergabe: WAVE 'police_s.wav' : Unsigned 8 bit, Rate: 22000 Hz, mono
aplay: set_params:1081: Sample-Format nicht unterstützt
Available formats:
- S16_LE

But no sound is played.

Markus


Yes but have you Raspbian "wheezy" installed ?? if so, is it fully updated/upgraded ?? Then I found a tutorial which is undertaken from the command line:

If the Sound quality is not adequate then using a USB Sound Card or USB PCM2704 Sound Board is an alternative, on the command line type the following, then press the enter key, the last entry will launch the Leafpad text editor, where the 7th line up needs to have a # placed in front of the writing:

sudo modprobe snd_bcm2835
sudo amixer cset numid=3 0

leafpad /etc/modprobe.d/alsa-base.conf

In Leafpad the line 7 up from bottom reads: options sound-usb-audio index=-2 place a # before options

sudo reboot

http://debianarmpi.blogspot.co.uk
http://www.jackenhack.com/raspberry-pi- ... y-problems
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am