3

I had my Raspberry Pi configured to work with a USB microphone (C-Media microphone USB). I had made the following changes

For /lib/modprobe.d/aliases I update the following lines

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

My asoundrc file has the following

pcm.!default {
    type hw
    card 0
}

ctl.!default {
    type hw
    card 0
}

My microphone shows up as a USB device when I run lsusb but doesn't show up when I try a arecord -l

I have attached a copy of the dmesg log which shows an error. Any suggestions on fixing this issue are welcome.

Screen shot

user2808264
  • 91
  • 1
  • 9
  • Similar post : https://raspberrypi.stackexchange.com/questions/46799/usb-microphone-raspberry-pi?rq=1 – CoderMike Nov 12 '17 at 16:26
  • @CoderMike In that post, the person is unable to hear anything but in this case the microphone doesn't show up as a hardware capture device – user2808264 Nov 13 '17 at 06:33
  • Error -16 is EBUSY so it seems like you're on the right track. That ][1]][1] in your asoundrc is a typo, right? Because if I include that in /etc/asound.conf, arecord naturally says parse error. I don't have your particular mic, but running sudo modprobe snd_bcm2835 index=1 results in unknown parameter 'index' so perhaps what you want to try instead is: sudo modprobe -r snd_bcm2835; sudo modprobe snd-usb-audio index=0. (Once this is better troubleshooted/easily reproducible at runtime, then we can loop back and try to get it consistent at boot time e.g. /lib/modprobe.d) – jdonald Nov 20 '17 at 06:20
  • @jdonald Did you want me to run these lines of code when I face this issue? sudo modprobe -r snd_bcm2835; sudo modprobe snd-usb-audio index=0

    Do you have any suggestions on how I can force this error on bootup?

    – user2808264 Nov 20 '17 at 09:45
  • It would be greatly appreciated if you could post the output of lsusb in your question, ideally, in text .... images suck, because they cannot be indexed (for search) and our blind friends cannot help you. – thecarpy Nov 20 '17 at 12:38
  • It may be a race condition so hard to force on bootup. I'm suggesting you remove the bootup configuration (sudo rm /lib/modprobe.d/aliases) and try to reproduce the error several times at runtime, even try reordering the load of snd_bcm2835. Re-test by unloading each module: sudo modprobe -r snd-usb-audio; sudo modprobe -r snd_bcm2835 and then loading again (-r means remove, while modprobe normally loads a module if not loaded already). In either situation you can run lsmod to see if other snd modules are loaded and potentially conflicting (and check dmesg) then provide more info. – jdonald Nov 20 '17 at 15:48
  • What is the output if you type: cat /proc/asound/cards ? – MrChips Nov 23 '17 at 04:29

0 Answers0