aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-02-06 16:59:35 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:30 -0400
commit2da9479aaa331bdfaadab0d14f75fd76bfa5e56a (patch)
tree47f03e9f792da3e1b208f18cb98e2ec040b9e8ac
parente34184edfbe3ea818408f0ac1cb1fe538301e67d (diff)
V4L/DVB (11112): v4l2-subdev: add support for TRY_FMT, ENUM_FMT and G/S_PARM.
These ops are used by the ov7670 driver, so these need to be added. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/v4l2-subdev.c8
-rw-r--r--include/media/v4l2-subdev.h6
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c
index 923ec8d01991..dc881671d536 100644
--- a/drivers/media/video/v4l2-subdev.c
+++ b/drivers/media/video/v4l2-subdev.c
@@ -98,6 +98,10 @@ int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg)
98 return v4l2_subdev_call(sd, video, g_vbi_data, arg); 98 return v4l2_subdev_call(sd, video, g_vbi_data, arg);
99 case VIDIOC_G_SLICED_VBI_CAP: 99 case VIDIOC_G_SLICED_VBI_CAP:
100 return v4l2_subdev_call(sd, video, g_sliced_vbi_cap, arg); 100 return v4l2_subdev_call(sd, video, g_sliced_vbi_cap, arg);
101 case VIDIOC_ENUM_FMT:
102 return v4l2_subdev_call(sd, video, enum_fmt, arg);
103 case VIDIOC_TRY_FMT:
104 return v4l2_subdev_call(sd, video, try_fmt, arg);
101 case VIDIOC_S_FMT: 105 case VIDIOC_S_FMT:
102 return v4l2_subdev_call(sd, video, s_fmt, arg); 106 return v4l2_subdev_call(sd, video, s_fmt, arg);
103 case VIDIOC_G_FMT: 107 case VIDIOC_G_FMT:
@@ -112,6 +116,10 @@ int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg)
112 return v4l2_subdev_call(sd, video, s_stream, 1); 116 return v4l2_subdev_call(sd, video, s_stream, 1);
113 case VIDIOC_STREAMOFF: 117 case VIDIOC_STREAMOFF:
114 return v4l2_subdev_call(sd, video, s_stream, 0); 118 return v4l2_subdev_call(sd, video, s_stream, 0);
119 case VIDIOC_S_PARM:
120 return v4l2_subdev_call(sd, video, s_parm, arg);
121 case VIDIOC_G_PARM:
122 return v4l2_subdev_call(sd, video, g_parm, arg);
115 123
116 default: 124 default:
117 return v4l2_subdev_call(sd, core, ioctl, cmd, arg); 125 return v4l2_subdev_call(sd, core, ioctl, cmd, arg);
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 1b97a2c33a73..d7a72d2d1f00 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -118,8 +118,12 @@ struct v4l2_subdev_video_ops {
118 int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std); 118 int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std);
119 int (*g_input_status)(struct v4l2_subdev *sd, u32 *status); 119 int (*g_input_status)(struct v4l2_subdev *sd, u32 *status);
120 int (*s_stream)(struct v4l2_subdev *sd, int enable); 120 int (*s_stream)(struct v4l2_subdev *sd, int enable);
121 int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); 121 int (*enum_fmt)(struct v4l2_subdev *sd, struct v4l2_fmtdesc *fmtdesc);
122 int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); 122 int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
123 int (*try_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
124 int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
125 int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
126 int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
123}; 127};
124 128
125struct v4l2_subdev_ops { 129struct v4l2_subdev_ops {