Commit 2da9479a authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

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: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e34184ed
...@@ -98,6 +98,10 @@ int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg) ...@@ -98,6 +98,10 @@ int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg)
return v4l2_subdev_call(sd, video, g_vbi_data, arg); return v4l2_subdev_call(sd, video, g_vbi_data, arg);
case VIDIOC_G_SLICED_VBI_CAP: case VIDIOC_G_SLICED_VBI_CAP:
return v4l2_subdev_call(sd, video, g_sliced_vbi_cap, arg); return v4l2_subdev_call(sd, video, g_sliced_vbi_cap, arg);
case VIDIOC_ENUM_FMT:
return v4l2_subdev_call(sd, video, enum_fmt, arg);
case VIDIOC_TRY_FMT:
return v4l2_subdev_call(sd, video, try_fmt, arg);
case VIDIOC_S_FMT: case VIDIOC_S_FMT:
return v4l2_subdev_call(sd, video, s_fmt, arg); return v4l2_subdev_call(sd, video, s_fmt, arg);
case VIDIOC_G_FMT: case VIDIOC_G_FMT:
...@@ -112,6 +116,10 @@ int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg) ...@@ -112,6 +116,10 @@ int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg)
return v4l2_subdev_call(sd, video, s_stream, 1); return v4l2_subdev_call(sd, video, s_stream, 1);
case VIDIOC_STREAMOFF: case VIDIOC_STREAMOFF:
return v4l2_subdev_call(sd, video, s_stream, 0); return v4l2_subdev_call(sd, video, s_stream, 0);
case VIDIOC_S_PARM:
return v4l2_subdev_call(sd, video, s_parm, arg);
case VIDIOC_G_PARM:
return v4l2_subdev_call(sd, video, g_parm, arg);
default: default:
return v4l2_subdev_call(sd, core, ioctl, cmd, arg); return v4l2_subdev_call(sd, core, ioctl, cmd, arg);
......
...@@ -118,8 +118,12 @@ struct v4l2_subdev_video_ops { ...@@ -118,8 +118,12 @@ struct v4l2_subdev_video_ops {
int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std); int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std);
int (*g_input_status)(struct v4l2_subdev *sd, u32 *status); int (*g_input_status)(struct v4l2_subdev *sd, u32 *status);
int (*s_stream)(struct v4l2_subdev *sd, int enable); int (*s_stream)(struct v4l2_subdev *sd, int enable);
int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); int (*enum_fmt)(struct v4l2_subdev *sd, struct v4l2_fmtdesc *fmtdesc);
int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
int (*try_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
}; };
struct v4l2_subdev_ops { struct v4l2_subdev_ops {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment