Christopher Monty Montgomery wrote:
> On 9/29/06, Clemens Ladisch <[EMAIL PROTECTED]> wrote:
> > Christopher Monty Montgomery wrote:
> > > patch 15: This fix is not actually to ehci-hcd, but is rather a fix
> > > to usbaudio necessitated by fixing the isoch underrun detection/
> > > reporting in ehci. usbaudio playback nominally causes one, specific
> > > harmless underrun in startup.
> >
> > The driver just submits a bunch of URB_ISO_ASAP URBs at the same time.
> > How does this cause an underrun?
> 
> Usbaudio appears to push a packet of silence during the playback
> snd_pcm_prepare() step; in a non-realtime app, or an app that does
> other things between the prepare() and the beginning of real playback,
> and underrun will occur.

The driver actually uses more than one URB and resubmits them as needed,
so an underrun shouldn't occur in this situation.

> Apply the scheduler patches without the usbaudio patch, and sox
> will trip the bug nearly every time.

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.)

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 ...

> This is the reporting mechanism that has always been in place in the
> USB driver, it simply didn't work properly before now.

And wasn't documented at all.
Could you please add the explanation from your mail to
Documentation/usb/error-codes.txt?


Regards,
Clemens

-------------------------------------------------------------------------
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