I was trying to prepare my RPi for jasper and plugged the USB mic and the speakers in the 3.5 jack. Trying to configure it I found out that I could only chose that the whole audio IO is going through USB with 1 or through the 3.5 jack with 0 when configuring the alsa.conf
file. Is there a way to make my setup work? I think it was possible in Raspbian Wheezy, because they said in their documentation that you need some speaker which work with the headphone jack of the Pi.
EDIT
arecord -l :
**** List of CAPTURE Hardware Devices ****
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
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 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
So I got that my card 1
is the one with the mic and card 0
is with the aux output and HDMI output. According to the jasper documentation I have set my alsa.conf
like this:
...
# show all name hints also for definitions without hint {} section
defaults.namehint.showall on
# show just basic name hints
defaults.namehint.basic on
# show extended name hints
defaults.namehint.extended on
#
defaults.ctl.card 1 #<- changed from 0 to 1
defaults.pcm.card 1 #<- changed from 0 to 1
defaults.pcm.device 0
...
And I made a .asoundrc
file in the root directory with these options:
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
If I leave the alsa.conf
on 0, I am able to play something with aplay, but putting it on 1 doesn't allow me to play it (of course, because on card 1 is the mic). Also calling alsamixer
gives me only the bcm2835 card, which is my output card if I am not mistaken.