Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a USB microphone that works fine, up until I reboot my system. After that, it doesn't work at all until I unplug it and replug it. Based on my (limited) understanding of the components involved, I think that ALSA isn't detecting the mic on boot (possibly because the appropriate module hasn't been loaded during the USB scan at system boot). So, my question is,

How can I either,

  1. Configure ALSA to look for USB devices when it gets initialized,
  2. Manually trigger ALSA to check for USB devices in a script I can run at boot, or
  3. Make sure snd-usb-audio is loaded before the initial scan for devices?

I'm running a modified RHEL4 distribution, if that matters. If there's more information you need, ask and I'll add it.

From looking at /var/log/messages, here's what I see at boot with the mic plugged in:

Mar 28 08:19:04 foobar kernel: usb 6-2: new full speed USB device using uhci_hcd and address 3
Mar 28 08:19:04 foobar kernel: usb 6-2: New USB device found, idVendor=08bb, idProduct=2912
Mar 28 08:19:04 foobar kernel: usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Mar 28 08:19:04 foobar kernel: usb 6-2: Product: USB audio CODEC
Mar 28 08:19:04 foobar kernel: usb 6-2: Manufacturer: Burr-Brown from TI
Mar 28 08:19:04 foobar kernel: usb 6-2: configuration #1 chosen from 1 choice

If I later unplug the mic, I get a single line in messages:

Mar 28 15:10:52 foobar kernel: usb 6-2: USB disconnect, address 3

After boot, when I plug in the mic, I get the same output as above, but with one additional line:

Mar 28 15:11:12 foobar kernel: usb 6-2: new full speed USB device using uhci_hcd and address 4
Mar 28 15:11:12 foobar kernel: usb 6-2: New USB device found, idVendor=08bb, idProduct=2912
Mar 28 15:11:12 foobar kernel: usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Mar 28 15:11:12 foobar kernel: usb 6-2: Product: USB audio CODEC
Mar 28 15:11:12 foobar kernel: usb 6-2: Manufacturer: Burr-Brown from TI
Mar 28 15:11:12 foobar kernel: usb 6-2: configuration #1 chosen from 1 choice
Mar 28 15:11:12 foobar kernel: usbcore: registered new interface driver snd-usb-audio
share|improve this question

1 Answer 1

up vote 0 down vote accepted

Well, I've got an answer to #2, found over at the Ubuntu stack exchange:

sudo sh -c "echo 0 > /sys/bus/usb/devices/<devId>/authorized"
sudo sh -c "echo 1 > /sys/bus/usb/devices/<devId>/authorized"

where devId can be figured out (in my case, since I'll always know the exact expected product name) by inspecting /sys/bus/usb/devices/*/product

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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