>>> The USB audio driver is pretty broken. I can often get it to play >>> something after a reboot. Sometimes processes get stuck. My bug >>> report (with disassembly and C source even!) got ignored. >> >> I must have missed that one. Please CC it to me if you still have >> at hand, if it still get ignored, I'll include it in my kernel and >> push for a fix on my side. > >I did "cat /bin/sh >> /dev/audio" and hit ^C to stop the noise. >The "cat" process gets stuck in "D" state with the WCHAN indicating >that the process is stuck 1/3 the way through the usbout_stop() >function.
I think I found the problem. The function usbin_stop and usbout_stop check for flags indicating some USBs are pending, and after a certain amount of time, call usb_unlink_urb() on the remaining ones. However, since those URBs don't have the USB_ASYNC_UNLINK flag, their completion will never be called, thus the driver flags indicating which URBs are still pending will not be reset. The driver will then infinitely loop in one of these routines. You see a D state because most of the time is actually spent in schedule_timeout(). A fix for this is to clear each flag after calling usb_unlink_urb(). I haven't studied the code enough though, so there may be other things done by the URB completions that are expected and not done in this case, or I may have missed something else as I don't have USB audio HW to test with right now. Ben. _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
