isci: Converting smp_response to Linux native smp_resp
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / Documentation / DocBook / v4l / v4l2.xml
bloba7fd76d0dac1f6e04e8961e94fb29cc430bf2053
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>2.6.39</revnumber>
132         <date>2011-03-01</date>
133         <authorinitials>mcc, po</authorinitials>
134         <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>
135       </revision>
137       <revision>
138         <revnumber>2.6.37</revnumber>
139         <date>2010-08-06</date>
140         <authorinitials>hv</authorinitials>
141         <revremark>Removed obsolete vtx (videotext) API.</revremark>
142       </revision>
144       <revision>
145         <revnumber>2.6.33</revnumber>
146         <date>2009-12-03</date>
147         <authorinitials>mk</authorinitials>
148         <revremark>Added documentation for the Digital Video timings API.</revremark>
149       </revision>
151       <revision>
152         <revnumber>2.6.32</revnumber>
153         <date>2009-08-31</date>
154         <authorinitials>mcc</authorinitials>
155         <revremark>Now, revisions will match the kernel version where
156 the V4L2 API changes will be used by the Linux Kernel.
157 Also added Remote Controller chapter.</revremark>
158       </revision>
160       <revision>
161         <revnumber>0.29</revnumber>
162         <date>2009-08-26</date>
163         <authorinitials>ev</authorinitials>
164         <revremark>Added documentation for string controls and for FM Transmitter controls.</revremark>
165       </revision>
167       <revision>
168         <revnumber>0.28</revnumber>
169         <date>2009-08-26</date>
170         <authorinitials>gl</authorinitials>
171         <revremark>Added V4L2_CID_BAND_STOP_FILTER documentation.</revremark>
172       </revision>
174       <revision>
175         <revnumber>0.27</revnumber>
176         <date>2009-08-15</date>
177         <authorinitials>mcc</authorinitials>
178         <revremark>Added libv4l and Remote Controller documentation;
179 added v4l2grab and keytable application examples.</revremark>
180       </revision>
182       <revision>
183         <revnumber>0.26</revnumber>
184         <date>2009-07-23</date>
185         <authorinitials>hv</authorinitials>
186         <revremark>Finalized the RDS capture API. Added modulator and RDS encoder
187 capabilities. Added support for string controls.</revremark>
188       </revision>
190       <revision>
191         <revnumber>0.25</revnumber>
192         <date>2009-01-18</date>
193         <authorinitials>hv</authorinitials>
194         <revremark>Added pixel formats VYUY, NV16 and NV61, and changed
195 the debug ioctls VIDIOC_DBG_G/S_REGISTER and VIDIOC_DBG_G_CHIP_IDENT.
196 Added camera controls V4L2_CID_ZOOM_ABSOLUTE, V4L2_CID_ZOOM_RELATIVE,
197 V4L2_CID_ZOOM_CONTINUOUS and V4L2_CID_PRIVACY.</revremark>
198       </revision>
200       <revision>
201         <revnumber>0.24</revnumber>
202         <date>2008-03-04</date>
203         <authorinitials>mhs</authorinitials>
204         <revremark>Added pixel formats Y16 and SBGGR16, new controls
205 and a camera controls class. Removed VIDIOC_G/S_MPEGCOMP.</revremark>
206       </revision>
208       <revision>
209         <revnumber>0.23</revnumber>
210         <date>2007-08-30</date>
211         <authorinitials>mhs</authorinitials>
212         <revremark>Fixed a typo in VIDIOC_DBG_G/S_REGISTER.
213 Clarified the byte order of packed pixel formats.</revremark>
214       </revision>
216       <revision>
217         <revnumber>0.22</revnumber>
218         <date>2007-08-29</date>
219         <authorinitials>mhs</authorinitials>
220         <revremark>Added the Video Output Overlay interface, new MPEG
221 controls, V4L2_FIELD_INTERLACED_TB and V4L2_FIELD_INTERLACED_BT,
222 VIDIOC_DBG_G/S_REGISTER, VIDIOC_(TRY_)ENCODER_CMD,
223 VIDIOC_G_CHIP_IDENT, VIDIOC_G_ENC_INDEX, new pixel formats.
224 Clarifications in the cropping chapter, about RGB pixel formats, the
225 mmap(), poll(), select(), read() and write() functions. Typographical
226 fixes.</revremark>
227       </revision>
229       <revision>
230         <revnumber>0.21</revnumber>
231         <date>2006-12-19</date>
232         <authorinitials>mhs</authorinitials>
233         <revremark>Fixed a link in the VIDIOC_G_EXT_CTRLS section.</revremark>
234       </revision>
236       <revision>
237         <revnumber>0.20</revnumber>
238         <date>2006-11-24</date>
239         <authorinitials>mhs</authorinitials>
240         <revremark>Clarified the purpose of the audioset field in
241 struct v4l2_input and v4l2_output.</revremark>
242       </revision>
244       <revision>
245         <revnumber>0.19</revnumber>
246         <date>2006-10-19</date>
247         <authorinitials>mhs</authorinitials>
248         <revremark>Documented V4L2_PIX_FMT_RGB444.</revremark>
249       </revision>
251       <revision>
252         <revnumber>0.18</revnumber>
253         <date>2006-10-18</date>
254         <authorinitials>mhs</authorinitials>
255         <revremark>Added the description of extended controls by Hans
256 Verkuil. Linked V4L2_PIX_FMT_MPEG to V4L2_CID_MPEG_STREAM_TYPE.</revremark>
257       </revision>
259       <revision>
260         <revnumber>0.17</revnumber>
261         <date>2006-10-12</date>
262         <authorinitials>mhs</authorinitials>
263         <revremark>Corrected V4L2_PIX_FMT_HM12 description.</revremark>
264       </revision>
266       <revision>
267         <revnumber>0.16</revnumber>
268         <date>2006-10-08</date>
269         <authorinitials>mhs</authorinitials>
270         <revremark>VIDIOC_ENUM_FRAMESIZES and
271 VIDIOC_ENUM_FRAMEINTERVALS are now part of the API.</revremark>
272       </revision>
274       <revision>
275         <revnumber>0.15</revnumber>
276         <date>2006-09-23</date>
277         <authorinitials>mhs</authorinitials>
278         <revremark>Cleaned up the bibliography, added BT.653 and
279 BT.1119. capture.c/start_capturing() for user pointer I/O did not
280 initialize the buffer index. Documented the V4L MPEG and MJPEG
281 VID_TYPEs and V4L2_PIX_FMT_SBGGR8. Updated the list of reserved pixel
282 formats. See the history chapter for API changes.</revremark>
283       </revision>
285       <revision>
286         <revnumber>0.14</revnumber>
287         <date>2006-09-14</date>
288         <authorinitials>mr</authorinitials>
289         <revremark>Added VIDIOC_ENUM_FRAMESIZES and
290 VIDIOC_ENUM_FRAMEINTERVALS proposal for frame format enumeration of
291 digital devices.</revremark>
292       </revision>
294       <revision>
295         <revnumber>0.13</revnumber>
296         <date>2006-04-07</date>
297         <authorinitials>mhs</authorinitials>
298         <revremark>Corrected the description of struct v4l2_window
299 clips. New V4L2_STD_ and V4L2_TUNER_MODE_LANG1_LANG2
300 defines.</revremark>
301       </revision>
303       <revision>
304         <revnumber>0.12</revnumber>
305         <date>2006-02-03</date>
306         <authorinitials>mhs</authorinitials>
307         <revremark>Corrected the description of struct
308 v4l2_captureparm and v4l2_outputparm.</revremark>
309       </revision>
311       <revision>
312         <revnumber>0.11</revnumber>
313         <date>2006-01-27</date>
314         <authorinitials>mhs</authorinitials>
315         <revremark>Improved the description of struct
316 v4l2_tuner.</revremark>
317       </revision>
319       <revision>
320         <revnumber>0.10</revnumber>
321         <date>2006-01-10</date>
322         <authorinitials>mhs</authorinitials>
323         <revremark>VIDIOC_G_INPUT and VIDIOC_S_PARM
324 clarifications.</revremark>
325       </revision>
327       <revision>
328         <revnumber>0.9</revnumber>
329         <date>2005-11-27</date>
330         <authorinitials>mhs</authorinitials>
331         <revremark>Improved the 525 line numbering diagram. Hans
332 Verkuil and I rewrote the sliced VBI section. He also contributed a
333 VIDIOC_LOG_STATUS page. Fixed VIDIOC_S_STD call in the video standard
334 selection example. Various updates.</revremark>
335       </revision>
337       <revision>
338         <revnumber>0.8</revnumber>
339         <date>2004-10-04</date>
340         <authorinitials>mhs</authorinitials>
341         <revremark>Somehow a piece of junk slipped into the capture
342 example, removed.</revremark>
343       </revision>
345       <revision>
346         <revnumber>0.7</revnumber>
347         <date>2004-09-19</date>
348         <authorinitials>mhs</authorinitials>
349         <revremark>Fixed video standard selection, control
350 enumeration, downscaling and aspect example. Added read and user
351 pointer i/o to video capture example.</revremark>
352       </revision>
354       <revision>
355         <revnumber>0.6</revnumber>
356         <date>2004-08-01</date>
357         <authorinitials>mhs</authorinitials>
358         <revremark>v4l2_buffer changes, added video capture example,
359 various corrections.</revremark>
360       </revision>
362       <revision>
363         <revnumber>0.5</revnumber>
364         <date>2003-11-05</date>
365         <authorinitials>mhs</authorinitials>
366         <revremark>Pixel format erratum.</revremark>
367       </revision>
369       <revision>
370         <revnumber>0.4</revnumber>
371         <date>2003-09-17</date>
372         <authorinitials>mhs</authorinitials>
373         <revremark>Corrected source and Makefile to generate a PDF.
374 SGML fixes. Added latest API changes. Closed gaps in the history
375 chapter.</revremark>
376       </revision>
378       <revision>
379         <revnumber>0.3</revnumber>
380         <date>2003-02-05</date>
381         <authorinitials>mhs</authorinitials>
382         <revremark>Another draft, more corrections.</revremark>
383       </revision>
385       <revision>
386         <revnumber>0.2</revnumber>
387         <date>2003-01-15</date>
388         <authorinitials>mhs</authorinitials>
389         <revremark>Second draft, with corrections pointed out by Gerd
390 Knorr.</revremark>
391       </revision>
393       <revision>
394         <revnumber>0.1</revnumber>
395         <date>2002-12-01</date>
396         <authorinitials>mhs</authorinitials>
397         <revremark>First draft, based on documentation by Bill Dirks
398 and discussions on the V4L mailing list.</revremark>
399       </revision>
400     </revhistory>
401 </partinfo>
403 <title>Video for Linux Two API Specification</title>
404  <subtitle>Revision 2.6.39</subtitle>
406   <chapter id="common">
407     &sub-common;
408   </chapter>
410   <chapter id="pixfmt">
411     &sub-pixfmt;
412   </chapter>
414   <chapter id="io">
415     &sub-io;
416   </chapter>
418   <chapter id="devices">
419     <title>Interfaces</title>
421     <section id="capture"> &sub-dev-capture; </section>
422     <section id="overlay"> &sub-dev-overlay; </section>
423     <section id="output"> &sub-dev-output; </section>
424     <section id="osd"> &sub-dev-osd; </section>
425     <section id="codec"> &sub-dev-codec; </section>
426     <section id="effect"> &sub-dev-effect; </section>
427     <section id="raw-vbi"> &sub-dev-raw-vbi; </section>
428     <section id="sliced"> &sub-dev-sliced-vbi; </section>
429     <section id="ttx"> &sub-dev-teletext; </section>
430     <section id="radio"> &sub-dev-radio; </section>
431     <section id="rds"> &sub-dev-rds; </section>
432     <section id="event"> &sub-dev-event; </section>
433     <section id="subdev"> &sub-dev-subdev; </section>
434   </chapter>
436   <chapter id="driver">
437           &sub-driver;
438   </chapter>
440   <chapter id="libv4l">
441           &sub-libv4l;
442   </chapter>
444   <chapter id="compat">
445           &sub-compat;
446   </chapter>
448   <appendix id="user-func">
449   <title>Function Reference</title>
451     <!-- Keep this alphabetically sorted. -->
453     &sub-close;
454     &sub-ioctl;
455     <!-- All ioctls go here. -->
456     &sub-cropcap;
457     &sub-dbg-g-chip-ident;
458     &sub-dbg-g-register;
459     &sub-dqevent;
460     &sub-encoder-cmd;
461     &sub-enumaudio;
462     &sub-enumaudioout;
463     &sub-enum-dv-presets;
464     &sub-enum-fmt;
465     &sub-enum-framesizes;
466     &sub-enum-frameintervals;
467     &sub-enuminput;
468     &sub-enumoutput;
469     &sub-enumstd;
470     &sub-g-audio;
471     &sub-g-audioout;
472     &sub-g-crop;
473     &sub-g-ctrl;
474     &sub-g-dv-preset;
475     &sub-g-dv-timings;
476     &sub-g-enc-index;
477     &sub-g-ext-ctrls;
478     &sub-g-fbuf;
479     &sub-g-fmt;
480     &sub-g-frequency;
481     &sub-g-input;
482     &sub-g-jpegcomp;
483     &sub-g-modulator;
484     &sub-g-output;
485     &sub-g-parm;
486     &sub-g-priority;
487     &sub-g-sliced-vbi-cap;
488     &sub-g-std;
489     &sub-g-tuner;
490     &sub-log-status;
491     &sub-overlay;
492     &sub-qbuf;
493     &sub-querybuf;
494     &sub-querycap;
495     &sub-queryctrl;
496     &sub-query-dv-preset;
497     &sub-querystd;
498     &sub-reqbufs;
499     &sub-s-hw-freq-seek;
500     &sub-streamon;
501     &sub-subdev-enum-frame-interval;
502     &sub-subdev-enum-frame-size;
503     &sub-subdev-enum-mbus-code;
504     &sub-subdev-g-crop;
505     &sub-subdev-g-fmt;
506     &sub-subdev-g-frame-interval;
507     &sub-subscribe-event;
508     <!-- End of ioctls. -->
509     &sub-mmap;
510     &sub-munmap;
511     &sub-open;
512     &sub-poll;
513     &sub-read;
514     &sub-select;
515     &sub-write;
516   </appendix>
518   <appendix id="videodev">
519     <title>Video For Linux Two Header File</title>
520     &sub-videodev2-h;
521   </appendix>
523   <appendix id="capture-example">
524     <title>Video Capture Example</title>
525     &sub-capture-c;
526   </appendix>
528   <appendix id="v4l2grab-example">
529     <title>Video Grabber example using libv4l</title>
530     <para>This program demonstrates how to grab V4L2 images in ppm format by
531 using libv4l handlers. The advantage is that this grabber can potentially work
532 with any V4L2 driver.</para>
533     &sub-v4l2grab-c;
534   </appendix>
536   &sub-media-indices;
538   &sub-biblio;