On 10/4/06, Clemens Ladisch <[EMAIL PROTECTED]> wrote: > > I guess sox trips this because it opens the device, sets some sample > formats to check which are available, and then resets the device without > playing any data. (Many applications using the OSS API do this.)
Ah, that is indeed plausible. > Setting the sample format results in prepare(), but resetting and then > selecting another sample format does not result in a usb_set_interface() > call unless the new sample format requires another altsetting. > > Is it possible to tell the scheduler that the iso stream has stopped/ > restarted, without calling usb_set_interface()? In theory, setting > start_frame (instead of using ISO_ASAP) should be able to do this ... Closing and reopening the device would be the only way currently to do it. The driver assumes all submissions set ISO_ASAP, which isn't correct, but there you have it. That should be easier to fix with the new code. OTOH, an 'underrun' is nothing more and nothing less than the scheduler informing the upper layers that the stream had a gap. It is not a true error condition, and there is no heavyweight cleanup or re-setup. The next URB submission will start transfers right back up with no more complexity than an uninterrupted streaming submission. In short, it's unfortunate that the only feedback is through an 'error' return status, but I don't believe that design is fundamentally flawed or misguided. Everything at each layer is working as it's supposed to, and drivers making use of isochronous endpoints should realize that an underrun status can happen, just like EAGAIN can happen. At least when it happens in prepare, we can be sure it is entirely ignorable. The only thing I didn't like is the overload of EL2NSYNC. > And wasn't documented at all. A fair complaint, but one that predates me :-) EL2NSYNC *did* happen before, but entirely spuriously. > Could you please add the explanation from your mail to > Documentation/usb/error-codes.txt? Yes indeed. Monty ------------------------------------------------------------------------- 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