The USB microphone occasionally gets locked up such that nothing can use it.
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: ACCESS: RW_INTERLEAVED FORMAT: U8 etc...
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 saw something using
ioctl(fd, USBDEVFS_RESET, 0) but no idea which filename to open to correspond to device and not sure if that would work anyway.