aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/v4l2-subdev.h36
-rw-r--r--include/media/v4l2-subdev.h7
2 files changed, 43 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 */
88struct 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 */
103struct 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
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 4215650151be..8b7a78a013c6 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -268,6 +268,10 @@ struct v4l2_subdev_video_ops {
268 int (*s_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop); 268 int (*s_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop);
269 int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); 269 int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
270 int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); 270 int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
271 int (*g_frame_interval)(struct v4l2_subdev *sd,
272 struct v4l2_subdev_frame_interval *interval);
273 int (*s_frame_interval)(struct v4l2_subdev *sd,
274 struct v4l2_subdev_frame_interval *interval);
271 int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize); 275 int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize);
272 int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival); 276 int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival);
273 int (*enum_dv_presets) (struct v4l2_subdev *sd, 277 int (*enum_dv_presets) (struct v4l2_subdev *sd,
@@ -420,6 +424,9 @@ struct v4l2_subdev_pad_ops {
420 int (*enum_frame_size)(struct v4l2_subdev *sd, 424 int (*enum_frame_size)(struct v4l2_subdev *sd,
421 struct v4l2_subdev_fh *fh, 425 struct v4l2_subdev_fh *fh,
422 struct v4l2_subdev_frame_size_enum *fse); 426 struct v4l2_subdev_frame_size_enum *fse);
427 int (*enum_frame_interval)(struct v4l2_subdev *sd,
428 struct v4l2_subdev_fh *fh,
429 struct v4l2_subdev_frame_interval_enum *fie);
423 int (*get_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, 430 int (*get_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
424 struct v4l2_subdev_format *format); 431 struct v4l2_subdev_format *format);
425 int (*set_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, 432 int (*set_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,