• Adam Goode's avatar
    media: uvcvideo: Ensure all probed info is returned to v4l2 · 8a652a17
    Adam Goode authored
    bFrameIndex and bFormatIndex can be negotiated by the camera during
    probing, resulting in the camera choosing a different format than
    expected. v4l2 can already accommodate such changes, but the code was
    not updating the proper fields.
    
    Without such a change, v4l2 would potentially interpret the payload
    incorrectly, causing corrupted output. This was happening on the
    Elgato HD60 S+, which currently always renegotiates to format 1.
    
    As an aside, the Elgato firmware is buggy and should not be renegotating,
    but it is still a valid thing for the camera to do. Both macOS and Windows
    will properly probe and read uncorrupted images from this camera.
    
    With this change, both qv4l2 and chromium can now read uncorrupted video
    from the Elgato HD60 S+.
    
    [Add blank lines, remove periods at the of messages]
    Signed-off-by: default avatarAdam Goode <agoode@google.com>
    Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    8a652a17
uvc_v4l2.c 38 KB