aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-01-20 10:12:57 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-17 23:52:51 -0400
commit48213fe3f981d2cbccd926d6858fa9cf8617beed (patch)
treee0d7b046c576f5cf1914a0486194d8ac8ff4c730
parentf129b03ba272c86c42ad476684caa0d6109cb383 (diff)
V4L/DVB: v4l: Add V4L2_CID_IRIS_ABSOLUTE and V4L2_CID_IRIS_RELATIVE controls
Those control, as their names imply, control the camera aperture settings. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--Documentation/DocBook/v4l/compat.xml11
-rw-r--r--Documentation/DocBook/v4l/controls.xml19
-rw-r--r--Documentation/DocBook/v4l/videodev2.h.xml3
-rw-r--r--drivers/media/video/v4l2-common.c3
-rw-r--r--include/linux/videodev2.h3
5 files changed, 39 insertions, 0 deletions
diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml
index b9dbdf9e6d29..854235b5208e 100644
--- a/Documentation/DocBook/v4l/compat.xml
+++ b/Documentation/DocBook/v4l/compat.xml
@@ -2332,6 +2332,17 @@ more information.</para>
2332 </listitem> 2332 </listitem>
2333 </orderedlist> 2333 </orderedlist>
2334 </section> 2334 </section>
2335 <section>
2336 <title>V4L2 in Linux 2.6.34</title>
2337 <orderedlist>
2338 <listitem>
2339 <para>Added
2340<constant>V4L2_CID_IRIS_ABSOLUTE</constant> and
2341<constant>V4L2_CID_IRIS_RELATIVE</constant> controls to the
2342 <link linkend="camera-controls">Camera controls class</link>.
2343 </para>
2344 </listitem>
2345 </orderedlist>
2335 </section> 2346 </section>
2336 2347
2337 <section id="other"> 2348 <section id="other">
diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml
index e1bdbb6eff84..7e0c68747134 100644
--- a/Documentation/DocBook/v4l/controls.xml
+++ b/Documentation/DocBook/v4l/controls.xml
@@ -1831,6 +1831,25 @@ wide-angle direction. The zoom speed unit is driver-specific.</entry>
1831 <row><entry></entry></row> 1831 <row><entry></entry></row>
1832 1832
1833 <row> 1833 <row>
1834 <entry spanname="id"><constant>V4L2_CID_IRIS_ABSOLUTE</constant>&nbsp;</entry>
1835 <entry>integer</entry>
1836 </row><row><entry spanname="descr">This control sets the
1837camera's aperture to the specified value. The unit is undefined.
1838Larger values open the iris wider, smaller values close it.</entry>
1839 </row>
1840 <row><entry></entry></row>
1841
1842 <row>
1843 <entry spanname="id"><constant>V4L2_CID_IRIS_RELATIVE</constant>&nbsp;</entry>
1844 <entry>integer</entry>
1845 </row><row><entry spanname="descr">This control modifies the
1846camera's aperture by the specified amount. The unit is undefined.
1847Positive values open the iris one step further, negative values close
1848it one step further. This is a write-only control.</entry>
1849 </row>
1850 <row><entry></entry></row>
1851
1852 <row>
1834 <entry spanname="id"><constant>V4L2_CID_PRIVACY</constant>&nbsp;</entry> 1853 <entry spanname="id"><constant>V4L2_CID_PRIVACY</constant>&nbsp;</entry>
1835 <entry>boolean</entry> 1854 <entry>boolean</entry>
1836 </row><row><entry spanname="descr">Prevent video from being acquired 1855 </row><row><entry spanname="descr">Prevent video from being acquired
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml
index 068325940658..c18dfebedeff 100644
--- a/Documentation/DocBook/v4l/videodev2.h.xml
+++ b/Documentation/DocBook/v4l/videodev2.h.xml
@@ -1271,6 +1271,9 @@ enum <link linkend="v4l2-exposure-auto-type">v4l2_exposure_auto_type</link> {
1271 1271
1272#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) 1272#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16)
1273 1273
1274#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17)
1275#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18)
1276
1274/* FM Modulator class control IDs */ 1277/* FM Modulator class control IDs */
1275#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) 1278#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
1276#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) 1279#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
index cd1f21d9b079..67944f53a79a 100644
--- a/drivers/media/video/v4l2-common.c
+++ b/drivers/media/video/v4l2-common.c
@@ -489,6 +489,8 @@ const char *v4l2_ctrl_get_name(u32 id)
489 case V4L2_CID_FOCUS_ABSOLUTE: return "Focus, Absolute"; 489 case V4L2_CID_FOCUS_ABSOLUTE: return "Focus, Absolute";
490 case V4L2_CID_FOCUS_RELATIVE: return "Focus, Relative"; 490 case V4L2_CID_FOCUS_RELATIVE: return "Focus, Relative";
491 case V4L2_CID_FOCUS_AUTO: return "Focus, Automatic"; 491 case V4L2_CID_FOCUS_AUTO: return "Focus, Automatic";
492 case V4L2_CID_IRIS_ABSOLUTE: return "Iris, Absolute";
493 case V4L2_CID_IRIS_RELATIVE: return "Iris, Relative";
492 case V4L2_CID_ZOOM_ABSOLUTE: return "Zoom, Absolute"; 494 case V4L2_CID_ZOOM_ABSOLUTE: return "Zoom, Absolute";
493 case V4L2_CID_ZOOM_RELATIVE: return "Zoom, Relative"; 495 case V4L2_CID_ZOOM_RELATIVE: return "Zoom, Relative";
494 case V4L2_CID_ZOOM_CONTINUOUS: return "Zoom, Continuous"; 496 case V4L2_CID_ZOOM_CONTINUOUS: return "Zoom, Continuous";
@@ -643,6 +645,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
643 case V4L2_CID_PAN_RELATIVE: 645 case V4L2_CID_PAN_RELATIVE:
644 case V4L2_CID_TILT_RELATIVE: 646 case V4L2_CID_TILT_RELATIVE:
645 case V4L2_CID_FOCUS_RELATIVE: 647 case V4L2_CID_FOCUS_RELATIVE:
648 case V4L2_CID_IRIS_RELATIVE:
646 case V4L2_CID_ZOOM_RELATIVE: 649 case V4L2_CID_ZOOM_RELATIVE:
647 qctrl->flags |= V4L2_CTRL_FLAG_WRITE_ONLY; 650 qctrl->flags |= V4L2_CTRL_FLAG_WRITE_ONLY;
648 break; 651 break;
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 6fb0b2daa5b9..2559b182b8c4 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -1282,6 +1282,9 @@ enum v4l2_exposure_auto_type {
1282 1282
1283#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) 1283#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16)
1284 1284
1285#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17)
1286#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18)
1287
1285/* FM Modulator class control IDs */ 1288/* FM Modulator class control IDs */
1286#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) 1289#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
1287#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) 1290#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)