2

I have a USB sound card that has an audio out and a microphone in. That sound card works fine - a small microphone records fine and a small speaker plays sound back fine.

However, I now have an additional USB microphone (a PS eye) that plugs into a differnt USB port. So my RPI now has two microphone inputs: one from my sound card and one from the PS Eye. My /etc/modprobe.d/alsa-base.conf has these lines:

options snd-usb-audio index=0
options snd-bcm2835 index=1

I have not done any additional configuration for the PS Eye, all I did was plug it in. So, how can I tell my RPI to use the microphone in the PSEye instead of the sound card microphone? I still want to use the sound card for audio out.

  • 2
  • Try alsamixer You can set input/output devices with it if I remember correctly. Run it from a terminal. – NULL Apr 9 '16 at 11:29
  • Hi I had a simillar problem There are different locations for the config file from raspbian versions /etc/modprobe.d/alsa-base.conf /usr/share/alsa/alsa.conf /lib/modprobe.d/aliases.conf mine was the last .... so good luck – justin case Feb 17 '17 at 1:32
3

You can make these various settings in your asoundrc, discussed here. You need to set the default input and output in your asoundrc file. Note that when the input and output devices are different, there can be problems with playback and recording at the same time (full duplex). This is because the two sound cards don't share a common clock. It seems that it may be possible to use the dmix plugin to resample as required. To make this happen, edit your ~/.asoundrc file

pcm.!default
{
type asym
playback.pcm
{
    type plug
    slave.pcm "dmix"
}
capture.pcm 
{
    type plug
    slave.pcm "usb"
}
}

Alternatively you could get one of the sound cards which have inbuilt input/microphone and output ability, such as the ones listed here. This solves a lot of problems, as the same clock is operating the input (ADC) and output (DAC). I see that was your original situation, and am wondering why you changed to purchase the USB input.

Matt

  • Could you please include some specific detail in your answer, link only answers are generally discouraged. – Darth Vader Sep 3 '16 at 8:35
  • Thanks for your feedback Darth, I have updated my answer to solve the problem inline, rather then linking out. – Matt Sep 4 '16 at 11:34
  • this is what I have been looking for , for 4 hours thanks alot. – ProllyGeek Sep 5 '16 at 7:50
  • 1
    Thanks a lot. I just wanted to use usb microphone and keep output in jack Here is mine ~/.asoundrc pcm.!default { type asym playback.pcm { type plug slave.pcm "hw:0,0" } capture.pcm { type plug slave.pcm "hw:1,0" } } – Eugene Oct 25 '16 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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