|
|
Log in / Subscribe / Register

BPF for HID drivers

BPF for HID drivers

Posted Sep 26, 2022 17:16 UTC (Mon) by WolfWings (subscriber, #56790)
Parent article: BPF for HID drivers

I sincerely hope these get shipped as out-of-kernel BPF files akin to firmware, because that would allow for a widely useful but currently frustrating "Yes I know it's valid but it's badly implemented" situation that's been long-standing for years now to allow for having a lot more H.264 and/or MJPEG webcams on a single port by finally having a (relatively trivial) way to override the USB descriptor.

The camera may consume the entire allocatable (which is comically just over 50% of the available) bandwidth on a USB 2.0 port when in 'raw' modes, but that bandwidth drops significantly in the 'compressed' video modes, but there's no support in the standard to specify proper compressed bandwidth estimates.


to post comments

BPF for HID drivers

Posted Sep 26, 2022 18:58 UTC (Mon) by laurent.pinchart (subscriber, #71290) [Link] (1 responses)

> there's no support in the standard to specify proper compressed bandwidth estimates.

The UVC specification requires the device to report the bandwidth it needs. The issue is that many devices don't bother to get the number right and just return a very large value.

BPF for HID drivers

Posted Sep 27, 2022 1:32 UTC (Tue) by WolfWings (subscriber, #56790) [Link]

Both are true, there's no support AFAIK to indicate variable bandwidth so H264 best case will report the I-frame-only bandwidth which is still an order of magnitude too high.

Much like AVI USB UVC doesn't have good support for anything but fixed data structure format descriptions last I checked.

But either way these sound like a great avenue to allow webcam capture software to handle compressed-video USB cameras far better despite manufacturers shoddy firmware.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds