diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-05-05 10:38:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 03:53:32 -0400 |
commit | 35c3017a29d278c4405a7f3ab30b814999d156d3 (patch) | |
tree | b956724fb7c11c336a4a4d93a5679347f222caf8 /drivers/media/video/v4l2-subdev.c | |
parent | 333c8b97785d5afd5085ba3720b4d259623290f6 (diff) |
[media] v4l: v4l2_subdev userspace frame interval API
The three new ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL,
VIDIOC_SUBDEV_G_FRAME_INTERVAL and VIDIOC_SUBDEV_S_FRAME_INTERVAL can be
used to enumerate and configure a subdev's frame rate from userspace.
Two new video::g/s_frame_interval subdev operations are introduced to
support those ioctls. The existing video::g/s_parm operations are
deprecated and shouldn't be used anymore.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-subdev.c')
-rw-r--r-- | drivers/media/video/v4l2-subdev.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c index 207cc5cceb29..a4a12563ec3c 100644 --- a/drivers/media/video/v4l2-subdev.c +++ b/drivers/media/video/v4l2-subdev.c | |||
@@ -232,6 +232,22 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
232 | return v4l2_subdev_call(sd, pad, enum_frame_size, subdev_fh, | 232 | return v4l2_subdev_call(sd, pad, enum_frame_size, subdev_fh, |
233 | fse); | 233 | fse); |
234 | } | 234 | } |
235 | |||
236 | case VIDIOC_SUBDEV_G_FRAME_INTERVAL: | ||
237 | return v4l2_subdev_call(sd, video, g_frame_interval, arg); | ||
238 | |||
239 | case VIDIOC_SUBDEV_S_FRAME_INTERVAL: | ||
240 | return v4l2_subdev_call(sd, video, s_frame_interval, arg); | ||
241 | |||
242 | case VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL: { | ||
243 | struct v4l2_subdev_frame_interval_enum *fie = arg; | ||
244 | |||
245 | if (fie->pad >= sd->entity.num_pads) | ||
246 | return -EINVAL; | ||
247 | |||
248 | return v4l2_subdev_call(sd, pad, enum_frame_interval, subdev_fh, | ||
249 | fie); | ||
250 | } | ||
235 | #endif | 251 | #endif |
236 | default: | 252 | default: |
237 | return -ENOIOCTLCMD; | 253 | return -ENOIOCTLCMD; |