On my RasPi board, Debian Linux, the USB microphone occasionally gets locked up such that nothing can use it. The microphone has a LED which is usually flashing, when it's locked, it turns off.

The utility arecord describes it as follows:

card 1: Device [DYNEX USB MIC Device], device 0:USB Audio [USB Audio]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

When the microphone stops working, arecord gives diagnostics like this:

> arecord -D plughw:1,0 > recording.wav
Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
arecord: set_params:1145: Unable to install hw_params:

Unplugging and plugging the microphone fixes it, only because the current dip forces the RasPi to reboot! Not an ideal situation.

Is there a way to fix this from the command line or a C executable?

I also tried using ioctl(fd, USBDEVFS_RESET, 0) using the output from lsusb to provide the bus and device number. That turns the LED back on, but it's overkill. The device has to be re-setup using alsamixer.

| improve this question | | | | |
  • 1
    are you running it from a USB hub? The power draw from USB devices sometimes isn't enough, and might be causing hardware problems if not. – dougBTV Jun 14 '13 at 12:17
  • Same behavior is observed when using a hub or without. RasPi is connected to dedicated power supply as opposed to a USB port. – Yimin Rong Jun 14 '13 at 13:03
  • are you aware of this site too: raspberrypi.stackexchange.com :) – erch Jun 14 '13 at 17:20
  • Yes, I thought this is more of a Linux question. – Yimin Rong Jun 15 '13 at 15:58
  • Do you have the same problems if you connect the mic to a normal Linux-PC? You can easily "create" one by booting a live distribution from a CD/USB flash drive. – jofel Jul 5 '13 at 8:26

This is easy to solve.

Issue: Your microphone is not getting enough power. The Raspberry Pi USB ports have issues supplying enough amps to USB devices that need more than power than USB memory cards.

Solution: Get an active USB hub (powered hub plugged into a power source like an outlet.) The hub will power the microphone.

| improve this answer | | | | |

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.