]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: uvcvideo: Implement dual stream quirk to fix loss of usb packets
authorIsaac Scott <isaac.scott@ideasonboard.com>
Thu, 28 Nov 2024 14:51:43 +0000 (14:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 13:01:24 +0000 (14:01 +0100)
commit1b259a5df5e60299bd156efe8c995b3ad8a1ba6f
treeed98b71f0c20d44503c1c4091f01594e2b5450ea
parenteef0ce8d8d36d7a72340cc733256242d2da9366a
media: uvcvideo: Implement dual stream quirk to fix loss of usb packets

[ Upstream commit c2eda35e675b6ea4a0a21a4b1167b121571a9036 ]

Some cameras, such as the Sonix Technology Co. 292A, exhibit issues when
running two parallel streams, causing USB packets to be dropped when an
H.264 stream posts a keyframe while an MJPEG stream is running
simultaneously. This occasionally causes the driver to erroneously
output two consecutive JPEG images as a single frame.

To fix this, we inspect the buffer, and trigger a new frame when we
find an SOI.

Signed-off-by: Isaac Scott <isaac.scott@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://lore.kernel.org/r/20241128145144.61475-2-isaac.scott@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/usb/uvc/uvc_video.c
drivers/media/usb/uvc/uvcvideo.h