uvcvideo bogus SuperSpeed bandwidth calculations

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

 



Hi,

I encountered two problems getting one no-name SuperSpeed UVC camera to
work with Linux 6.6.8 (some earlier kernels were similar or worse).


1. The required bandwidth (as reported by "Device requested %u B/frame
bandwidth" with trace=0x400) appears to equal wMaxPacketSize*burst*mult
of the fastest altsetting, sometimes the second fastest one, regardless
of selected video mode. (And my xHCI refuses to enable the fastest alt
for supposed lack of bandwidth, so the camera is unusable).

This is nonsense, and I suspect a bug either in uvcvideo or in camera
firmware. Any thoughts or hints what to look at?


2. I tried to work around this by enabling the banwdidth fixup quirk,
but the quirk has never been updated to work with USB3.x. Code below
needs to have USB_SPEED_SUPER (and others?) added to it.

bandwidth = frame->wWidth * frame->wHeight / 8 * format->bpp;
bandwidth *= 10000000 / interval + 1;
bandwidth /= 1000;
if (stream->dev->udev->speed == USB_SPEED_HIGH)
	bandwidth /= 8;


After fixing and enabling the quirk, my camera works. Although with
trace=0xffff I'm still getting regular messages about dropped frames,
not sure if this is normal? Observed framerate is close to nominal.


Regards,
Michal




[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