Skip to content

Commit

Permalink
V4L/DVB (13469): Davinci VPFE Capture: Add support for Control ioctls
Browse files Browse the repository at this point in the history
Added support for Control IOCTL,
        - s_ctrl
        - g_ctrl
        - queryctrl

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Vaibhav Hiremath authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent bd97780 commit d73bfc5
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions drivers/media/video/davinci/vpfe_capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,41 @@ static int vpfe_dqbuf(struct file *file, void *priv,
buf, file->f_flags & O_NONBLOCK);
}

static int vpfe_queryctrl(struct file *file, void *priv,
struct v4l2_queryctrl *qctrl)
{
struct vpfe_device *vpfe_dev = video_drvdata(file);
struct vpfe_subdev_info *sdinfo;

sdinfo = vpfe_dev->current_subdev;

return v4l2_device_call_until_err(&vpfe_dev->v4l2_dev, sdinfo->grp_id,
core, queryctrl, qctrl);

}

static int vpfe_g_ctrl(struct file *file, void *priv, struct v4l2_control *ctrl)
{
struct vpfe_device *vpfe_dev = video_drvdata(file);
struct vpfe_subdev_info *sdinfo;

sdinfo = vpfe_dev->current_subdev;

return v4l2_device_call_until_err(&vpfe_dev->v4l2_dev, sdinfo->grp_id,
core, g_ctrl, ctrl);
}

static int vpfe_s_ctrl(struct file *file, void *priv, struct v4l2_control *ctrl)
{
struct vpfe_device *vpfe_dev = video_drvdata(file);
struct vpfe_subdev_info *sdinfo;

sdinfo = vpfe_dev->current_subdev;

return v4l2_device_call_until_err(&vpfe_dev->v4l2_dev, sdinfo->grp_id,
core, s_ctrl, ctrl);
}

/*
* vpfe_calculate_offsets : This function calculates buffers offset
* for top and bottom field
Expand Down Expand Up @@ -1710,6 +1745,9 @@ static const struct v4l2_ioctl_ops vpfe_ioctl_ops = {
.vidioc_querystd = vpfe_querystd,
.vidioc_s_std = vpfe_s_std,
.vidioc_g_std = vpfe_g_std,
.vidioc_queryctrl = vpfe_queryctrl,
.vidioc_g_ctrl = vpfe_g_ctrl,
.vidioc_s_ctrl = vpfe_s_ctrl,
.vidioc_reqbufs = vpfe_reqbufs,
.vidioc_querybuf = vpfe_querybuf,
.vidioc_qbuf = vpfe_qbuf,
Expand Down

0 comments on commit d73bfc5

Please sign in to comment.