aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorVaibhav Hiremath <hvaibhav@ti.com>2009-11-10 11:12:25 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:42:03 -0500
commitd73bfc5fe625f6962d0ced84066e201249f14e53 (patch)
tree4fe87df15d47a3585bba8c4880e3b386b0df5282 /drivers/media
parentbd9778019b4bd52fe21b4e41b826b1282693687e (diff)
V4L/DVB (13469): Davinci VPFE Capture: Add support for Control ioctls
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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/davinci/vpfe_capture.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c
index 1c3bde7fcd5e..12a1b3d7132d 100644
--- a/drivers/media/video/davinci/vpfe_capture.c
+++ b/drivers/media/video/davinci/vpfe_capture.c
@@ -1413,6 +1413,41 @@ static int vpfe_dqbuf(struct file *file, void *priv,
1413 buf, file->f_flags & O_NONBLOCK); 1413 buf, file->f_flags & O_NONBLOCK);
1414} 1414}
1415 1415
1416static int vpfe_queryctrl(struct file *file, void *priv,
1417 struct v4l2_queryctrl *qctrl)
1418{
1419 struct vpfe_device *vpfe_dev = video_drvdata(file);
1420 struct vpfe_subdev_info *sdinfo;
1421
1422 sdinfo = vpfe_dev->current_subdev;
1423
1424 return v4l2_device_call_until_err(&vpfe_dev->v4l2_dev, sdinfo->grp_id,
1425 core, queryctrl, qctrl);
1426
1427}
1428
1429static int vpfe_g_ctrl(struct file *file, void *priv, struct v4l2_control *ctrl)
1430{
1431 struct vpfe_device *vpfe_dev = video_drvdata(file);
1432 struct vpfe_subdev_info *sdinfo;
1433
1434 sdinfo = vpfe_dev->current_subdev;
1435
1436 return v4l2_device_call_until_err(&vpfe_dev->v4l2_dev, sdinfo->grp_id,
1437 core, g_ctrl, ctrl);
1438}
1439
1440static int vpfe_s_ctrl(struct file *file, void *priv, struct v4l2_control *ctrl)
1441{
1442 struct vpfe_device *vpfe_dev = video_drvdata(file);
1443 struct vpfe_subdev_info *sdinfo;
1444
1445 sdinfo = vpfe_dev->current_subdev;
1446
1447 return v4l2_device_call_until_err(&vpfe_dev->v4l2_dev, sdinfo->grp_id,
1448 core, s_ctrl, ctrl);
1449}
1450
1416/* 1451/*
1417 * vpfe_calculate_offsets : This function calculates buffers offset 1452 * vpfe_calculate_offsets : This function calculates buffers offset
1418 * for top and bottom field 1453 * for top and bottom field
@@ -1710,6 +1745,9 @@ static const struct v4l2_ioctl_ops vpfe_ioctl_ops = {
1710 .vidioc_querystd = vpfe_querystd, 1745 .vidioc_querystd = vpfe_querystd,
1711 .vidioc_s_std = vpfe_s_std, 1746 .vidioc_s_std = vpfe_s_std,
1712 .vidioc_g_std = vpfe_g_std, 1747 .vidioc_g_std = vpfe_g_std,
1748 .vidioc_queryctrl = vpfe_queryctrl,
1749 .vidioc_g_ctrl = vpfe_g_ctrl,
1750 .vidioc_s_ctrl = vpfe_s_ctrl,
1713 .vidioc_reqbufs = vpfe_reqbufs, 1751 .vidioc_reqbufs = vpfe_reqbufs,
1714 .vidioc_querybuf = vpfe_querybuf, 1752 .vidioc_querybuf = vpfe_querybuf,
1715 .vidioc_qbuf = vpfe_qbuf, 1753 .vidioc_qbuf = vpfe_qbuf,