Re: [PATCH] USB: change scheduling of Iso URBs in uhci-hcd

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Mon, 12 Nov 2007, jidong xiao wrote:

> On Oct 16, 2007 11:55 PM, Alan Stern <[email protected]> wrote:
> > This patch (as1003) changes uhci-hcd to treat the URB_ISO_ASAP flag
> > the same as other host controller drivers, namely, to schedule an Iso
> > URB for the first available time slot that hasn't already expired.
> > URBs in which the flag isn't set will be scheduled for the first slot
> > following the last URB, even if it has expired.
> 
> Sorry, I don't get it. Regarding "even if it has expired", what does
> this mean?

Let's say the previous URB for an Iso endpoint had two packets,
scheduled for frames 108 and 109 (the interval is 1).  Now suppose the
next URB isn't submitted until frame 111.  If the URB_ISO_ASAP flag
isn't set, then uhci-hcd will schedule the first packet in the new URB
for frame 110 (the first slot after 109) even though it's too late --
frame 110 has already expired.

If the URB_ISO_ASAP flag is set then uhci-hcd will schedule the first 
packet in the new URB for the next available slot, which would be in 
frame 112.  That packet and all the following ones would thus be 
delayed by two frames.

> Does this make sense if it has expired?

Sometimes.  For instance, an audio driver might want packets to be
transmitted at specific times in order to maintain phase coherence of
the audio signal.  The driver might prefer to have some packets get
dropped entirely rather than to have them transmitted late (and all the
following packets delayed).

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.