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: Hans Verkuil <hans.verk...@cisco.com>

diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c 
b/drivers/media/platform/vivid/vivid-vid-cap.c
index 1d9ea2d..5ed44f2 100644
--- a/drivers/media/platform/vivid/vivid-vid-cap.c
+++ b/drivers/media/platform/vivid/vivid-vid-cap.c
@@ -1689,18 +1689,14 @@ int vidioc_enum_frameintervals(struct file *file, void 
*priv,
                return -EINVAL;
 
        if (!vivid_is_webcam(dev)) {
-               static const struct v4l2_fract step = { 1, 1 };
-
                if (fival->index)
                        return -EINVAL;
                if (fival->width < MIN_WIDTH || fival->width > MAX_WIDTH * 
MAX_ZOOM)
                        return -EINVAL;
                if (fival->height < MIN_HEIGHT || fival->height > MAX_HEIGHT * 
MAX_ZOOM)
                        return -EINVAL;
-               fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS;
-               fival->stepwise.min = tpf_min;
-               fival->stepwise.max = tpf_max;
-               fival->stepwise.step = step;
+               fival->type = V4L2_FRMIVAL_TYPE_DISCRETE;
+               fival->discrete = dev->timeperframe_vid_cap;
                return 0;
        }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to