This question already has an answer here:

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.

marked as duplicate by joan, goldilocks Jan 6 '16 at 15:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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.

  • 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 '16 at 7:03
  • Hi Leo, did you solve this? – icordoba Apr 5 '16 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 '17 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. – Kevin Etore Jul 8 '17 at 11:09
  • I would also like to use HDMI output and USB mic input. – Andy Anderson Nov 22 '17 at 21:00

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