Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: uvcvideo: Fix comments in uvc_meta_detect_msxu

The comments can be more precise. Let's fix them.

Fixes: 6cb786f040ad ("media: uvcvideo: Auto-set UVC_QUIRK_MSXU_META")
Cc: stable+noautosel@kernel.org # Coment change only, no need to backport
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans de Goede <hansg@kernel.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Ricardo Ribalda and committed by
Hans Verkuil
e8e65d92 f4da0de6

+9 -4
+9 -4
drivers/media/usb/uvc/uvc_metadata.c
··· 196 196 if (!data) 197 197 return -ENOMEM; 198 198 199 - /* Check if the metadata is already enabled. */ 199 + /* 200 + * Check if the metadata is already enabled, or if the device always 201 + * returns metadata. 202 + */ 200 203 ret = uvc_query_ctrl(dev, UVC_GET_CUR, entity->id, dev->intfnum, 201 204 MSXU_CONTROL_METADATA, data, sizeof(*data)); 202 205 if (ret) ··· 211 208 } 212 209 213 210 /* 214 - * We have seen devices that require 1 to enable the metadata, others 215 - * requiring a value != 1 and others requiring a value >1. Luckily for 216 - * us, the value from GET_MAX seems to work all the time. 211 + * Set the value of MSXU_CONTROL_METADATA to the value reported by 212 + * GET_MAX to enable production of MSXU metadata. The GET_MAX request 213 + * reports the maximum size of the metadata, if its value is 0 then MSXU 214 + * metadata is not supported. For more information, see 215 + * https://learn.microsoft.com/en-us/windows-hardware/drivers/stream/uvc-extensions-1-5#2229-metadata-control 217 216 */ 218 217 ret = uvc_query_ctrl(dev, UVC_GET_MAX, entity->id, dev->intfnum, 219 218 MSXU_CONTROL_METADATA, data, sizeof(*data));