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 /include/linux/v4l2-subdev.h | |
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 'include/linux/v4l2-subdev.h')
-rw-r--r-- | include/linux/v4l2-subdev.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h index 8dbb44873821..c55f9e9e1dd3 100644 --- a/include/linux/v4l2-subdev.h +++ b/include/linux/v4l2-subdev.h | |||
@@ -80,11 +80,47 @@ struct v4l2_subdev_frame_size_enum { | |||
80 | __u32 reserved[9]; | 80 | __u32 reserved[9]; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | /** | ||
84 | * struct v4l2_subdev_frame_interval - Pad-level frame rate | ||
85 | * @pad: pad number, as reported by the media API | ||
86 | * @interval: frame interval in seconds | ||
87 | */ | ||
88 | struct v4l2_subdev_frame_interval { | ||
89 | __u32 pad; | ||
90 | struct v4l2_fract interval; | ||
91 | __u32 reserved[9]; | ||
92 | }; | ||
93 | |||
94 | /** | ||
95 | * struct v4l2_subdev_frame_interval_enum - Frame interval enumeration | ||
96 | * @pad: pad number, as reported by the media API | ||
97 | * @index: frame interval index during enumeration | ||
98 | * @code: format code (from enum v4l2_mbus_pixelcode) | ||
99 | * @width: frame width in pixels | ||
100 | * @height: frame height in pixels | ||
101 | * @interval: frame interval in seconds | ||
102 | */ | ||
103 | struct v4l2_subdev_frame_interval_enum { | ||
104 | __u32 index; | ||
105 | __u32 pad; | ||
106 | __u32 code; | ||
107 | __u32 width; | ||
108 | __u32 height; | ||
109 | struct v4l2_fract interval; | ||
110 | __u32 reserved[9]; | ||
111 | }; | ||
112 | |||
83 | #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) | 113 | #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) |
84 | #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) | 114 | #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) |
115 | #define VIDIOC_SUBDEV_G_FRAME_INTERVAL \ | ||
116 | _IOWR('V', 21, struct v4l2_subdev_frame_interval) | ||
117 | #define VIDIOC_SUBDEV_S_FRAME_INTERVAL \ | ||
118 | _IOWR('V', 22, struct v4l2_subdev_frame_interval) | ||
85 | #define VIDIOC_SUBDEV_ENUM_MBUS_CODE \ | 119 | #define VIDIOC_SUBDEV_ENUM_MBUS_CODE \ |
86 | _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum) | 120 | _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum) |
87 | #define VIDIOC_SUBDEV_ENUM_FRAME_SIZE \ | 121 | #define VIDIOC_SUBDEV_ENUM_FRAME_SIZE \ |
88 | _IOWR('V', 74, struct v4l2_subdev_frame_size_enum) | 122 | _IOWR('V', 74, struct v4l2_subdev_frame_size_enum) |
123 | #define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \ | ||
124 | _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum) | ||
89 | 125 | ||
90 | #endif | 126 | #endif |