[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3c2f8e86-3519-8284-fdeb-555ec03fbeff@xs4all.nl>
Date: Fri, 12 Mar 2021 08:07:31 +0100
From: Hans Verkuil <hverkuil@...all.nl>
To: Ricardo Ribalda <ribalda@...omium.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Tomasz Figa <tfiga@...omium.org>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, senozhatsky@...omium.org
Subject: Re: [PATCH v2 2/6] media: uvcvideo: Set capability in s_param
On 11/03/2021 23:19, Ricardo Ribalda wrote:
> Fixes v4l2-compliance:
>
> Format ioctls (Input 0):
> warn: v4l2-test-formats.cpp(1339): S_PARM is supported but doesn't report V4L2_CAP_TIMEPERFRAME
> fail: v4l2-test-formats.cpp(1241): node->has_frmintervals && !cap->capability
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@...all.nl>
Thanks!
Hans
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
> drivers/media/usb/uvc/uvc_v4l2.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
> index 252136cc885c..157310c0ca87 100644
> --- a/drivers/media/usb/uvc/uvc_v4l2.c
> +++ b/drivers/media/usb/uvc/uvc_v4l2.c
> @@ -472,10 +472,13 @@ static int uvc_v4l2_set_streamparm(struct uvc_streaming *stream,
> uvc_simplify_fraction(&timeperframe.numerator,
> &timeperframe.denominator, 8, 333);
>
> - if (parm->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
> + if (parm->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
> parm->parm.capture.timeperframe = timeperframe;
> - else
> + parm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
> + } else {
> parm->parm.output.timeperframe = timeperframe;
> + parm->parm.output.capability = V4L2_CAP_TIMEPERFRAME;
> + }
>
> return 0;
> }
>
Powered by blists - more mailing lists