Re: xHCI bandwidth error with USB webcam

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

 



On Mon, 12 Apr 2010, Sarah Sharp wrote:

> I've been trying out the patches to enable isochronous transfers under
> xHCI, and they work fine on my USB speaker.  However, I've been having
> trouble getting my high speed USB webcam to work.  The NEC Express Card
> I have rejects the first alternate setting that the uvcvideo driver
> tries to install (altsetting 11), saying that it takes too much
> bandwidth.  This happens even when I plug the device directly into the
> roothub with no other devices plugged in.
> 
> I would like to know if this is correct behavior for the host, as I
> can't believe a device would advertise an alternate setting that took up
> too much bandwidth by itself.  Device descriptors and a log snippet are
> attached.

The webcam is a high-speed device, right?  The descriptors call for an
isochronous-IN endpoint with 3x1020 bytes (period 1 uframe) and an
isochronous-IN endpoint with 36 bytes (period 8 uframes).  That
combination does not exceed the high-speed bandwidth limit, so the
controller should accept it.

Broadly speaking, at 480 Mb/s you get 60 KB/ms = 7500 B/uframe.  The
periodic bandwidth limit is 80% of the total, or 6000 B/uframe.  
Taking bitstuffing into account (6/7) leaves 5142 B/uframe available
for data, and overhead eats up some of that.  It's still much more than
the 3*1020 + 36 = 3096 bytes needed by the webcam.

> The other problem is that uvcvideo then gives up on the device when
> installing the alt setting fails, rather than trying the next less
> resource-intensive alternate setting.  The past, submit_urb() might fail
> if there wasn't enough bandwidth for the isochronous transfers, but
> under an xHCI host controller, it will fail sooner, when
> usb_set_interface() is called.  That needs to be fixed in all the USB
> video drivers.
> 
> I figured out how to patch the gspca driver, but not uvcvideo.  The
> patch looks a bit hackish; can with experience with that driver look it
> over?  Can anyone tell me where to look for the usb_set_interface() in
> uvcvideo?

Not at the moment, sorry.

Alan Stern

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

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux