Add linux-next specific files for 20110831
[linux-2.6/next.git] / Documentation / DocBook / media / v4l / v4l2.xml
blob0d05e8747c12e24da9a2a4cebcdce4826e0858a4
1  <partinfo>
2     <authorgroup>
3       <author>
4         <firstname>Michael</firstname>
5         <surname>Schimek</surname>
6         <othername role="mi">H</othername>
7         <affiliation>
8           <address>
9             <email>mschimek@gmx.at</email>
10           </address>
11         </affiliation>
12       </author>
14       <author>
15         <firstname>Bill</firstname>
16         <surname>Dirks</surname>
17         <!-- Commented until Bill opts in to be spammed.
18         <affiliation>
19           <address>
20             <email>bill@thedirks.org</email>
21           </address>
22         </affiliation> -->
23         <contrib>Original author of the V4L2 API and
24 documentation.</contrib>
25       </author>
27       <author>
28         <firstname>Hans</firstname>
29         <surname>Verkuil</surname>
30         <contrib>Designed and documented the VIDIOC_LOG_STATUS ioctl,
31 the extended control ioctls and major parts of the sliced VBI
32 API.</contrib>
33         <affiliation>
34           <address>
35             <email>hverkuil@xs4all.nl</email>
36           </address>
37         </affiliation>
38       </author>
40       <author>
41         <firstname>Martin</firstname>
42         <surname>Rubli</surname>
43         <!--
44         <affiliation>
45           <address>
46             <email>martin_rubli@logitech.com</email>
47           </address>
48         </affiliation> -->
49         <contrib>Designed and documented the VIDIOC_ENUM_FRAMESIZES
50 and VIDIOC_ENUM_FRAMEINTERVALS ioctls.</contrib>
51       </author>
53       <author>
54         <firstname>Andy</firstname>
55         <surname>Walls</surname>
56         <contrib>Documented the fielded V4L2_MPEG_STREAM_VBI_FMT_IVTV
57 MPEG stream embedded, sliced VBI data format in this specification.
58 </contrib>
59         <affiliation>
60           <address>
61             <email>awalls@md.metrocast.net</email>
62           </address>
63         </affiliation>
64       </author>
66       <author>
67         <firstname>Mauro</firstname>
68         <surname>Carvalho Chehab</surname>
69         <contrib>Documented libv4l, designed and added v4l2grab example,
70 Remote Controller chapter.</contrib>
71         <affiliation>
72           <address>
73             <email>mchehab@redhat.com</email>
74           </address>
75         </affiliation>
76       </author>
78       <author>
79         <firstname>Muralidharan</firstname>
80         <surname>Karicheri</surname>
81         <contrib>Documented the Digital Video timings API.</contrib>
82         <affiliation>
83           <address>
84             <email>m-karicheri2@ti.com</email>
85           </address>
86         </affiliation>
87       </author>
89       <author>
90         <firstname>Pawel</firstname>
91         <surname>Osciak</surname>
92         <contrib>Designed and documented the multi-planar API.</contrib>
93         <affiliation>
94           <address>
95             <email>pawel AT osciak.com</email>
96           </address>
97         </affiliation>
98       </author>
99     </authorgroup>
101     <copyright>
102       <year>1999</year>
103       <year>2000</year>
104       <year>2001</year>
105       <year>2002</year>
106       <year>2003</year>
107       <year>2004</year>
108       <year>2005</year>
109       <year>2006</year>
110       <year>2007</year>
111       <year>2008</year>
112       <year>2009</year>
113       <year>2010</year>
114       <year>2011</year>
115       <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin
116 Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab,
117         Pawel Osciak</holder>
118     </copyright>
119     <legalnotice>
120     <para>Except when explicitly stated as GPL, programming examples within
121             this part can be used and distributed without restrictions.</para>
122     </legalnotice>
123     <revhistory>
124       <!-- Put document revisions here, newest first. -->
125       <!-- API revisions (changes and additions of defines, enums,
126 structs, ioctls) must be noted in more detail in the history chapter
127 (compat.xml), along with the possible impact on existing drivers and
128 applications. -->
130       <revision>
131         <revnumber>3.1</revnumber>
132         <date>2011-06-27</date>
133         <authorinitials>mcc, po, hv</authorinitials>
134         <revremark>Documented that VIDIOC_QUERYCAP now returns a per-subsystem version instead of a per-driver one.
135                    Standardize an error code for invalid ioctl.
136                    Added V4L2_CTRL_TYPE_BITMASK.</revremark>
137       </revision>
139       <revision>
140         <revnumber>2.6.39</revnumber>
141         <date>2011-03-01</date>
142         <authorinitials>mcc, po</authorinitials>
143         <revremark>Removed VIDIOC_*_OLD from videodev2.h header and update it to reflect latest changes. Added the <link linkend="planar-apis">multi-planar API</link>.</revremark>
144       </revision>
146       <revision>
147         <revnumber>2.6.37</revnumber>
148         <date>2010-08-06</date>
149         <authorinitials>hv</authorinitials>
150         <revremark>Removed obsolete vtx (videotext) API.</revremark>
151       </revision>
153       <revision>
154         <revnumber>2.6.33</revnumber>
155         <date>2009-12-03</date>
156         <authorinitials>mk</authorinitials>
157         <revremark>Added documentation for the Digital Video timings API.</revremark>
158       </revision>
160       <revision>
161         <revnumber>2.6.32</revnumber>
162         <date>2009-08-31</date>
163         <authorinitials>mcc</authorinitials>
164         <revremark>Now, revisions will match the kernel version where
165 the V4L2 API changes will be used by the Linux Kernel.
166 Also added Remote Controller chapter.</revremark>
167       </revision>
169       <revision>
170         <revnumber>0.29</revnumber>
171         <date>2009-08-26</date>
172         <authorinitials>ev</authorinitials>
173         <revremark>Added documentation for string controls and for FM Transmitter controls.</revremark>
174       </revision>
176       <revision>
177         <revnumber>0.28</revnumber>
178         <date>2009-08-26</date>
179         <authorinitials>gl</authorinitials>
180         <revremark>Added V4L2_CID_BAND_STOP_FILTER documentation.</revremark>
181       </revision>
183       <revision>
184         <revnumber>0.27</revnumber>
185         <date>2009-08-15</date>
186         <authorinitials>mcc</authorinitials>
187         <revremark>Added libv4l and Remote Controller documentation;
188 added v4l2grab and keytable application examples.</revremark>
189       </revision>
191       <revision>
192         <revnumber>0.26</revnumber>
193         <date>2009-07-23</date>
194         <authorinitials>hv</authorinitials>
195         <revremark>Finalized the RDS capture API. Added modulator and RDS encoder
196 capabilities. Added support for string controls.</revremark>
197       </revision>
199       <revision>
200         <revnumber>0.25</revnumber>
201         <date>2009-01-18</date>
202         <authorinitials>hv</authorinitials>
203         <revremark>Added pixel formats VYUY, NV16 and NV61, and changed
204 the debug ioctls VIDIOC_DBG_G/S_REGISTER and VIDIOC_DBG_G_CHIP_IDENT.
205 Added camera controls V4L2_CID_ZOOM_ABSOLUTE, V4L2_CID_ZOOM_RELATIVE,
206 V4L2_CID_ZOOM_CONTINUOUS and V4L2_CID_PRIVACY.</revremark>
207       </revision>
209       <revision>
210         <revnumber>0.24</revnumber>
211         <date>2008-03-04</date>
212         <authorinitials>mhs</authorinitials>
213         <revremark>Added pixel formats Y16 and SBGGR16, new controls
214 and a camera controls class. Removed VIDIOC_G/S_MPEGCOMP.</revremark>
215       </revision>
217       <revision>
218         <revnumber>0.23</revnumber>
219         <date>2007-08-30</date>
220         <authorinitials>mhs</authorinitials>
221         <revremark>Fixed a typo in VIDIOC_DBG_G/S_REGISTER.
222 Clarified the byte order of packed pixel formats.</revremark>
223       </revision>
225       <revision>
226         <revnumber>0.22</revnumber>
227         <date>2007-08-29</date>
228         <authorinitials>mhs</authorinitials>
229         <revremark>Added the Video Output Overlay interface, new MPEG
230 controls, V4L2_FIELD_INTERLACED_TB and V4L2_FIELD_INTERLACED_BT,
231 VIDIOC_DBG_G/S_REGISTER, VIDIOC_(TRY_)ENCODER_CMD,
232 VIDIOC_G_CHIP_IDENT, VIDIOC_G_ENC_INDEX, new pixel formats.
233 Clarifications in the cropping chapter, about RGB pixel formats, the
234 mmap(), poll(), select(), read() and write() functions. Typographical
235 fixes.</revremark>
236       </revision>
238       <revision>
239         <revnumber>0.21</revnumber>
240         <date>2006-12-19</date>
241         <authorinitials>mhs</authorinitials>
242         <revremark>Fixed a link in the VIDIOC_G_EXT_CTRLS section.</revremark>
243       </revision>
245       <revision>
246         <revnumber>0.20</revnumber>
247         <date>2006-11-24</date>
248         <authorinitials>mhs</authorinitials>
249         <revremark>Clarified the purpose of the audioset field in
250 struct v4l2_input and v4l2_output.</revremark>
251       </revision>
253       <revision>
254         <revnumber>0.19</revnumber>
255         <date>2006-10-19</date>
256         <authorinitials>mhs</authorinitials>
257         <revremark>Documented V4L2_PIX_FMT_RGB444.</revremark>
258       </revision>
260       <revision>
261         <revnumber>0.18</revnumber>
262         <date>2006-10-18</date>
263         <authorinitials>mhs</authorinitials>
264         <revremark>Added the description of extended controls by Hans
265 Verkuil. Linked V4L2_PIX_FMT_MPEG to V4L2_CID_MPEG_STREAM_TYPE.</revremark>
266       </revision>
268       <revision>
269         <revnumber>0.17</revnumber>
270         <date>2006-10-12</date>
271         <authorinitials>mhs</authorinitials>
272         <revremark>Corrected V4L2_PIX_FMT_HM12 description.</revremark>
273       </revision>
275       <revision>
276         <revnumber>0.16</revnumber>
277         <date>2006-10-08</date>
278         <authorinitials>mhs</authorinitials>
279         <revremark>VIDIOC_ENUM_FRAMESIZES and
280 VIDIOC_ENUM_FRAMEINTERVALS are now part of the API.</revremark>
281       </revision>
283       <revision>
284         <revnumber>0.15</revnumber>
285         <date>2006-09-23</date>
286         <authorinitials>mhs</authorinitials>
287         <revremark>Cleaned up the bibliography, added BT.653 and
288 BT.1119. capture.c/start_capturing() for user pointer I/O did not
289 initialize the buffer index. Documented the V4L MPEG and MJPEG
290 VID_TYPEs and V4L2_PIX_FMT_SBGGR8. Updated the list of reserved pixel
291 formats. See the history chapter for API changes.</revremark>
292       </revision>
294       <revision>
295         <revnumber>0.14</revnumber>
296         <date>2006-09-14</date>
297         <authorinitials>mr</authorinitials>
298         <revremark>Added VIDIOC_ENUM_FRAMESIZES and
299 VIDIOC_ENUM_FRAMEINTERVALS proposal for frame format enumeration of
300 digital devices.</revremark>
301       </revision>
303       <revision>
304         <revnumber>0.13</revnumber>
305         <date>2006-04-07</date>
306         <authorinitials>mhs</authorinitials>
307         <revremark>Corrected the description of struct v4l2_window
308 clips. New V4L2_STD_ and V4L2_TUNER_MODE_LANG1_LANG2
309 defines.</revremark>
310       </revision>
312       <revision>
313         <revnumber>0.12</revnumber>
314         <date>2006-02-03</date>
315         <authorinitials>mhs</authorinitials>
316         <revremark>Corrected the description of struct
317 v4l2_captureparm and v4l2_outputparm.</revremark>
318       </revision>
320       <revision>
321         <revnumber>0.11</revnumber>
322         <date>2006-01-27</date>
323         <authorinitials>mhs</authorinitials>
324         <revremark>Improved the description of struct
325 v4l2_tuner.</revremark>
326       </revision>
328       <revision>
329         <revnumber>0.10</revnumber>
330         <date>2006-01-10</date>
331         <authorinitials>mhs</authorinitials>
332         <revremark>VIDIOC_G_INPUT and VIDIOC_S_PARM
333 clarifications.</revremark>
334       </revision>
336       <revision>
337         <revnumber>0.9</revnumber>
338         <date>2005-11-27</date>
339         <authorinitials>mhs</authorinitials>
340         <revremark>Improved the 525 line numbering diagram. Hans
341 Verkuil and I rewrote the sliced VBI section. He also contributed a
342 VIDIOC_LOG_STATUS page. Fixed VIDIOC_S_STD call in the video standard
343 selection example. Various updates.</revremark>
344       </revision>
346       <revision>
347         <revnumber>0.8</revnumber>
348         <date>2004-10-04</date>
349         <authorinitials>mhs</authorinitials>
350         <revremark>Somehow a piece of junk slipped into the capture
351 example, removed.</revremark>
352       </revision>
354       <revision>
355         <revnumber>0.7</revnumber>
356         <date>2004-09-19</date>
357         <authorinitials>mhs</authorinitials>
358         <revremark>Fixed video standard selection, control
359 enumeration, downscaling and aspect example. Added read and user
360 pointer i/o to video capture example.</revremark>
361       </revision>
363       <revision>
364         <revnumber>0.6</revnumber>
365         <date>2004-08-01</date>
366         <authorinitials>mhs</authorinitials>
367         <revremark>v4l2_buffer changes, added video capture example,
368 various corrections.</revremark>
369       </revision>
371       <revision>
372         <revnumber>0.5</revnumber>
373         <date>2003-11-05</date>
374         <authorinitials>mhs</authorinitials>
375         <revremark>Pixel format erratum.</revremark>
376       </revision>
378       <revision>
379         <revnumber>0.4</revnumber>
380         <date>2003-09-17</date>
381         <authorinitials>mhs</authorinitials>
382         <revremark>Corrected source and Makefile to generate a PDF.
383 SGML fixes. Added latest API changes. Closed gaps in the history
384 chapter.</revremark>
385       </revision>
387       <revision>
388         <revnumber>0.3</revnumber>
389         <date>2003-02-05</date>
390         <authorinitials>mhs</authorinitials>
391         <revremark>Another draft, more corrections.</revremark>
392       </revision>
394       <revision>
395         <revnumber>0.2</revnumber>
396         <date>2003-01-15</date>
397         <authorinitials>mhs</authorinitials>
398         <revremark>Second draft, with corrections pointed out by Gerd
399 Knorr.</revremark>
400       </revision>
402       <revision>
403         <revnumber>0.1</revnumber>
404         <date>2002-12-01</date>
405         <authorinitials>mhs</authorinitials>
406         <revremark>First draft, based on documentation by Bill Dirks
407 and discussions on the V4L mailing list.</revremark>
408       </revision>
409     </revhistory>
410 </partinfo>
412 <title>Video for Linux Two API Specification</title>
413  <subtitle>Revision 3.1</subtitle>
415   <chapter id="common">
416     &sub-common;
417   </chapter>
419   <chapter id="pixfmt">
420     &sub-pixfmt;
421   </chapter>
423   <chapter id="io">
424     &sub-io;
425   </chapter>
427   <chapter id="devices">
428     <title>Interfaces</title>
430     <section id="capture"> &sub-dev-capture; </section>
431     <section id="overlay"> &sub-dev-overlay; </section>
432     <section id="output"> &sub-dev-output; </section>
433     <section id="osd"> &sub-dev-osd; </section>
434     <section id="codec"> &sub-dev-codec; </section>
435     <section id="effect"> &sub-dev-effect; </section>
436     <section id="raw-vbi"> &sub-dev-raw-vbi; </section>
437     <section id="sliced"> &sub-dev-sliced-vbi; </section>
438     <section id="ttx"> &sub-dev-teletext; </section>
439     <section id="radio"> &sub-dev-radio; </section>
440     <section id="rds"> &sub-dev-rds; </section>
441     <section id="event"> &sub-dev-event; </section>
442     <section id="subdev"> &sub-dev-subdev; </section>
443   </chapter>
445   <chapter id="driver">
446           &sub-driver;
447   </chapter>
449   <chapter id="libv4l">
450           &sub-libv4l;
451   </chapter>
453   <chapter id="compat">
454           &sub-compat;
455   </chapter>
457   <appendix id="user-func">
458   <title>Function Reference</title>
460     <!-- Keep this alphabetically sorted. -->
462     &sub-close;
463     &sub-ioctl;
464     <!-- All ioctls go here. -->
465     &sub-cropcap;
466     &sub-dbg-g-chip-ident;
467     &sub-dbg-g-register;
468     &sub-dqevent;
469     &sub-encoder-cmd;
470     &sub-enumaudio;
471     &sub-enumaudioout;
472     &sub-enum-dv-presets;
473     &sub-enum-fmt;
474     &sub-enum-framesizes;
475     &sub-enum-frameintervals;
476     &sub-enuminput;
477     &sub-enumoutput;
478     &sub-enumstd;
479     &sub-g-audio;
480     &sub-g-audioout;
481     &sub-g-crop;
482     &sub-g-ctrl;
483     &sub-g-dv-preset;
484     &sub-g-dv-timings;
485     &sub-g-enc-index;
486     &sub-g-ext-ctrls;
487     &sub-g-fbuf;
488     &sub-g-fmt;
489     &sub-g-frequency;
490     &sub-g-input;
491     &sub-g-jpegcomp;
492     &sub-g-modulator;
493     &sub-g-output;
494     &sub-g-parm;
495     &sub-g-priority;
496     &sub-g-sliced-vbi-cap;
497     &sub-g-std;
498     &sub-g-tuner;
499     &sub-log-status;
500     &sub-overlay;
501     &sub-qbuf;
502     &sub-querybuf;
503     &sub-querycap;
504     &sub-queryctrl;
505     &sub-query-dv-preset;
506     &sub-querystd;
507     &sub-reqbufs;
508     &sub-s-hw-freq-seek;
509     &sub-streamon;
510     &sub-subdev-enum-frame-interval;
511     &sub-subdev-enum-frame-size;
512     &sub-subdev-enum-mbus-code;
513     &sub-subdev-g-crop;
514     &sub-subdev-g-fmt;
515     &sub-subdev-g-frame-interval;
516     &sub-subscribe-event;
517     <!-- End of ioctls. -->
518     &sub-mmap;
519     &sub-munmap;
520     &sub-open;
521     &sub-poll;
522     &sub-read;
523     &sub-select;
524     &sub-write;
525   </appendix>
527   <appendix id="videodev">
528     <title>Video For Linux Two Header File</title>
529     &sub-videodev2-h;
530   </appendix>
532   <appendix id="capture-example">
533     <title>Video Capture Example</title>
534     &sub-capture-c;
535   </appendix>
537   <appendix id="v4l2grab-example">
538     <title>Video Grabber example using libv4l</title>
539     <para>This program demonstrates how to grab V4L2 images in ppm format by
540 using libv4l handlers. The advantage is that this grabber can potentially work
541 with any V4L2 driver.</para>
542     &sub-v4l2grab-c;
543   </appendix>
545   &sub-media-indices;
547   &sub-biblio;