On 10/6/06, David Brownell <[EMAIL PROTECTED]> wrote:
>
> Hmm, in the current EHCI scheduler, the place which returns EL2NSYNC is
> arguably just a bug that should get fixed ... it even includes the
> comment "someday, try to reschedule".

I'll point out we did discuss this and came to a different conclusion
a few months ago :-)  But it's more important to be correct than
consistent...

> The problem scenario was, ISTR, that sometimes there would be iso URB(s)
> still in that stream's queue so that the recorded start point for the
> next URB (that is, scheduler state) was invalid.  Why were they still in
> the queue?  From what I remember, it was quite likely that the transfers
> in that URB were completed by the controller, but the IRQ handler had not
> yet cleaned them up ... either it had not yet been called, or more often
> it was currently _doing_ that cleanup, and this URB was being submitted
> from the completion handler of a previous URB.
>
> That is, in at least some of the common cases I had observed, the issue
> could have been resolved by using a more precise test:  "are there ITDs
> that are still active?" (looking for ITD_ACTIVE/SITD_ACTIVE) rather than
> the quicker-but-sometimes-wrong "are there ITDs that haven't completed".
>
> So I guess I'm strongly inclined to NAK patch 15/15 ... although maybe
> something in one of the earlier patches changed the El2NSYNC behavior.

OK, so I don't have precedent to fall back on in my argument.
Nevertheless, there must be a way to notify the upper layers of a
schedule xrun.  This is a clear means of doing so.

When my recording has gaps, but ALSA claims buffer fill never fell
below 90%, I am filled with a developer's most righteous rage.  (It
happens, I'll send you some of the recordings if you care.  ALSA never
threw xrun, and it's potentially clear in retrospect why-- there was
no way for USB to tell it slots got missed, so ALSA didn't know-- it's
buffers were still full!).

In any case, setting a status flag on the next completion is not good
enough; that tells you an xrun happend a long time ago.  Notification
has to happen upon next submission.

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

Reply via email to