Brief summary: After being suspended and resumed, Jon's USB sound device 
remains in a useless powered-off state (the LEDs don't turn back on).

Clemens, if you have any ideas that might be relevant, please let us know.


On Tue, 9 Jan 2007, Jon Smirl wrote:

> Something has a refcount set into snd-usb-audio. Any way to figure out
> what so that I can rmmod it?

Maybe another one of the sound modules.  I don't know how they are 
organized.  Or perhaps some program or daemon has opened the sound device.  
You can eliminate that possibility by going to single-user mode.

> I turned off CONFIG_USB_SUSPEND and everything is working.

That definitely points to the suspend-resume transition as the source of 
the problem.  Unfortunately CONFIG_USB_SUSPEND isn't going to remain in 
the kernel forever; eventually it will be forced on always.  So your
problem does need a better solution.

There is no way to prevent a USB device without a driver from being 
suspended.  Perhaps we need one.  On the other hand, USB devices _are_ 
supposed to be able to suspend and resume with no ill effects -- it's part 
of the spec.

I still would like to figure out exactly what goes wrong when the device 
gets resumed just before snd-usb-audio is bound to it.  One way to attack 
this is to rename snd-usb-audio.ko so that it can't be loaded 
automatically.  Then after the device is plugged in and suspended, you can 
insmod the driver by hand and see what happens.

If nothing else, the driver could try to reset the device.  You can try
testing that approach by hand as well.  I posted a program to reset a USB
device here:

http://marc.theaimsgroup.com/?l=linux-usb-users&m=116827193506484&w=2

You could run that program immediately prior to insmod-ing the driver (in 
a shell script or separated by a ';') -- as long as the gap between the 
two commands is less than 2 seconds the device won't get suspended again.

Note that you will have to have CONFIG_USB_SUSPEND turned back on for
these tests to mean anything.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to