8

I am trying to setup Jasper on my RPi 2 B by following these instructions http://jasperproject.github.io/documentation/installation/#configure-raspbian and just figured out that there's no /etc/modprobe.d/alsa-base.conf for me.

I can successfully record sound by specifying USB mic but not sure how to make it default for the system without editing alsa-base.conf.

0

1 Answer 1

6

Ok, first delete the file /etc/modprobe.d/alsa-base.conf Raspbian Jessie does not use this config file like Wheezy did.

Now, to set the USB sound card to your default card you will need to edit the file /usr/share/alsa/alsa.conf with the command sudo nano /usr/share/alsa/alsa.conf scroll down until you find the lines

defaults.ctl.card 0
defaults.pcm.card 0

and change them to

defaults.ctl.card 1
defaults.pcm.card 1

Explanation: USB sound cards are registered as card 1 on Raspbian Jessie. On Wheezy they would be registered as card -2 by default and editing /etc/modprobe.d/alsa-base.conf would change that.

I do not know if this next step is necessary but without it my card wouldn't work.

Create and edit the file ~/.asoundrc by using the command sudo nano~/.asoundrc` and change it so that it only reads this:

pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw
    card 1
}

Now your default audio out (speakers) and audio in (mic) are your usb device.

5
  • 2
    can you do this seperately for audio out and in? Id like to keep hdmi as audio out, but just use an usb sound card to have a audio in as well.
    – Leo
    Apr 3, 2016 at 7:03
  • Hi Leo, did you solve this?
    – icordoba
    Apr 5, 2016 at 21:47
  • I also would need help for using usb micro as default input and keep another card as default output.
    – baraber
    Feb 6, 2017 at 3:16
  • Did anyone manage to keep input and output separate? Like many other people I would like to have HDMI as audio out and usb audio in. Jul 8, 2017 at 11:09
  • I would also like to use HDMI output and USB mic input. Nov 22, 2017 at 21:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.