I purchased a small USB sound card. My Pi recognizes the device:
$ lsusb
Bus 001 Device 004: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller
If I run alsamixer
and set the audio to USB PnP Sound Device
, I can hear audio through the USB sound card. To make it permanent I type:
$ sudo alsactl store
But after reboot, the default is no longer the USB sound card.
So then I try to see a list of playback devices:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
I edit /etc/asound.conf
to look like this to set the default:
$ sudo nano /etc/asound.conf
pcm.!default {
type hw
card 1
device 0
}
Do a reboot
and still my default is not the USB sound card.
When I try:
$ aplay /usr/share/sounds/alsa/Front_Center.wav -D sysdefault:CARD=1
I hear sound from the USB card.
I also tried the following:
$ sudo nano /etc/modprobe.d/alsa-base.conf
change the index from -2 to 0:
options snd-usb-audio index=0
Reboot and still it did not set the default. I even commented out the line and no luck.
So how do I set the USB card as my default Audio Device?
Edit
dpkg -s pulseaudio
Displays:
Package: pulseaudio
Status: install ok installed
Priority: optional
Section: sound
Installed-Size: 4413
Maintainer: Pulseaudio maintenance team <pkg-pulseaudio-devel@lists.alioth.debian.org>
Architecture: armhf
Multi-Arch: foreign
Version: 2.0-6
Depends: libasound2 (>= 1.0.24.1), libc6 (>= 2.13-28), libcap2 (>= 2.10), libdbus-1-3 (>= 1.1.1), libfftw3-3, libgcc1 (>= 1:4.4.0), libice6 (>= 1:1.0.0), libltdl7 (>= 2.4.2), liborc-0.4-0 (>= 1:0.4.16), libpulse0 (= 2.0-6), libsamplerate0 (>= 0.1.7), libsm6, libsndfile1 (>= 1.0.20), libspeexdsp1 (>= 1.2~beta3.2-1), libstdc++6 (>= 4.1.1), libsystemd-daemon0 (>= 31), libsystemd-login0 (>= 31), libtdb1 (>= 1.2.7+git20101214), libudev0 (>= 146), libwebrtc-audio-processing-0, libx11-6, libx11-xcb1, libxcb1, libxtst6, adduser, lsb-base (>= 3.2-13), consolekit, udev (>= 143), libasound2-plugins
Recommends: pulseaudio-module-x11, gstreamer0.10-pulseaudio, rtkit
Suggests: pulseaudio-utils, pavumeter, pavucontrol, paman, paprefs
Breaks: libltdl3 (<< 1.5.24-1)
Conffiles:
/etc/init.d/pulseaudio 8580c855e4547e8a3c84dca96d9bbd7e
/etc/default/pulseaudio ee26e4427d72cf16a59b1a8ce2712c66
/etc/xdg/autostart/pulseaudio.desktop 5e19ffbe14d21702be1edd3256c4265d
/etc/xdg/autostart/pulseaudio-kde.desktop fd20c58d32035e908a0866784e4e3511
/etc/pulse/system.pa 408f6d6119d7afce522ab1b394709134
/etc/pulse/default.pa a9ac2a96744beae0913865fafd3d2582
/etc/pulse/daemon.conf 6c9e4c973cabb406beee3ec81c63fcd7
/etc/dbus-1/system.d/pulseaudio-system.conf 69d56dc5342bf589a2e199541709a452
Description: PulseAudio sound server
PulseAudio, previously known as Polypaudio, is a sound server for POSIX and
WIN32 systems. It is a drop in replacement for the ESD sound server with
much better latency, mixing/re-sampling quality and overall architecture.
.
Then:
cat /proc/asound/modules
Displays:
0 snd_bcm2835
1 snd_usb_audio
dpkg -s pulseaudio
to find out, it will say something like itdpkg-query: package 'pulseaudio' is not installed and no information is available
if it isn't. Could you run that command and post the output? – RPiAwesomeness Jul 08 '14 at 13:28cat /proc/asound/modules
and post the output? – RPiAwesomeness Jul 08 '14 at 13:29options snd-usb-audio index=0
tooptions snd-usb-audio index=1
. – RPiAwesomeness Jul 09 '14 at 03:19options snd-usb-audio index=0 [PRESS ENTER] options snd_bcm2835 index=1
? From what I can see, you're just changing thesnd-usb-audio
index, and the system is changing it back because it can't have two (usb and bcm2835) at the same index? – RPiAwesomeness Jul 10 '14 at 12:40pulseaudio
. That seems to be behind many of these issues, pulseaudio and alsa conflicting...However, don't remove it yet, we may yet fix this issue :D – RPiAwesomeness Jul 10 '14 at 12:44options snd-usb-audio index=0 [PRESS ENTER] options snd_bcm2835 index=1
. Please put this in as answer so you get the much deserved credit! – PhillyNJ Jul 10 '14 at 13:18