aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/media
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/DocBook/media')
-rw-r--r--Documentation/DocBook/media/v4l/biblio.xml20
-rw-r--r--Documentation/DocBook/media/v4l/compat.xml14
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml220
-rw-r--r--Documentation/DocBook/media/v4l/selection-api.xml8
-rw-r--r--Documentation/DocBook/media/v4l/v4l2.xml19
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml256
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml9
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml16
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-selection.xml106
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-querycap.xml36
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml6
11 files changed, 644 insertions, 66 deletions
diff --git a/Documentation/DocBook/media/v4l/biblio.xml b/Documentation/DocBook/media/v4l/biblio.xml
index cea6fd3ed428..7dc65c592a87 100644
--- a/Documentation/DocBook/media/v4l/biblio.xml
+++ b/Documentation/DocBook/media/v4l/biblio.xml
@@ -128,6 +128,26 @@ url="http://www.ijg.org">http://www.ijg.org</ulink>)</corpauthor>
128 <subtitle>Version 1.02</subtitle> 128 <subtitle>Version 1.02</subtitle>
129 </biblioentry> 129 </biblioentry>
130 130
131 <biblioentry id="itu-t81">
132 <abbrev>ITU-T.81</abbrev>
133 <authorgroup>
134 <corpauthor>International Telecommunication Union
135(<ulink url="http://www.itu.int">http://www.itu.int</ulink>)</corpauthor>
136 </authorgroup>
137 <title>ITU-T Recommendation T.81
138"Information Technology &mdash; Digital Compression and Coding of Continous-Tone
139Still Images &mdash; Requirements and Guidelines"</title>
140 </biblioentry>
141
142 <biblioentry id="w3c-jpeg-jfif">
143 <abbrev>W3C JPEG JFIF</abbrev>
144 <authorgroup>
145 <corpauthor>The World Wide Web Consortium (<ulink
146url="http://www.w3.org/Graphics/JPEG">http://www.w3.org</ulink>)</corpauthor>
147 </authorgroup>
148 <title>JPEG JFIF</title>
149 </biblioentry>
150
131 <biblioentry id="smpte12m"> 151 <biblioentry id="smpte12m">
132 <abbrev>SMPTE&nbsp;12M</abbrev> 152 <abbrev>SMPTE&nbsp;12M</abbrev>
133 <authorgroup> 153 <authorgroup>
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml
index a2485b3ff3d2..bce97c50391b 100644
--- a/Documentation/DocBook/media/v4l/compat.xml
+++ b/Documentation/DocBook/media/v4l/compat.xml
@@ -2393,6 +2393,20 @@ details.</para>
2393 to the <link linkend="control">User controls class</link>. 2393 to the <link linkend="control">User controls class</link>.
2394 </para> 2394 </para>
2395 </listitem> 2395 </listitem>
2396 <listitem>
2397 <para>Added the device_caps field to struct v4l2_capabilities and added the new
2398 V4L2_CAP_DEVICE_CAPS capability.</para>
2399 </listitem>
2400 </orderedlist>
2401 </section>
2402
2403 <section>
2404 <title>V4L2 in Linux 3.4</title>
2405 <orderedlist>
2406 <listitem>
2407 <para>Added <link linkend="jpeg-controls">JPEG compression control
2408 class</link>.</para>
2409 </listitem>
2396 </orderedlist> 2410 </orderedlist>
2397 </section> 2411 </section>
2398 2412
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index a1be37897ad7..b84f25e9cc87 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -1286,6 +1286,49 @@ produce a slight hiss, but in the encoder itself, guaranteeing a fixed
1286and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry> 1286and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry>
1287 </row> 1287 </row>
1288 <row><entry></entry></row> 1288 <row><entry></entry></row>
1289 <row id="v4l2-mpeg-audio-dec-playback">
1290 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK</constant>&nbsp;</entry>
1291 <entry>enum&nbsp;v4l2_mpeg_audio_dec_playback</entry>
1292 </row><row><entry spanname="descr">Determines how monolingual audio should be played back.
1293Possible values are:</entry>
1294 </row>
1295 <row>
1296 <entrytbl spanname="descr" cols="2">
1297 <tbody valign="top">
1298 <row>
1299 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO</constant>&nbsp;</entry>
1300 <entry>Automatically determines the best playback mode.</entry>
1301 </row>
1302 <row>
1303 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO</constant>&nbsp;</entry>
1304 <entry>Stereo playback.</entry>
1305 </row>
1306 <row>
1307 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT</constant>&nbsp;</entry>
1308 <entry>Left channel playback.</entry>
1309 </row>
1310 <row>
1311 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT</constant>&nbsp;</entry>
1312 <entry>Right channel playback.</entry>
1313 </row>
1314 <row>
1315 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO</constant>&nbsp;</entry>
1316 <entry>Mono playback.</entry>
1317 </row>
1318 <row>
1319 <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO</constant>&nbsp;</entry>
1320 <entry>Stereo playback with swapped left and right channels.</entry>
1321 </row>
1322 </tbody>
1323 </entrytbl>
1324 </row>
1325 <row><entry></entry></row>
1326 <row id="v4l2-mpeg-audio-dec-multilingual-playback">
1327 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK</constant>&nbsp;</entry>
1328 <entry>enum&nbsp;v4l2_mpeg_audio_dec_playback</entry>
1329 </row><row><entry spanname="descr">Determines how multilingual audio should be played back.</entry>
1330 </row>
1331 <row><entry></entry></row>
1289 <row id="v4l2-mpeg-video-encoding"> 1332 <row id="v4l2-mpeg-video-encoding">
1290 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant>&nbsp;</entry> 1333 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant>&nbsp;</entry>
1291 <entry>enum&nbsp;v4l2_mpeg_video_encoding</entry> 1334 <entry>enum&nbsp;v4l2_mpeg_video_encoding</entry>
@@ -1447,6 +1490,22 @@ of the video. The supplied 32-bit integer is interpreted as follows (bit
1447 </tbody> 1490 </tbody>
1448 </entrytbl> 1491 </entrytbl>
1449 </row> 1492 </row>
1493 <row><entry></entry></row>
1494 <row id="v4l2-mpeg-video-dec-pts">
1495 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DEC_PTS</constant>&nbsp;</entry>
1496 <entry>integer64</entry>
1497 </row><row><entry spanname="descr">This read-only control returns the
149833-bit video Presentation Time Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of
1499the currently displayed frame. This is the same PTS as is used in &VIDIOC-DECODER-CMD;.</entry>
1500 </row>
1501 <row><entry></entry></row>
1502 <row id="v4l2-mpeg-video-dec-frame">
1503 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DEC_FRAME</constant>&nbsp;</entry>
1504 <entry>integer64</entry>
1505 </row><row><entry spanname="descr">This read-only control returns the
1506frame counter of the frame that is currently displayed (decoded). This value is reset to 0 whenever
1507the decoder is started.</entry>
1508 </row>
1450 1509
1451 1510
1452 <row><entry></entry></row> 1511 <row><entry></entry></row>
@@ -3377,6 +3436,167 @@ interface and may change in the future.</para>
3377 </tbody> 3436 </tbody>
3378 </tgroup> 3437 </tgroup>
3379 </table> 3438 </table>
3439 </section>
3440
3441 <section id="jpeg-controls">
3442 <title>JPEG Control Reference</title>
3443 <para>The JPEG class includes controls for common features of JPEG
3444 encoders and decoders. Currently it includes features for codecs
3445 implementing progressive baseline DCT compression process with
3446 Huffman entrophy coding.</para>
3447 <table pgwide="1" frame="none" id="jpeg-control-id">
3448 <title>JPEG Control IDs</title>
3380 3449
3450 <tgroup cols="4">
3451 <colspec colname="c1" colwidth="1*" />
3452 <colspec colname="c2" colwidth="6*" />
3453 <colspec colname="c3" colwidth="2*" />
3454 <colspec colname="c4" colwidth="6*" />
3455 <spanspec namest="c1" nameend="c2" spanname="id" />
3456 <spanspec namest="c2" nameend="c4" spanname="descr" />
3457 <thead>
3458 <row>
3459 <entry spanname="id" align="left">ID</entry>
3460 <entry align="left">Type</entry>
3461 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
3462 </row>
3463 </thead>
3464 <tbody valign="top">
3465 <row><entry></entry></row>
3466 <row>
3467 <entry spanname="id"><constant>V4L2_CID_JPEG_CLASS</constant>&nbsp;</entry>
3468 <entry>class</entry>
3469 </row><row><entry spanname="descr">The JPEG class descriptor. Calling
3470 &VIDIOC-QUERYCTRL; for this control will return a description of this
3471 control class.
3472
3473 </entry>
3474 </row>
3475 <row>
3476 <entry spanname="id"><constant>V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant></entry>
3477 <entry>menu</entry>
3478 </row>
3479 <row id="jpeg-chroma-subsampling-control">
3480 <entry spanname="descr">The chroma subsampling factors describe how
3481 each component of an input image is sampled, in respect to maximum
3482 sample rate in each spatial dimension. See <xref linkend="itu-t81"/>,
3483 clause A.1.1. for more details. The <constant>
3484 V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant> control determines how
3485 Cb and Cr components are downsampled after coverting an input image
3486 from RGB to Y'CbCr color space.
3487 </entry>
3488 </row>
3489 <row>
3490 <entrytbl spanname="descr" cols="2">
3491 <tbody valign="top">
3492 <row>
3493 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_444</constant>
3494 </entry><entry>No chroma subsampling, each pixel has
3495 Y, Cr and Cb values.</entry>
3496 </row>
3497 <row>
3498 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_422</constant>
3499 </entry><entry>Horizontally subsample Cr, Cb components
3500 by a factor of 2.</entry>
3501 </row>
3502 <row>
3503 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_420</constant>
3504 </entry><entry>Subsample Cr, Cb components horizontally
3505 and vertically by 2.</entry>
3506 </row>
3507 <row>
3508 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_411</constant>
3509 </entry><entry>Horizontally subsample Cr, Cb components
3510 by a factor of 4.</entry>
3511 </row>
3512 <row>
3513 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_410</constant>
3514 </entry><entry>Subsample Cr, Cb components horizontally
3515 by 4 and vertically by 2.</entry>
3516 </row>
3517 <row>
3518 <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY</constant>
3519 </entry><entry>Use only luminance component.</entry>
3520 </row>
3521 </tbody>
3522 </entrytbl>
3523 </row>
3524 <row>
3525 <entry spanname="id"><constant>V4L2_CID_JPEG_RESTART_INTERVAL</constant>
3526 </entry><entry>integer</entry>
3527 </row>
3528 <row><entry spanname="descr">
3529 The restart interval determines an interval of inserting RSTm
3530 markers (m = 0..7). The purpose of these markers is to additionally
3531 reinitialize the encoder process, in order to process blocks of
3532 an image independently.
3533 For the lossy compression processes the restart interval unit is
3534 MCU (Minimum Coded Unit) and its value is contained in DRI
3535 (Define Restart Interval) marker. If <constant>
3536 V4L2_CID_JPEG_RESTART_INTERVAL</constant> control is set to 0,
3537 DRI and RSTm markers will not be inserted.
3538 </entry>
3539 </row>
3540 <row id="jpeg-quality-control">
3541 <entry spanname="id"><constant>V4L2_CID_JPEG_COMPRESION_QUALITY</constant></entry>
3542 <entry>integer</entry>
3543 </row>
3544 <row>
3545 <entry spanname="descr">
3546 <constant>V4L2_CID_JPEG_COMPRESION_QUALITY</constant> control
3547 determines trade-off between image quality and size.
3548 It provides simpler method for applications to control image quality,
3549 without a need for direct reconfiguration of luminance and chrominance
3550 quantization tables.
3551
3552 In cases where a driver uses quantization tables configured directly
3553 by an application, using interfaces defined elsewhere, <constant>
3554 V4L2_CID_JPEG_COMPRESION_QUALITY</constant> control should be set
3555 by driver to 0.
3556
3557 <para>The value range of this control is driver-specific. Only
3558 positive, non-zero values are meaningful. The recommended range
3559 is 1 - 100, where larger values correspond to better image quality.
3560 </para>
3561 </entry>
3562 </row>
3563 <row id="jpeg-active-marker-control">
3564 <entry spanname="id"><constant>V4L2_CID_JPEG_ACTIVE_MARKER</constant></entry>
3565 <entry>bitmask</entry>
3566 </row>
3567 <row>
3568 <entry spanname="descr">Specify which JPEG markers are included
3569 in compressed stream. This control is valid only for encoders.
3570 </entry>
3571 </row>
3572 <row>
3573 <entrytbl spanname="descr" cols="2">
3574 <tbody valign="top">
3575 <row>
3576 <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP0</constant></entry>
3577 <entry>Application data segment APP<subscript>0</subscript>.</entry>
3578 </row><row>
3579 <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP1</constant></entry>
3580 <entry>Application data segment APP<subscript>1</subscript>.</entry>
3581 </row><row>
3582 <entry><constant>V4L2_JPEG_ACTIVE_MARKER_COM</constant></entry>
3583 <entry>Comment segment.</entry>
3584 </row><row>
3585 <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DQT</constant></entry>
3586 <entry>Quantization tables segment.</entry>
3587 </row><row>
3588 <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DHT</constant></entry>
3589 <entry>Huffman tables segment.</entry>
3590 </row>
3591 </tbody>
3592 </entrytbl>
3593 </row>
3594 <row><entry></entry></row>
3595 </tbody>
3596 </tgroup>
3597 </table>
3598 <para>For more details about JPEG specification, refer
3599 to <xref linkend="itu-t81"/>, <xref linkend="jfif"/>,
3600 <xref linkend="w3c-jpeg-jfif"/>.</para>
3381 </section> 3601 </section>
3382</section> 3602</section>
diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml
index 2f0bdb4d5551..b299e4779354 100644
--- a/Documentation/DocBook/media/v4l/selection-api.xml
+++ b/Documentation/DocBook/media/v4l/selection-api.xml
@@ -52,6 +52,10 @@ cropping and composing rectangles have the same size.</para>
52 </textobject> 52 </textobject>
53 </mediaobject> 53 </mediaobject>
54 </figure> 54 </figure>
55
56For complete list of the available selection targets see table <xref
57linkend="v4l2-sel-target"/>
58
55 </section> 59 </section>
56 60
57 <section> 61 <section>
@@ -186,7 +190,7 @@ V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para>
186 190
187 <section> 191 <section>
188 192
189 <title>Scaling control.</title> 193 <title>Scaling control</title>
190 194
191<para>An application can detect if scaling is performed by comparing the width 195<para>An application can detect if scaling is performed by comparing the width
192and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP_ACTIVE 196and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP_ACTIVE
@@ -200,7 +204,7 @@ the scaling ratios using these values.</para>
200 204
201 <section> 205 <section>
202 206
203 <title>Comparison with old cropping API.</title> 207 <title>Comparison with old cropping API</title>
204 208
205<para>The selection API was introduced to cope with deficiencies of previous 209<para>The selection API was introduced to cope with deficiencies of previous
206<link linkend="crop"> API </link>, that was designed to control simple capture 210<link linkend="crop"> API </link>, that was designed to control simple capture
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index e97c512861bb..8ae38876172e 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -128,6 +128,22 @@ structs, ioctls) must be noted in more detail in the history chapter
128applications. --> 128applications. -->
129 129
130 <revision> 130 <revision>
131 <revnumber>3.4</revnumber>
132 <date>2012-01-25</date>
133 <authorinitials>sn</authorinitials>
134 <revremark>Added <link linkend="jpeg-controls">JPEG compression
135 control class.</link>
136 </revremark>
137 </revision>
138
139 <revision>
140 <revnumber>3.3</revnumber>
141 <date>2012-01-11</date>
142 <authorinitials>hv</authorinitials>
143 <revremark>Added device_caps field to struct v4l2_capabilities.</revremark>
144 </revision>
145
146 <revision>
131 <revnumber>3.2</revnumber> 147 <revnumber>3.2</revnumber>
132 <date>2011-08-26</date> 148 <date>2011-08-26</date>
133 <authorinitials>hv</authorinitials> 149 <authorinitials>hv</authorinitials>
@@ -417,7 +433,7 @@ and discussions on the V4L mailing list.</revremark>
417</partinfo> 433</partinfo>
418 434
419<title>Video for Linux Two API Specification</title> 435<title>Video for Linux Two API Specification</title>
420 <subtitle>Revision 3.2</subtitle> 436 <subtitle>Revision 3.3</subtitle>
421 437
422 <chapter id="common"> 438 <chapter id="common">
423 &sub-common; 439 &sub-common;
@@ -473,6 +489,7 @@ and discussions on the V4L mailing list.</revremark>
473 &sub-cropcap; 489 &sub-cropcap;
474 &sub-dbg-g-chip-ident; 490 &sub-dbg-g-chip-ident;
475 &sub-dbg-g-register; 491 &sub-dbg-g-register;
492 &sub-decoder-cmd;
476 &sub-dqevent; 493 &sub-dqevent;
477 &sub-encoder-cmd; 494 &sub-encoder-cmd;
478 &sub-enumaudio; 495 &sub-enumaudio;
diff --git a/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml b/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml
new file mode 100644
index 000000000000..74b87f6e480a
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml
@@ -0,0 +1,256 @@
1<refentry id="vidioc-decoder-cmd">
2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>VIDIOC_DECODER_CMD</refname>
9 <refname>VIDIOC_TRY_DECODER_CMD</refname>
10 <refpurpose>Execute an decoder command</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>struct v4l2_decoder_cmd *<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_DECODER_CMD, VIDIOC_TRY_DECODER_CMD</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 <note>
53 <title>Experimental</title>
54
55 <para>This is an <link linkend="experimental">experimental</link>
56interface and may change in the future.</para>
57 </note>
58
59 <para>These ioctls control an audio/video (usually MPEG-) decoder.
60<constant>VIDIOC_DECODER_CMD</constant> sends a command to the
61decoder, <constant>VIDIOC_TRY_DECODER_CMD</constant> can be used to
62try a command without actually executing it. To send a command applications
63must initialize all fields of a &v4l2-decoder-cmd; and call
64<constant>VIDIOC_DECODER_CMD</constant> or <constant>VIDIOC_TRY_DECODER_CMD</constant>
65with a pointer to this structure.</para>
66
67 <para>The <structfield>cmd</structfield> field must contain the
68command code. Some commands use the <structfield>flags</structfield> field for
69additional information.
70</para>
71
72 <para>A <function>write</function>() or &VIDIOC-STREAMON; call sends an implicit
73START command to the decoder if it has not been started yet.
74</para>
75
76 <para>A <function>close</function>() or &VIDIOC-STREAMOFF; call of a streaming
77file descriptor sends an implicit immediate STOP command to the decoder, and all
78buffered data is discarded.</para>
79
80 <para>These ioctls are optional, not all drivers may support
81them. They were introduced in Linux 3.3.</para>
82
83 <table pgwide="1" frame="none" id="v4l2-decoder-cmd">
84 <title>struct <structname>v4l2_decoder_cmd</structname></title>
85 <tgroup cols="5">
86 &cs-str;
87 <tbody valign="top">
88 <row>
89 <entry>__u32</entry>
90 <entry><structfield>cmd</structfield></entry>
91 <entry></entry>
92 <entry></entry>
93 <entry>The decoder command, see <xref linkend="decoder-cmds" />.</entry>
94 </row>
95 <row>
96 <entry>__u32</entry>
97 <entry><structfield>flags</structfield></entry>
98 <entry></entry>
99 <entry></entry>
100 <entry>Flags to go with the command. If no flags are defined for
101this command, drivers and applications must set this field to zero.</entry>
102 </row>
103 <row>
104 <entry>union</entry>
105 <entry>(anonymous)</entry>
106 <entry></entry>
107 <entry></entry>
108 <entry></entry>
109 </row>
110 <row>
111 <entry></entry>
112 <entry>struct</entry>
113 <entry><structfield>start</structfield></entry>
114 <entry></entry>
115 <entry>Structure containing additional data for the
116<constant>V4L2_DEC_CMD_START</constant> command.</entry>
117 </row>
118 <row>
119 <entry></entry>
120 <entry></entry>
121 <entry>__s32</entry>
122 <entry><structfield>speed</structfield></entry>
123 <entry>Playback speed and direction. The playback speed is defined as
124<structfield>speed</structfield>/1000 of the normal speed. So 1000 is normal playback.
125Negative numbers denote reverse playback, so -1000 does reverse playback at normal
126speed. Speeds -1, 0 and 1 have special meanings: speed 0 is shorthand for 1000
127(normal playback). A speed of 1 steps just one frame forward, a speed of -1 steps
128just one frame back.
129 </entry>
130 </row>
131 <row>
132 <entry></entry>
133 <entry></entry>
134 <entry>__u32</entry>
135 <entry><structfield>format</structfield></entry>
136 <entry>Format restrictions. This field is set by the driver, not the
137application. Possible values are <constant>V4L2_DEC_START_FMT_NONE</constant> if
138there are no format restrictions or <constant>V4L2_DEC_START_FMT_GOP</constant>
139if the decoder operates on full GOPs (<wordasword>Group Of Pictures</wordasword>).
140This is usually the case for reverse playback: the decoder needs full GOPs, which
141it can then play in reverse order. So to implement reverse playback the application
142must feed the decoder the last GOP in the video file, then the GOP before that, etc. etc.
143 </entry>
144 </row>
145 <row>
146 <entry></entry>
147 <entry>struct</entry>
148 <entry><structfield>stop</structfield></entry>
149 <entry></entry>
150 <entry>Structure containing additional data for the
151<constant>V4L2_DEC_CMD_STOP</constant> command.</entry>
152 </row>
153 <row>
154 <entry></entry>
155 <entry></entry>
156 <entry>__u64</entry>
157 <entry><structfield>pts</structfield></entry>
158 <entry>Stop playback at this <structfield>pts</structfield> or immediately
159if the playback is already past that timestamp. Leave to 0 if you want to stop after the
160last frame was decoded.
161 </entry>
162 </row>
163 <row>
164 <entry></entry>
165 <entry>struct</entry>
166 <entry><structfield>raw</structfield></entry>
167 <entry></entry>
168 <entry></entry>
169 </row>
170 <row>
171 <entry></entry>
172 <entry></entry>
173 <entry>__u32</entry>
174 <entry><structfield>data</structfield>[16]</entry>
175 <entry>Reserved for future extensions. Drivers and
176applications must set the array to zero.</entry>
177 </row>
178 </tbody>
179 </tgroup>
180 </table>
181
182 <table pgwide="1" frame="none" id="decoder-cmds">
183 <title>Decoder Commands</title>
184 <tgroup cols="3">
185 &cs-def;
186 <tbody valign="top">
187 <row>
188 <entry><constant>V4L2_DEC_CMD_START</constant></entry>
189 <entry>0</entry>
190 <entry>Start the decoder. When the decoder is already
191running or paused, this command will just change the playback speed.
192That means that calling <constant>V4L2_DEC_CMD_START</constant> when
193the decoder was paused will <emphasis>not</emphasis> resume the decoder.
194You have to explicitly call <constant>V4L2_DEC_CMD_RESUME</constant> for that.
195This command has one flag:
196<constant>V4L2_DEC_CMD_START_MUTE_AUDIO</constant>. If set, then audio will
197be muted when playing back at a non-standard speed.
198 </entry>
199 </row>
200 <row>
201 <entry><constant>V4L2_DEC_CMD_STOP</constant></entry>
202 <entry>1</entry>
203 <entry>Stop the decoder. When the decoder is already stopped,
204this command does nothing. This command has two flags:
205if <constant>V4L2_DEC_CMD_STOP_TO_BLACK</constant> is set, then the decoder will
206set the picture to black after it stopped decoding. Otherwise the last image will
207repeat. If <constant>V4L2_DEC_CMD_STOP_IMMEDIATELY</constant> is set, then the decoder
208stops immediately (ignoring the <structfield>pts</structfield> value), otherwise it
209will keep decoding until timestamp >= pts or until the last of the pending data from
210its internal buffers was decoded.
211</entry>
212 </row>
213 <row>
214 <entry><constant>V4L2_DEC_CMD_PAUSE</constant></entry>
215 <entry>2</entry>
216 <entry>Pause the decoder. When the decoder has not been
217started yet, the driver will return an &EPERM;. When the decoder is
218already paused, this command does nothing. This command has one flag:
219if <constant>V4L2_DEC_CMD_PAUSE_TO_BLACK</constant> is set, then set the
220decoder output to black when paused.
221</entry>
222 </row>
223 <row>
224 <entry><constant>V4L2_DEC_CMD_RESUME</constant></entry>
225 <entry>3</entry>
226 <entry>Resume decoding after a PAUSE command. When the
227decoder has not been started yet, the driver will return an &EPERM;.
228When the decoder is already running, this command does nothing. No
229flags are defined for this command.</entry>
230 </row>
231 </tbody>
232 </tgroup>
233 </table>
234
235 </refsect1>
236
237 <refsect1>
238 &return-value;
239
240 <variablelist>
241 <varlistentry>
242 <term><errorcode>EINVAL</errorcode></term>
243 <listitem>
244 <para>The <structfield>cmd</structfield> field is invalid.</para>
245 </listitem>
246 </varlistentry>
247 <varlistentry>
248 <term><errorcode>EPERM</errorcode></term>
249 <listitem>
250 <para>The application sent a PAUSE or RESUME command when
251the decoder was not running.</para>
252 </listitem>
253 </varlistentry>
254 </variablelist>
255 </refsect1>
256</refentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
index af7f3f2a36dd..f431b3ba79bd 100644
--- a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
@@ -74,15 +74,16 @@ only used by the STOP command and contains one bit: If the
74encoding will continue until the end of the current <wordasword>Group 74encoding will continue until the end of the current <wordasword>Group
75Of Pictures</wordasword>, otherwise it will stop immediately.</para> 75Of Pictures</wordasword>, otherwise it will stop immediately.</para>
76 76
77 <para>A <function>read</function>() call sends a START command to 77 <para>A <function>read</function>() or &VIDIOC-STREAMON; call sends an implicit
78the encoder if it has not been started yet. After a STOP command, 78START command to the encoder if it has not been started yet. After a STOP command,
79<function>read</function>() calls will read the remaining data 79<function>read</function>() calls will read the remaining data
80buffered by the driver. When the buffer is empty, 80buffered by the driver. When the buffer is empty,
81<function>read</function>() will return zero and the next 81<function>read</function>() will return zero and the next
82<function>read</function>() call will restart the encoder.</para> 82<function>read</function>() call will restart the encoder.</para>
83 83
84 <para>A <function>close</function>() call sends an immediate STOP 84 <para>A <function>close</function>() or &VIDIOC-STREAMOFF; call of a streaming
85to the encoder, and all buffered data is discarded.</para> 85file descriptor sends an implicit immediate STOP to the encoder, and all buffered
86data is discarded.</para>
86 87
87 <para>These ioctls are optional, not all drivers may support 88 <para>These ioctls are optional, not all drivers may support
88them. They were introduced in Linux 2.6.21.</para> 89them. They were introduced in Linux 2.6.21.</para>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml b/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml
index 01ea24b84385..48748499c097 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-jpegcomp.xml
@@ -57,6 +57,11 @@
57 <refsect1> 57 <refsect1>
58 <title>Description</title> 58 <title>Description</title>
59 59
60 <para>These ioctls are <emphasis role="bold">deprecated</emphasis>.
61 New drivers and applications should use <link linkend="jpeg-controls">
62 JPEG class controls</link> for image quality and JPEG markers control.
63 </para>
64
60 <para>[to do]</para> 65 <para>[to do]</para>
61 66
62 <para>Ronald Bultje elaborates:</para> 67 <para>Ronald Bultje elaborates:</para>
@@ -86,7 +91,10 @@ to add them.</para>
86 <row> 91 <row>
87 <entry>int</entry> 92 <entry>int</entry>
88 <entry><structfield>quality</structfield></entry> 93 <entry><structfield>quality</structfield></entry>
89 <entry></entry> 94 <entry>Deprecated. If <link linkend="jpeg-quality-control"><constant>
95 V4L2_CID_JPEG_IMAGE_QUALITY</constant></link> control is exposed by
96 a driver applications should use it instead and ignore this field.
97 </entry>
90 </row> 98 </row>
91 <row> 99 <row>
92 <entry>int</entry> 100 <entry>int</entry>
@@ -116,7 +124,11 @@ to add them.</para>
116 <row> 124 <row>
117 <entry>__u32</entry> 125 <entry>__u32</entry>
118 <entry><structfield>jpeg_markers</structfield></entry> 126 <entry><structfield>jpeg_markers</structfield></entry>
119 <entry>See <xref linkend="jpeg-markers" />.</entry> 127 <entry>See <xref linkend="jpeg-markers"/>. Deprecated.
128 If <link linkend="jpeg-active-marker-control"><constant>
129 V4L2_CID_JPEG_ACTIVE_MARKER</constant></link> control
130 is exposed by a driver applications should use it instead
131 and ignore this field.</entry>
120 </row> 132 </row>
121 </tbody> 133 </tbody>
122 </tgroup> 134 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
index a9d36e0c090e..bb04eff75f45 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
@@ -58,43 +58,43 @@
58 58
59 <para>The ioctls are used to query and configure selection rectangles.</para> 59 <para>The ioctls are used to query and configure selection rectangles.</para>
60 60
61<para> To query the cropping (composing) rectangle set <structfield> 61<para> To query the cropping (composing) rectangle set &v4l2-selection;
62&v4l2-selection;::type </structfield> to the respective buffer type. Do not 62<structfield> type </structfield> field to the respective buffer type.
63use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE 63Do not use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
64</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 64</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
65</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of 65</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
66<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is 66<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is
67setting <structfield> &v4l2-selection;::target </structfield> to value 67setting the value of &v4l2-selection; <structfield>target</structfield> field
68<constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant> 68to <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant>
69V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref 69V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref
70linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional 70linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
71targets. Fields <structfield> &v4l2-selection;::flags </structfield> and 71targets. The <structfield>flags</structfield> and <structfield>reserved
72<structfield> &v4l2-selection;::reserved </structfield> are ignored and they 72</structfield> fields of &v4l2-selection; are ignored and they must be filled
73must be filled with zeros. The driver fills the rest of the structure or 73with zeros. The driver fills the rest of the structure or
74returns &EINVAL; if incorrect buffer type or target was used. If cropping 74returns &EINVAL; if incorrect buffer type or target was used. If cropping
75(composing) is not supported then the active rectangle is not mutable and it is 75(composing) is not supported then the active rectangle is not mutable and it is
76always equal to the bounds rectangle. Finally, structure <structfield> 76always equal to the bounds rectangle. Finally, the &v4l2-rect;
77&v4l2-selection;::r </structfield> is filled with the current cropping 77<structfield>r</structfield> rectangle is filled with the current cropping
78(composing) coordinates. The coordinates are expressed in driver-dependent 78(composing) coordinates. The coordinates are expressed in driver-dependent
79units. The only exception are rectangles for images in raw formats, whose 79units. The only exception are rectangles for images in raw formats, whose
80coordinates are always expressed in pixels. </para> 80coordinates are always expressed in pixels. </para>
81 81
82<para> To change the cropping (composing) rectangle set <structfield> 82<para> To change the cropping (composing) rectangle set the &v4l2-selection;
83&v4l2-selection;::type </structfield> to the respective buffer type. Do not 83<structfield>type</structfield> field to the respective buffer type. Do not
84use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE 84use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
85</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 85</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
86</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of 86</constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
87<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is 87<constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is
88setting <structfield> &v4l2-selection;::target </structfield> to value 88setting the value of &v4l2-selection; <structfield>target</structfield> to
89<constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant> 89<constant>V4L2_SEL_TGT_CROP_ACTIVE</constant> (<constant>
90V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref 90V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref
91linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional 91linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional
92targets. Set desired active area into the field <structfield> 92targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be
93&v4l2-selection;::r </structfield>. Field <structfield> 93set to the desired active area. Field &v4l2-selection; <structfield> reserved
94&v4l2-selection;::reserved </structfield> is ignored and must be filled with 94</structfield> is ignored and must be filled with zeros. The driver may adjust
95zeros. The driver may adjust the rectangle coordinates. An application may 95coordinates of the requested rectangle. An application may
96introduce constraints to control rounding behaviour. Set the field 96introduce constraints to control rounding behaviour. The &v4l2-selection;
97<structfield> &v4l2-selection;::flags </structfield> to one of values: 97<structfield>flags</structfield> field must be set to one of the following:
98 98
99<itemizedlist> 99<itemizedlist>
100 <listitem> 100 <listitem>
@@ -129,7 +129,7 @@ and vertical offset and sizes are chosen according to following priority:
129 129
130<orderedlist> 130<orderedlist>
131 <listitem> 131 <listitem>
132 <para>Satisfy constraints from <structfield>&v4l2-selection;::flags</structfield>.</para> 132 <para>Satisfy constraints from &v4l2-selection; <structfield>flags</structfield>.</para>
133 </listitem> 133 </listitem>
134 <listitem> 134 <listitem>
135 <para>Adjust width, height, left, and top to hardware limits and alignments.</para> 135 <para>Adjust width, height, left, and top to hardware limits and alignments.</para>
@@ -145,7 +145,7 @@ and vertical offset and sizes are chosen according to following priority:
145 </listitem> 145 </listitem>
146</orderedlist> 146</orderedlist>
147 147
148On success the field <structfield> &v4l2-selection;::r </structfield> contains 148On success the &v4l2-rect; <structfield>r</structfield> field contains
149the adjusted rectangle. When the parameters are unsuitable the application may 149the adjusted rectangle. When the parameters are unsuitable the application may
150modify the cropping (composing) or image parameters and repeat the cycle until 150modify the cropping (composing) or image parameters and repeat the cycle until
151satisfactory parameters have been negotiated. If constraints flags have to be 151satisfactory parameters have been negotiated. If constraints flags have to be
@@ -162,38 +162,38 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
162 <tbody valign="top"> 162 <tbody valign="top">
163 <row> 163 <row>
164 <entry><constant>V4L2_SEL_TGT_CROP_ACTIVE</constant></entry> 164 <entry><constant>V4L2_SEL_TGT_CROP_ACTIVE</constant></entry>
165 <entry>0</entry> 165 <entry>0x0000</entry>
166 <entry>area that is currently cropped by hardware</entry> 166 <entry>The area that is currently cropped by hardware.</entry>
167 </row> 167 </row>
168 <row> 168 <row>
169 <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry> 169 <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry>
170 <entry>1</entry> 170 <entry>0x0001</entry>
171 <entry>suggested cropping rectangle that covers the "whole picture"</entry> 171 <entry>Suggested cropping rectangle that covers the "whole picture".</entry>
172 </row> 172 </row>
173 <row> 173 <row>
174 <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry> 174 <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry>
175 <entry>2</entry> 175 <entry>0x0002</entry>
176 <entry>limits for the cropping rectangle</entry> 176 <entry>Limits for the cropping rectangle.</entry>
177 </row> 177 </row>
178 <row> 178 <row>
179 <entry><constant>V4L2_SEL_TGT_COMPOSE_ACTIVE</constant></entry> 179 <entry><constant>V4L2_SEL_TGT_COMPOSE_ACTIVE</constant></entry>
180 <entry>256</entry> 180 <entry>0x0100</entry>
181 <entry>area to which data are composed by hardware</entry> 181 <entry>The area to which data is composed by hardware.</entry>
182 </row> 182 </row>
183 <row> 183 <row>
184 <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry> 184 <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry>
185 <entry>257</entry> 185 <entry>0x0101</entry>
186 <entry>suggested composing rectangle that covers the "whole picture"</entry> 186 <entry>Suggested composing rectangle that covers the "whole picture".</entry>
187 </row> 187 </row>
188 <row> 188 <row>
189 <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry> 189 <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry>
190 <entry>258</entry> 190 <entry>0x0102</entry>
191 <entry>limits for the composing rectangle</entry> 191 <entry>Limits for the composing rectangle.</entry>
192 </row> 192 </row>
193 <row> 193 <row>
194 <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry> 194 <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry>
195 <entry>259</entry> 195 <entry>0x0103</entry>
196 <entry>the active area and all padding pixels that are inserted or modified by the hardware</entry> 196 <entry>The active area and all padding pixels that are inserted or modified by hardware.</entry>
197 </row> 197 </row>
198 </tbody> 198 </tbody>
199 </tgroup> 199 </tgroup>
@@ -209,12 +209,14 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
209 <row> 209 <row>
210 <entry><constant>V4L2_SEL_FLAG_GE</constant></entry> 210 <entry><constant>V4L2_SEL_FLAG_GE</constant></entry>
211 <entry>0x00000001</entry> 211 <entry>0x00000001</entry>
212 <entry>indicate that adjusted rectangle must contain a rectangle from <structfield>&v4l2-selection;::r</structfield></entry> 212 <entry>Indicates that the adjusted rectangle must contain the original
213 &v4l2-selection; <structfield>r</structfield> rectangle.</entry>
213 </row> 214 </row>
214 <row> 215 <row>
215 <entry><constant>V4L2_SEL_FLAG_LE</constant></entry> 216 <entry><constant>V4L2_SEL_FLAG_LE</constant></entry>
216 <entry>0x00000002</entry> 217 <entry>0x00000002</entry>
217 <entry>indicate that adjusted rectangle must be inside a rectangle from <structfield>&v4l2-selection;::r</structfield></entry> 218 <entry>Indicates that the adjusted rectangle must be inside the original
219 &v4l2-rect; <structfield>r</structfield> rectangle.</entry>
218 </row> 220 </row>
219 </tbody> 221 </tbody>
220 </tgroup> 222 </tgroup>
@@ -245,27 +247,29 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
245 <row> 247 <row>
246 <entry>__u32</entry> 248 <entry>__u32</entry>
247 <entry><structfield>type</structfield></entry> 249 <entry><structfield>type</structfield></entry>
248 <entry>Type of the buffer (from &v4l2-buf-type;)</entry> 250 <entry>Type of the buffer (from &v4l2-buf-type;).</entry>
249 </row> 251 </row>
250 <row> 252 <row>
251 <entry>__u32</entry> 253 <entry>__u32</entry>
252 <entry><structfield>target</structfield></entry> 254 <entry><structfield>target</structfield></entry>
253 <entry>used to select between <link linkend="v4l2-sel-target"> cropping and composing rectangles </link></entry> 255 <entry>Used to select between <link linkend="v4l2-sel-target"> cropping
256 and composing rectangles</link>.</entry>
254 </row> 257 </row>
255 <row> 258 <row>
256 <entry>__u32</entry> 259 <entry>__u32</entry>
257 <entry><structfield>flags</structfield></entry> 260 <entry><structfield>flags</structfield></entry>
258 <entry>control over coordinates adjustments, refer to <link linkend="v4l2-sel-flags">selection flags</link></entry> 261 <entry>Flags controlling the selection rectangle adjustments, refer to
262 <link linkend="v4l2-sel-flags">selection flags</link>.</entry>
259 </row> 263 </row>
260 <row> 264 <row>
261 <entry>&v4l2-rect;</entry> 265 <entry>&v4l2-rect;</entry>
262 <entry><structfield>r</structfield></entry> 266 <entry><structfield>r</structfield></entry>
263 <entry>selection rectangle</entry> 267 <entry>The selection rectangle.</entry>
264 </row> 268 </row>
265 <row> 269 <row>
266 <entry>__u32</entry> 270 <entry>__u32</entry>
267 <entry><structfield>reserved[9]</structfield></entry> 271 <entry><structfield>reserved[9]</structfield></entry>
268 <entry>Reserved fields for future use</entry> 272 <entry>Reserved fields for future use.</entry>
269 </row> 273 </row>
270 </tbody> 274 </tbody>
271 </tgroup> 275 </tgroup>
@@ -278,24 +282,24 @@ exist no rectangle </emphasis> that satisfies the constraints.</para>
278 <varlistentry> 282 <varlistentry>
279 <term><errorcode>EINVAL</errorcode></term> 283 <term><errorcode>EINVAL</errorcode></term>
280 <listitem> 284 <listitem>
281 <para>The buffer <structfield> &v4l2-selection;::type </structfield> 285 <para>Given buffer type <structfield>type</structfield> or
282or <structfield> &v4l2-selection;::target </structfield> is not supported, or 286the selection target <structfield>target</structfield> is not supported,
283the <structfield> &v4l2-selection;::flags </structfield> are invalid.</para> 287or the <structfield>flags</structfield> argument is not valid.</para>
284 </listitem> 288 </listitem>
285 </varlistentry> 289 </varlistentry>
286 <varlistentry> 290 <varlistentry>
287 <term><errorcode>ERANGE</errorcode></term> 291 <term><errorcode>ERANGE</errorcode></term>
288 <listitem> 292 <listitem>
289 <para>it is not possible to adjust a rectangle <structfield> 293 <para>It is not possible to adjust &v4l2-rect; <structfield>
290&v4l2-selection;::r </structfield> that satisfies all contraints from 294r</structfield> rectangle to satisfy all contraints given in the
291<structfield> &v4l2-selection;::flags </structfield>.</para> 295<structfield>flags</structfield> argument.</para>
292 </listitem> 296 </listitem>
293 </varlistentry> 297 </varlistentry>
294 <varlistentry> 298 <varlistentry>
295 <term><errorcode>EBUSY</errorcode></term> 299 <term><errorcode>EBUSY</errorcode></term>
296 <listitem> 300 <listitem>
297 <para>it is not possible to apply change of selection rectangle at the moment. 301 <para>It is not possible to apply change of the selection rectangle
298Usually because streaming is in progress.</para> 302at the moment. Usually because streaming is in progress.</para>
299 </listitem> 303 </listitem>
300 </varlistentry> 304 </varlistentry>
301 </variablelist> 305 </variablelist>
diff --git a/Documentation/DocBook/media/v4l/vidioc-querycap.xml b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
index e3664d6f2de4..4643505cd4ca 100644
--- a/Documentation/DocBook/media/v4l/vidioc-querycap.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-querycap.xml
@@ -124,12 +124,35 @@ printf ("Version: %u.%u.%u\n",
124 <row> 124 <row>
125 <entry>__u32</entry> 125 <entry>__u32</entry>
126 <entry><structfield>capabilities</structfield></entry> 126 <entry><structfield>capabilities</structfield></entry>
127 <entry>Device capabilities, see <xref 127 <entry>Available capabilities of the physical device as a whole, see <xref
128 linkend="device-capabilities" />.</entry> 128 linkend="device-capabilities" />. The same physical device can export
129 multiple devices in /dev (e.g. /dev/videoX, /dev/vbiY and /dev/radioZ).
130 The <structfield>capabilities</structfield> field should contain a union
131 of all capabilities available around the several V4L2 devices exported
132 to userspace.
133 For all those devices the <structfield>capabilities</structfield> field
134 returns the same set of capabilities. This allows applications to open
135 just one of the devices (typically the video device) and discover whether
136 video, vbi and/or radio are also supported.
137 </entry>
129 </row> 138 </row>
130 <row> 139 <row>
131 <entry>__u32</entry> 140 <entry>__u32</entry>
132 <entry><structfield>reserved</structfield>[4]</entry> 141 <entry><structfield>device_caps</structfield></entry>
142 <entry>Device capabilities of the opened device, see <xref
143 linkend="device-capabilities" />. Should contain the available capabilities
144 of that specific device node. So, for example, <structfield>device_caps</structfield>
145 of a radio device will only contain radio related capabilities and
146 no video or vbi capabilities. This field is only set if the <structfield>capabilities</structfield>
147 field contains the <constant>V4L2_CAP_DEVICE_CAPS</constant> capability.
148 Only the <structfield>capabilities</structfield> field can have the
149 <constant>V4L2_CAP_DEVICE_CAPS</constant> capability, <structfield>device_caps</structfield>
150 will never set <constant>V4L2_CAP_DEVICE_CAPS</constant>.
151 </entry>
152 </row>
153 <row>
154 <entry>__u32</entry>
155 <entry><structfield>reserved</structfield>[3]</entry>
133 <entry>Reserved for future extensions. Drivers must set 156 <entry>Reserved for future extensions. Drivers must set
134this array to zero.</entry> 157this array to zero.</entry>
135 </row> 158 </row>
@@ -276,6 +299,13 @@ linkend="async">asynchronous</link> I/O methods.</entry>
276 <entry>The device supports the <link 299 <entry>The device supports the <link
277linkend="mmap">streaming</link> I/O method.</entry> 300linkend="mmap">streaming</link> I/O method.</entry>
278 </row> 301 </row>
302 <row>
303 <entry><constant>V4L2_CAP_DEVICE_CAPS</constant></entry>
304 <entry>0x80000000</entry>
305 <entry>The driver fills the <structfield>device_caps</structfield>
306 field. This capability can only appear in the <structfield>capabilities</structfield>
307 field and never in the <structfield>device_caps</structfield> field.</entry>
308 </row>
279 </tbody> 309 </tbody>
280 </tgroup> 310 </tgroup>
281 </table> 311 </table>
diff --git a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
index e013da845b11..18b1a8266f7c 100644
--- a/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-s-hw-freq-seek.xml
@@ -96,8 +96,8 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
96 <row> 96 <row>
97 <entry>__u32</entry> 97 <entry>__u32</entry>
98 <entry><structfield>reserved</structfield>[7]</entry> 98 <entry><structfield>reserved</structfield>[7]</entry>
99 <entry>Reserved for future extensions. Drivers and 99 <entry>Reserved for future extensions. Applications
100 applications must set the array to zero.</entry> 100 must set the array to zero.</entry>
101 </row> 101 </row>
102 </tbody> 102 </tbody>
103 </tgroup> 103 </tgroup>
@@ -112,7 +112,7 @@ field and the &v4l2-tuner; <structfield>index</structfield> field.</entry>
112 <term><errorcode>EINVAL</errorcode></term> 112 <term><errorcode>EINVAL</errorcode></term>
113 <listitem> 113 <listitem>
114 <para>The <structfield>tuner</structfield> index is out of 114 <para>The <structfield>tuner</structfield> index is out of
115bounds or the value in the <structfield>type</structfield> field is 115bounds, the wrap_around value is not supported or the value in the <structfield>type</structfield> field is
116wrong.</para> 116wrong.</para>
117 </listitem> 117 </listitem>
118 </varlistentry> 118 </varlistentry>