1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Changes of the V4L2 API</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="compat.html" title="Chapter 7. Changes"><link rel="prev" href="compat.html" title="Chapter 7. Changes"><link rel="next" href="user-func.html" title="Appendix A. Function Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Changes of the V4L2 API</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="compat.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Changes</th><td width="20%" align="right"> <a accesskey="n" href="user-func.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="hist-v4l2"></a>Changes of the V4L2 API</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="hist-v4l2.html#idp1110945676">Early Versions</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1110958468">V4L2 Version 0.16 1999-01-31</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1110959340">V4L2 Version 0.18 1999-03-16</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1110960348">V4L2 Version 0.19 1999-06-05</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1110962996">V4L2 Version 0.20 (1999-09-10)</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1110980828">V4L2 Version 0.20 incremental changes</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1110995620">V4L2 Version 0.20 2000-11-23</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111004332">V4L2 Version 0.20 2002-07-25</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111004996">V4L2 in Linux 2.5.46, 2002-10</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111100852">V4L2 2003-06-19</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111111820">V4L2 2003-11-05</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111121164">V4L2 in Linux 2.6.6, 2004-05-09</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111123236">V4L2 in Linux 2.6.8</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111125988">V4L2 spec erratum 2004-08-01</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111130996">V4L2 in Linux 2.6.14</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111133420">V4L2 in Linux 2.6.15</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111140396">V4L2 spec erratum 2005-11-27</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111142844">V4L2 spec erratum 2006-01-10</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111145788">V4L2 spec erratum 2006-02-03</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111148124">V4L2 spec erratum 2006-02-04</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111150884">V4L2 in Linux 2.6.17</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111155580">V4L2 spec erratum 2006-09-23 (Draft 0.15)</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111165556">V4L2 in Linux 2.6.18</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111171276">V4L2 in Linux 2.6.19</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111177612">V4L2 spec erratum 2006-10-12 (Draft 0.17)</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111179340">V4L2 in Linux 2.6.21</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111181100">V4L2 in Linux 2.6.22</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111188468">V4L2 in Linux 2.6.24</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111190876">V4L2 in Linux 2.6.25</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111201596">V4L2 in Linux 2.6.26</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111204236">V4L2 in Linux 2.6.27</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111208412">V4L2 in Linux 2.6.28</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111211764">V4L2 in Linux 2.6.29</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111216916">V4L2 in Linux 2.6.30</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111219084">V4L2 in Linux 2.6.32</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111225356">V4L2 in Linux 2.6.33</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111226724">V4L2 in Linux 2.6.34</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111228972">V4L2 in Linux 2.6.37</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111230468">V4L2 in Linux 2.6.39</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111232748">V4L2 in Linux 3.1</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111234556">V4L2 in Linux 3.2</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111236916">V4L2 in Linux 3.3</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111239372">V4L2 in Linux 3.4</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111242884">V4L2 in Linux 3.5</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111252356">V4L2 in Linux 3.6</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111255244">V4L2 in Linux 3.9</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111259452">V4L2 in Linux 3.10</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111261356">V4L2 in Linux 3.11</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111263564">V4L2 in Linux 3.14</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111265788">V4L2 in Linux 3.15</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111267100">V4L2 in Linux 3.16</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111268356">V4L2 in Linux 3.17</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111270876">V4L2 in Linux 3.18</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111272724">V4L2 in Linux 3.19</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#other">Relation of V4L2 to other Linux multimedia APIs</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#experimental">Experimental API Elements</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#obsolete">Obsolete API Elements</a></span></dt></dl></div><p>Soon after the V4L API was added to the kernel it was 2criticised as too inflexible. In August 1998 Bill Dirks proposed a 3number of improvements and began to work on documentation, example 4drivers and applications. With the help of other volunteers this 5eventually became the V4L2 API, not just an extension but a 6replacement for the V4L API. However it took another four years and 7two stable kernel releases until the new API was finally accepted for 8inclusion into the kernel in its present form.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1110945676"></a>Early Versions</h3></div></div></div><p>1998-08-20: First version.</p><p>1998-08-27: The <a class="link" href="func-select.html" title="V4L2 select()"><code class="function">select()</code></a> function was introduced.</p><p>1998-09-10: New video standard interface.</p><p>1998-09-18: The <code class="constant">VIDIOC_NONCAP</code> ioctl 9was replaced by the otherwise meaningless <code class="constant">O_TRUNC</code> 10<a class="link" href="func-open.html" title="V4L2 open()"><code class="function">open()</code></a> flag, and the aliases <code class="constant">O_NONCAP</code> and 11<code class="constant">O_NOIO</code> were defined. Applications can set this 12flag if they intend to access controls only, as opposed to capture 13applications which need exclusive access. The 14<code class="constant">VIDEO_STD_XXX</code> identifiers are now ordinals 15instead of flags, and the <code class="function">video_std_construct()</code> 16helper function takes id and transmission arguments.</p><p>1998-09-28: Revamped video standard. Made video controls 17individually enumerable.</p><p>1998-10-02: The <em class="structfield"><code>id</code></em> field was 18removed from struct <span class="structname">video_standard</span> and the 19color subcarrier fields were renamed. The <a class="link" href="vidioc-querystd.html" title="ioctl VIDIOC_QUERYSTD"><code class="constant">VIDIOC_QUERYSTD</code></a> ioctl was 20renamed to <a class="link" href="vidioc-enumstd.html" title="ioctl VIDIOC_ENUMSTD"><code class="constant">VIDIOC_ENUMSTD</code></a>, <a class="link" href="vidioc-g-input.html" title="ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT"><code class="constant">VIDIOC_G_INPUT</code></a> to <a class="link" href="vidioc-enuminput.html" title="ioctl VIDIOC_ENUMINPUT"><code class="constant">VIDIOC_ENUMINPUT</code></a>. A 21first draft of the Codec API was released.</p><p>1998-11-08: Many minor changes. Most symbols have been 22renamed. Some material changes to struct <a class="link" href="vidioc-querycap.html#v4l2-capability" title="Table A.93. struct v4l2_capability">v4l2_capability</a>.</p><p>1998-11-12: The read/write directon of some ioctls was misdefined.</p><p>1998-11-14: <code class="constant">V4L2_PIX_FMT_RGB24</code> 23changed to <code class="constant">V4L2_PIX_FMT_BGR24</code>, and 24<code class="constant">V4L2_PIX_FMT_RGB32</code> changed to 25<code class="constant">V4L2_PIX_FMT_BGR32</code>. Audio controls are now 26accessible with the <a class="link" href="vidioc-g-ctrl.html" title="ioctl VIDIOC_G_CTRL, VIDIOC_S_CTRL"><code class="constant">VIDIOC_G_CTRL</code></a> and <a class="link" href="vidioc-g-ctrl.html" title="ioctl VIDIOC_G_CTRL, VIDIOC_S_CTRL"><code class="constant">VIDIOC_S_CTRL</code></a> ioctls under 27names starting with <code class="constant">V4L2_CID_AUDIO</code>. The 28<code class="constant">V4L2_MAJOR</code> define was removed from 29<code class="filename">videodev.h</code> since it was only used once in the 30<code class="filename">videodev</code> kernel module. The 31<code class="constant">YUV422</code> and <code class="constant">YUV411</code> planar 32image formats were added.</p><p>1998-11-28: A few ioctl symbols changed. Interfaces for codecs and 33video output devices were added.</p><p>1999-01-14: A raw VBI capture interface was added.</p><p>1999-01-19: The <code class="constant">VIDIOC_NEXTBUF</code> ioctl 34 was removed.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1110958468"></a>V4L2 Version 0.16 1999-01-31</h3></div></div></div><p>1999-01-27: There is now one QBUF ioctl, VIDIOC_QWBUF and VIDIOC_QRBUF 35are gone. VIDIOC_QBUF takes a v4l2_buffer as a parameter. Added 36digital zoom (cropping) controls.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1110959340"></a>V4L2 Version 0.18 1999-03-16</h3></div></div></div><p>Added a v4l to V4L2 ioctl compatibility layer to 37videodev.c. Driver writers, this changes how you implement your ioctl 38handler. See the Driver Writer's Guide. Added some more control id 39codes.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1110960348"></a>V4L2 Version 0.19 1999-06-05</h3></div></div></div><p>1999-03-18: Fill in the category and catname fields of 40v4l2_queryctrl objects before passing them to the driver. Required a 41minor change to the VIDIOC_QUERYCTRL handlers in the sample 42drivers.</p><p>1999-03-31: Better compatibility for v4l memory capture 43ioctls. Requires changes to drivers to fully support new compatibility 44features, see Driver Writer's Guide and v4l2cap.c. Added new control 45IDs: V4L2_CID_HFLIP, _VFLIP. Changed V4L2_PIX_FMT_YUV422P to _YUV422P, 46and _YUV411P to _YUV411P.</p><p>1999-04-04: Added a few more control IDs.</p><p>1999-04-07: Added the button control type.</p><p>1999-05-02: Fixed a typo in videodev.h, and added the 47V4L2_CTRL_FLAG_GRAYED (later V4L2_CTRL_FLAG_GRABBED) flag.</p><p>1999-05-20: Definition of VIDIOC_G_CTRL was wrong causing 48a malfunction of this ioctl.</p><p>1999-06-05: Changed the value of 49V4L2_CID_WHITENESS.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1110962996"></a>V4L2 Version 0.20 (1999-09-10)</h3></div></div></div><p>Version 0.20 introduced a number of changes which were 50<span class="emphasis"><em>not backward compatible</em></span> with 0.19 and earlier 51versions. Purpose of these changes was to simplify the API, while 52making it more extensible and following common Linux driver API 53conventions.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Some typos in <code class="constant">V4L2_FMT_FLAG</code> 54symbols were fixed. struct <a class="link" href="overlay.html#v4l2-clip" title="Table 4.2. struct v4l2_clip">v4l2_clip</a> was changed for compatibility with 55v4l. (1999-08-30)</p></li><li class="listitem"><p><code class="constant">V4L2_TUNER_SUB_LANG1</code> was added. 56(1999-09-05)</p></li><li class="listitem"><p>All ioctl() commands that used an integer argument now 57take a pointer to an integer. Where it makes sense, ioctls will return 58the actual new value in the integer pointed to by the argument, a 59common convention in the V4L2 API. The affected ioctls are: 60VIDIOC_PREVIEW, VIDIOC_STREAMON, VIDIOC_STREAMOFF, VIDIOC_S_FREQ, 61VIDIOC_S_INPUT, VIDIOC_S_OUTPUT, VIDIOC_S_EFFECT. For example 62</p><pre class="programlisting"> 63err = ioctl (fd, VIDIOC_XXX, V4L2_XXX); 64</pre><p> becomes </p><pre class="programlisting"> 65int a = V4L2_XXX; err = ioctl(fd, VIDIOC_XXX, &a); 66</pre><p> 67 </p></li><li class="listitem"><p>All the different get- and set-format commands were 68swept into one <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_G_FMT</code></a> and <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_S_FMT</code></a> ioctl taking a union 69and a type field selecting the union member as parameter. Purpose is to 70simplify the API by eliminating several ioctls and to allow new and 71driver private data streams without adding new ioctls.</p><p>This change obsoletes the following ioctls: 72<code class="constant">VIDIOC_S_INFMT</code>, 73<code class="constant">VIDIOC_G_INFMT</code>, 74<code class="constant">VIDIOC_S_OUTFMT</code>, 75<code class="constant">VIDIOC_G_OUTFMT</code>, 76<code class="constant">VIDIOC_S_VBIFMT</code> and 77<code class="constant">VIDIOC_G_VBIFMT</code>. The image format structure 78<span class="structname">v4l2_format</span> was renamed to struct <a class="link" href="pixfmt.html#v4l2-pix-format" title="Table 2.1. struct v4l2_pix_format">v4l2_pix_format</a>, 79while struct <a class="link" href="vidioc-g-fmt.html#v4l2-format" title="Table A.72. struct v4l2_format">v4l2_format</a> is now the envelopping structure for all format 80negotiations.</p></li><li class="listitem"><p>Similar to the changes above, the 81<code class="constant">VIDIOC_G_PARM</code> and 82<code class="constant">VIDIOC_S_PARM</code> ioctls were merged with 83<code class="constant">VIDIOC_G_OUTPARM</code> and 84<code class="constant">VIDIOC_S_OUTPARM</code>. A 85<em class="structfield"><code>type</code></em> field in the new struct <a class="link" href="vidioc-g-parm.html#v4l2-streamparm" title="Table A.78. struct v4l2_streamparm">v4l2_streamparm</a> 86selects the respective union member.</p><p>This change obsoletes the 87<code class="constant">VIDIOC_G_OUTPARM</code> and 88<code class="constant">VIDIOC_S_OUTPARM</code> ioctls.</p></li><li class="listitem"><p>Control enumeration was simplified, and two new 89control flags were introduced and one dropped. The 90<em class="structfield"><code>catname</code></em> field was replaced by a 91<em class="structfield"><code>group</code></em> field.</p><p>Drivers can now flag unsupported and temporarily 92unavailable controls with <code class="constant">V4L2_CTRL_FLAG_DISABLED</code> 93and <code class="constant">V4L2_CTRL_FLAG_GRABBED</code> respectively. The 94<em class="structfield"><code>group</code></em> name indicates a possibly narrower 95classification than the <em class="structfield"><code>category</code></em>. In other 96words, there may be multiple groups within a category. Controls within 97a group would typically be drawn within a group box. Controls in 98different categories might have a greater separation, or may even 99appear in separate windows.</p></li><li class="listitem"><p>The struct <a class="link" href="buffer.html#v4l2-buffer" title="Table 3.1. struct v4l2_buffer">v4l2_buffer</a> <em class="structfield"><code>timestamp</code></em> 100was changed to a 64 bit integer, containing the sampling or output 101time of the frame in nanoseconds. Additionally timestamps will be in 102absolute system time, not starting from zero at the beginning of a 103stream. The data type name for timestamps is stamp_t, defined as a 104signed 64-bit integer. Output devices should not send a buffer out 105until the time in the timestamp field has arrived. I would like to 106follow SGI's lead, and adopt a multimedia timestamping system like 107their UST (Unadjusted System Time). See 108http://web.archive.org/web/*/http://reality.sgi.com 109/cpirazzi_engr/lg/time/intro.html. 110UST uses timestamps that are 64-bit signed integers 111(not struct timeval's) and given in nanosecond units. The UST clock 112starts at zero when the system is booted and runs continuously and 113uniformly. It takes a little over 292 years for UST to overflow. There 114is no way to set the UST clock. The regular Linux time-of-day clock 115can be changed periodically, which would cause errors if it were being 116used for timestamping a multimedia stream. A real UST style clock will 117require some support in the kernel that is not there yet. But in 118anticipation, I will change the timestamp field to a 64-bit integer, 119and I will change the v4l2_masterclock_gettime() function (used only 120by drivers) to return a 64-bit integer.</p></li><li class="listitem"><p>A <em class="structfield"><code>sequence</code></em> field was added 121to struct <a class="link" href="buffer.html#v4l2-buffer" title="Table 3.1. struct v4l2_buffer">v4l2_buffer</a>. The <em class="structfield"><code>sequence</code></em> field counts 122captured frames, it is ignored by output devices. When a capture 123driver drops a frame, the sequence number of that frame is 124skipped.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1110980828"></a>V4L2 Version 0.20 incremental changes</h3></div></div></div><p>1999-12-23: In struct <a class="link" href="raw-vbi.html#v4l2-vbi-format" title="Table 4.4. struct v4l2_vbi_format">v4l2_vbi_format</a> the 125<em class="structfield"><code>reserved1</code></em> field became 126<em class="structfield"><code>offset</code></em>. Previously drivers were required to 127clear the <em class="structfield"><code>reserved1</code></em> field.</p><p>2000-01-13: The 128 <code class="constant">V4L2_FMT_FLAG_NOT_INTERLACED</code> flag was added.</p><p>2000-07-31: The <code class="filename">linux/poll.h</code> header 129is now included by <code class="filename">videodev.h</code> for compatibility 130with the original <code class="filename">videodev.h</code> file.</p><p>2000-11-20: <code class="constant">V4L2_TYPE_VBI_OUTPUT</code> and 131<code class="constant">V4L2_PIX_FMT_Y41P</code> were added.</p><p>2000-11-25: <code class="constant">V4L2_TYPE_VBI_INPUT</code> was 132added.</p><p>2000-12-04: A couple typos in symbol names were fixed.</p><p>2001-01-18: To avoid namespace conflicts the 133<code class="constant">fourcc</code> macro defined in the 134<code class="filename">videodev.h</code> header file was renamed to 135<code class="constant">v4l2_fourcc</code>.</p><p>2001-01-25: A possible driver-level compatibility problem 136between the <code class="filename">videodev.h</code> file in Linux 2.4.0 and 137the <code class="filename">videodev.h</code> file included in the 138<code class="filename">videodevX</code> patch was fixed. Users of an earlier 139version of <code class="filename">videodevX</code> on Linux 2.4.0 should 140recompile their V4L and V4L2 drivers.</p><p>2001-01-26: A possible kernel-level incompatibility 141between the <code class="filename">videodev.h</code> file in the 142<code class="filename">videodevX</code> patch and the 143<code class="filename">videodev.h</code> file in Linux 2.2.x with devfs patches 144applied was fixed.</p><p>2001-03-02: Certain V4L ioctls which pass data in both 145direction although they are defined with read-only parameter, did not 146work correctly through the backward compatibility layer. 147[Solution?]</p><p>2001-04-13: Big endian 16-bit RGB formats were added.</p><p>2001-09-17: New YUV formats and the <a class="link" href="vidioc-g-frequency.html" title="ioctl VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY"><code class="constant">VIDIOC_G_FREQUENCY</code></a> and 148<a class="link" href="vidioc-g-frequency.html" title="ioctl VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY"><code class="constant">VIDIOC_S_FREQUENCY</code></a> ioctls were added. (The old 149<code class="constant">VIDIOC_G_FREQ</code> and 150<code class="constant">VIDIOC_S_FREQ</code> ioctls did not take multiple tuners 151into account.)</p><p>2000-09-18: <code class="constant">V4L2_BUF_TYPE_VBI</code> was 152added. This may <span class="emphasis"><em>break compatibility</em></span> as the 153<a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_G_FMT</code></a> and <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_S_FMT</code></a> ioctls may fail now if the struct 154<span class="structname">v4l2_fmt</span> <em class="structfield"><code>type</code></em> 155field does not contain <code class="constant">V4L2_BUF_TYPE_VBI</code>. In the 156documentation of the struct <a class="link" href="raw-vbi.html#v4l2-vbi-format" title="Table 4.4. struct v4l2_vbi_format">v4l2_vbi_format</a> 157<em class="structfield"><code>offset</code></em> field the ambiguous phrase "rising 158edge" was changed to "leading edge".</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1110995620"></a>V4L2 Version 0.20 2000-11-23</h3></div></div></div><p>A number of changes were made to the raw VBI 159interface.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Figures clarifying the line numbering scheme were 160added to the V4L2 API specification. The 161<em class="structfield"><code>start</code></em>[0] and 162<em class="structfield"><code>start</code></em>[1] fields no longer count line 163numbers beginning at zero. Rationale: a) The previous definition was 164unclear. b) The <em class="structfield"><code>start</code></em>[] values are ordinal 165numbers. c) There is no point in inventing a new line numbering 166scheme. We now use line number as defined by ITU-R, period. 167Compatibility: Add one to the start values. Applications depending on 168the previous semantics may not function correctly.</p></li><li class="listitem"><p>The restriction "count[0] > 0 and count[1] > 0" 169has been relaxed to "(count[0] + count[1]) > 0". Rationale: 170Drivers may allocate resources at scan line granularity and some data 171services are transmitted only on the first field. The comment that 172both <em class="structfield"><code>count</code></em> values will usually be equal is 173misleading and pointless and has been removed. This change 174<span class="emphasis"><em>breaks compatibility</em></span> with earlier versions: 175Drivers may return EINVAL, applications may not function 176correctly.</p></li><li class="listitem"><p>Drivers are again permitted to return negative 177(unknown) start values as proposed earlier. Why this feature was 178dropped is unclear. This change may <span class="emphasis"><em>break 179compatibility</em></span> with applications depending on the start 180values being positive. The use of <code class="constant">EBUSY</code> and 181<code class="constant">EINVAL</code> error codes with the <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_S_FMT</code></a> ioctl 182was clarified. The <span class="errorcode">EBUSY</span> error code was finally documented, and the 183<em class="structfield"><code>reserved2</code></em> field which was previously 184mentioned only in the <code class="filename">videodev.h</code> header 185file.</p></li><li class="listitem"><p>New buffer types 186<code class="constant">V4L2_TYPE_VBI_INPUT</code> and 187<code class="constant">V4L2_TYPE_VBI_OUTPUT</code> were added. The former is an 188alias for the old <code class="constant">V4L2_TYPE_VBI</code>, the latter was 189missing in the <code class="filename">videodev.h</code> file.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111004332"></a>V4L2 Version 0.20 2002-07-25</h3></div></div></div><p>Added sliced VBI interface proposal.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111004996"></a>V4L2 in Linux 2.5.46, 2002-10</h3></div></div></div><p>Around October-November 2002, prior to an announced 190feature freeze of Linux 2.5, the API was revised, drawing from 191experience with V4L2 0.20. This unnamed version was finally merged 192into Linux 2.5.46.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>As specified in <a class="xref" href="common.html#related" title="Related Devices">the section called “Related Devices”</a>, drivers 193must make related device functions available under all minor device 194numbers.</p></li><li class="listitem"><p>The <a class="link" href="func-open.html" title="V4L2 open()"><code class="function">open()</code></a> function requires access mode 195<code class="constant">O_RDWR</code> regardless of the device type. All V4L2 196drivers exchanging data with applications must support the 197<code class="constant">O_NONBLOCK</code> flag. The <code class="constant">O_NOIO</code> 198flag, a V4L2 symbol which aliased the meaningless 199<code class="constant">O_TRUNC</code> to indicate accesses without data 200exchange (panel applications) was dropped. Drivers must stay in "panel 201mode" until the application attempts to initiate a data exchange, see 202<a class="xref" href="common.html#open" title="Opening and Closing Devices">the section called “Opening and Closing Devices”</a>.</p></li><li class="listitem"><p>The struct <a class="link" href="vidioc-querycap.html#v4l2-capability" title="Table A.93. struct v4l2_capability">v4l2_capability</a> changed dramatically. Note that 203also the size of the structure changed, which is encoded in the ioctl 204request code, thus older V4L2 devices will respond with an <span class="errorcode">EINVAL</span> error code to 205the new <a class="link" href="vidioc-querycap.html" title="ioctl VIDIOC_QUERYCAP"><code class="constant">VIDIOC_QUERYCAP</code></a> ioctl.</p><p>There are new fields to identify the driver, a new RDS 206device function <code class="constant">V4L2_CAP_RDS_CAPTURE</code>, the 207<code class="constant">V4L2_CAP_AUDIO</code> flag indicates if the device has 208any audio connectors, another I/O capability 209<code class="constant">V4L2_CAP_ASYNCIO</code> can be flagged. In response to 210these changes the <em class="structfield"><code>type</code></em> field became a bit 211set and was merged into the <em class="structfield"><code>flags</code></em> field. 212<code class="constant">V4L2_FLAG_TUNER</code> was renamed to 213<code class="constant">V4L2_CAP_TUNER</code>, 214<code class="constant">V4L2_CAP_VIDEO_OVERLAY</code> replaced 215<code class="constant">V4L2_FLAG_PREVIEW</code> and 216<code class="constant">V4L2_CAP_VBI_CAPTURE</code> and 217<code class="constant">V4L2_CAP_VBI_OUTPUT</code> replaced 218<code class="constant">V4L2_FLAG_DATA_SERVICE</code>. 219<code class="constant">V4L2_FLAG_READ</code> and 220<code class="constant">V4L2_FLAG_WRITE</code> were merged into 221<code class="constant">V4L2_CAP_READWRITE</code>.</p><p>The redundant fields 222<em class="structfield"><code>inputs</code></em>, <em class="structfield"><code>outputs</code></em> 223and <em class="structfield"><code>audios</code></em> were removed. These properties 224can be determined as described in <a class="xref" href="video.html" title="Video Inputs and Outputs">the section called “Video Inputs and Outputs”</a> and <a class="xref" href="audio.html" title="Audio Inputs and Outputs">the section called “Audio Inputs and Outputs”</a>.</p><p>The somewhat volatile and therefore barely useful 225fields <em class="structfield"><code>maxwidth</code></em>, 226<em class="structfield"><code>maxheight</code></em>, 227<em class="structfield"><code>minwidth</code></em>, 228<em class="structfield"><code>minheight</code></em>, 229<em class="structfield"><code>maxframerate</code></em> were removed. This information 230is available as described in <a class="xref" href="format.html" title="Data Formats">the section called “Data Formats”</a> and 231<a class="xref" href="standard.html" title="Video Standards">the section called “Video Standards”</a>.</p><p><code class="constant">V4L2_FLAG_SELECT</code> was removed. We 232believe the select() function is important enough to require support 233of it in all V4L2 drivers exchanging data with applications. The 234redundant <code class="constant">V4L2_FLAG_MONOCHROME</code> flag was removed, 235this information is available as described in <a class="xref" href="format.html" title="Data Formats">the section called “Data Formats”</a>.</p></li><li class="listitem"><p>In struct <a class="link" href="vidioc-enuminput.html#v4l2-input" title="Table A.39. struct v4l2_input">v4l2_input</a> the 236<em class="structfield"><code>assoc_audio</code></em> field and the 237<em class="structfield"><code>capability</code></em> field and its only flag 238<code class="constant">V4L2_INPUT_CAP_AUDIO</code> was replaced by the new 239<em class="structfield"><code>audioset</code></em> field. Instead of linking one 240video input to one audio input this field reports all audio inputs 241this video input combines with.</p><p>New fields are <em class="structfield"><code>tuner</code></em> 242(reversing the former link from tuners to video inputs), 243<em class="structfield"><code>std</code></em> and 244<em class="structfield"><code>status</code></em>.</p><p>Accordingly struct <a class="link" href="vidioc-enumoutput.html#v4l2-output" title="Table A.43. struct v4l2_output">v4l2_output</a> lost its 245<em class="structfield"><code>capability</code></em> and 246<em class="structfield"><code>assoc_audio</code></em> fields. 247<em class="structfield"><code>audioset</code></em>, 248<em class="structfield"><code>modulator</code></em> and 249<em class="structfield"><code>std</code></em> where added instead.</p></li><li class="listitem"><p>The struct <a class="link" href="vidioc-g-audio.html#v4l2-audio" title="Table A.51. struct v4l2_audio">v4l2_audio</a> field 250<em class="structfield"><code>audio</code></em> was renamed to 251<em class="structfield"><code>index</code></em>, for consistency with other 252structures. A new capability flag 253<code class="constant">V4L2_AUDCAP_STEREO</code> was added to indicated if the 254audio input in question supports stereo sound. 255<code class="constant">V4L2_AUDCAP_EFFECTS</code> and the corresponding 256<code class="constant">V4L2_AUDMODE</code> flags where removed. This can be 257easily implemented using controls. (However the same applies to AVL 258which is still there.)</p><p>Again for consistency the struct <a class="link" href="vidioc-g-audioout.html#v4l2-audioout" title="Table A.54. struct v4l2_audioout">v4l2_audioout</a> field 259<em class="structfield"><code>audio</code></em> was renamed to 260<em class="structfield"><code>index</code></em>.</p></li><li class="listitem"><p>The struct <a class="link" href="vidioc-g-tuner.html#v4l2-tuner" title="Table A.87. struct v4l2_tuner">v4l2_tuner</a> 261<em class="structfield"><code>input</code></em> field was replaced by an 262<em class="structfield"><code>index</code></em> field, permitting devices with 263multiple tuners. The link between video inputs and tuners is now 264reversed, inputs point to their tuner. The 265<em class="structfield"><code>std</code></em> substructure became a 266simple set (more about this below) and moved into struct <a class="link" href="vidioc-enuminput.html#v4l2-input" title="Table A.39. struct v4l2_input">v4l2_input</a>. A 267<em class="structfield"><code>type</code></em> field was added.</p><p>Accordingly in struct <a class="link" href="vidioc-g-modulator.html#v4l2-modulator" title="Table A.76. struct v4l2_modulator">v4l2_modulator</a> the 268<em class="structfield"><code>output</code></em> was replaced by an 269<em class="structfield"><code>index</code></em> field.</p><p>In struct <a class="link" href="vidioc-g-frequency.html#v4l2-frequency" title="Table A.73. struct v4l2_frequency">v4l2_frequency</a> the 270<em class="structfield"><code>port</code></em> field was replaced by a 271<em class="structfield"><code>tuner</code></em> field containing the respective tuner 272or modulator index number. A tuner <em class="structfield"><code>type</code></em> 273field was added and the <em class="structfield"><code>reserved</code></em> field 274became larger for future extensions (satellite tuners in 275particular).</p></li><li class="listitem"><p>The idea of completely transparent video standards was 276dropped. Experience showed that applications must be able to work with 277video standards beyond presenting the user a menu. Instead of 278enumerating supported standards with an ioctl applications can now 279refer to standards by <a class="link" href="vidioc-enumstd.html#v4l2-std-id" title="Table A.48. typedef v4l2_std_id">v4l2_std_id</a> and symbols defined in the 280<code class="filename">videodev2.h</code> header file. For details see <a class="xref" href="standard.html" title="Video Standards">the section called “Video Standards”</a>. The <a class="link" href="vidioc-g-std.html" title="ioctl VIDIOC_G_STD, VIDIOC_S_STD"><code class="constant">VIDIOC_G_STD</code></a> and 281<a class="link" href="vidioc-g-std.html" title="ioctl VIDIOC_G_STD, VIDIOC_S_STD"><code class="constant">VIDIOC_S_STD</code></a> now take a pointer to this type as argument. 282<a class="link" href="vidioc-querystd.html" title="ioctl VIDIOC_QUERYSTD"><code class="constant">VIDIOC_QUERYSTD</code></a> was added to autodetect the received standard, if 283the hardware has this capability. In struct <a class="link" href="vidioc-enumstd.html#v4l2-standard" title="Table A.46. struct v4l2_standard">v4l2_standard</a> an 284<em class="structfield"><code>index</code></em> field was added for <a class="link" href="vidioc-enumstd.html" title="ioctl VIDIOC_ENUMSTD"><code class="constant">VIDIOC_ENUMSTD</code></a>. 285A <a class="link" href="vidioc-enumstd.html#v4l2-std-id" title="Table A.48. typedef v4l2_std_id">v4l2_std_id</a> field named <em class="structfield"><code>id</code></em> was added as 286machine readable identifier, also replacing the 287<em class="structfield"><code>transmission</code></em> field. The misleading 288<em class="structfield"><code>framerate</code></em> field was renamed 289to <em class="structfield"><code>frameperiod</code></em>. The now obsolete 290<em class="structfield"><code>colorstandard</code></em> information, originally 291needed to distguish between variations of standards, were 292removed.</p><p>Struct <span class="structname">v4l2_enumstd</span> ceased to 293be. <a class="link" href="vidioc-enumstd.html" title="ioctl VIDIOC_ENUMSTD"><code class="constant">VIDIOC_ENUMSTD</code></a> now takes a pointer to a struct <a class="link" href="vidioc-enumstd.html#v4l2-standard" title="Table A.46. struct v4l2_standard">v4l2_standard</a> 294directly. The information which standards are supported by a 295particular video input or output moved into struct <a class="link" href="vidioc-enuminput.html#v4l2-input" title="Table A.39. struct v4l2_input">v4l2_input</a> and 296struct <a class="link" href="vidioc-enumoutput.html#v4l2-output" title="Table A.43. struct v4l2_output">v4l2_output</a> fields named <em class="structfield"><code>std</code></em>, 297respectively.</p></li><li class="listitem"><p>The struct <a class="link" href="vidioc-queryctrl.html#v4l2-queryctrl" title="Table A.95. struct v4l2_queryctrl">v4l2_queryctrl</a> fields 298<em class="structfield"><code>category</code></em> and 299<em class="structfield"><code>group</code></em> did not catch on and/or were not 300implemented as expected and therefore removed.</p></li><li class="listitem"><p>The <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_TRY_FMT</code></a> ioctl was added to negotiate data 301formats as with <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_S_FMT</code></a>, but without the overhead of 302programming the hardware and regardless of I/O in progress.</p><p>In struct <a class="link" href="vidioc-g-fmt.html#v4l2-format" title="Table A.72. struct v4l2_format">v4l2_format</a> the <em class="structfield"><code>fmt</code></em> 303union was extended to contain struct <a class="link" href="overlay.html#v4l2-window" title="Table 4.1. struct v4l2_window">v4l2_window</a>. All image format 304negotiations are now possible with <code class="constant">VIDIOC_G_FMT</code>, 305<code class="constant">VIDIOC_S_FMT</code> and 306<code class="constant">VIDIOC_TRY_FMT</code>; ioctl. The 307<code class="constant">VIDIOC_G_WIN</code> and 308<code class="constant">VIDIOC_S_WIN</code> ioctls to prepare for a video 309overlay were removed. The <em class="structfield"><code>type</code></em> field 310changed to type enum <a class="link" href="buffer.html#v4l2-buf-type" title="Table 3.3. enum v4l2_buf_type">v4l2_buf_type</a> and the buffer type names changed as 311follows.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Old defines</th><th>enum <a class="link" href="buffer.html#v4l2-buf-type" title="Table 3.3. enum v4l2_buf_type">v4l2_buf_type</a></th></tr></thead><tbody valign="top"><tr><td valign="top"><code class="constant">V4L2_BUF_TYPE_CAPTURE</code></td><td valign="top"><code class="constant">V4L2_BUF_TYPE_VIDEO_CAPTURE</code></td></tr><tr><td valign="top"><code class="constant">V4L2_BUF_TYPE_CODECIN</code></td><td valign="top">Omitted for now</td></tr><tr><td valign="top"><code class="constant">V4L2_BUF_TYPE_CODECOUT</code></td><td valign="top">Omitted for now</td></tr><tr><td valign="top"><code class="constant">V4L2_BUF_TYPE_EFFECTSIN</code></td><td valign="top">Omitted for now</td></tr><tr><td valign="top"><code class="constant">V4L2_BUF_TYPE_EFFECTSIN2</code></td><td valign="top">Omitted for now</td></tr><tr><td valign="top"><code class="constant">V4L2_BUF_TYPE_EFFECTSOUT</code></td><td valign="top">Omitted for now</td></tr><tr><td valign="top"><code class="constant">V4L2_BUF_TYPE_VIDEOOUT</code></td><td valign="top"><code class="constant">V4L2_BUF_TYPE_VIDEO_OUTPUT</code></td></tr><tr><td valign="top"><code class="constant">-</code></td><td valign="top"><code class="constant">V4L2_BUF_TYPE_VIDEO_OVERLAY</code></td></tr><tr><td valign="top"><code class="constant">-</code></td><td valign="top"><code class="constant">V4L2_BUF_TYPE_VBI_CAPTURE</code></td></tr><tr><td valign="top"><code class="constant">-</code></td><td valign="top"><code class="constant">V4L2_BUF_TYPE_VBI_OUTPUT</code></td></tr><tr><td valign="top"><code class="constant">-</code></td><td valign="top"><code class="constant">V4L2_BUF_TYPE_SLICED_VBI_CAPTURE</code></td></tr><tr><td valign="top"><code class="constant">-</code></td><td valign="top"><code class="constant">V4L2_BUF_TYPE_SLICED_VBI_OUTPUT</code></td></tr><tr><td valign="top"><code class="constant">V4L2_BUF_TYPE_PRIVATE_BASE</code></td><td valign="top"><code class="constant">V4L2_BUF_TYPE_PRIVATE</code> (but this is deprecated)</td></tr></tbody></table></div></li><li class="listitem"><p>In struct <a class="link" href="vidioc-enum-fmt.html#v4l2-fmtdesc" title="Table A.28. struct v4l2_fmtdesc">v4l2_fmtdesc</a> a enum <a class="link" href="buffer.html#v4l2-buf-type" title="Table 3.3. enum v4l2_buf_type">v4l2_buf_type</a> field named 312<em class="structfield"><code>type</code></em> was added as in struct <a class="link" href="vidioc-g-fmt.html#v4l2-format" title="Table A.72. struct v4l2_format">v4l2_format</a>. The 313<code class="constant">VIDIOC_ENUM_FBUFFMT</code> ioctl is no longer needed and 314was removed. These calls can be replaced by <a class="link" href="vidioc-enum-fmt.html" title="ioctl VIDIOC_ENUM_FMT"><code class="constant">VIDIOC_ENUM_FMT</code></a> with 315type <code class="constant">V4L2_BUF_TYPE_VIDEO_OVERLAY</code>.</p></li><li class="listitem"><p>In struct <a class="link" href="pixfmt.html#v4l2-pix-format" title="Table 2.1. struct v4l2_pix_format">v4l2_pix_format</a> the 316<em class="structfield"><code>depth</code></em> field was removed, assuming 317applications which recognize the format by its four-character-code 318already know the color depth, and others do not care about it. The 319same rationale lead to the removal of the 320<code class="constant">V4L2_FMT_FLAG_COMPRESSED</code> flag. The 321<code class="constant">V4L2_FMT_FLAG_SWCONVECOMPRESSED</code> flag was removed 322because drivers are not supposed to convert images in kernel space. A 323user library of conversion functions should be provided instead. The 324<code class="constant">V4L2_FMT_FLAG_BYTESPERLINE</code> flag was redundant. 325Applications can set the <em class="structfield"><code>bytesperline</code></em> field 326to zero to get a reasonable default. Since the remaining flags were 327replaced as well, the <em class="structfield"><code>flags</code></em> field itself 328was removed.</p><p>The interlace flags were replaced by a enum <a class="link" href="field-order.html#v4l2-field" title="Table 3.9. enum v4l2_field">v4l2_field</a> 329value in a newly added <em class="structfield"><code>field</code></em> 330field.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><thead><tr><th>Old flag</th><th>enum <a class="link" href="field-order.html#v4l2-field" title="Table 3.9. enum v4l2_field">v4l2_field</a></th></tr></thead><tbody valign="top"><tr><td valign="top"><code class="constant">V4L2_FMT_FLAG_NOT_INTERLACED</code></td><td valign="top">?</td></tr><tr><td valign="top"><code class="constant">V4L2_FMT_FLAG_INTERLACED</code> 331= <code class="constant">V4L2_FMT_FLAG_COMBINED</code></td><td valign="top"><code class="constant">V4L2_FIELD_INTERLACED</code></td></tr><tr><td valign="top"><code class="constant">V4L2_FMT_FLAG_TOPFIELD</code> 332= <code class="constant">V4L2_FMT_FLAG_ODDFIELD</code></td><td valign="top"><code class="constant">V4L2_FIELD_TOP</code></td></tr><tr><td valign="top"><code class="constant">V4L2_FMT_FLAG_BOTFIELD</code> 333= <code class="constant">V4L2_FMT_FLAG_EVENFIELD</code></td><td valign="top"><code class="constant">V4L2_FIELD_BOTTOM</code></td></tr><tr><td valign="top"><code class="constant">-</code></td><td valign="top"><code class="constant">V4L2_FIELD_SEQ_TB</code></td></tr><tr><td valign="top"><code class="constant">-</code></td><td valign="top"><code class="constant">V4L2_FIELD_SEQ_BT</code></td></tr><tr><td valign="top"><code class="constant">-</code></td><td valign="top"><code class="constant">V4L2_FIELD_ALTERNATE</code></td></tr></tbody></table></div><p>The color space flags were replaced by a 334enum <a class="link" href="ch02s05.html#v4l2-colorspace" title="Table 2.4. V4L2 Colorspaces">v4l2_colorspace</a> value in a newly added 335<em class="structfield"><code>colorspace</code></em> field, where one of 336<code class="constant">V4L2_COLORSPACE_SMPTE170M</code>, 337<code class="constant">V4L2_COLORSPACE_BT878</code>, 338<code class="constant">V4L2_COLORSPACE_470_SYSTEM_M</code> or 339<code class="constant">V4L2_COLORSPACE_470_SYSTEM_BG</code> replaces 340<code class="constant">V4L2_FMT_CS_601YUV</code>.</p></li><li class="listitem"><p>In struct <a class="link" href="vidioc-reqbufs.html#v4l2-requestbuffers" title="Table A.100. struct v4l2_requestbuffers">v4l2_requestbuffers</a> the 341<em class="structfield"><code>type</code></em> field was properly defined as 342enum <a class="link" href="buffer.html#v4l2-buf-type" title="Table 3.3. enum v4l2_buf_type">v4l2_buf_type</a>. Buffer types changed as mentioned above. A new 343<em class="structfield"><code>memory</code></em> field of type enum <a class="link" href="buffer.html#v4l2-memory" title="Table 3.5. enum v4l2_memory">v4l2_memory</a> was 344added to distinguish between I/O methods using buffers allocated 345by the driver or the application. See <a class="xref" href="io.html" title="Chapter 3. Input/Output">Chapter 3, <i>Input/Output</i></a> for 346details.</p></li><li class="listitem"><p>In struct <a class="link" href="buffer.html#v4l2-buffer" title="Table 3.1. struct v4l2_buffer">v4l2_buffer</a> the <em class="structfield"><code>type</code></em> 347field was properly defined as enum <a class="link" href="buffer.html#v4l2-buf-type" title="Table 3.3. enum v4l2_buf_type">v4l2_buf_type</a>. Buffer types changed as 348mentioned above. A <em class="structfield"><code>field</code></em> field of type 349enum <a class="link" href="field-order.html#v4l2-field" title="Table 3.9. enum v4l2_field">v4l2_field</a> was added to indicate if a buffer contains a top or 350bottom field. The old field flags were removed. Since no unadjusted 351system time clock was added to the kernel as planned, the 352<em class="structfield"><code>timestamp</code></em> field changed back from type 353stamp_t, an unsigned 64 bit integer expressing the sample time in 354nanoseconds, to struct <span class="structname">timeval</span>. With the 355addition of a second memory mapping method the 356<em class="structfield"><code>offset</code></em> field moved into union 357<em class="structfield"><code>m</code></em>, and a new 358<em class="structfield"><code>memory</code></em> field of type enum <a class="link" href="buffer.html#v4l2-memory" title="Table 3.5. enum v4l2_memory">v4l2_memory</a> was 359added to distinguish between I/O methods. See <a class="xref" href="io.html" title="Chapter 3. Input/Output">Chapter 3, <i>Input/Output</i></a> 360for details.</p><p>The <code class="constant">V4L2_BUF_REQ_CONTIG</code> 361flag was used by the V4L compatibility layer, after changes to this 362code it was no longer needed. The 363<code class="constant">V4L2_BUF_ATTR_DEVICEMEM</code> flag would indicate if 364the buffer was indeed allocated in device memory rather than DMA-able 365system memory. It was barely useful and so was removed.</p></li><li class="listitem"><p>In struct <a class="link" href="vidioc-g-fbuf.html#v4l2-framebuffer" title="Table A.69. struct v4l2_framebuffer">v4l2_framebuffer</a> the 366<em class="structfield"><code>base[3]</code></em> array anticipating double- and 367triple-buffering in off-screen video memory, however without defining 368a synchronization mechanism, was replaced by a single pointer. The 369<code class="constant">V4L2_FBUF_CAP_SCALEUP</code> and 370<code class="constant">V4L2_FBUF_CAP_SCALEDOWN</code> flags were removed. 371Applications can determine this capability more accurately using the 372new cropping and scaling interface. The 373<code class="constant">V4L2_FBUF_CAP_CLIPPING</code> flag was replaced by 374<code class="constant">V4L2_FBUF_CAP_LIST_CLIPPING</code> and 375<code class="constant">V4L2_FBUF_CAP_BITMAP_CLIPPING</code>.</p></li><li class="listitem"><p>In struct <a class="link" href="overlay.html#v4l2-clip" title="Table 4.2. struct v4l2_clip">v4l2_clip</a> the <em class="structfield"><code>x</code></em>, 376<em class="structfield"><code>y</code></em>, <em class="structfield"><code>width</code></em> and 377<em class="structfield"><code>height</code></em> field moved into a 378<em class="structfield"><code>c</code></em> substructure of type struct <a class="link" href="overlay.html#v4l2-rect" title="Table 4.3. struct v4l2_rect">v4l2_rect</a>. The 379<em class="structfield"><code>x</code></em> and <em class="structfield"><code>y</code></em> fields 380were renamed to <em class="structfield"><code>left</code></em> and 381<em class="structfield"><code>top</code></em>, i. e. offsets to a context dependent 382origin.</p></li><li class="listitem"><p>In struct <a class="link" href="overlay.html#v4l2-window" title="Table 4.1. struct v4l2_window">v4l2_window</a> the <em class="structfield"><code>x</code></em>, 383<em class="structfield"><code>y</code></em>, <em class="structfield"><code>width</code></em> and 384<em class="structfield"><code>height</code></em> field moved into a 385<em class="structfield"><code>w</code></em> substructure as above. A 386<em class="structfield"><code>field</code></em> field of type %v4l2-field; was added 387to distinguish between field and frame (interlaced) overlay.</p></li><li class="listitem"><p>The digital zoom interface, including struct 388<span class="structname">v4l2_zoomcap</span>, struct 389<span class="structname">v4l2_zoom</span>, 390<code class="constant">V4L2_ZOOM_NONCAP</code> and 391<code class="constant">V4L2_ZOOM_WHILESTREAMING</code> was replaced by a new 392cropping and scaling interface. The previously unused struct 393<span class="structname">v4l2_cropcap</span> and 394<span class="structname">v4l2_crop</span> where redefined for this purpose. 395See <a class="xref" href="crop.html" title="Image Cropping, Insertion and Scaling">the section called “Image Cropping, Insertion and Scaling”</a> for details.</p></li><li class="listitem"><p>In struct <a class="link" href="raw-vbi.html#v4l2-vbi-format" title="Table 4.4. struct v4l2_vbi_format">v4l2_vbi_format</a> the 396<em class="structfield"><code>SAMPLE_FORMAT</code></em> field now contains a 397four-character-code as used to identify video image formats and 398<code class="constant">V4L2_PIX_FMT_GREY</code> replaces the 399<code class="constant">V4L2_VBI_SF_UBYTE</code> define. The 400<em class="structfield"><code>reserved</code></em> field was extended.</p></li><li class="listitem"><p>In struct <a class="link" href="vidioc-g-parm.html#v4l2-captureparm" title="Table A.79. struct v4l2_captureparm">v4l2_captureparm</a> the type of the 401<em class="structfield"><code>timeperframe</code></em> field changed from unsigned 402long to struct <a class="link" href="vidioc-enumstd.html#v4l2-fract" title="Table A.47. struct v4l2_fract">v4l2_fract</a>. This allows the accurate expression of multiples 403of the NTSC-M frame rate 30000 / 1001. A new field 404<em class="structfield"><code>readbuffers</code></em> was added to control the driver 405behaviour in read I/O mode.</p><p>Similar changes were made to struct <a class="link" href="vidioc-g-parm.html#v4l2-outputparm" title="Table A.80. struct v4l2_outputparm">v4l2_outputparm</a>.</p></li><li class="listitem"><p>The struct <span class="structname">v4l2_performance</span> 406and <code class="constant">VIDIOC_G_PERF</code> ioctl were dropped. Except when 407using the <a class="link" href="io.html#rw" title="Read/Write">read/write I/O method</a>, which is 408limited anyway, this information is already available to 409applications.</p></li><li class="listitem"><p>The example transformation from RGB to YCbCr color 410space in the old V4L2 documentation was inaccurate, this has been 411corrected in <a class="xref" href="pixfmt.html" title="Chapter 2. Image Formats">Chapter 2, <i>Image Formats</i></a>.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111100852"></a>V4L2 2003-06-19</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>A new capability flag 412<code class="constant">V4L2_CAP_RADIO</code> was added for radio devices. Prior 413to this change radio devices would identify solely by having exactly one 414tuner whose type field reads <code class="constant">V4L2_TUNER_RADIO</code>.</p></li><li class="listitem"><p>An optional driver access priority mechanism was 415added, see <a class="xref" href="app-pri.html" title="Application Priority">the section called “Application Priority”</a> for details.</p></li><li class="listitem"><p>The audio input and output interface was found to be 416incomplete.</p><p>Previously the <a class="link" href="vidioc-g-audio.html" title="ioctl VIDIOC_G_AUDIO, VIDIOC_S_AUDIO"><code class="constant">VIDIOC_G_AUDIO</code></a> 417ioctl would enumerate the available audio inputs. An ioctl to 418determine the current audio input, if more than one combines with the 419current video input, did not exist. So 420<code class="constant">VIDIOC_G_AUDIO</code> was renamed to 421<code class="constant">VIDIOC_G_AUDIO_OLD</code>, this ioctl was removed on 422Kernel 2.6.39. The <a class="link" href="vidioc-enumaudio.html" title="ioctl VIDIOC_ENUMAUDIO"><code class="constant">VIDIOC_ENUMAUDIO</code></a> ioctl was added to enumerate 423audio inputs, while <a class="link" href="vidioc-g-audio.html" title="ioctl VIDIOC_G_AUDIO, VIDIOC_S_AUDIO"><code class="constant">VIDIOC_G_AUDIO</code></a> now reports the current audio 424input.</p><p>The same changes were made to <a class="link" href="vidioc-g-audioout.html" title="ioctl VIDIOC_G_AUDOUT, VIDIOC_S_AUDOUT"><code class="constant">VIDIOC_G_AUDOUT</code></a> and 425<a class="link" href="vidioc-enumaudioout.html" title="ioctl VIDIOC_ENUMAUDOUT"><code class="constant">VIDIOC_ENUMAUDOUT</code></a>.</p><p>Until further the "videodev" module will automatically 426translate between the old and new ioctls, but drivers and applications 427must be updated to successfully compile again.</p></li><li class="listitem"><p>The <a class="link" href="vidioc-overlay.html" title="ioctl VIDIOC_OVERLAY"><code class="constant">VIDIOC_OVERLAY</code></a> ioctl was incorrectly defined with 428write-read parameter. It was changed to write-only, while the write-read 429version was renamed to <code class="constant">VIDIOC_OVERLAY_OLD</code>. The old 430ioctl was removed on Kernel 2.6.39. Until further the "videodev" 431kernel module will automatically translate to the new version, so drivers 432must be recompiled, but not applications.</p></li><li class="listitem"><p><a class="xref" href="overlay.html" title="Video Overlay Interface">the section called “Video Overlay Interface”</a> incorrectly stated that 433clipping rectangles define regions where the video can be seen. 434Correct is that clipping rectangles define regions where 435<span class="emphasis"><em>no</em></span> video shall be displayed and so the graphics 436surface can be seen.</p></li><li class="listitem"><p>The <a class="link" href="vidioc-g-parm.html" title="ioctl VIDIOC_G_PARM, VIDIOC_S_PARM"><code class="constant">VIDIOC_S_PARM</code></a> and <a class="link" href="vidioc-g-ctrl.html" title="ioctl VIDIOC_G_CTRL, VIDIOC_S_CTRL"><code class="constant">VIDIOC_S_CTRL</code></a> ioctls were 437defined with write-only parameter, inconsistent with other ioctls 438modifying their argument. They were changed to write-read, while a 439<code class="constant">_OLD</code> suffix was added to the write-only versions. 440The old ioctls were removed on Kernel 2.6.39. Drivers and 441applications assuming a constant parameter need an update.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111111820"></a>V4L2 2003-11-05</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>In <a class="xref" href="pixfmt-rgb.html" title="RGB Formats">the section called “RGB Formats”</a> the following pixel 442formats were incorrectly transferred from Bill Dirks' V4L2 443specification. Descriptions below refer to bytes in memory, in 444ascending address order.</p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Symbol</th><th>In this document prior to revision 4450.5</th><th>Corrected</th></tr></thead><tbody valign="top"><tr><td valign="top"><code class="constant">V4L2_PIX_FMT_RGB24</code></td><td valign="top">B, G, R</td><td valign="top">R, G, B</td></tr><tr><td valign="top"><code class="constant">V4L2_PIX_FMT_BGR24</code></td><td valign="top">R, G, B</td><td valign="top">B, G, R</td></tr><tr><td valign="top"><code class="constant">V4L2_PIX_FMT_RGB32</code></td><td valign="top">B, G, R, X</td><td valign="top">R, G, B, X</td></tr><tr><td valign="top"><code class="constant">V4L2_PIX_FMT_BGR32</code></td><td valign="top">R, G, B, X</td><td valign="top">B, G, R, X</td></tr></tbody></table></div><p> The 446<code class="constant">V4L2_PIX_FMT_BGR24</code> example was always 447correct.</p><p>In <a class="xref" href="compat.html#v4l-image-properties" title="Image Properties">the section called “Image Properties”</a> the mapping 448of the V4L <code class="constant">VIDEO_PALETTE_RGB24</code> and 449<code class="constant">VIDEO_PALETTE_RGB32</code> formats to V4L2 pixel formats 450was accordingly corrected.</p></li><li class="listitem"><p>Unrelated to the fixes above, drivers may still 451interpret some V4L2 RGB pixel formats differently. These issues have 452yet to be addressed, for details see <a class="xref" href="pixfmt-rgb.html" title="RGB Formats">the section called “RGB Formats”</a>.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111121164"></a>V4L2 in Linux 2.6.6, 2004-05-09</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The <a class="link" href="vidioc-cropcap.html" title="ioctl VIDIOC_CROPCAP"><code class="constant">VIDIOC_CROPCAP</code></a> ioctl was incorrectly defined 453with read-only parameter. It is now defined as write-read ioctl, while 454the read-only version was renamed to 455<code class="constant">VIDIOC_CROPCAP_OLD</code>. The old ioctl was removed 456on Kernel 2.6.39.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111123236"></a>V4L2 in Linux 2.6.8</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>A new field <em class="structfield"><code>input</code></em> (former 457<em class="structfield"><code>reserved[0]</code></em>) was added to the struct <a class="link" href="buffer.html#v4l2-buffer" title="Table 3.1. struct v4l2_buffer">v4l2_buffer</a> 458structure. Purpose of this field is to alternate between video inputs 459(e. g. cameras) in step with the video capturing process. This function 460must be enabled with the new <code class="constant">V4L2_BUF_FLAG_INPUT</code> 461flag. The <em class="structfield"><code>flags</code></em> field is no longer 462read-only.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111125988"></a>V4L2 spec erratum 2004-08-01</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The return value of the 463<a class="xref" href="func-open.html" title="V4L2 open()"><span class="refentrytitle">V4L2 open()</span>(2)</a> function was incorrectly documented.</p></li><li class="listitem"><p>Audio output ioctls end in -AUDOUT, not -AUDIOOUT.</p></li><li class="listitem"><p>In the Current Audio Input example the 464<code class="constant">VIDIOC_G_AUDIO</code> ioctl took the wrong 465argument.</p></li><li class="listitem"><p>The documentation of the <a class="link" href="vidioc-qbuf.html" title="ioctl VIDIOC_QBUF, VIDIOC_DQBUF"><code class="constant">VIDIOC_QBUF</code></a> and 466<a class="link" href="vidioc-qbuf.html" title="ioctl VIDIOC_QBUF, VIDIOC_DQBUF"><code class="constant">VIDIOC_DQBUF</code></a> ioctls did not mention the struct <a class="link" href="buffer.html#v4l2-buffer" title="Table 3.1. struct v4l2_buffer">v4l2_buffer</a> 467<em class="structfield"><code>memory</code></em> field. It was also missing from 468examples. Also on the <code class="constant">VIDIOC_DQBUF</code> page the <span class="errorcode">EIO</span> error code 469was not documented.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111130996"></a>V4L2 in Linux 2.6.14</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>A new sliced VBI interface was added. It is documented 470in <a class="xref" href="sliced.html" title="Sliced VBI Data Interface">the section called “Sliced VBI Data Interface”</a> and replaces the interface first 471proposed in V4L2 specification 0.8.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111133420"></a>V4L2 in Linux 2.6.15</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The <a class="link" href="vidioc-log-status.html" title="ioctl VIDIOC_LOG_STATUS"><code class="constant">VIDIOC_LOG_STATUS</code></a> ioctl was added.</p></li><li class="listitem"><p>New video standards 472<code class="constant">V4L2_STD_NTSC_443</code>, 473<code class="constant">V4L2_STD_SECAM_LC</code>, 474<code class="constant">V4L2_STD_SECAM_DK</code> (a set of SECAM D, K and K1), 475and <code class="constant">V4L2_STD_ATSC</code> (a set of 476<code class="constant">V4L2_STD_ATSC_8_VSB</code> and 477<code class="constant">V4L2_STD_ATSC_16_VSB</code>) were defined. Note the 478<code class="constant">V4L2_STD_525_60</code> set now includes 479<code class="constant">V4L2_STD_NTSC_443</code>. See also <a class="xref" href="vidioc-enumstd.html#v4l2-std-id" title="Table A.48. typedef v4l2_std_id">Table A.48, “typedef <span class="structname">v4l2_std_id</span>”</a>.</p></li><li class="listitem"><p>The <code class="constant">VIDIOC_G_COMP</code> and 480<code class="constant">VIDIOC_S_COMP</code> ioctl were renamed to 481<code class="constant">VIDIOC_G_MPEGCOMP</code> and 482<code class="constant">VIDIOC_S_MPEGCOMP</code> respectively. Their argument 483was replaced by a struct 484<span class="structname">v4l2_mpeg_compression</span> pointer. (The 485<code class="constant">VIDIOC_G_MPEGCOMP</code> and 486<code class="constant">VIDIOC_S_MPEGCOMP</code> ioctls where removed in Linux 4872.6.25.)</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111140396"></a>V4L2 spec erratum 2005-11-27</h3></div></div></div><p>The capture example in <a class="xref" href="capture-example.html" title="Appendix D. Video Capture Example">Appendix D, <i>Video Capture Example</i></a> 488called the <a class="link" href="vidioc-g-crop.html" title="ioctl VIDIOC_G_CROP, VIDIOC_S_CROP"><code class="constant">VIDIOC_S_CROP</code></a> ioctl without checking if cropping is 489supported. In the video standard selection example in 490<a class="xref" href="standard.html" title="Video Standards">the section called “Video Standards”</a> the <a class="link" href="vidioc-g-std.html" title="ioctl VIDIOC_G_STD, VIDIOC_S_STD"><code class="constant">VIDIOC_S_STD</code></a> call used the wrong 491argument type.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111142844"></a>V4L2 spec erratum 2006-01-10</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The <code class="constant">V4L2_IN_ST_COLOR_KILL</code> flag in 492struct <a class="link" href="vidioc-enuminput.html#v4l2-input" title="Table A.39. struct v4l2_input">v4l2_input</a> not only indicates if the color killer is enabled, but 493also if it is active. (The color killer disables color decoding when 494it detects no color in the video signal to improve the image 495quality.)</p></li><li class="listitem"><p><a class="link" href="vidioc-g-parm.html" title="ioctl VIDIOC_G_PARM, VIDIOC_S_PARM"><code class="constant">VIDIOC_S_PARM</code></a> is a write-read ioctl, not write-only as 496stated on its reference page. The ioctl changed in 2003 as noted above.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111145788"></a>V4L2 spec erratum 2006-02-03</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>In struct <a class="link" href="vidioc-g-parm.html#v4l2-captureparm" title="Table A.79. struct v4l2_captureparm">v4l2_captureparm</a> and struct <a class="link" href="vidioc-g-parm.html#v4l2-outputparm" title="Table A.80. struct v4l2_outputparm">v4l2_outputparm</a> the 497<em class="structfield"><code>timeperframe</code></em> field gives the time in 498seconds, not microseconds.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111148124"></a>V4L2 spec erratum 2006-02-04</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The <em class="structfield"><code>clips</code></em> field in 499struct <a class="link" href="overlay.html#v4l2-window" title="Table 4.1. struct v4l2_window">v4l2_window</a> must point to an array of struct <a class="link" href="overlay.html#v4l2-clip" title="Table 4.2. struct v4l2_clip">v4l2_clip</a>, not a linked 500list, because drivers ignore the struct 501<span class="structname">v4l2_clip</span>.<em class="structfield"><code>next</code></em> 502pointer.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111150884"></a>V4L2 in Linux 2.6.17</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>New video standard macros were added: 503<code class="constant">V4L2_STD_NTSC_M_KR</code> (NTSC M South Korea), and the 504sets <code class="constant">V4L2_STD_MN</code>, 505<code class="constant">V4L2_STD_B</code>, <code class="constant">V4L2_STD_GH</code> and 506<code class="constant">V4L2_STD_DK</code>. The 507<code class="constant">V4L2_STD_NTSC</code> and 508<code class="constant">V4L2_STD_SECAM</code> sets now include 509<code class="constant">V4L2_STD_NTSC_M_KR</code> and 510<code class="constant">V4L2_STD_SECAM_LC</code> respectively.</p></li><li class="listitem"><p>A new <code class="constant">V4L2_TUNER_MODE_LANG1_LANG2</code> 511was defined to record both languages of a bilingual program. The 512use of <code class="constant">V4L2_TUNER_MODE_STEREO</code> for this purpose 513is deprecated now. See the <a class="link" href="vidioc-g-tuner.html" title="ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER"><code class="constant">VIDIOC_G_TUNER</code></a> section for 514details.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111155580"></a>V4L2 spec erratum 2006-09-23 (Draft 0.15)</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>In various places 515<code class="constant">V4L2_BUF_TYPE_SLICED_VBI_CAPTURE</code> and 516<code class="constant">V4L2_BUF_TYPE_SLICED_VBI_OUTPUT</code> of the sliced VBI 517interface were not mentioned along with other buffer types.</p></li><li class="listitem"><p>In <a class="xref" href="vidioc-g-audio.html" title="ioctl VIDIOC_G_AUDIO, VIDIOC_S_AUDIO"><span class="refentrytitle">ioctl VIDIOC_G_AUDIO, VIDIOC_S_AUDIO</span>(2)</a> it was clarified 518that the struct <a class="link" href="vidioc-g-audio.html#v4l2-audio" title="Table A.51. struct v4l2_audio">v4l2_audio</a> <em class="structfield"><code>mode</code></em> field is a flags 519field.</p></li><li class="listitem"><p><a class="xref" href="vidioc-querycap.html" title="ioctl VIDIOC_QUERYCAP"><span class="refentrytitle">ioctl VIDIOC_QUERYCAP</span>(2)</a> did not mention the 520sliced VBI and radio capability flags.</p></li><li class="listitem"><p>In <a class="xref" href="vidioc-g-frequency.html" title="ioctl VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY"><span class="refentrytitle">ioctl VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY</span>(2)</a> it was 521clarified that applications must initialize the tuner 522<em class="structfield"><code>type</code></em> field of struct <a class="link" href="vidioc-g-frequency.html#v4l2-frequency" title="Table A.73. struct v4l2_frequency">v4l2_frequency</a> before 523calling <a class="link" href="vidioc-g-frequency.html" title="ioctl VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY"><code class="constant">VIDIOC_S_FREQUENCY</code></a>.</p></li><li class="listitem"><p>The <em class="structfield"><code>reserved</code></em> array 524in struct <a class="link" href="vidioc-reqbufs.html#v4l2-requestbuffers" title="Table A.100. struct v4l2_requestbuffers">v4l2_requestbuffers</a> has 2 elements, not 32.</p></li><li class="listitem"><p>In <a class="xref" href="output.html" title="Video Output Interface">the section called “Video Output Interface”</a> and <a class="xref" href="raw-vbi.html" title="Raw VBI Data Interface">the section called “Raw VBI Data Interface”</a> the device file names 525<code class="filename">/dev/vout</code> which never caught on were replaced 526by <code class="filename">/dev/video</code>.</p></li><li class="listitem"><p>With Linux 2.6.15 the possible range for VBI device minor 527numbers was extended from 224-239 to 224-255. Accordingly device file names 528<code class="filename">/dev/vbi0</code> to <code class="filename">/dev/vbi31</code> are 529possible now.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111165556"></a>V4L2 in Linux 2.6.18</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>New ioctls <a class="link" href="vidioc-g-ext-ctrls.html" title="ioctl VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS, VIDIOC_TRY_EXT_CTRLS"><code class="constant">VIDIOC_G_EXT_CTRLS</code></a>, <a class="link" href="vidioc-g-ext-ctrls.html" title="ioctl VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS, VIDIOC_TRY_EXT_CTRLS"><code class="constant">VIDIOC_S_EXT_CTRLS</code></a> 530and <a class="link" href="vidioc-g-ext-ctrls.html" title="ioctl VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS, VIDIOC_TRY_EXT_CTRLS"><code class="constant">VIDIOC_TRY_EXT_CTRLS</code></a> were added, a flag to skip unsupported 531controls with <a class="link" href="vidioc-queryctrl.html" title="ioctl VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL, VIDIOC_QUERYMENU"><code class="constant">VIDIOC_QUERYCTRL</code></a>, new control types 532<code class="constant">V4L2_CTRL_TYPE_INTEGER64</code> and 533<code class="constant">V4L2_CTRL_TYPE_CTRL_CLASS</code> (<a class="xref" href="vidioc-queryctrl.html#v4l2-ctrl-type" title="Table A.98. enum v4l2_ctrl_type">Table A.98, “enum v4l2_ctrl_type”</a>), and new control flags 534<code class="constant">V4L2_CTRL_FLAG_READ_ONLY</code>, 535<code class="constant">V4L2_CTRL_FLAG_UPDATE</code>, 536<code class="constant">V4L2_CTRL_FLAG_INACTIVE</code> and 537<code class="constant">V4L2_CTRL_FLAG_SLIDER</code> (<a class="xref" href="vidioc-queryctrl.html#control-flags" title="Table A.99. Control Flags">Table A.99, “Control Flags”</a>). See <a class="xref" href="extended-controls.html" title="Extended Controls">the section called “Extended Controls”</a> for details.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111171276"></a>V4L2 in Linux 2.6.19</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>In struct <a class="link" href="vidioc-g-sliced-vbi-cap.html#v4l2-sliced-vbi-cap" title="Table A.85. struct v4l2_sliced_vbi_cap">v4l2_sliced_vbi_cap</a> a buffer type field was added 538replacing a reserved field. Note on architectures where the size of 539enum types differs from int types the size of the structure changed. 540The <a class="link" href="vidioc-g-sliced-vbi-cap.html" title="ioctl VIDIOC_G_SLICED_VBI_CAP"><code class="constant">VIDIOC_G_SLICED_VBI_CAP</code></a> ioctl was redefined from being read-only 541to write-read. Applications must initialize the type field and clear 542the reserved fields now. These changes may <span class="emphasis"><em>break the 543compatibility</em></span> with older drivers and applications.</p></li><li class="listitem"><p>The ioctls <a class="link" href="vidioc-enum-framesizes.html" title="ioctl VIDIOC_ENUM_FRAMESIZES"><code class="constant">VIDIOC_ENUM_FRAMESIZES</code></a> and 544<a class="link" href="vidioc-enum-frameintervals.html" title="ioctl VIDIOC_ENUM_FRAMEINTERVALS"><code class="constant">VIDIOC_ENUM_FRAMEINTERVALS</code></a> were added.</p></li><li class="listitem"><p>A new pixel format <code class="constant">V4L2_PIX_FMT_RGB444</code> (<a class="xref" href="packed-rgb.html#rgb-formats" title="Table 2.16. Packed RGB Image Formats">Table 2.16, “Packed RGB Image Formats”</a>) was added.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111177612"></a>V4L2 spec erratum 2006-10-12 (Draft 0.17)</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><code class="constant">V4L2_PIX_FMT_HM12</code> (<a class="xref" href="pixfmt-reserved.html#reserved-formats" title="Table 2.20. Reserved Image Formats">Table 2.20, “Reserved Image Formats”</a>) is a YUV 4:2:0, not 4:2:2 format.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111179340"></a>V4L2 in Linux 2.6.21</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The <code class="filename">videodev2.h</code> header file is 545now dual licensed under GNU General Public License version two or 546later, and under a 3-clause BSD-style license.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111181100"></a>V4L2 in Linux 2.6.22</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Two new field orders 547 <code class="constant">V4L2_FIELD_INTERLACED_TB</code> and 548 <code class="constant">V4L2_FIELD_INTERLACED_BT</code> were 549 added. See <a class="xref" href="field-order.html#v4l2-field" title="Table 3.9. enum v4l2_field">Table 3.9, “enum v4l2_field”</a> for details.</p></li><li class="listitem"><p>Three new clipping/blending methods with a global or 550straight or inverted local alpha value were added to the video overlay 551interface. See the description of the <a class="link" href="vidioc-g-fbuf.html" title="ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF"><code class="constant">VIDIOC_G_FBUF</code></a> and 552<a class="link" href="vidioc-g-fbuf.html" title="ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF"><code class="constant">VIDIOC_S_FBUF</code></a> ioctls for details.</p><p>A new <em class="structfield"><code>global_alpha</code></em> field 553was added to <a class="link" href="overlay.html#v4l2-window" title="Table 4.1. struct v4l2_window"><span class="structname">v4l2_window</span></a>, 554extending the structure. This may <span class="emphasis"><em>break 555compatibility</em></span> with applications using a struct 556<span class="structname">v4l2_window</span> directly. However the <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT">VIDIOC_G/S/TRY_FMT</a> ioctls, which take a 557pointer to a <a class="link" href="vidioc-g-fmt.html#v4l2-format" title="Table A.72. struct v4l2_format">v4l2_format</a> parent 558structure with padding bytes at the end, are not affected.</p></li><li class="listitem"><p>The format of the <em class="structfield"><code>chromakey</code></em> 559field in struct <a class="link" href="overlay.html#v4l2-window" title="Table 4.1. struct v4l2_window">v4l2_window</a> changed from "host order RGB32" to a pixel 560value in the same format as the framebuffer. This may <span class="emphasis"><em>break 561compatibility</em></span> with existing applications. Drivers 562supporting the "host order RGB32" format are not known.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111188468"></a>V4L2 in Linux 2.6.24</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The pixel formats 563<code class="constant">V4L2_PIX_FMT_PAL8</code>, 564<code class="constant">V4L2_PIX_FMT_YUV444</code>, 565<code class="constant">V4L2_PIX_FMT_YUV555</code>, 566<code class="constant">V4L2_PIX_FMT_YUV565</code> and 567<code class="constant">V4L2_PIX_FMT_YUV32</code> were added.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111190876"></a>V4L2 in Linux 2.6.25</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The pixel formats <a class="link" href="V4L2-PIX-FMT-Y16.html" title="V4L2_PIX_FMT_Y16 ('Y16 ')"> 568<code class="constant">V4L2_PIX_FMT_Y16</code></a> and <a class="link" href="V4L2-PIX-FMT-SBGGR16.html" title="V4L2_PIX_FMT_SBGGR16 ('BYR2')"> 569<code class="constant">V4L2_PIX_FMT_SBGGR16</code></a> were added.</p></li><li class="listitem"><p>New <a class="link" href="control.html" title="User Controls">controls</a> 570<code class="constant">V4L2_CID_POWER_LINE_FREQUENCY</code>, 571<code class="constant">V4L2_CID_HUE_AUTO</code>, 572<code class="constant">V4L2_CID_WHITE_BALANCE_TEMPERATURE</code>, 573<code class="constant">V4L2_CID_SHARPNESS</code> and 574<code class="constant">V4L2_CID_BACKLIGHT_COMPENSATION</code> were added. The 575controls <code class="constant">V4L2_CID_BLACK_LEVEL</code>, 576<code class="constant">V4L2_CID_WHITENESS</code>, 577<code class="constant">V4L2_CID_HCENTER</code> and 578<code class="constant">V4L2_CID_VCENTER</code> were deprecated. 579</p></li><li class="listitem"><p>A <a class="link" href="extended-controls.html#camera-controls" title="Camera Control Reference">Camera controls 580class</a> was added, with the new controls 581<code class="constant">V4L2_CID_EXPOSURE_AUTO</code>, 582<code class="constant">V4L2_CID_EXPOSURE_ABSOLUTE</code>, 583<code class="constant">V4L2_CID_EXPOSURE_AUTO_PRIORITY</code>, 584<code class="constant">V4L2_CID_PAN_RELATIVE</code>, 585<code class="constant">V4L2_CID_TILT_RELATIVE</code>, 586<code class="constant">V4L2_CID_PAN_RESET</code>, 587<code class="constant">V4L2_CID_TILT_RESET</code>, 588<code class="constant">V4L2_CID_PAN_ABSOLUTE</code>, 589<code class="constant">V4L2_CID_TILT_ABSOLUTE</code>, 590<code class="constant">V4L2_CID_FOCUS_ABSOLUTE</code>, 591<code class="constant">V4L2_CID_FOCUS_RELATIVE</code> and 592<code class="constant">V4L2_CID_FOCUS_AUTO</code>.</p></li><li class="listitem"><p>The <code class="constant">VIDIOC_G_MPEGCOMP</code> and 593<code class="constant">VIDIOC_S_MPEGCOMP</code> ioctls, which were superseded 594by the <a class="link" href="extended-controls.html" title="Extended Controls">extended controls</a> 595interface in Linux 2.6.18, where finally removed from the 596<code class="filename">videodev2.h</code> header file.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111201596"></a>V4L2 in Linux 2.6.26</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The pixel formats 597<code class="constant">V4L2_PIX_FMT_Y16</code> and 598<code class="constant">V4L2_PIX_FMT_SBGGR16</code> were added.</p></li><li class="listitem"><p>Added user controls 599<code class="constant">V4L2_CID_CHROMA_AGC</code> and 600<code class="constant">V4L2_CID_COLOR_KILLER</code>.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111204236"></a>V4L2 in Linux 2.6.27</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The <a class="link" href="vidioc-s-hw-freq-seek.html" title="ioctl VIDIOC_S_HW_FREQ_SEEK"><code class="constant">VIDIOC_S_HW_FREQ_SEEK</code></a> ioctl and the 601<code class="constant">V4L2_CAP_HW_FREQ_SEEK</code> capability were added.</p></li><li class="listitem"><p>The pixel formats 602<code class="constant">V4L2_PIX_FMT_YVYU</code>, 603<code class="constant">V4L2_PIX_FMT_PCA501</code>, 604<code class="constant">V4L2_PIX_FMT_PCA505</code>, 605<code class="constant">V4L2_PIX_FMT_PCA508</code>, 606<code class="constant">V4L2_PIX_FMT_PCA561</code>, 607<code class="constant">V4L2_PIX_FMT_SGBRG8</code>, 608<code class="constant">V4L2_PIX_FMT_PAC207</code> and 609<code class="constant">V4L2_PIX_FMT_PJPG</code> were added.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111208412"></a>V4L2 in Linux 2.6.28</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Added <code class="constant">V4L2_MPEG_AUDIO_ENCODING_AAC</code> and 610<code class="constant">V4L2_MPEG_AUDIO_ENCODING_AC3</code> MPEG audio encodings.</p></li><li class="listitem"><p>Added <code class="constant">V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC</code> MPEG 611video encoding.</p></li><li class="listitem"><p>The pixel formats 612<code class="constant">V4L2_PIX_FMT_SGRBG10</code> and 613<code class="constant">V4L2_PIX_FMT_SGRBG10DPCM8</code> were added.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111211764"></a>V4L2 in Linux 2.6.29</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The <code class="constant">VIDIOC_G_CHIP_IDENT</code> ioctl was renamed 614to <code class="constant">VIDIOC_G_CHIP_IDENT_OLD</code> and <code class="constant">VIDIOC_DBG_G_CHIP_IDENT</code> 615was introduced in its place. The old struct <span class="structname">v4l2_chip_ident</span> 616was renamed to <span class="structname"><a name="v4l2-chip-ident-old"></a>v4l2_chip_ident_old</span>.</p></li><li class="listitem"><p>The pixel formats 617<code class="constant">V4L2_PIX_FMT_VYUY</code>, 618<code class="constant">V4L2_PIX_FMT_NV16</code> and 619<code class="constant">V4L2_PIX_FMT_NV61</code> were added.</p></li><li class="listitem"><p>Added camera controls 620<code class="constant">V4L2_CID_ZOOM_ABSOLUTE</code>, 621<code class="constant">V4L2_CID_ZOOM_RELATIVE</code>, 622<code class="constant">V4L2_CID_ZOOM_CONTINUOUS</code> and 623<code class="constant">V4L2_CID_PRIVACY</code>.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111216916"></a>V4L2 in Linux 2.6.30</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>New control flag <code class="constant">V4L2_CTRL_FLAG_WRITE_ONLY</code> was added.</p></li><li class="listitem"><p>New control <code class="constant">V4L2_CID_COLORFX</code> was added.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111219084"></a>V4L2 in Linux 2.6.32</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>In order to be easier to compare a V4L2 API and a kernel 624version, now V4L2 API is numbered using the Linux Kernel version numeration.</p></li><li class="listitem"><p>Finalized the RDS capture API. See <a class="xref" href="rds.html" title="RDS Interface">the section called “RDS Interface”</a> for 625more information.</p></li><li class="listitem"><p>Added new capabilities for modulators and RDS encoders.</p></li><li class="listitem"><p>Add description for libv4l API.</p></li><li class="listitem"><p>Added support for string controls via new type <code class="constant">V4L2_CTRL_TYPE_STRING</code>.</p></li><li class="listitem"><p>Added <code class="constant">V4L2_CID_BAND_STOP_FILTER</code> documentation.</p></li><li class="listitem"><p>Added FM Modulator (FM TX) Extended Control Class: <code class="constant">V4L2_CTRL_CLASS_FM_TX</code> and their Control IDs.</p></li><li class="listitem"><p>Added FM Receiver (FM RX) Extended Control Class: <code class="constant">V4L2_CTRL_CLASS_FM_RX</code> and their Control IDs.</p></li><li class="listitem"><p>Added Remote Controller chapter, describing the default Remote Controller mapping for media devices.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111225356"></a>V4L2 in Linux 2.6.33</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Added support for Digital Video timings in order to support HDTV receivers and transmitters.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111226724"></a>V4L2 in Linux 2.6.34</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Added 626<code class="constant">V4L2_CID_IRIS_ABSOLUTE</code> and 627<code class="constant">V4L2_CID_IRIS_RELATIVE</code> controls to the 628 <a class="link" href="extended-controls.html#camera-controls" title="Camera Control Reference">Camera controls class</a>. 629 </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111228972"></a>V4L2 in Linux 2.6.37</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Remove the vtx (videotext/teletext) API. This API was no longer 630used and no hardware exists to verify the API. Nor were any userspace applications found 631that used it. It was originally scheduled for removal in 2.6.35. 632 </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111230468"></a>V4L2 in Linux 2.6.39</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The old VIDIOC_*_OLD symbols and V4L1 support were removed.</p></li><li class="listitem"><p>Multi-planar API added. Does not affect the compatibility of 633 current drivers and applications. See 634 <a class="link" href="planar-apis.html" title="Single- and multi-planar APIs">multi-planar API</a> 635 for details.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111232748"></a>V4L2 in Linux 3.1</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>VIDIOC_QUERYCAP now returns a per-subsystem version instead of a per-driver one.</p><p>Standardize an error code for invalid ioctl.</p><p>Added V4L2_CTRL_TYPE_BITMASK.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111234556"></a>V4L2 in Linux 3.2</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>V4L2_CTRL_FLAG_VOLATILE was added to signal volatile controls to userspace.</p></li><li class="listitem"><p>Add selection API for extended control over cropping 636 and composing. Does not affect the compatibility of current 637 drivers and applications. See <a class="link" href="selection-api.html" title="Experimental API for cropping, composing and scaling"> selection API </a> for 638 details.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111236916"></a>V4L2 in Linux 3.3</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Added <code class="constant">V4L2_CID_ALPHA_COMPONENT</code> control 639 to the <a class="link" href="control.html" title="User Controls">User controls class</a>. 640 </p></li><li class="listitem"><p>Added the device_caps field to struct v4l2_capabilities and added the new 641 V4L2_CAP_DEVICE_CAPS capability.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111239372"></a>V4L2 in Linux 3.4</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Added <a class="link" href="extended-controls.html#jpeg-controls" title="JPEG Control Reference">JPEG compression control 642 class</a>.</p></li><li class="listitem"><p>Extended the DV Timings API: 643 <a class="link" href="vidioc-enum-dv-timings.html" title="ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS"><code class="constant">VIDIOC_ENUM_DV_TIMINGS</code></a>, <a class="link" href="vidioc-query-dv-timings.html" title="ioctl VIDIOC_QUERY_DV_TIMINGS"><code class="constant">VIDIOC_QUERY_DV_TIMINGS</code></a> and 644 <a class="link" href="vidioc-dv-timings-cap.html" title="ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP"><code class="constant">VIDIOC_DV_TIMINGS_CAP</code></a>.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111242884"></a>V4L2 in Linux 3.5</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Added integer menus, the new type will be 645 V4L2_CTRL_TYPE_INTEGER_MENU.</p></li><li class="listitem"><p>Added selection API for V4L2 subdev interface: 646 <a class="link" href="vidioc-subdev-g-selection.html" title="ioctl VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION"><code class="constant">VIDIOC_SUBDEV_G_SELECTION</code></a> and 647 <a class="link" href="vidioc-subdev-g-selection.html" title="ioctl VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION"><code class="constant">VIDIOC_SUBDEV_S_SELECTION</code></a>.</p></li><li class="listitem"><p> Added <code class="constant">V4L2_COLORFX_ANTIQUE</code>, 648 <code class="constant">V4L2_COLORFX_ART_FREEZE</code>, 649 <code class="constant">V4L2_COLORFX_AQUA</code>, 650 <code class="constant">V4L2_COLORFX_SILHOUETTE</code>, 651 <code class="constant">V4L2_COLORFX_SOLARIZATION</code>, 652 <code class="constant">V4L2_COLORFX_VIVID</code> and 653 <code class="constant">V4L2_COLORFX_ARBITRARY_CBCR</code> menu items 654 to the <code class="constant">V4L2_CID_COLORFX</code> control.</p></li><li class="listitem"><p> Added <code class="constant">V4L2_CID_COLORFX_CBCR</code> control.</p></li><li class="listitem"><p> Added camera controls <code class="constant">V4L2_CID_AUTO_EXPOSURE_BIAS</code>, 655 <code class="constant">V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE</code>, 656 <code class="constant">V4L2_CID_IMAGE_STABILIZATION</code>, 657 <code class="constant">V4L2_CID_ISO_SENSITIVITY</code>, 658 <code class="constant">V4L2_CID_ISO_SENSITIVITY_AUTO</code>, 659 <code class="constant">V4L2_CID_EXPOSURE_METERING</code>, 660 <code class="constant">V4L2_CID_SCENE_MODE</code>, 661 <code class="constant">V4L2_CID_3A_LOCK</code>, 662 <code class="constant">V4L2_CID_AUTO_FOCUS_START</code>, 663 <code class="constant">V4L2_CID_AUTO_FOCUS_STOP</code>, 664 <code class="constant">V4L2_CID_AUTO_FOCUS_STATUS</code> and 665 <code class="constant">V4L2_CID_AUTO_FOCUS_RANGE</code>. 666 </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111252356"></a>V4L2 in Linux 3.6</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Replaced <em class="structfield"><code>input</code></em> in 667 <span class="structname">v4l2_buffer</span> by 668 <em class="structfield"><code>reserved2</code></em> and removed 669 <code class="constant">V4L2_BUF_FLAG_INPUT</code>.</p></li><li class="listitem"><p>Added V4L2_CAP_VIDEO_M2M and V4L2_CAP_VIDEO_M2M_MPLANE capabilities.</p></li><li class="listitem"><p>Added support for frequency band enumerations: <a class="link" href="vidioc-enum-freq-bands.html" title="ioctl VIDIOC_ENUM_FREQ_BANDS"><code class="constant">VIDIOC_ENUM_FREQ_BANDS</code></a>.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111255244"></a>V4L2 in Linux 3.9</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Added timestamp types to 670 <em class="structfield"><code>flags</code></em> field in 671 <span class="structname">v4l2_buffer</span>. See <a class="xref" href="buffer.html#buffer-flags" title="Table 3.4. Buffer Flags">Table 3.4, “Buffer Flags”</a>.</p></li><li class="listitem"><p>Added <code class="constant">V4L2_EVENT_CTRL_CH_RANGE</code> control event 672 changes flag. See <a class="xref" href="vidioc-dqevent.html#ctrl-changes-flags" title="Table A.19. Control Changes">Table A.19, “Control Changes”</a>.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111259452"></a>V4L2 in Linux 3.10</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Removed obsolete and unused DV_PRESET ioctls 673 VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET, VIDIOC_QUERY_DV_PRESET and 674 VIDIOC_ENUM_DV_PRESET. Remove the related v4l2_input/output capability 675 flags V4L2_IN_CAP_PRESETS and V4L2_OUT_CAP_PRESETS. 676 </p></li><li class="listitem"><p>Added new debugging ioctl <a class="link" href="vidioc-dbg-g-chip-info.html" title="ioctl VIDIOC_DBG_G_CHIP_INFO"><code class="constant">VIDIOC_DBG_G_CHIP_INFO</code></a>. 677 </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111261356"></a>V4L2 in Linux 3.11</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Remove obsolete <code class="constant">VIDIOC_DBG_G_CHIP_IDENT</code> ioctl. 678 </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111263564"></a>V4L2 in Linux 3.14</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> In struct <span class="structname">v4l2_rect</span>, the type 679of <em class="structfield"><code>width</code></em> and <em class="structfield"><code>height</code></em> 680fields changed from _s32 to _u32. 681 </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111265788"></a>V4L2 in Linux 3.15</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Added Software Defined Radio (SDR) Interface. 682 </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111267100"></a>V4L2 in Linux 3.16</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Added event V4L2_EVENT_SOURCE_CHANGE. 683 </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111268356"></a>V4L2 in Linux 3.17</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Extended struct <a class="link" href="pixfmt.html#v4l2-pix-format" title="Table 2.1. struct v4l2_pix_format">v4l2_pix_format</a>. Added format flags. 684 </p></li><li class="listitem"><p>Added compound control types and <a class="link" href="vidioc-queryctrl.html" title="ioctl VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL, VIDIOC_QUERYMENU"><code class="constant">VIDIOC_QUERY_EXT_CTRL</code></a>. 685 </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111270876"></a>V4L2 in Linux 3.18</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Added <code class="constant">V4L2_CID_PAN_SPEED</code> and 686 <code class="constant">V4L2_CID_TILT_SPEED</code> camera controls.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idp1111272724"></a>V4L2 in Linux 3.19</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Rewrote Colorspace chapter, added new enum <a class="link" href="ch02s05.html#v4l2-ycbcr-encoding" title="Table 2.5. V4L2 Y'CbCr Encodings">v4l2_ycbcr_encoding</a> 687and enum <a class="link" href="ch02s05.html#v4l2-quantization" title="Table 2.6. V4L2 Quantization Methods">v4l2_quantization</a> fields to struct <a class="link" href="pixfmt.html#v4l2-pix-format" title="Table 2.1. struct v4l2_pix_format">v4l2_pix_format</a>, struct <a class="link" href="ch02s02.html#v4l2-pix-format-mplane" title="Table 2.3. struct v4l2_pix_format_mplane">v4l2_pix_format_mplane</a> 688and struct <a class="link" href="subdev.html#v4l2-mbus-framefmt" title="Table 4.20. struct v4l2_mbus_framefmt">v4l2_mbus_framefmt</a>. 689 </p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="other"></a>Relation of V4L2 to other Linux multimedia APIs</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="hist-v4l2.html#xvideo">X Video Extension</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111281700">Digital Video</a></span></dt><dt><span class="section"><a href="hist-v4l2.html#idp1111282948">Audio Interfaces</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="xvideo"></a>X Video Extension</h4></div></div></div><p>The X Video Extension (abbreviated XVideo or just Xv) is 690an extension of the X Window system, implemented for example by the 691XFree86 project. Its scope is similar to V4L2, an API to video capture 692and output devices for X clients. Xv allows applications to display 693live video in a window, send window contents to a TV output, and 694capture or output still images in XPixmaps<a href="#ftn.idp1111277492" class="footnote" name="idp1111277492"><sup class="footnote">[17]</sup></a>. With their implementation XFree86 makes the 695extension available across many operating systems and 696architectures.</p><p>Because the driver is embedded into the X server Xv has a 697number of advantages over the V4L2 <a class="link" href="overlay.html" title="Video Overlay Interface">video 698overlay interface</a>. The driver can easily determine the overlay 699target, i. e. visible graphics memory or off-screen buffers for a 700destructive overlay. It can program the RAMDAC for a non-destructive 701overlay, scaling or color-keying, or the clipping functions of the 702video capture hardware, always in sync with drawing operations or 703windows moving or changing their stacking order.</p><p>To combine the advantages of Xv and V4L a special Xv 704driver exists in XFree86 and XOrg, just programming any overlay capable 705Video4Linux device it finds. To enable it 706<code class="filename">/etc/X11/XF86Config</code> must contain these lines:</p><pre class="screen"> 707Section "Module" 708 Load "v4l" 709EndSection</pre><p>As of XFree86 4.2 this driver still supports only V4L 710ioctls, however it should work just fine with all V4L2 devices through 711the V4L2 backward-compatibility layer. Since V4L2 permits multiple 712opens it is possible (if supported by the V4L2 driver) to capture 713video while an X client requested video overlay. Restrictions of 714simultaneous capturing and overlay are discussed in <a class="xref" href="overlay.html" title="Video Overlay Interface">the section called “Video Overlay Interface”</a> apply.</p><p>Only marginally related to V4L2, XFree86 extended Xv to 715support hardware YUV to RGB conversion and scaling for faster video 716playback, and added an interface to MPEG-2 decoding hardware. This API 717is useful to display images captured with V4L2 devices.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="idp1111281700"></a>Digital Video</h4></div></div></div><p>V4L2 does not support digital terrestrial, cable or 718satellite broadcast. A separate project aiming at digital receivers 719exists. You can find its homepage at <a class="ulink" href="http://linuxtv.org" target="_top">http://linuxtv.org</a>. The Linux DVB API 720has no connection to the V4L2 API except that drivers for hybrid 721hardware may support both.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="idp1111282948"></a>Audio Interfaces</h4></div></div></div><p>[to do - OSS/ALSA]</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="experimental"></a>Experimental API Elements</h3></div></div></div><p>The following V4L2 API elements are currently experimental 722and may change in the future.</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>Video Output Overlay (OSD) Interface, <a class="xref" href="osd.html" title="Video Output Overlay Interface">the section called “Video Output Overlay Interface”</a>.</p></li><li class="listitem"><p><a class="link" href="vidioc-dbg-g-register.html" title="ioctl VIDIOC_DBG_G_REGISTER, VIDIOC_DBG_S_REGISTER"><code class="constant">VIDIOC_DBG_G_REGISTER</code></a> and <a class="link" href="vidioc-dbg-g-register.html" title="ioctl VIDIOC_DBG_G_REGISTER, VIDIOC_DBG_S_REGISTER"><code class="constant">VIDIOC_DBG_S_REGISTER</code></a> 723ioctls.</p></li><li class="listitem"><p><a class="link" href="vidioc-dbg-g-chip-info.html" title="ioctl VIDIOC_DBG_G_CHIP_INFO"><code class="constant">VIDIOC_DBG_G_CHIP_INFO</code></a> ioctl.</p></li><li class="listitem"><p><a class="link" href="vidioc-enum-dv-timings.html" title="ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS"><code class="constant">VIDIOC_ENUM_DV_TIMINGS</code></a>, <a class="link" href="vidioc-query-dv-timings.html" title="ioctl VIDIOC_QUERY_DV_TIMINGS"><code class="constant">VIDIOC_QUERY_DV_TIMINGS</code></a> and 724 <a class="link" href="vidioc-dv-timings-cap.html" title="ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP"><code class="constant">VIDIOC_DV_TIMINGS_CAP</code></a> ioctls.</p></li><li class="listitem"><p>Flash API. <a class="xref" href="extended-controls.html#flash-controls" title="Flash Control Reference">the section called “Flash Control Reference”</a></p></li><li class="listitem"><p><a class="link" href="vidioc-create-bufs.html" title="ioctl VIDIOC_CREATE_BUFS"><code class="constant">VIDIOC_CREATE_BUFS</code></a> and <a class="link" href="vidioc-prepare-buf.html" title="ioctl VIDIOC_PREPARE_BUF"><code class="constant">VIDIOC_PREPARE_BUF</code></a> ioctls.</p></li><li class="listitem"><p>Selection API. <a class="xref" href="selection-api.html" title="Experimental API for cropping, composing and scaling">the section called “Experimental API for cropping, composing and scaling”</a></p></li><li class="listitem"><p>Sub-device selection API: <a class="link" href="vidioc-subdev-g-selection.html" title="ioctl VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION"><code class="constant">VIDIOC_SUBDEV_G_SELECTION</code></a> 725 and <a class="link" href="vidioc-subdev-g-selection.html" title="ioctl VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION"><code class="constant">VIDIOC_SUBDEV_S_SELECTION</code></a> ioctls.</p></li><li class="listitem"><p>Support for frequency band enumeration: <a class="link" href="vidioc-enum-freq-bands.html" title="ioctl VIDIOC_ENUM_FREQ_BANDS"><code class="constant">VIDIOC_ENUM_FREQ_BANDS</code></a> ioctl.</p></li><li class="listitem"><p>Vendor and device specific media bus pixel formats. 726 <a class="xref" href="subdev.html#v4l2-mbus-vendor-spec-fmts" title="Vendor and Device Specific Formats">the section called “Vendor and Device Specific Formats”</a>.</p></li><li class="listitem"><p>Importing DMABUF file descriptors as a new IO method described 727 in <a class="xref" href="dmabuf.html" title="Streaming I/O (DMA buffer importing)">the section called “Streaming I/O (DMA buffer importing)”</a>.</p></li><li class="listitem"><p>Exporting DMABUF files using <a class="link" href="vidioc-expbuf.html" title="ioctl VIDIOC_EXPBUF"><code class="constant">VIDIOC_EXPBUF</code></a> ioctl.</p></li><li class="listitem"><p>Software Defined Radio (SDR) Interface, <a class="xref" href="sdr.html" title="Software Defined Radio Interface (SDR)">the section called “Software Defined Radio Interface (SDR)”</a>.</p></li></ul></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="obsolete"></a>Obsolete API Elements</h3></div></div></div><p>The following V4L2 API elements were superseded by new 728interfaces and should not be implemented in new drivers.</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><code class="constant">VIDIOC_G_MPEGCOMP</code> and 729<code class="constant">VIDIOC_S_MPEGCOMP</code> ioctls. Use Extended Controls, 730<a class="xref" href="extended-controls.html" title="Extended Controls">the section called “Extended Controls”</a>.</p></li><li class="listitem"><p>VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET, VIDIOC_ENUM_DV_PRESETS and 731 VIDIOC_QUERY_DV_PRESET ioctls. Use the DV Timings API (<a class="xref" href="dv-timings.html" title="Digital Video (DV) Timings">the section called “Digital Video (DV) Timings”</a>).</p></li><li class="listitem"><p><code class="constant">VIDIOC_SUBDEV_G_CROP</code> and 732 <code class="constant">VIDIOC_SUBDEV_S_CROP</code> ioctls. Use 733 <code class="constant">VIDIOC_SUBDEV_G_SELECTION</code> and 734 <code class="constant">VIDIOC_SUBDEV_S_SELECTION</code>, <a class="xref" href="vidioc-subdev-g-selection.html" title="ioctl VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION"><span class="refentrytitle">ioctl VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION</span>(2)</a>.</p></li></ul></div></div><div class="footnotes"><br><hr style="width:100; text-align:left;margin-left: 0"><div id="ftn.idp1111277492" class="footnote"><p><a href="#idp1111277492" class="para"><sup class="para">[17] </sup></a>This is not implemented in XFree86.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="compat.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="compat.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="user-func.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 7. Changes </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix A. Function Reference</td></tr></table></div></body></html> 735