I've a logitech usb video class compatible webcam, which also has an usb-sound compatible mic. If I plug this in before booting, the mic works (video works too with the uvb-linux driver). However if I plug this in later I get: usb 5-2: new high speed USB device using ehci_hcd and address 4 usb 5-2: configuration #1 chosen from 1 choice USB device is in the shutdown state, cannot create a card instance snd-usb-audio: probe of 5-2:1.2 failed with error -5
The comparison with dev looks bogus to me. I have no idea what Takashi was thinking when he wrote it. I'm going to poke him and then we'll see.
Well, Takashi says that the code fragment I mentioned is used when several audio devices are present in one USB interface. Odd, but not criminal, as long as the device pointer is not used across disconnects. He asks to try this: diff -r aed6a15c9398 sound/usb/usbaudio.c --- a/sound/usb/usbaudio.c Mon Apr 23 11:54:41 2007 +0200 +++ b/sound/usb/usbaudio.c Mon Apr 23 12:09:12 2007 +0200 @@ -3611,6 +3611,7 @@ static void snd_usb_audio_disconnect(str list_for_each(p, &chip->mixer_list) { snd_usb_mixer_disconnect(p); } + chip->dev = NULL; mutex_unlock(®ister_mutex); snd_card_free_when_closed(card); } else {
Unfortunately, despite my current kernel not having the chip->dev = NULL; line I can no longer reproduce this, I guess some other upstream change has fixed this. So I guess this maybe closed, not sure though.
I'm closing this so that it doesn't stick out. But yes, I suspect this is random. The patch is not in 2.6.21-1.3126.