I have a Raspberry Pi, running Raspbian, with a cheap SoundBlaster USB card plugged into it. The card is visible to ALSA:
# aplay -l | grep card
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
card 1: S3 [Sound Blaster Play! 3], device 0: USB Audio [USB Audio]
And I can play sound through this card:
$ speaker-test -Dhw:1,0 -c2 -twav
does output "front left" and "front right" in a woman's voice through the connected speakers.
However, PulseAudio does not recognize the card:
$ pacmd list-sinks|egrep -i 'index:|name:'
* index: 0
name: <auto_null>
I'm not even sure how to select this card in alsamixer
; hitting "F2" and looking at /proc/asound/cards
does show this, but then "F6" only shows the default card and trying to enter another value, like "S3" (the name of the card) or "1" or "hw1" or "hw:1,0" just returns "Cannot open mixer device [whatever]. No such file or directory."
I've tried a variety of solutions I've found; none of them work. For example, adding load-module module-alsa-sink device=hw:1,0
to /etc/pulse/default.pa
does not trigger an error, but it also does not change the output of pacmd list-sinks
, and does not give me any sound.
Adding an ALSA configuration file consisting of:
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
does make the USB card available to alsamixer, and I can then play things directly through ALSA, e.g. $ aplay test.wav
, but it's still invisible to Pulse via list-sinks
, and if I try to play anything through Pulse, I get errors or no sound, e.g. with mocp sample.mp3
there's no sound.
I can't imagine this should be so hard, so I assume I'm missing something obvious. Could someone tell me what it is?
[EDIT:]
The output of ls -l /dev/snd
is:
$ ls -l /dev/snd
total 0
drwxr-xr-x 2 root root 60 Jan 12 17:01 by-id
drwxr-xr-x 2 root root 80 Jan 12 17:01 by-path
crw-rw---- 1 root audio 116, 0 Jan 12 17:01 controlC0
crw-rw---- 1 root audio 116, 32 Jan 12 17:01 controlC1
crw-rw---- 1 root audio 116, 16 Jan 12 17:01 pcmC0D0p
crw-rw---- 1 root audio 116, 17 Jan 12 17:01 pcmC0D1p
crw-rw---- 1 root audio 116, 18 Jan 12 17:01 pcmC0D2p
crw-rw---- 1 root audio 116, 56 Jan 12 17:01 pcmC1D0c
crw-rw---- 1 root audio 116, 48 Jan 12 17:01 pcmC1D0p
crw-rw---- 1 root audio 116, 1 Jan 12 17:01 seq
crw-rw---- 1 root audio 116, 33 Jan 12 17:01 timer