]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: g_webcam: Send color matching descriptor per frame
authorDaniel Scally <dan.scally@ideasonboard.com>
Fri, 16 Dec 2022 16:05:28 +0000 (16:05 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:24:38 +0000 (07:24 +0100)
commit10ae4f56bdc6e361448da3f05b64eba84c3381c6
tree7c209acd5c53400e8ad033e373a439c6941ac194
parentc3ff99ee9304641cb54d8b6510469be87164a819
usb: gadget: g_webcam: Send color matching descriptor per frame

commit c70713eeb73c8229b93a75a6a517d541ba00fc42 upstream.

Currently the color matching descriptor is only sent across the wire
a single time, following the descriptors for each format and frame.
According to the UVC 1.5 Specification 3.9.2.6 ("Color Matching
Descriptors"):

"Only one instance is allowed for a given format and if present,
the Color Matching descriptor shall be placed following the Video
and Still Image Frame descriptors for that format".

Add another reference to the color matching descriptor after the
yuyv frames so that it's correctly transmitted for that format
too.

Fixes: a7d91ec9ee19 ("USB gadget: Webcam device")
Cc: stable <stable@kernel.org>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Link: https://lore.kernel.org/r/20221216160528.479094-1-dan.scally@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/legacy/webcam.c