Commit 29813a6f authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] vivid: report only one frameinterval

The vivid driver reports a range of frame intervals for non-webcams, when in fact
the frame interval is fixed for those inputs as it depends on the DV timings or
standard. Just report the single discrete frame interval instead.

Caught by v4l2-compliance.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 1bd0835a
...@@ -1689,18 +1689,14 @@ int vidioc_enum_frameintervals(struct file *file, void *priv, ...@@ -1689,18 +1689,14 @@ int vidioc_enum_frameintervals(struct file *file, void *priv,
return -EINVAL; return -EINVAL;
if (!vivid_is_webcam(dev)) { if (!vivid_is_webcam(dev)) {
static const struct v4l2_fract step = { 1, 1 };
if (fival->index) if (fival->index)
return -EINVAL; return -EINVAL;
if (fival->width < MIN_WIDTH || fival->width > MAX_WIDTH * MAX_ZOOM) if (fival->width < MIN_WIDTH || fival->width > MAX_WIDTH * MAX_ZOOM)
return -EINVAL; return -EINVAL;
if (fival->height < MIN_HEIGHT || fival->height > MAX_HEIGHT * MAX_ZOOM) if (fival->height < MIN_HEIGHT || fival->height > MAX_HEIGHT * MAX_ZOOM)
return -EINVAL; return -EINVAL;
fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS; fival->type = V4L2_FRMIVAL_TYPE_DISCRETE;
fival->stepwise.min = tpf_min; fival->discrete = dev->timeperframe_vid_cap;
fival->stepwise.max = tpf_max;
fival->stepwise.step = step;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment