Re: Bugs in xhci-hcd isochronous support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/21/2014 11:49 PM, Alan Stern wrote:
Mathias:

I noticed a couple of things wrong in xhci_queue_isoc_tx_prepare().
One of them isn't too serious: The code checks in several places
whether the device is running at low speed.  This is useless, because
USB does not support isochronous transfers at low speed.

More importantly, the routine sets urb->start_frame to the current
value of the frame counter.  This is completely wrong; urb->start_frame
is supposed to be the (micro-)frame number for when the transfer
begins, not when the transfer was submitted.

As far as I can tell, the only way to do this correctly is to set the
Frame ID field (with SIA = 0) in the first TD of an isochronous stream,
and then set SIA = 1 in all the following TDs (see 4.11.2.5).  That
way, xhci-hcd will know exactly when the stream begins, so it can keep
track of the frame in which each URB starts.  Dealing with underruns is
left as an exercise for the implementer...

Alan Stern


Ok, thanks for the info, so this is probably why the usbmon ouput had weird frame numbers in the isochronous audio case.

I'll add it to my TODO list.
(or if anyone else want's to take a shot at it feel free)

-Mathias

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux