Tuesday, September 15, 2015

How to setup USB audio card in Raspberry Pi 2

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

Change this line to
options snd-usb-audio index=-2 to options snd-usb-audio index=1


This will enable USB audio output by default. Reboot now:
sudo reboot

After reboot, To play a sound
aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Left.wav

if it does not work
cat /proc/asound/modules

Displays:
 0 snd_bcm2835
 1 snd_usb_audio


 aplay -D plughw:0,0 /usr/share/sounds/alsa/Front_Left.wav
 aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Left.wav

No comments:

Post a Comment