aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMuralidharan Karicheri <m-karicheri2@ti.com>2009-12-02 23:13:17 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-15 21:18:04 -0500
commit007701e2c4de94109864c8e85e39b6d8fc474170 (patch)
tree1d36357e0053ee101b5b55e4b98d25d6ecaf1f9b /Documentation
parentb6456c0cfe9d94e6d2bf684e6e6c031fc0b10031 (diff)
V4L/DVB (13572): v4l2-spec: Digital Video Timings API documentation
This patch updates the v4l2-dvb documentation for the new video timings API added. Also updated the document based on comments from Hans Verkuil. Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/media-entities.tmpl18
-rw-r--r--Documentation/DocBook/media-indices.tmpl4
-rw-r--r--Documentation/DocBook/v4l/common.xml35
-rw-r--r--Documentation/DocBook/v4l/v4l2.xml4
-rw-r--r--Documentation/DocBook/v4l/videodev2.h.xml116
-rw-r--r--Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml238
-rw-r--r--Documentation/DocBook/v4l/vidioc-enuminput.xml36
-rw-r--r--Documentation/DocBook/v4l/vidioc-enumoutput.xml36
-rw-r--r--Documentation/DocBook/v4l/vidioc-g-dv-preset.xml111
-rw-r--r--Documentation/DocBook/v4l/vidioc-g-dv-timings.xml224
-rw-r--r--Documentation/DocBook/v4l/vidioc-query-dv-preset.xml85
11 files changed, 903 insertions, 4 deletions
diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl
index bb5ab741220e..c725cb852c54 100644
--- a/Documentation/DocBook/media-entities.tmpl
+++ b/Documentation/DocBook/media-entities.tmpl
@@ -23,6 +23,7 @@
23<!ENTITY VIDIOC-ENUMINPUT "<link linkend='vidioc-enuminput'><constant>VIDIOC_ENUMINPUT</constant></link>"> 23<!ENTITY VIDIOC-ENUMINPUT "<link linkend='vidioc-enuminput'><constant>VIDIOC_ENUMINPUT</constant></link>">
24<!ENTITY VIDIOC-ENUMOUTPUT "<link linkend='vidioc-enumoutput'><constant>VIDIOC_ENUMOUTPUT</constant></link>"> 24<!ENTITY VIDIOC-ENUMOUTPUT "<link linkend='vidioc-enumoutput'><constant>VIDIOC_ENUMOUTPUT</constant></link>">
25<!ENTITY VIDIOC-ENUMSTD "<link linkend='vidioc-enumstd'><constant>VIDIOC_ENUMSTD</constant></link>"> 25<!ENTITY VIDIOC-ENUMSTD "<link linkend='vidioc-enumstd'><constant>VIDIOC_ENUMSTD</constant></link>">
26<!ENTITY VIDIOC-ENUM-DV-PRESETS "<link linkend='vidioc-enum-dv-presets'><constant>VIDIOC_ENUM_DV_PRESETS</constant></link>">
26<!ENTITY VIDIOC-ENUM-FMT "<link linkend='vidioc-enum-fmt'><constant>VIDIOC_ENUM_FMT</constant></link>"> 27<!ENTITY VIDIOC-ENUM-FMT "<link linkend='vidioc-enum-fmt'><constant>VIDIOC_ENUM_FMT</constant></link>">
27<!ENTITY VIDIOC-ENUM-FRAMEINTERVALS "<link linkend='vidioc-enum-frameintervals'><constant>VIDIOC_ENUM_FRAMEINTERVALS</constant></link>"> 28<!ENTITY VIDIOC-ENUM-FRAMEINTERVALS "<link linkend='vidioc-enum-frameintervals'><constant>VIDIOC_ENUM_FRAMEINTERVALS</constant></link>">
28<!ENTITY VIDIOC-ENUM-FRAMESIZES "<link linkend='vidioc-enum-framesizes'><constant>VIDIOC_ENUM_FRAMESIZES</constant></link>"> 29<!ENTITY VIDIOC-ENUM-FRAMESIZES "<link linkend='vidioc-enum-framesizes'><constant>VIDIOC_ENUM_FRAMESIZES</constant></link>">
@@ -30,6 +31,8 @@
30<!ENTITY VIDIOC-G-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_G_AUDOUT</constant></link>"> 31<!ENTITY VIDIOC-G-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_G_AUDOUT</constant></link>">
31<!ENTITY VIDIOC-G-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_G_CROP</constant></link>"> 32<!ENTITY VIDIOC-G-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_G_CROP</constant></link>">
32<!ENTITY VIDIOC-G-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_G_CTRL</constant></link>"> 33<!ENTITY VIDIOC-G-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_G_CTRL</constant></link>">
34<!ENTITY VIDIOC-G-DV-PRESET "<link linkend='vidioc-g-dv-preset'><constant>VIDIOC_G_DV_PRESET</constant></link>">
35<!ENTITY VIDIOC-G-DV-TIMINGS "<link linkend='vidioc-g-dv-timings'><constant>VIDIOC_G_DV_TIMINGS</constant></link>">
33<!ENTITY VIDIOC-G-ENC-INDEX "<link linkend='vidioc-g-enc-index'><constant>VIDIOC_G_ENC_INDEX</constant></link>"> 36<!ENTITY VIDIOC-G-ENC-INDEX "<link linkend='vidioc-g-enc-index'><constant>VIDIOC_G_ENC_INDEX</constant></link>">
34<!ENTITY VIDIOC-G-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_G_EXT_CTRLS</constant></link>"> 37<!ENTITY VIDIOC-G-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_G_EXT_CTRLS</constant></link>">
35<!ENTITY VIDIOC-G-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_G_FBUF</constant></link>"> 38<!ENTITY VIDIOC-G-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_G_FBUF</constant></link>">
@@ -53,6 +56,7 @@
53<!ENTITY VIDIOC-QUERYCTRL "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYCTRL</constant></link>"> 56<!ENTITY VIDIOC-QUERYCTRL "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYCTRL</constant></link>">
54<!ENTITY VIDIOC-QUERYMENU "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYMENU</constant></link>"> 57<!ENTITY VIDIOC-QUERYMENU "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYMENU</constant></link>">
55<!ENTITY VIDIOC-QUERYSTD "<link linkend='vidioc-querystd'><constant>VIDIOC_QUERYSTD</constant></link>"> 58<!ENTITY VIDIOC-QUERYSTD "<link linkend='vidioc-querystd'><constant>VIDIOC_QUERYSTD</constant></link>">
59<!ENTITY VIDIOC-QUERY-DV-PRESET "<link linkend='vidioc-query-dv-preset'><constant>VIDIOC_QUERY_DV_PRESET</constant></link>">
56<!ENTITY VIDIOC-REQBUFS "<link linkend='vidioc-reqbufs'><constant>VIDIOC_REQBUFS</constant></link>"> 60<!ENTITY VIDIOC-REQBUFS "<link linkend='vidioc-reqbufs'><constant>VIDIOC_REQBUFS</constant></link>">
57<!ENTITY VIDIOC-STREAMOFF "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMOFF</constant></link>"> 61<!ENTITY VIDIOC-STREAMOFF "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMOFF</constant></link>">
58<!ENTITY VIDIOC-STREAMON "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMON</constant></link>"> 62<!ENTITY VIDIOC-STREAMON "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMON</constant></link>">
@@ -60,6 +64,8 @@
60<!ENTITY VIDIOC-S-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_S_AUDOUT</constant></link>"> 64<!ENTITY VIDIOC-S-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_S_AUDOUT</constant></link>">
61<!ENTITY VIDIOC-S-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_S_CROP</constant></link>"> 65<!ENTITY VIDIOC-S-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_S_CROP</constant></link>">
62<!ENTITY VIDIOC-S-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_S_CTRL</constant></link>"> 66<!ENTITY VIDIOC-S-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_S_CTRL</constant></link>">
67<!ENTITY VIDIOC-S-DV-PRESET "<link linkend='vidioc-g-dv-preset'><constant>VIDIOC_S_DV_PRESET</constant></link>">
68<!ENTITY VIDIOC-S-DV-TIMINGS "<link linkend='vidioc-g-dv-timings'><constant>VIDIOC_S_DV_TIMINGS</constant></link>">
63<!ENTITY VIDIOC-S-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_S_EXT_CTRLS</constant></link>"> 69<!ENTITY VIDIOC-S-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_S_EXT_CTRLS</constant></link>">
64<!ENTITY VIDIOC-S-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_S_FBUF</constant></link>"> 70<!ENTITY VIDIOC-S-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_S_FBUF</constant></link>">
65<!ENTITY VIDIOC-S-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_S_FMT</constant></link>"> 71<!ENTITY VIDIOC-S-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_S_FMT</constant></link>">
@@ -118,6 +124,7 @@
118<!-- Structures --> 124<!-- Structures -->
119<!ENTITY v4l2-audio "struct&nbsp;<link linkend='v4l2-audio'>v4l2_audio</link>"> 125<!ENTITY v4l2-audio "struct&nbsp;<link linkend='v4l2-audio'>v4l2_audio</link>">
120<!ENTITY v4l2-audioout "struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link>"> 126<!ENTITY v4l2-audioout "struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link>">
127<!ENTITY v4l2-bt-timings "struct&nbsp;<link linkend='v4l2-bt-timings'>v4l2_bt_timings</link>">
121<!ENTITY v4l2-buffer "struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link>"> 128<!ENTITY v4l2-buffer "struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link>">
122<!ENTITY v4l2-capability "struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link>"> 129<!ENTITY v4l2-capability "struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link>">
123<!ENTITY v4l2-captureparm "struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link>"> 130<!ENTITY v4l2-captureparm "struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link>">
@@ -128,6 +135,9 @@
128<!ENTITY v4l2-dbg-chip-ident "struct&nbsp;<link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link>"> 135<!ENTITY v4l2-dbg-chip-ident "struct&nbsp;<link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link>">
129<!ENTITY v4l2-dbg-match "struct&nbsp;<link linkend='v4l2-dbg-match'>v4l2_dbg_match</link>"> 136<!ENTITY v4l2-dbg-match "struct&nbsp;<link linkend='v4l2-dbg-match'>v4l2_dbg_match</link>">
130<!ENTITY v4l2-dbg-register "struct&nbsp;<link linkend='v4l2-dbg-register'>v4l2_dbg_register</link>"> 137<!ENTITY v4l2-dbg-register "struct&nbsp;<link linkend='v4l2-dbg-register'>v4l2_dbg_register</link>">
138<!ENTITY v4l2-dv-enum-preset "struct&nbsp;<link linkend='v4l2-dv-enum-preset'>v4l2_dv_enum_preset</link>">
139<!ENTITY v4l2-dv-preset "struct&nbsp;<link linkend='v4l2-dv-preset'>v4l2_dv_preset</link>">
140<!ENTITY v4l2-dv-timings "struct&nbsp;<link linkend='v4l2-dv-timings'>v4l2_dv_timings</link>">
131<!ENTITY v4l2-enc-idx "struct&nbsp;<link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>"> 141<!ENTITY v4l2-enc-idx "struct&nbsp;<link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>">
132<!ENTITY v4l2-enc-idx-entry "struct&nbsp;<link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>"> 142<!ENTITY v4l2-enc-idx-entry "struct&nbsp;<link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>">
133<!ENTITY v4l2-encoder-cmd "struct&nbsp;<link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link>"> 143<!ENTITY v4l2-encoder-cmd "struct&nbsp;<link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link>">
@@ -243,6 +253,10 @@
243<!ENTITY sub-enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml"> 253<!ENTITY sub-enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml">
244<!ENTITY sub-enuminput SYSTEM "v4l/vidioc-enuminput.xml"> 254<!ENTITY sub-enuminput SYSTEM "v4l/vidioc-enuminput.xml">
245<!ENTITY sub-enumoutput SYSTEM "v4l/vidioc-enumoutput.xml"> 255<!ENTITY sub-enumoutput SYSTEM "v4l/vidioc-enumoutput.xml">
256<!ENTITY sub-enum-dv-presets SYSTEM "v4l/vidioc-enum-dv-presets.xml">
257<!ENTITY sub-g-dv-preset SYSTEM "v4l/vidioc-g-dv-preset.xml">
258<!ENTITY sub-query-dv-preset SYSTEM "v4l/vidioc-query-dv-preset.xml">
259<!ENTITY sub-g-dv-timings SYSTEM "v4l/vidioc-g-dv-timings.xml">
246<!ENTITY sub-enumstd SYSTEM "v4l/vidioc-enumstd.xml"> 260<!ENTITY sub-enumstd SYSTEM "v4l/vidioc-enumstd.xml">
247<!ENTITY sub-g-audio SYSTEM "v4l/vidioc-g-audio.xml"> 261<!ENTITY sub-g-audio SYSTEM "v4l/vidioc-g-audio.xml">
248<!ENTITY sub-g-audioout SYSTEM "v4l/vidioc-g-audioout.xml"> 262<!ENTITY sub-g-audioout SYSTEM "v4l/vidioc-g-audioout.xml">
@@ -333,6 +347,10 @@
333<!ENTITY enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml"> 347<!ENTITY enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml">
334<!ENTITY enuminput SYSTEM "v4l/vidioc-enuminput.xml"> 348<!ENTITY enuminput SYSTEM "v4l/vidioc-enuminput.xml">
335<!ENTITY enumoutput SYSTEM "v4l/vidioc-enumoutput.xml"> 349<!ENTITY enumoutput SYSTEM "v4l/vidioc-enumoutput.xml">
350<!ENTITY enum-dv-presets SYSTEM "v4l/vidioc-enum-dv-presets.xml">
351<!ENTITY g-dv-preset SYSTEM "v4l/vidioc-g-dv-preset.xml">
352<!ENTITY query-dv-preset SYSTEM "v4l/vidioc-query-dv-preset.xml">
353<!ENTITY g-dv-timings SYSTEM "v4l/vidioc-g-dv-timings.xml">
336<!ENTITY enumstd SYSTEM "v4l/vidioc-enumstd.xml"> 354<!ENTITY enumstd SYSTEM "v4l/vidioc-enumstd.xml">
337<!ENTITY g-audio SYSTEM "v4l/vidioc-g-audio.xml"> 355<!ENTITY g-audio SYSTEM "v4l/vidioc-g-audio.xml">
338<!ENTITY g-audioout SYSTEM "v4l/vidioc-g-audioout.xml"> 356<!ENTITY g-audioout SYSTEM "v4l/vidioc-g-audioout.xml">
diff --git a/Documentation/DocBook/media-indices.tmpl b/Documentation/DocBook/media-indices.tmpl
index 9e30a236d74f..78d6031de001 100644
--- a/Documentation/DocBook/media-indices.tmpl
+++ b/Documentation/DocBook/media-indices.tmpl
@@ -36,6 +36,7 @@
36<indexentry><primaryie>enum&nbsp;<link linkend='v4l2-preemphasis'>v4l2_preemphasis</link></primaryie></indexentry> 36<indexentry><primaryie>enum&nbsp;<link linkend='v4l2-preemphasis'>v4l2_preemphasis</link></primaryie></indexentry>
37<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-audio'>v4l2_audio</link></primaryie></indexentry> 37<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-audio'>v4l2_audio</link></primaryie></indexentry>
38<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link></primaryie></indexentry> 38<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-audioout'>v4l2_audioout</link></primaryie></indexentry>
39<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-bt-timings'>v4l2_bt_timings</link></primaryie></indexentry>
39<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link></primaryie></indexentry> 40<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-buffer'>v4l2_buffer</link></primaryie></indexentry>
40<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link></primaryie></indexentry> 41<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-capability'>v4l2_capability</link></primaryie></indexentry>
41<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link></primaryie></indexentry> 42<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-captureparm'>v4l2_captureparm</link></primaryie></indexentry>
@@ -46,6 +47,9 @@
46<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link></primaryie></indexentry> 47<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link></primaryie></indexentry>
47<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-match'>v4l2_dbg_match</link></primaryie></indexentry> 48<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-match'>v4l2_dbg_match</link></primaryie></indexentry>
48<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-register'>v4l2_dbg_register</link></primaryie></indexentry> 49<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dbg-register'>v4l2_dbg_register</link></primaryie></indexentry>
50<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dv-enum-preset'>v4l2_dv_enum_preset</link></primaryie></indexentry>
51<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dv-preset'>v4l2_dv_preset</link></primaryie></indexentry>
52<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-dv-timings'>v4l2_dv_timings</link></primaryie></indexentry>
49<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-enc-idx'>v4l2_enc_idx</link></primaryie></indexentry> 53<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-enc-idx'>v4l2_enc_idx</link></primaryie></indexentry>
50<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link></primaryie></indexentry> 54<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link></primaryie></indexentry>
51<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link></primaryie></indexentry> 55<indexentry><primaryie>struct&nbsp;<link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link></primaryie></indexentry>
diff --git a/Documentation/DocBook/v4l/common.xml b/Documentation/DocBook/v4l/common.xml
index b1a81d246d58..c65f0ac9b6ee 100644
--- a/Documentation/DocBook/v4l/common.xml
+++ b/Documentation/DocBook/v4l/common.xml
@@ -716,6 +716,41 @@ if (-1 == ioctl (fd, &VIDIOC-S-STD;, &amp;std_id)) {
716} 716}
717 </programlisting> 717 </programlisting>
718 </example> 718 </example>
719 <section id="dv-timings">
720 <title>Digital Video (DV) Timings</title>
721 <para>
722 The video standards discussed so far has been dealing with Analog TV and the
723corresponding video timings. Today there are many more different hardware interfaces
724such as High Definition TV interfaces (HDMI), VGA, DVI connectors etc., that carry
725video signals and there is a need to extend the API to select the video timings
726for these interfaces. Since it is not possible to extend the &v4l2-std-id; due to
727the limited bits available, a new set of IOCTLs is added to set/get video timings at
728the input and output: </para><itemizedlist>
729 <listitem>
730 <para>DV Presets: Digital Video (DV) presets. These are IDs representing a
731video timing at the input/output. Presets are pre-defined timings implemented
732by the hardware according to video standards. A __u32 data type is used to represent
733a preset unlike the bit mask that is used in &v4l2-std-id; allowing future extensions
734to support as many different presets as needed.</para>
735 </listitem>
736 <listitem>
737 <para>Custom DV Timings: This will allow applications to define more detailed
738custom video timings for the interface. This includes parameters such as width, height,
739polarities, frontporch, backporch etc.
740 </para>
741 </listitem>
742 </itemizedlist>
743 <para>To enumerate and query the attributes of DV presets supported by a device,
744applications use the &VIDIOC-ENUM-DV-PRESETS; ioctl. To get the current DV preset,
745applications use the &VIDIOC-G-DV-PRESET; ioctl and to set a preset they use the
746&VIDIOC-S-DV-PRESET; ioctl.</para>
747 <para>To set custom DV timings for the device, applications use the
748&VIDIOC-S-DV-TIMINGS; ioctl and to get current custom DV timings they use the
749&VIDIOC-G-DV-TIMINGS; ioctl.</para>
750 <para>Applications can make use of the <xref linkend="input-capabilities" /> and
751<xref linkend="output-capabilities"/> flags to decide what ioctls are available to set the
752video timings for the device.</para>
753 </section>
719 </section> 754 </section>
720 755
721 &sub-controls; 756 &sub-controls;
diff --git a/Documentation/DocBook/v4l/v4l2.xml b/Documentation/DocBook/v4l/v4l2.xml
index 937b4157a5d0..77b7dd8a3b5f 100644
--- a/Documentation/DocBook/v4l/v4l2.xml
+++ b/Documentation/DocBook/v4l/v4l2.xml
@@ -411,6 +411,7 @@ and discussions on the V4L mailing list.</revremark>
411 &sub-encoder-cmd; 411 &sub-encoder-cmd;
412 &sub-enumaudio; 412 &sub-enumaudio;
413 &sub-enumaudioout; 413 &sub-enumaudioout;
414 &sub-enum-dv-presets;
414 &sub-enum-fmt; 415 &sub-enum-fmt;
415 &sub-enum-framesizes; 416 &sub-enum-framesizes;
416 &sub-enum-frameintervals; 417 &sub-enum-frameintervals;
@@ -421,6 +422,8 @@ and discussions on the V4L mailing list.</revremark>
421 &sub-g-audioout; 422 &sub-g-audioout;
422 &sub-g-crop; 423 &sub-g-crop;
423 &sub-g-ctrl; 424 &sub-g-ctrl;
425 &sub-g-dv-preset;
426 &sub-g-dv-timings;
424 &sub-g-enc-index; 427 &sub-g-enc-index;
425 &sub-g-ext-ctrls; 428 &sub-g-ext-ctrls;
426 &sub-g-fbuf; 429 &sub-g-fbuf;
@@ -441,6 +444,7 @@ and discussions on the V4L mailing list.</revremark>
441 &sub-querybuf; 444 &sub-querybuf;
442 &sub-querycap; 445 &sub-querycap;
443 &sub-queryctrl; 446 &sub-queryctrl;
447 &sub-query-dv-preset;
444 &sub-querystd; 448 &sub-querystd;
445 &sub-reqbufs; 449 &sub-reqbufs;
446 &sub-s-hw-freq-seek; 450 &sub-s-hw-freq-seek;
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml
index 3e282ed9f593..068325940658 100644
--- a/Documentation/DocBook/v4l/videodev2.h.xml
+++ b/Documentation/DocBook/v4l/videodev2.h.xml
@@ -734,6 +734,99 @@ struct <link linkend="v4l2-standard">v4l2_standard</link> {
734}; 734};
735 735
736/* 736/*
737 * V I D E O T I M I N G S D V P R E S E T
738 */
739struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link> {
740 __u32 preset;
741 __u32 reserved[4];
742};
743
744/*
745 * D V P R E S E T S E N U M E R A T I O N
746 */
747struct <link linkend="v4l2-dv-enum-preset">v4l2_dv_enum_preset</link> {
748 __u32 index;
749 __u32 preset;
750 __u8 name[32]; /* Name of the preset timing */
751 __u32 width;
752 __u32 height;
753 __u32 reserved[4];
754};
755
756/*
757 * D V P R E S E T V A L U E S
758 */
759#define V4L2_DV_INVALID 0
760#define V4L2_DV_480P59_94 1 /* BT.1362 */
761#define V4L2_DV_576P50 2 /* BT.1362 */
762#define V4L2_DV_720P24 3 /* SMPTE 296M */
763#define V4L2_DV_720P25 4 /* SMPTE 296M */
764#define V4L2_DV_720P30 5 /* SMPTE 296M */
765#define V4L2_DV_720P50 6 /* SMPTE 296M */
766#define V4L2_DV_720P59_94 7 /* SMPTE 274M */
767#define V4L2_DV_720P60 8 /* SMPTE 274M/296M */
768#define V4L2_DV_1080I29_97 9 /* BT.1120/ SMPTE 274M */
769#define V4L2_DV_1080I30 10 /* BT.1120/ SMPTE 274M */
770#define V4L2_DV_1080I25 11 /* BT.1120 */
771#define V4L2_DV_1080I50 12 /* SMPTE 296M */
772#define V4L2_DV_1080I60 13 /* SMPTE 296M */
773#define V4L2_DV_1080P24 14 /* SMPTE 296M */
774#define V4L2_DV_1080P25 15 /* SMPTE 296M */
775#define V4L2_DV_1080P30 16 /* SMPTE 296M */
776#define V4L2_DV_1080P50 17 /* BT.1120 */
777#define V4L2_DV_1080P60 18 /* BT.1120 */
778
779/*
780 * D V B T T I M I N G S
781 */
782
783/* BT.656/BT.1120 timing data */
784struct <link linkend="v4l2-bt-timings">v4l2_bt_timings</link> {
785 __u32 width; /* width in pixels */
786 __u32 height; /* height in lines */
787 __u32 interlaced; /* Interlaced or progressive */
788 __u32 polarities; /* Positive or negative polarity */
789 __u64 pixelclock; /* Pixel clock in HZ. Ex. 74.25MHz-&gt;74250000 */
790 __u32 hfrontporch; /* Horizpontal front porch in pixels */
791 __u32 hsync; /* Horizontal Sync length in pixels */
792 __u32 hbackporch; /* Horizontal back porch in pixels */
793 __u32 vfrontporch; /* Vertical front porch in pixels */
794 __u32 vsync; /* Vertical Sync length in lines */
795 __u32 vbackporch; /* Vertical back porch in lines */
796 __u32 il_vfrontporch; /* Vertical front porch for bottom field of
797 * interlaced field formats
798 */
799 __u32 il_vsync; /* Vertical sync length for bottom field of
800 * interlaced field formats
801 */
802 __u32 il_vbackporch; /* Vertical back porch for bottom field of
803 * interlaced field formats
804 */
805 __u32 reserved[16];
806} __attribute__ ((packed));
807
808/* Interlaced or progressive format */
809#define V4L2_DV_PROGRESSIVE 0
810#define V4L2_DV_INTERLACED 1
811
812/* Polarities. If bit is not set, it is assumed to be negative polarity */
813#define V4L2_DV_VSYNC_POS_POL 0x00000001
814#define V4L2_DV_HSYNC_POS_POL 0x00000002
815
816
817/* DV timings */
818struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link> {
819 __u32 type;
820 union {
821 struct <link linkend="v4l2-bt-timings">v4l2_bt_timings</link> bt;
822 __u32 reserved[32];
823 };
824} __attribute__ ((packed));
825
826/* Values for the type field */
827#define V4L2_DV_BT_656_1120 0 /* BT.656/1120 timing type */
828
829/*
737 * V I D E O I N P U T S 830 * V I D E O I N P U T S
738 */ 831 */
739struct <link linkend="v4l2-input">v4l2_input</link> { 832struct <link linkend="v4l2-input">v4l2_input</link> {
@@ -744,7 +837,8 @@ struct <link linkend="v4l2-input">v4l2_input</link> {
744 __u32 tuner; /* Associated tuner */ 837 __u32 tuner; /* Associated tuner */
745 v4l2_std_id std; 838 v4l2_std_id std;
746 __u32 status; 839 __u32 status;
747 __u32 reserved[4]; 840 __u32 capabilities;
841 __u32 reserved[3];
748}; 842};
749 843
750/* Values for the 'type' field */ 844/* Values for the 'type' field */
@@ -775,6 +869,11 @@ struct <link linkend="v4l2-input">v4l2_input</link> {
775#define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ 869#define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */
776#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ 870#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */
777 871
872/* capabilities flags */
873#define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
874#define V4L2_IN_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
875#define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */
876
778/* 877/*
779 * V I D E O O U T P U T S 878 * V I D E O O U T P U T S
780 */ 879 */
@@ -785,13 +884,19 @@ struct <link linkend="v4l2-output">v4l2_output</link> {
785 __u32 audioset; /* Associated audios (bitfield) */ 884 __u32 audioset; /* Associated audios (bitfield) */
786 __u32 modulator; /* Associated modulator */ 885 __u32 modulator; /* Associated modulator */
787 v4l2_std_id std; 886 v4l2_std_id std;
788 __u32 reserved[4]; 887 __u32 capabilities;
888 __u32 reserved[3];
789}; 889};
790/* Values for the 'type' field */ 890/* Values for the 'type' field */
791#define V4L2_OUTPUT_TYPE_MODULATOR 1 891#define V4L2_OUTPUT_TYPE_MODULATOR 1
792#define V4L2_OUTPUT_TYPE_ANALOG 2 892#define V4L2_OUTPUT_TYPE_ANALOG 2
793#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 893#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3
794 894
895/* capabilities flags */
896#define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
897#define V4L2_OUT_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
898#define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */
899
795/* 900/*
796 * C O N T R O L S 901 * C O N T R O L S
797 */ 902 */
@@ -1626,6 +1731,13 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> {
1626#endif 1731#endif
1627 1732
1628#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct <link linkend="v4l2-hw-freq-seek">v4l2_hw_freq_seek</link>) 1733#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct <link linkend="v4l2-hw-freq-seek">v4l2_hw_freq_seek</link>)
1734#define VIDIOC_ENUM_DV_PRESETS _IOWR('V', 83, struct <link linkend="v4l2-dv-enum-preset">v4l2_dv_enum_preset</link>)
1735#define VIDIOC_S_DV_PRESET _IOWR('V', 84, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>)
1736#define VIDIOC_G_DV_PRESET _IOWR('V', 85, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>)
1737#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>)
1738#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>)
1739#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>)
1740
1629/* Reminder: when adding new ioctls please add support for them to 1741/* Reminder: when adding new ioctls please add support for them to
1630 drivers/media/video/v4l2-compat-ioctl32.c as well! */ 1742 drivers/media/video/v4l2-compat-ioctl32.c as well! */
1631 1743
diff --git a/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml b/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml
new file mode 100644
index 000000000000..1d31427edd1b
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml
@@ -0,0 +1,238 @@
1<refentry id="vidioc-enum-dv-presets">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_ENUM_DV_PRESETS</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_ENUM_DV_PRESETS</refname>
9 <refpurpose>Enumerate supported Digital Video presets</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct v4l2_dv_enum_preset *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>&fd;</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>request</parameter></term>
35 <listitem>
36 <para>VIDIOC_ENUM_DV_PRESETS</para>
37 </listitem>
38 </varlistentry>
39 <varlistentry>
40 <term><parameter>argp</parameter></term>
41 <listitem>
42 <para></para>
43 </listitem>
44 </varlistentry>
45 </variablelist>
46 </refsect1>
47
48 <refsect1>
49 <title>Description</title>
50
51 <para>To query the attributes of a DV preset, applications initialize the
52<structfield>index</structfield> field and zero the reserved array of &v4l2-dv-enum-preset;
53and call the <constant>VIDIOC_ENUM_DV_PRESETS</constant> ioctl with a pointer to this
54structure. Drivers fill the rest of the structure or return an
55&EINVAL; when the index is out of bounds. To enumerate all DV Presets supported,
56applications shall begin at index zero, incrementing by one until the
57driver returns <errorcode>EINVAL</errorcode>. Drivers may enumerate a
58different set of DV presets after switching the video input or
59output.</para>
60
61 <table pgwide="1" frame="none" id="v4l2-dv-enum-preset">
62 <title>struct <structname>v4l2_dv_enum_presets</structname></title>
63 <tgroup cols="3">
64 &cs-str;
65 <tbody valign="top">
66 <row>
67 <entry>__u32</entry>
68 <entry><structfield>index</structfield></entry>
69 <entry>Number of the DV preset, set by the
70application.</entry>
71 </row>
72 <row>
73 <entry>__u32</entry>
74 <entry><structfield>preset</structfield></entry>
75 <entry>This field identifies one of the DV preset values listed in <xref linkend="v4l2-dv-presets-vals"/>.</entry>
76 </row>
77 <row>
78 <entry>__u8</entry>
79 <entry><structfield>name</structfield>[24]</entry>
80 <entry>Name of the preset, a NUL-terminated ASCII string, for example: "720P-60", "1080I-60". This information is
81intended for the user.</entry>
82 </row>
83 <row>
84 <entry>__u32</entry>
85 <entry><structfield>width</structfield></entry>
86 <entry>Width of the active video in pixels for the DV preset.</entry>
87 </row>
88 <row>
89 <entry>__u32</entry>
90 <entry><structfield>height</structfield></entry>
91 <entry>Height of the active video in lines for the DV preset.</entry>
92 </row>
93 <row>
94 <entry>__u32</entry>
95 <entry><structfield>reserved</structfield>[4]</entry>
96 <entry>Reserved for future extensions. Drivers must set the array to zero.</entry>
97 </row>
98 </tbody>
99 </tgroup>
100 </table>
101
102 <table pgwide="1" frame="none" id="v4l2-dv-presets-vals">
103 <title>struct <structname>DV Presets</structname></title>
104 <tgroup cols="3">
105 &cs-str;
106 <tbody valign="top">
107 <row>
108 <entry>Preset</entry>
109 <entry>Preset value</entry>
110 <entry>Description</entry>
111 </row>
112 <row>
113 <entry></entry>
114 <entry></entry>
115 <entry></entry>
116 </row>
117 <row>
118 <entry>V4L2_DV_INVALID</entry>
119 <entry>0</entry>
120 <entry>Invalid preset value.</entry>
121 </row>
122 <row>
123 <entry>V4L2_DV_480P59_94</entry>
124 <entry>1</entry>
125 <entry>720x480 progressive video at 59.94 fps as per BT.1362.</entry>
126 </row>
127 <row>
128 <entry>V4L2_DV_576P50</entry>
129 <entry>2</entry>
130 <entry>720x576 progressive video at 50 fps as per BT.1362.</entry>
131 </row>
132 <row>
133 <entry>V4L2_DV_720P24</entry>
134 <entry>3</entry>
135 <entry>1280x720 progressive video at 24 fps as per SMPTE 296M.</entry>
136 </row>
137 <row>
138 <entry>V4L2_DV_720P25</entry>
139 <entry>4</entry>
140 <entry>1280x720 progressive video at 25 fps as per SMPTE 296M.</entry>
141 </row>
142 <row>
143 <entry>V4L2_DV_720P30</entry>
144 <entry>5</entry>
145 <entry>1280x720 progressive video at 30 fps as per SMPTE 296M.</entry>
146 </row>
147 <row>
148 <entry>V4L2_DV_720P50</entry>
149 <entry>6</entry>
150 <entry>1280x720 progressive video at 50 fps as per SMPTE 296M.</entry>
151 </row>
152 <row>
153 <entry>V4L2_DV_720P59_94</entry>
154 <entry>7</entry>
155 <entry>1280x720 progressive video at 59.94 fps as per SMPTE 274M.</entry>
156 </row>
157 <row>
158 <entry>V4L2_DV_720P60</entry>
159 <entry>8</entry>
160 <entry>1280x720 progressive video at 60 fps as per SMPTE 274M/296M.</entry>
161 </row>
162 <row>
163 <entry>V4L2_DV_1080I29_97</entry>
164 <entry>9</entry>
165 <entry>1920x1080 interlaced video at 29.97 fps as per BT.1120/SMPTE 274M.</entry>
166 </row>
167 <row>
168 <entry>V4L2_DV_1080I30</entry>
169 <entry>10</entry>
170 <entry>1920x1080 interlaced video at 30 fps as per BT.1120/SMPTE 274M.</entry>
171 </row>
172 <row>
173 <entry>V4L2_DV_1080I25</entry>
174 <entry>11</entry>
175 <entry>1920x1080 interlaced video at 25 fps as per BT.1120.</entry>
176 </row>
177 <row>
178 <entry>V4L2_DV_1080I50</entry>
179 <entry>12</entry>
180 <entry>1920x1080 interlaced video at 50 fps as per SMPTE 296M.</entry>
181 </row>
182 <row>
183 <entry>V4L2_DV_1080I60</entry>
184 <entry>13</entry>
185 <entry>1920x1080 interlaced video at 60 fps as per SMPTE 296M.</entry>
186 </row>
187 <row>
188 <entry>V4L2_DV_1080P24</entry>
189 <entry>14</entry>
190 <entry>1920x1080 progressive video at 24 fps as per SMPTE 296M.</entry>
191 </row>
192 <row>
193 <entry>V4L2_DV_1080P25</entry>
194 <entry>15</entry>
195 <entry>1920x1080 progressive video at 25 fps as per SMPTE 296M.</entry>
196 </row>
197 <row>
198 <entry>V4L2_DV_1080P30</entry>
199 <entry>16</entry>
200 <entry>1920x1080 progressive video at 30 fps as per SMPTE 296M.</entry>
201 </row>
202 <row>
203 <entry>V4L2_DV_1080P50</entry>
204 <entry>17</entry>
205 <entry>1920x1080 progressive video at 50 fps as per BT.1120.</entry>
206 </row>
207 <row>
208 <entry>V4L2_DV_1080P60</entry>
209 <entry>18</entry>
210 <entry>1920x1080 progressive video at 60 fps as per BT.1120.</entry>
211 </row>
212 </tbody>
213 </tgroup>
214 </table>
215 </refsect1>
216
217 <refsect1>
218 &return-value;
219
220 <variablelist>
221 <varlistentry>
222 <term><errorcode>EINVAL</errorcode></term>
223 <listitem>
224 <para>The &v4l2-dv-enum-preset; <structfield>index</structfield>
225is out of bounds.</para>
226 </listitem>
227 </varlistentry>
228 </variablelist>
229 </refsect1>
230</refentry>
231
232<!--
233Local Variables:
234mode: sgml
235sgml-parent-document: "v4l2.sgml"
236indent-tabs-mode: nil
237End:
238-->
diff --git a/Documentation/DocBook/v4l/vidioc-enuminput.xml b/Documentation/DocBook/v4l/vidioc-enuminput.xml
index 414856b82473..71b868e2fb8f 100644
--- a/Documentation/DocBook/v4l/vidioc-enuminput.xml
+++ b/Documentation/DocBook/v4l/vidioc-enuminput.xml
@@ -124,7 +124,13 @@ current input.</entry>
124 </row> 124 </row>
125 <row> 125 <row>
126 <entry>__u32</entry> 126 <entry>__u32</entry>
127 <entry><structfield>reserved</structfield>[4]</entry> 127 <entry><structfield>capabilities</structfield></entry>
128 <entry>This field provides capabilities for the
129input. See <xref linkend="input-capabilities" /> for flags.</entry>
130 </row>
131 <row>
132 <entry>__u32</entry>
133 <entry><structfield>reserved</structfield>[3]</entry>
128 <entry>Reserved for future extensions. Drivers must set 134 <entry>Reserved for future extensions. Drivers must set
129the array to zero.</entry> 135the array to zero.</entry>
130 </row> 136 </row>
@@ -261,6 +267,34 @@ flag is set Macrovision has been detected.</entry>
261 </tbody> 267 </tbody>
262 </tgroup> 268 </tgroup>
263 </table> 269 </table>
270
271 <!-- Capability flags based on video timings RFC by Muralidharan
272Karicheri, titled RFC (v1.2): V4L - Support for video timings at the
273input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
274 -->
275 <table frame="none" pgwide="1" id="input-capabilities">
276 <title>Input capabilities</title>
277 <tgroup cols="3">
278 &cs-def;
279 <tbody valign="top">
280 <row>
281 <entry><constant>V4L2_IN_CAP_PRESETS</constant></entry>
282 <entry>0x00000001</entry>
283 <entry>This input supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry>
284 </row>
285 <row>
286 <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry>
287 <entry>0x00000002</entry>
288 <entry>This input supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry>
289 </row>
290 <row>
291 <entry><constant>V4L2_IN_CAP_STD</constant></entry>
292 <entry>0x00000004</entry>
293 <entry>This input supports setting the TV standard by using VIDIOC_S_STD.</entry>
294 </row>
295 </tbody>
296 </tgroup>
297 </table>
264 </refsect1> 298 </refsect1>
265 299
266 <refsect1> 300 <refsect1>
diff --git a/Documentation/DocBook/v4l/vidioc-enumoutput.xml b/Documentation/DocBook/v4l/vidioc-enumoutput.xml
index e8d16dcd50cf..a281d26a195f 100644
--- a/Documentation/DocBook/v4l/vidioc-enumoutput.xml
+++ b/Documentation/DocBook/v4l/vidioc-enumoutput.xml
@@ -114,7 +114,13 @@ details on video standards and how to switch see <xref
114 </row> 114 </row>
115 <row> 115 <row>
116 <entry>__u32</entry> 116 <entry>__u32</entry>
117 <entry><structfield>reserved</structfield>[4]</entry> 117 <entry><structfield>capabilities</structfield></entry>
118 <entry>This field provides capabilities for the
119output. See <xref linkend="output-capabilities" /> for flags.</entry>
120 </row>
121 <row>
122 <entry>__u32</entry>
123 <entry><structfield>reserved</structfield>[3]</entry>
118 <entry>Reserved for future extensions. Drivers must set 124 <entry>Reserved for future extensions. Drivers must set
119the array to zero.</entry> 125the array to zero.</entry>
120 </row> 126 </row>
@@ -147,6 +153,34 @@ CVBS, S-Video, RGB.</entry>
147 </tgroup> 153 </tgroup>
148 </table> 154 </table>
149 155
156 <!-- Capabilities flags based on video timings RFC by Muralidharan
157Karicheri, titled RFC (v1.2): V4L - Support for video timings at the
158input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
159 -->
160 <table frame="none" pgwide="1" id="output-capabilities">
161 <title>Output capabilities</title>
162 <tgroup cols="3">
163 &cs-def;
164 <tbody valign="top">
165 <row>
166 <entry><constant>V4L2_OUT_CAP_PRESETS</constant></entry>
167 <entry>0x00000001</entry>
168 <entry>This output supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry>
169 </row>
170 <row>
171 <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry>
172 <entry>0x00000002</entry>
173 <entry>This output supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry>
174 </row>
175 <row>
176 <entry><constant>V4L2_OUT_CAP_STD</constant></entry>
177 <entry>0x00000004</entry>
178 <entry>This output supports setting the TV standard by using VIDIOC_S_STD.</entry>
179 </row>
180 </tbody>
181 </tgroup>
182 </table>
183
150 </refsect1> 184 </refsect1>
151 <refsect1> 185 <refsect1>
152 &return-value; 186 &return-value;
diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml
new file mode 100644
index 000000000000..3c6784e132f3
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml
@@ -0,0 +1,111 @@
1<refentry id="vidioc-g-dv-preset">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_G_DV_PRESET</refname>
9 <refname>VIDIOC_S_DV_PRESET</refname>
10 <refpurpose>Query or select the DV preset of the current input or output</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>&v4l2-dv-preset;
20*<parameter>argp</parameter></paramdef>
21 </funcprototype>
22 </funcsynopsis>
23 </refsynopsisdiv>
24
25 <refsect1>
26 <title>Arguments</title>
27
28 <variablelist>
29 <varlistentry>
30 <term><parameter>fd</parameter></term>
31 <listitem>
32 <para>&fd;</para>
33 </listitem>
34 </varlistentry>
35 <varlistentry>
36 <term><parameter>request</parameter></term>
37 <listitem>
38 <para>VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET</para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>argp</parameter></term>
43 <listitem>
44 <para></para>
45 </listitem>
46 </varlistentry>
47 </variablelist>
48 </refsect1>
49
50 <refsect1>
51 <title>Description</title>
52 <para>To query and select the current DV preset, applications
53use the <constant>VIDIOC_G_DV_PRESET</constant> and <constant>VIDIOC_S_DV_PRESET</constant>
54ioctls which take a pointer to a &v4l2-dv-preset; type as argument.
55Applications must zero the reserved array in &v4l2-dv-preset;.
56<constant>VIDIOC_G_DV_PRESET</constant> returns a dv preset in the field
57<structfield>preset</structfield> of &v4l2-dv-preset;.</para>
58
59 <para><constant>VIDIOC_S_DV_PRESET</constant> accepts a pointer to a &v4l2-dv-preset;
60that has the preset value to be set. Applications must zero the reserved array in &v4l2-dv-preset;.
61If the preset is not supported, it returns an &EINVAL; </para>
62 </refsect1>
63
64 <refsect1>
65 &return-value;
66
67 <variablelist>
68 <varlistentry>
69 <term><errorcode>EINVAL</errorcode></term>
70 <listitem>
71 <para>This ioctl is not supported, or the
72<constant>VIDIOC_S_DV_PRESET</constant>,<constant>VIDIOC_S_DV_PRESET</constant> parameter was unsuitable.</para>
73 </listitem>
74 </varlistentry>
75 <varlistentry>
76 <term><errorcode>EBUSY</errorcode></term>
77 <listitem>
78 <para>The device is busy and therefore can not change the preset.</para>
79 </listitem>
80 </varlistentry>
81 </variablelist>
82
83 <table pgwide="1" frame="none" id="v4l2-dv-preset">
84 <title>struct <structname>v4l2_dv_preset</structname></title>
85 <tgroup cols="3">
86 &cs-str;
87 <tbody valign="top">
88 <row>
89 <entry>__u32</entry>
90 <entry><structfield>preset</structfield></entry>
91 <entry>Preset value to represent the digital video timings</entry>
92 </row>
93 <row>
94 <entry>__u32</entry>
95 <entry><structfield>reserved[4]</structfield></entry>
96 <entry>Reserved fields for future use</entry>
97 </row>
98 </tbody>
99 </tgroup>
100 </table>
101
102 </refsect1>
103</refentry>
104
105<!--
106Local Variables:
107mode: sgml
108sgml-parent-document: "v4l2.sgml"
109indent-tabs-mode: nil
110End:
111-->
diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml
new file mode 100644
index 000000000000..ecc19576bb8f
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml
@@ -0,0 +1,224 @@
1<refentry id="vidioc-g-dv-timings">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_G_DV_TIMINGS</refname>
9 <refname>VIDIOC_S_DV_TIMINGS</refname>
10 <refpurpose>Get or set custom DV timings for input or output</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>&v4l2-dv-timings;
20*<parameter>argp</parameter></paramdef>
21 </funcprototype>
22 </funcsynopsis>
23 </refsynopsisdiv>
24
25 <refsect1>
26 <title>Arguments</title>
27
28 <variablelist>
29 <varlistentry>
30 <term><parameter>fd</parameter></term>
31 <listitem>
32 <para>&fd;</para>
33 </listitem>
34 </varlistentry>
35 <varlistentry>
36 <term><parameter>request</parameter></term>
37 <listitem>
38 <para>VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS</para>
39 </listitem>
40 </varlistentry>
41 <varlistentry>
42 <term><parameter>argp</parameter></term>
43 <listitem>
44 <para></para>
45 </listitem>
46 </varlistentry>
47 </variablelist>
48 </refsect1>
49
50 <refsect1>
51 <title>Description</title>
52 <para>To set custom DV timings for the input or output, applications use the
53<constant>VIDIOC_S_DV_TIMINGS</constant> ioctl and to get the current custom timings,
54applications use the <constant>VIDIOC_G_DV_TIMINGS</constant> ioctl. The detailed timing
55information is filled in using the structure &v4l2-dv-timings;. These ioctls take
56a pointer to the &v4l2-dv-timings; structure as argument. If the ioctl is not supported
57or the timing values are not correct, the driver returns &EINVAL;.</para>
58 </refsect1>
59
60 <refsect1>
61 &return-value;
62
63 <variablelist>
64 <varlistentry>
65 <term><errorcode>EINVAL</errorcode></term>
66 <listitem>
67 <para>This ioctl is not supported, or the
68<constant>VIDIOC_S_DV_TIMINGS</constant> parameter was unsuitable.</para>
69 </listitem>
70 </varlistentry>
71 <varlistentry>
72 <term><errorcode>EBUSY</errorcode></term>
73 <listitem>
74 <para>The device is busy and therefore can not change the timings.</para>
75 </listitem>
76 </varlistentry>
77 </variablelist>
78
79 <table pgwide="1" frame="none" id="v4l2-bt-timings">
80 <title>struct <structname>v4l2_bt_timings</structname></title>
81 <tgroup cols="3">
82 &cs-str;
83 <tbody valign="top">
84 <row>
85 <entry>__u32</entry>
86 <entry><structfield>width</structfield></entry>
87 <entry>Width of the active video in pixels</entry>
88 </row>
89 <row>
90 <entry>__u32</entry>
91 <entry><structfield>height</structfield></entry>
92 <entry>Height of the active video in lines</entry>
93 </row>
94 <row>
95 <entry>__u32</entry>
96 <entry><structfield>interlaced</structfield></entry>
97 <entry>Progressive (0) or interlaced (1)</entry>
98 </row>
99 <row>
100 <entry>__u32</entry>
101 <entry><structfield>polarities</structfield></entry>
102 <entry>This is a bit mask that defines polarities of sync signals.
103bit 0 (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit 1 (V4L2_DV_HSYNC_POS_POL) is for horizontal sync polarity. If the bit is set
104(1) it is positive polarity and if is cleared (0), it is negative polarity.</entry>
105 </row>
106 <row>
107 <entry>__u64</entry>
108 <entry><structfield>pixelclock</structfield></entry>
109 <entry>Pixel clock in Hz. Ex. 74.25MHz->74250000</entry>
110 </row>
111 <row>
112 <entry>__u32</entry>
113 <entry><structfield>hfrontporch</structfield></entry>
114 <entry>Horizontal front porch in pixels</entry>
115 </row>
116 <row>
117 <entry>__u32</entry>
118 <entry><structfield>hsync</structfield></entry>
119 <entry>Horizontal sync length in pixels</entry>
120 </row>
121 <row>
122 <entry>__u32</entry>
123 <entry><structfield>hbackporch</structfield></entry>
124 <entry>Horizontal back porch in pixels</entry>
125 </row>
126 <row>
127 <entry>__u32</entry>
128 <entry><structfield>vfrontporch</structfield></entry>
129 <entry>Vertical front porch in lines</entry>
130 </row>
131 <row>
132 <entry>__u32</entry>
133 <entry><structfield>vsync</structfield></entry>
134 <entry>Vertical sync length in lines</entry>
135 </row>
136 <row>
137 <entry>__u32</entry>
138 <entry><structfield>vbackporch</structfield></entry>
139 <entry>Vertical back porch in lines</entry>
140 </row>
141 <row>
142 <entry>__u32</entry>
143 <entry><structfield>il_vfrontporch</structfield></entry>
144 <entry>Vertical front porch in lines for bottom field of interlaced field formats</entry>
145 </row>
146 <row>
147 <entry>__u32</entry>
148 <entry><structfield>il_vsync</structfield></entry>
149 <entry>Vertical sync length in lines for bottom field of interlaced field formats</entry>
150 </row>
151 <row>
152 <entry>__u32</entry>
153 <entry><structfield>il_vbackporch</structfield></entry>
154 <entry>Vertical back porch in lines for bottom field of interlaced field formats</entry>
155 </row>
156 </tbody>
157 </tgroup>
158 </table>
159
160 <table pgwide="1" frame="none" id="v4l2-dv-timings">
161 <title>struct <structname>v4l2_dv_timings</structname></title>
162 <tgroup cols="4">
163 &cs-str;
164 <tbody valign="top">
165 <row>
166 <entry>__u32</entry>
167 <entry><structfield>type</structfield></entry>
168 <entry></entry>
169 <entry>Type of DV timings as listed in <xref linkend="dv-timing-types"/>.</entry>
170 </row>
171 <row>
172 <entry>union</entry>
173 <entry><structfield></structfield></entry>
174 <entry></entry>
175 </row>
176 <row>
177 <entry></entry>
178 <entry>&v4l2-bt-timings;</entry>
179 <entry><structfield>bt</structfield></entry>
180 <entry>Timings defined by BT.656/1120 specifications</entry>
181 </row>
182 <row>
183 <entry></entry>
184 <entry>__u32</entry>
185 <entry><structfield>reserved</structfield>[32]</entry>
186 <entry></entry>
187 </row>
188 </tbody>
189 </tgroup>
190 </table>
191
192 <table pgwide="1" frame="none" id="dv-timing-types">
193 <title>DV Timing types</title>
194 <tgroup cols="3">
195 &cs-str;
196 <tbody valign="top">
197 <row>
198 <entry>Timing type</entry>
199 <entry>value</entry>
200 <entry>Description</entry>
201 </row>
202 <row>
203 <entry></entry>
204 <entry></entry>
205 <entry></entry>
206 </row>
207 <row>
208 <entry>V4L2_DV_BT_656_1120</entry>
209 <entry>0</entry>
210 <entry>BT.656/1120 timings</entry>
211 </row>
212 </tbody>
213 </tgroup>
214 </table>
215 </refsect1>
216</refentry>
217
218<!--
219Local Variables:
220mode: sgml
221sgml-parent-document: "v4l2.sgml"
222indent-tabs-mode: nil
223End:
224-->
diff --git a/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml
new file mode 100644
index 000000000000..87e4f0f6151c
--- /dev/null
+++ b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml
@@ -0,0 +1,85 @@
1<refentry id="vidioc-query-dv-preset">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_QUERY_DV_PRESET</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_QUERY_DV_PRESET</refname>
9 <refpurpose>Sense the DV preset received by the current
10input</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>&v4l2-dv-preset; *<parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>VIDIOC_QUERY_DV_PRESET</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para></para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <para>The hardware may be able to detect the current DV preset
53automatically, similar to sensing the video standard. To do so, applications
54call <constant> VIDIOC_QUERY_DV_PRESET</constant> with a pointer to a
55&v4l2-dv-preset; type. Once the hardware detects a preset, that preset is
56returned in the preset field of &v4l2-dv-preset;. When detection is not
57possible or fails, the value V4L2_DV_INVALID is returned.</para>
58 </refsect1>
59
60 <refsect1>
61 &return-value;
62 <variablelist>
63 <varlistentry>
64 <term><errorcode>EINVAL</errorcode></term>
65 <listitem>
66 <para>This ioctl is not supported.</para>
67 </listitem>
68 </varlistentry>
69 <varlistentry>
70 <term><errorcode>EBUSY</errorcode></term>
71 <listitem>
72 <para>The device is busy and therefore can not sense the preset</para>
73 </listitem>
74 </varlistentry>
75 </variablelist>
76 </refsect1>
77</refentry>
78
79<!--
80Local Variables:
81mode: sgml
82sgml-parent-document: "v4l2.sgml"
83indent-tabs-mode: nil
84End:
85-->