Linux Media Controller development
 help / color / mirror / Atom feed
* uvcvideo bogus SuperSpeed bandwidth calculations
@ 2023-12-30 22:48 Michał Pecio
  0 siblings, 0 replies; only message in thread
From: Michał Pecio @ 2023-12-30 22:48 UTC (permalink / raw)
  To: linux-media

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-30 22:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-30 22:48 uvcvideo bogus SuperSpeed bandwidth calculations Michał Pecio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox