Re: [PATCH] media: uvcvideo: Handle payloads starting in the middle of a bulk URB

From: Hans de Goede

Date: Mon Oct 12 2026 - 09:19:48 EST


Hi,

On 12-Oct-26 03:54, Ricardo Ribalda wrote:
> Hi Muhammad
>
> I understand that this is a RFC. Let's focus on the problem before we
> discuss the code.
>
> Currently, both for isoc and bulk, if the camera appends some data at
> the end of the frame (let's call it trailer data) it is silently
> discarded. With your proposal, this trailer data will be considered
> part of the next frame.
>
> The trailer data is out of spec (check figure 2-12 of the spec), but
> having multiple frames in the same bulk package is also out of spec
> (For some reason the bulk cameras are the worst at following the spec,
> no idea why).
>
> Your proposal (again, not looking at the code yet), will fix the
> problem for some of the broken cameras but ti will completely break
> the driver for other family of broken cameras (the ones that have
> trailer data).
>
> If we want to automatically handle your family of broken cameras we should:
>
> - Add heuristics to also handle the camera with trailer camera (does
> the extra data look like a uvc header?)
> - Add a non compliance warning so the vendors have some feedback about
> their wrongness.

If I understand things correctly from the email thread + previous patch
there is only 1 USB vid:pid combo which needs this.

So although I'm normally in favor of heuristics over per device quirks
I think in this case a device-quirk might make more sense ?

Regards,

Hans