From: Ricardo Ribalda Date: Fri, 18 Jun 2021 12:29:14 +0000 (+0200) Subject: media: uvcvideo: Increase the size of UVC_METADATA_BUF_SIZE X-Git-Tag: v5.16-rc1~173^2~216 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8865c537037bb30b9e84c91e3386cc926f024f78;p=thirdparty%2Fkernel%2Flinux.git media: uvcvideo: Increase the size of UVC_METADATA_BUF_SIZE Hans has discovered that in his test device, for the H264 format bytesused goes up to about 570, for YUYV it will actually go up to a bit over 5000 bytes, and for MJPG up to about 2706 bytes. We should also, according to V4L2_META_FMT_UVC docs, drop headers when the buffer is full. Credit-to: Hans Verkuil Reviewed-by: Hans Verkuil Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h index 5eb7e87f8430c..37a092d717cfe 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -524,7 +524,7 @@ struct uvc_stats_stream { unsigned int max_sof; /* Maximum STC.SOF value */ }; -#define UVC_METADATA_BUF_SIZE 1024 +#define UVC_METADATA_BUF_SIZE 10240 /** * struct uvc_copy_op: Context structure to schedule asynchronous memcpy