1059b1c5bSMauro Carvalho Chehab.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2407e84cdSMauro Carvalho Chehab.. c:namespace:: V4L
354f38fcaSMauro Carvalho Chehab
454f38fcaSMauro Carvalho Chehab.. _hist-v4l2:
554f38fcaSMauro Carvalho Chehab
654f38fcaSMauro Carvalho Chehab***********************
754f38fcaSMauro Carvalho ChehabChanges of the V4L2 API
854f38fcaSMauro Carvalho Chehab***********************
954f38fcaSMauro Carvalho Chehab
1054f38fcaSMauro Carvalho ChehabSoon after the V4L API was added to the kernel it was criticised as too
1154f38fcaSMauro Carvalho Chehabinflexible. In August 1998 Bill Dirks proposed a number of improvements
1254f38fcaSMauro Carvalho Chehaband began to work on documentation, example drivers and applications.
1354f38fcaSMauro Carvalho ChehabWith the help of other volunteers this eventually became the V4L2 API,
1454f38fcaSMauro Carvalho Chehabnot just an extension but a replacement for the V4L API. However it took
1554f38fcaSMauro Carvalho Chehabanother four years and two stable kernel releases until the new API was
1654f38fcaSMauro Carvalho Chehabfinally accepted for inclusion into the kernel in its present form.
1754f38fcaSMauro Carvalho Chehab
1854f38fcaSMauro Carvalho ChehabEarly Versions
1954f38fcaSMauro Carvalho Chehab==============
2054f38fcaSMauro Carvalho Chehab
2154f38fcaSMauro Carvalho Chehab1998-08-20: First version.
2254f38fcaSMauro Carvalho Chehab
23407e84cdSMauro Carvalho Chehab1998-08-27: The :c:func:`select()` function was introduced.
2454f38fcaSMauro Carvalho Chehab
2554f38fcaSMauro Carvalho Chehab1998-09-10: New video standard interface.
2654f38fcaSMauro Carvalho Chehab
2754f38fcaSMauro Carvalho Chehab1998-09-18: The ``VIDIOC_NONCAP`` ioctl was replaced by the otherwise
28407e84cdSMauro Carvalho Chehabmeaningless ``O_TRUNC`` :c:func:`open()` flag, and the
2954f38fcaSMauro Carvalho Chehabaliases ``O_NONCAP`` and ``O_NOIO`` were defined. Applications can set
3054f38fcaSMauro Carvalho Chehabthis flag if they intend to access controls only, as opposed to capture
3154f38fcaSMauro Carvalho Chehabapplications which need exclusive access. The ``VIDEO_STD_XXX``
3254f38fcaSMauro Carvalho Chehabidentifiers are now ordinals instead of flags, and the
3354f38fcaSMauro Carvalho Chehab``video_std_construct()`` helper function takes id and
3454f38fcaSMauro Carvalho Chehabtransmission arguments.
3554f38fcaSMauro Carvalho Chehab
3654f38fcaSMauro Carvalho Chehab1998-09-28: Revamped video standard. Made video controls individually
3754f38fcaSMauro Carvalho Chehabenumerable.
3854f38fcaSMauro Carvalho Chehab
39b4cc96f9SRandy Dunlap1998-10-02: The ``id`` field was removed from
4054f38fcaSMauro Carvalho Chehabstruct ``video_standard`` and the color subcarrier fields were
4154f38fcaSMauro Carvalho Chehabrenamed. The :ref:`VIDIOC_QUERYSTD` ioctl was
4254f38fcaSMauro Carvalho Chehabrenamed to :ref:`VIDIOC_ENUMSTD`,
4354f38fcaSMauro Carvalho Chehab:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` to
4454f38fcaSMauro Carvalho Chehab:ref:`VIDIOC_ENUMINPUT`. A first draft of the
4554f38fcaSMauro Carvalho ChehabCodec API was released.
4654f38fcaSMauro Carvalho Chehab
4754f38fcaSMauro Carvalho Chehab1998-11-08: Many minor changes. Most symbols have been renamed. Some
48cae045f4SMauro Carvalho Chehabmaterial changes to struct v4l2_capability.
4954f38fcaSMauro Carvalho Chehab
50*c1966bd1SRandy Dunlap1998-11-12: The read/write direction of some ioctls was misdefined.
5154f38fcaSMauro Carvalho Chehab
5254f38fcaSMauro Carvalho Chehab1998-11-14: ``V4L2_PIX_FMT_RGB24`` changed to ``V4L2_PIX_FMT_BGR24``,
5354f38fcaSMauro Carvalho Chehaband ``V4L2_PIX_FMT_RGB32`` changed to ``V4L2_PIX_FMT_BGR32``. Audio
5454f38fcaSMauro Carvalho Chehabcontrols are now accessible with the
5554f38fcaSMauro Carvalho Chehab:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
5654f38fcaSMauro Carvalho Chehab:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls under names starting
5754f38fcaSMauro Carvalho Chehabwith ``V4L2_CID_AUDIO``. The ``V4L2_MAJOR`` define was removed from
5854f38fcaSMauro Carvalho Chehab``videodev.h`` since it was only used once in the ``videodev`` kernel
5954f38fcaSMauro Carvalho Chehabmodule. The ``YUV422`` and ``YUV411`` planar image formats were added.
6054f38fcaSMauro Carvalho Chehab
6154f38fcaSMauro Carvalho Chehab1998-11-28: A few ioctl symbols changed. Interfaces for codecs and video
6254f38fcaSMauro Carvalho Chehaboutput devices were added.
6354f38fcaSMauro Carvalho Chehab
6454f38fcaSMauro Carvalho Chehab1999-01-14: A raw VBI capture interface was added.
6554f38fcaSMauro Carvalho Chehab
6654f38fcaSMauro Carvalho Chehab1999-01-19: The ``VIDIOC_NEXTBUF`` ioctl was removed.
6754f38fcaSMauro Carvalho Chehab
6854f38fcaSMauro Carvalho ChehabV4L2 Version 0.16 1999-01-31
6954f38fcaSMauro Carvalho Chehab============================
7054f38fcaSMauro Carvalho Chehab
7154f38fcaSMauro Carvalho Chehab1999-01-27: There is now one QBUF ioctl, VIDIOC_QWBUF and VIDIOC_QRBUF
7254f38fcaSMauro Carvalho Chehabare gone. VIDIOC_QBUF takes a v4l2_buffer as a parameter. Added
7354f38fcaSMauro Carvalho Chehabdigital zoom (cropping) controls.
7454f38fcaSMauro Carvalho Chehab
7554f38fcaSMauro Carvalho ChehabV4L2 Version 0.18 1999-03-16
7654f38fcaSMauro Carvalho Chehab============================
7754f38fcaSMauro Carvalho Chehab
7854f38fcaSMauro Carvalho ChehabAdded a v4l to V4L2 ioctl compatibility layer to videodev.c. Driver
7954f38fcaSMauro Carvalho Chehabwriters, this changes how you implement your ioctl handler. See the
8054f38fcaSMauro Carvalho ChehabDriver Writer's Guide. Added some more control id codes.
8154f38fcaSMauro Carvalho Chehab
8254f38fcaSMauro Carvalho ChehabV4L2 Version 0.19 1999-06-05
8354f38fcaSMauro Carvalho Chehab============================
8454f38fcaSMauro Carvalho Chehab
8554f38fcaSMauro Carvalho Chehab1999-03-18: Fill in the category and catname fields of v4l2_queryctrl
8654f38fcaSMauro Carvalho Chehabobjects before passing them to the driver. Required a minor change to
8754f38fcaSMauro Carvalho Chehabthe VIDIOC_QUERYCTRL handlers in the sample drivers.
8854f38fcaSMauro Carvalho Chehab
8954f38fcaSMauro Carvalho Chehab1999-03-31: Better compatibility for v4l memory capture ioctls. Requires
9054f38fcaSMauro Carvalho Chehabchanges to drivers to fully support new compatibility features, see
9154f38fcaSMauro Carvalho ChehabDriver Writer's Guide and v4l2cap.c. Added new control IDs:
9254f38fcaSMauro Carvalho ChehabV4L2_CID_HFLIP, _VFLIP. Changed V4L2_PIX_FMT_YUV422P to _YUV422P,
9354f38fcaSMauro Carvalho Chehaband _YUV411P to _YUV411P.
9454f38fcaSMauro Carvalho Chehab
9554f38fcaSMauro Carvalho Chehab1999-04-04: Added a few more control IDs.
9654f38fcaSMauro Carvalho Chehab
9754f38fcaSMauro Carvalho Chehab1999-04-07: Added the button control type.
9854f38fcaSMauro Carvalho Chehab
9954f38fcaSMauro Carvalho Chehab1999-05-02: Fixed a typo in videodev.h, and added the
10054f38fcaSMauro Carvalho ChehabV4L2_CTRL_FLAG_GRAYED (later V4L2_CTRL_FLAG_GRABBED) flag.
10154f38fcaSMauro Carvalho Chehab
10254f38fcaSMauro Carvalho Chehab1999-05-20: Definition of VIDIOC_G_CTRL was wrong causing a
10354f38fcaSMauro Carvalho Chehabmalfunction of this ioctl.
10454f38fcaSMauro Carvalho Chehab
10554f38fcaSMauro Carvalho Chehab1999-06-05: Changed the value of V4L2_CID_WHITENESS.
10654f38fcaSMauro Carvalho Chehab
10754f38fcaSMauro Carvalho ChehabV4L2 Version 0.20 (1999-09-10)
10854f38fcaSMauro Carvalho Chehab==============================
10954f38fcaSMauro Carvalho Chehab
11054f38fcaSMauro Carvalho ChehabVersion 0.20 introduced a number of changes which were *not backward
11154f38fcaSMauro Carvalho Chehabcompatible* with 0.19 and earlier versions. Purpose of these changes was
11254f38fcaSMauro Carvalho Chehabto simplify the API, while making it more extensible and following
11354f38fcaSMauro Carvalho Chehabcommon Linux driver API conventions.
11454f38fcaSMauro Carvalho Chehab
115cae045f4SMauro Carvalho Chehab1. Some typos in ``V4L2_FMT_FLAG`` symbols were fixed. struct v4l2_clip
116cae045f4SMauro Carvalho Chehab   was changed for compatibility with v4l. (1999-08-30)
11754f38fcaSMauro Carvalho Chehab
11854f38fcaSMauro Carvalho Chehab2. ``V4L2_TUNER_SUB_LANG1`` was added. (1999-09-05)
11954f38fcaSMauro Carvalho Chehab
12054f38fcaSMauro Carvalho Chehab3. All ioctl() commands that used an integer argument now take a pointer
12154f38fcaSMauro Carvalho Chehab   to an integer. Where it makes sense, ioctls will return the actual
12254f38fcaSMauro Carvalho Chehab   new value in the integer pointed to by the argument, a common
12354f38fcaSMauro Carvalho Chehab   convention in the V4L2 API. The affected ioctls are: VIDIOC_PREVIEW,
12454f38fcaSMauro Carvalho Chehab   VIDIOC_STREAMON, VIDIOC_STREAMOFF, VIDIOC_S_FREQ,
12554f38fcaSMauro Carvalho Chehab   VIDIOC_S_INPUT, VIDIOC_S_OUTPUT, VIDIOC_S_EFFECT. For example
12654f38fcaSMauro Carvalho Chehab
12754f38fcaSMauro Carvalho Chehab   .. code-block:: c
12854f38fcaSMauro Carvalho Chehab
12954f38fcaSMauro Carvalho Chehab       err = ioctl (fd, VIDIOC_XXX, V4L2_XXX);
13054f38fcaSMauro Carvalho Chehab
13154f38fcaSMauro Carvalho Chehab   becomes
13254f38fcaSMauro Carvalho Chehab
13354f38fcaSMauro Carvalho Chehab   .. code-block:: c
13454f38fcaSMauro Carvalho Chehab
13554f38fcaSMauro Carvalho Chehab       int a = V4L2_XXX; err = ioctl(fd, VIDIOC_XXX, &a);
13654f38fcaSMauro Carvalho Chehab
13754f38fcaSMauro Carvalho Chehab4. All the different get- and set-format commands were swept into one
13854f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
13954f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl taking a union and a
14054f38fcaSMauro Carvalho Chehab   type field selecting the union member as parameter. Purpose is to
14154f38fcaSMauro Carvalho Chehab   simplify the API by eliminating several ioctls and to allow new and
14254f38fcaSMauro Carvalho Chehab   driver private data streams without adding new ioctls.
14354f38fcaSMauro Carvalho Chehab
14454f38fcaSMauro Carvalho Chehab   This change obsoletes the following ioctls: ``VIDIOC_S_INFMT``,
14554f38fcaSMauro Carvalho Chehab   ``VIDIOC_G_INFMT``, ``VIDIOC_S_OUTFMT``, ``VIDIOC_G_OUTFMT``,
14654f38fcaSMauro Carvalho Chehab   ``VIDIOC_S_VBIFMT`` and ``VIDIOC_G_VBIFMT``. The image format
147cae045f4SMauro Carvalho Chehab   struct v4l2_format was renamed to struct v4l2_pix_format, while
148*c1966bd1SRandy Dunlap   struct v4l2_format is now the enveloping structure
14954f38fcaSMauro Carvalho Chehab   for all format negotiations.
15054f38fcaSMauro Carvalho Chehab
15154f38fcaSMauro Carvalho Chehab5. Similar to the changes above, the ``VIDIOC_G_PARM`` and
15254f38fcaSMauro Carvalho Chehab   ``VIDIOC_S_PARM`` ioctls were merged with ``VIDIOC_G_OUTPARM`` and
153cae045f4SMauro Carvalho Chehab   ``VIDIOC_S_OUTPARM``. A ``type`` field in the new struct v4l2_streamparm
154cae045f4SMauro Carvalho Chehab   selects the respective union member.
15554f38fcaSMauro Carvalho Chehab
15654f38fcaSMauro Carvalho Chehab   This change obsoletes the ``VIDIOC_G_OUTPARM`` and
15754f38fcaSMauro Carvalho Chehab   ``VIDIOC_S_OUTPARM`` ioctls.
15854f38fcaSMauro Carvalho Chehab
15954f38fcaSMauro Carvalho Chehab6. Control enumeration was simplified, and two new control flags were
16054f38fcaSMauro Carvalho Chehab   introduced and one dropped. The ``catname`` field was replaced by a
16154f38fcaSMauro Carvalho Chehab   ``group`` field.
16254f38fcaSMauro Carvalho Chehab
16354f38fcaSMauro Carvalho Chehab   Drivers can now flag unsupported and temporarily unavailable controls
16454f38fcaSMauro Carvalho Chehab   with ``V4L2_CTRL_FLAG_DISABLED`` and ``V4L2_CTRL_FLAG_GRABBED``
16554f38fcaSMauro Carvalho Chehab   respectively. The ``group`` name indicates a possibly narrower
16654f38fcaSMauro Carvalho Chehab   classification than the ``category``. In other words, there may be
16754f38fcaSMauro Carvalho Chehab   multiple groups within a category. Controls within a group would
16854f38fcaSMauro Carvalho Chehab   typically be drawn within a group box. Controls in different
16954f38fcaSMauro Carvalho Chehab   categories might have a greater separation, or may even appear in
17054f38fcaSMauro Carvalho Chehab   separate windows.
17154f38fcaSMauro Carvalho Chehab
172cae045f4SMauro Carvalho Chehab7. The struct v4l2_buffer ``timestamp`` was
17354f38fcaSMauro Carvalho Chehab   changed to a 64 bit integer, containing the sampling or output time
17454f38fcaSMauro Carvalho Chehab   of the frame in nanoseconds. Additionally timestamps will be in
17554f38fcaSMauro Carvalho Chehab   absolute system time, not starting from zero at the beginning of a
17654f38fcaSMauro Carvalho Chehab   stream. The data type name for timestamps is stamp_t, defined as a
17754f38fcaSMauro Carvalho Chehab   signed 64-bit integer. Output devices should not send a buffer out
17854f38fcaSMauro Carvalho Chehab   until the time in the timestamp field has arrived. I would like to
17954f38fcaSMauro Carvalho Chehab   follow SGI's lead, and adopt a multimedia timestamping system like
18054f38fcaSMauro Carvalho Chehab   their UST (Unadjusted System Time). See
18154f38fcaSMauro Carvalho Chehab   http://web.archive.org/web/\*/http://reality.sgi.com
18254f38fcaSMauro Carvalho Chehab   /cpirazzi_engr/lg/time/intro.html. UST uses timestamps that are
18354f38fcaSMauro Carvalho Chehab   64-bit signed integers (not struct timeval's) and given in nanosecond
18454f38fcaSMauro Carvalho Chehab   units. The UST clock starts at zero when the system is booted and
18554f38fcaSMauro Carvalho Chehab   runs continuously and uniformly. It takes a little over 292 years for
18654f38fcaSMauro Carvalho Chehab   UST to overflow. There is no way to set the UST clock. The regular
18754f38fcaSMauro Carvalho Chehab   Linux time-of-day clock can be changed periodically, which would
18854f38fcaSMauro Carvalho Chehab   cause errors if it were being used for timestamping a multimedia
18954f38fcaSMauro Carvalho Chehab   stream. A real UST style clock will require some support in the
19054f38fcaSMauro Carvalho Chehab   kernel that is not there yet. But in anticipation, I will change the
19154f38fcaSMauro Carvalho Chehab   timestamp field to a 64-bit integer, and I will change the
19254f38fcaSMauro Carvalho Chehab   v4l2_masterclock_gettime() function (used only by drivers) to
19354f38fcaSMauro Carvalho Chehab   return a 64-bit integer.
19454f38fcaSMauro Carvalho Chehab
195cae045f4SMauro Carvalho Chehab8. A ``sequence`` field was added to struct v4l2_buffer. The ``sequence``
196cae045f4SMauro Carvalho Chehab   field counts captured frames, it is ignored by output devices. When a
197cae045f4SMauro Carvalho Chehab   capture driver drops a frame, the sequence number of that frame is skipped.
19854f38fcaSMauro Carvalho Chehab
19954f38fcaSMauro Carvalho ChehabV4L2 Version 0.20 incremental changes
20054f38fcaSMauro Carvalho Chehab=====================================
20154f38fcaSMauro Carvalho Chehab
202cae045f4SMauro Carvalho Chehab1999-12-23: In struct v4l2_vbi_format the
20354f38fcaSMauro Carvalho Chehab``reserved1`` field became ``offset``. Previously drivers were required
20454f38fcaSMauro Carvalho Chehabto clear the ``reserved1`` field.
20554f38fcaSMauro Carvalho Chehab
20654f38fcaSMauro Carvalho Chehab2000-01-13: The ``V4L2_FMT_FLAG_NOT_INTERLACED`` flag was added.
20754f38fcaSMauro Carvalho Chehab
20854f38fcaSMauro Carvalho Chehab2000-07-31: The ``linux/poll.h`` header is now included by
20954f38fcaSMauro Carvalho Chehab``videodev.h`` for compatibility with the original ``videodev.h`` file.
21054f38fcaSMauro Carvalho Chehab
21154f38fcaSMauro Carvalho Chehab2000-11-20: ``V4L2_TYPE_VBI_OUTPUT`` and ``V4L2_PIX_FMT_Y41P`` were
21254f38fcaSMauro Carvalho Chehabadded.
21354f38fcaSMauro Carvalho Chehab
21454f38fcaSMauro Carvalho Chehab2000-11-25: ``V4L2_TYPE_VBI_INPUT`` was added.
21554f38fcaSMauro Carvalho Chehab
21654f38fcaSMauro Carvalho Chehab2000-12-04: A couple typos in symbol names were fixed.
21754f38fcaSMauro Carvalho Chehab
21854f38fcaSMauro Carvalho Chehab2001-01-18: To avoid namespace conflicts the ``fourcc`` macro defined in
21954f38fcaSMauro Carvalho Chehabthe ``videodev.h`` header file was renamed to ``v4l2_fourcc``.
22054f38fcaSMauro Carvalho Chehab
22154f38fcaSMauro Carvalho Chehab2001-01-25: A possible driver-level compatibility problem between the
22254f38fcaSMauro Carvalho Chehab``videodev.h`` file in Linux 2.4.0 and the ``videodev.h`` file included
22354f38fcaSMauro Carvalho Chehabin the ``videodevX`` patch was fixed. Users of an earlier version of
22454f38fcaSMauro Carvalho Chehab``videodevX`` on Linux 2.4.0 should recompile their V4L and V4L2
22554f38fcaSMauro Carvalho Chehabdrivers.
22654f38fcaSMauro Carvalho Chehab
22754f38fcaSMauro Carvalho Chehab2001-01-26: A possible kernel-level incompatibility between the
22854f38fcaSMauro Carvalho Chehab``videodev.h`` file in the ``videodevX`` patch and the ``videodev.h``
22954f38fcaSMauro Carvalho Chehabfile in Linux 2.2.x with devfs patches applied was fixed.
23054f38fcaSMauro Carvalho Chehab
23154f38fcaSMauro Carvalho Chehab2001-03-02: Certain V4L ioctls which pass data in both direction
23254f38fcaSMauro Carvalho Chehabalthough they are defined with read-only parameter, did not work
23354f38fcaSMauro Carvalho Chehabcorrectly through the backward compatibility layer. [Solution?]
23454f38fcaSMauro Carvalho Chehab
23554f38fcaSMauro Carvalho Chehab2001-04-13: Big endian 16-bit RGB formats were added.
23654f38fcaSMauro Carvalho Chehab
23754f38fcaSMauro Carvalho Chehab2001-09-17: New YUV formats and the
23854f38fcaSMauro Carvalho Chehab:ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
23954f38fcaSMauro Carvalho Chehab:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctls were added.
24054f38fcaSMauro Carvalho Chehab(The old ``VIDIOC_G_FREQ`` and ``VIDIOC_S_FREQ`` ioctls did not take
24154f38fcaSMauro Carvalho Chehabmultiple tuners into account.)
24254f38fcaSMauro Carvalho Chehab
24354f38fcaSMauro Carvalho Chehab2000-09-18: ``V4L2_BUF_TYPE_VBI`` was added. This may *break
24454f38fcaSMauro Carvalho Chehabcompatibility* as the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
245b4cc96f9SRandy Dunlap:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls may fail now if the
24654f38fcaSMauro Carvalho Chehabstruct ``v4l2_fmt`` ``type`` field does not contain
247cae045f4SMauro Carvalho Chehab``V4L2_BUF_TYPE_VBI``. In the documentation of the struct v4l2_vbi_format`,
248cae045f4SMauro Carvalho Chehabthe ``offset`` field the ambiguous phrase "rising edge" was changed to
249cae045f4SMauro Carvalho Chehab"leading edge".
25054f38fcaSMauro Carvalho Chehab
25154f38fcaSMauro Carvalho ChehabV4L2 Version 0.20 2000-11-23
25254f38fcaSMauro Carvalho Chehab============================
25354f38fcaSMauro Carvalho Chehab
25454f38fcaSMauro Carvalho ChehabA number of changes were made to the raw VBI interface.
25554f38fcaSMauro Carvalho Chehab
25654f38fcaSMauro Carvalho Chehab1. Figures clarifying the line numbering scheme were added to the V4L2
25754f38fcaSMauro Carvalho Chehab   API specification. The ``start``\ [0] and ``start``\ [1] fields no
25854f38fcaSMauro Carvalho Chehab   longer count line numbers beginning at zero. Rationale: a) The
25954f38fcaSMauro Carvalho Chehab   previous definition was unclear. b) The ``start``\ [] values are
26054f38fcaSMauro Carvalho Chehab   ordinal numbers. c) There is no point in inventing a new line
26154f38fcaSMauro Carvalho Chehab   numbering scheme. We now use line number as defined by ITU-R, period.
26254f38fcaSMauro Carvalho Chehab   Compatibility: Add one to the start values. Applications depending on
26354f38fcaSMauro Carvalho Chehab   the previous semantics may not function correctly.
26454f38fcaSMauro Carvalho Chehab
26554f38fcaSMauro Carvalho Chehab2. The restriction "count[0] > 0 and count[1] > 0" has been relaxed to
26654f38fcaSMauro Carvalho Chehab   "(count[0] + count[1]) > 0". Rationale: Drivers may allocate
26754f38fcaSMauro Carvalho Chehab   resources at scan line granularity and some data services are
26854f38fcaSMauro Carvalho Chehab   transmitted only on the first field. The comment that both ``count``
26954f38fcaSMauro Carvalho Chehab   values will usually be equal is misleading and pointless and has been
27054f38fcaSMauro Carvalho Chehab   removed. This change *breaks compatibility* with earlier versions:
27154f38fcaSMauro Carvalho Chehab   Drivers may return ``EINVAL``, applications may not function correctly.
27254f38fcaSMauro Carvalho Chehab
27354f38fcaSMauro Carvalho Chehab3. Drivers are again permitted to return negative (unknown) start values
27454f38fcaSMauro Carvalho Chehab   as proposed earlier. Why this feature was dropped is unclear. This
27554f38fcaSMauro Carvalho Chehab   change may *break compatibility* with applications depending on the
27654f38fcaSMauro Carvalho Chehab   start values being positive. The use of ``EBUSY`` and ``EINVAL``
27754f38fcaSMauro Carvalho Chehab   error codes with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl was
27854f38fcaSMauro Carvalho Chehab   clarified. The ``EBUSY`` error code was finally documented, and the
27954f38fcaSMauro Carvalho Chehab   ``reserved2`` field which was previously mentioned only in the
28054f38fcaSMauro Carvalho Chehab   ``videodev.h`` header file.
28154f38fcaSMauro Carvalho Chehab
28254f38fcaSMauro Carvalho Chehab4. New buffer types ``V4L2_TYPE_VBI_INPUT`` and ``V4L2_TYPE_VBI_OUTPUT``
28354f38fcaSMauro Carvalho Chehab   were added. The former is an alias for the old ``V4L2_TYPE_VBI``, the
28454f38fcaSMauro Carvalho Chehab   latter was missing in the ``videodev.h`` file.
28554f38fcaSMauro Carvalho Chehab
28654f38fcaSMauro Carvalho ChehabV4L2 Version 0.20 2002-07-25
28754f38fcaSMauro Carvalho Chehab============================
28854f38fcaSMauro Carvalho Chehab
28954f38fcaSMauro Carvalho ChehabAdded sliced VBI interface proposal.
29054f38fcaSMauro Carvalho Chehab
29154f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.5.46, 2002-10
29254f38fcaSMauro Carvalho Chehab=============================
29354f38fcaSMauro Carvalho Chehab
29454f38fcaSMauro Carvalho ChehabAround October-November 2002, prior to an announced feature freeze of
29554f38fcaSMauro Carvalho ChehabLinux 2.5, the API was revised, drawing from experience with V4L2 0.20.
29654f38fcaSMauro Carvalho ChehabThis unnamed version was finally merged into Linux 2.5.46.
29754f38fcaSMauro Carvalho Chehab
29854f38fcaSMauro Carvalho Chehab1.  As specified in :ref:`related`, drivers must make related device
29954f38fcaSMauro Carvalho Chehab    functions available under all minor device numbers.
30054f38fcaSMauro Carvalho Chehab
301407e84cdSMauro Carvalho Chehab2.  The :c:func:`open()` function requires access mode
30254f38fcaSMauro Carvalho Chehab    ``O_RDWR`` regardless of the device type. All V4L2 drivers
30354f38fcaSMauro Carvalho Chehab    exchanging data with applications must support the ``O_NONBLOCK``
30454f38fcaSMauro Carvalho Chehab    flag. The ``O_NOIO`` flag, a V4L2 symbol which aliased the
30554f38fcaSMauro Carvalho Chehab    meaningless ``O_TRUNC`` to indicate accesses without data exchange
30654f38fcaSMauro Carvalho Chehab    (panel applications) was dropped. Drivers must stay in "panel mode"
30754f38fcaSMauro Carvalho Chehab    until the application attempts to initiate a data exchange, see
30854f38fcaSMauro Carvalho Chehab    :ref:`open`.
30954f38fcaSMauro Carvalho Chehab
310cae045f4SMauro Carvalho Chehab3.  The struct v4l2_capability changed
31154f38fcaSMauro Carvalho Chehab    dramatically. Note that also the size of the structure changed,
31254f38fcaSMauro Carvalho Chehab    which is encoded in the ioctl request code, thus older V4L2 devices
31354f38fcaSMauro Carvalho Chehab    will respond with an ``EINVAL`` error code to the new
31454f38fcaSMauro Carvalho Chehab    :ref:`VIDIOC_QUERYCAP` ioctl.
31554f38fcaSMauro Carvalho Chehab
31654f38fcaSMauro Carvalho Chehab    There are new fields to identify the driver, a new RDS device
31754f38fcaSMauro Carvalho Chehab    function ``V4L2_CAP_RDS_CAPTURE``, the ``V4L2_CAP_AUDIO`` flag
31854f38fcaSMauro Carvalho Chehab    indicates if the device has any audio connectors, another I/O
31917611d3fSHans Verkuil    capability V4L2_CAP_ASYNCIO can be flagged. In response to these
32054f38fcaSMauro Carvalho Chehab    changes the ``type`` field became a bit set and was merged into the
32154f38fcaSMauro Carvalho Chehab    ``flags`` field. ``V4L2_FLAG_TUNER`` was renamed to
32254f38fcaSMauro Carvalho Chehab    ``V4L2_CAP_TUNER``, ``V4L2_CAP_VIDEO_OVERLAY`` replaced
32354f38fcaSMauro Carvalho Chehab    ``V4L2_FLAG_PREVIEW`` and ``V4L2_CAP_VBI_CAPTURE`` and
32454f38fcaSMauro Carvalho Chehab    ``V4L2_CAP_VBI_OUTPUT`` replaced ``V4L2_FLAG_DATA_SERVICE``.
32554f38fcaSMauro Carvalho Chehab    ``V4L2_FLAG_READ`` and ``V4L2_FLAG_WRITE`` were merged into
32654f38fcaSMauro Carvalho Chehab    ``V4L2_CAP_READWRITE``.
32754f38fcaSMauro Carvalho Chehab
32854f38fcaSMauro Carvalho Chehab    The redundant fields ``inputs``, ``outputs`` and ``audios`` were
32954f38fcaSMauro Carvalho Chehab    removed. These properties can be determined as described in
33054f38fcaSMauro Carvalho Chehab    :ref:`video` and :ref:`audio`.
33154f38fcaSMauro Carvalho Chehab
33254f38fcaSMauro Carvalho Chehab    The somewhat volatile and therefore barely useful fields
33354f38fcaSMauro Carvalho Chehab    ``maxwidth``, ``maxheight``, ``minwidth``, ``minheight``,
33454f38fcaSMauro Carvalho Chehab    ``maxframerate`` were removed. This information is available as
33554f38fcaSMauro Carvalho Chehab    described in :ref:`format` and :ref:`standard`.
33654f38fcaSMauro Carvalho Chehab
33754f38fcaSMauro Carvalho Chehab    ``V4L2_FLAG_SELECT`` was removed. We believe the select() function
33854f38fcaSMauro Carvalho Chehab    is important enough to require support of it in all V4L2 drivers
33954f38fcaSMauro Carvalho Chehab    exchanging data with applications. The redundant
34054f38fcaSMauro Carvalho Chehab    ``V4L2_FLAG_MONOCHROME`` flag was removed, this information is
34154f38fcaSMauro Carvalho Chehab    available as described in :ref:`format`.
34254f38fcaSMauro Carvalho Chehab
343cae045f4SMauro Carvalho Chehab4.  In struct v4l2_input the ``assoc_audio``
34454f38fcaSMauro Carvalho Chehab    field and the ``capability`` field and its only flag
34554f38fcaSMauro Carvalho Chehab    ``V4L2_INPUT_CAP_AUDIO`` was replaced by the new ``audioset`` field.
34654f38fcaSMauro Carvalho Chehab    Instead of linking one video input to one audio input this field
34754f38fcaSMauro Carvalho Chehab    reports all audio inputs this video input combines with.
34854f38fcaSMauro Carvalho Chehab
34954f38fcaSMauro Carvalho Chehab    New fields are ``tuner`` (reversing the former link from tuners to
35054f38fcaSMauro Carvalho Chehab    video inputs), ``std`` and ``status``.
35154f38fcaSMauro Carvalho Chehab
352cae045f4SMauro Carvalho Chehab    Accordingly struct v4l2_output lost its
35354f38fcaSMauro Carvalho Chehab    ``capability`` and ``assoc_audio`` fields. ``audioset``,
35454f38fcaSMauro Carvalho Chehab    ``modulator`` and ``std`` where added instead.
35554f38fcaSMauro Carvalho Chehab
356cae045f4SMauro Carvalho Chehab5.  The struct v4l2_audio field ``audio`` was
35754f38fcaSMauro Carvalho Chehab    renamed to ``index``, for consistency with other structures. A new
35854f38fcaSMauro Carvalho Chehab    capability flag ``V4L2_AUDCAP_STEREO`` was added to indicated if the
35954f38fcaSMauro Carvalho Chehab    audio input in question supports stereo sound.
36054f38fcaSMauro Carvalho Chehab    ``V4L2_AUDCAP_EFFECTS`` and the corresponding ``V4L2_AUDMODE`` flags
36154f38fcaSMauro Carvalho Chehab    where removed. This can be easily implemented using controls.
36254f38fcaSMauro Carvalho Chehab    (However the same applies to AVL which is still there.)
36354f38fcaSMauro Carvalho Chehab
364cae045f4SMauro Carvalho Chehab    Again for consistency the struct v4l2_audioout field ``audio`` was renamed
36554f38fcaSMauro Carvalho Chehab    to ``index``.
36654f38fcaSMauro Carvalho Chehab
367cae045f4SMauro Carvalho Chehab6.  The struct v4l2_tuner ``input`` field was
36854f38fcaSMauro Carvalho Chehab    replaced by an ``index`` field, permitting devices with multiple
36954f38fcaSMauro Carvalho Chehab    tuners. The link between video inputs and tuners is now reversed,
37054f38fcaSMauro Carvalho Chehab    inputs point to their tuner. The ``std`` substructure became a
371cae045f4SMauro Carvalho Chehab    simple set (more about this below) and moved into struct v4l2_input.
372cae045f4SMauro Carvalho Chehab    A ``type`` field was added.
37354f38fcaSMauro Carvalho Chehab
374cae045f4SMauro Carvalho Chehab    Accordingly in struct v4l2_modulator the
37554f38fcaSMauro Carvalho Chehab    ``output`` was replaced by an ``index`` field.
37654f38fcaSMauro Carvalho Chehab
377cae045f4SMauro Carvalho Chehab    In struct v4l2_frequency the ``port``
37854f38fcaSMauro Carvalho Chehab    field was replaced by a ``tuner`` field containing the respective
37954f38fcaSMauro Carvalho Chehab    tuner or modulator index number. A tuner ``type`` field was added
38054f38fcaSMauro Carvalho Chehab    and the ``reserved`` field became larger for future extensions
38154f38fcaSMauro Carvalho Chehab    (satellite tuners in particular).
38254f38fcaSMauro Carvalho Chehab
38354f38fcaSMauro Carvalho Chehab7.  The idea of completely transparent video standards was dropped.
38454f38fcaSMauro Carvalho Chehab    Experience showed that applications must be able to work with video
38554f38fcaSMauro Carvalho Chehab    standards beyond presenting the user a menu. Instead of enumerating
38654f38fcaSMauro Carvalho Chehab    supported standards with an ioctl applications can now refer to
38754f38fcaSMauro Carvalho Chehab    standards by :ref:`v4l2_std_id <v4l2-std-id>` and symbols
38854f38fcaSMauro Carvalho Chehab    defined in the ``videodev2.h`` header file. For details see
38954f38fcaSMauro Carvalho Chehab    :ref:`standard`. The :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` and
39054f38fcaSMauro Carvalho Chehab    :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` now take a pointer to this
39154f38fcaSMauro Carvalho Chehab    type as argument. :ref:`VIDIOC_QUERYSTD` was
39254f38fcaSMauro Carvalho Chehab    added to autodetect the received standard, if the hardware has this
393cae045f4SMauro Carvalho Chehab    capability. In struct v4l2_standard an
39454f38fcaSMauro Carvalho Chehab    ``index`` field was added for
39554f38fcaSMauro Carvalho Chehab    :ref:`VIDIOC_ENUMSTD`. A
39654f38fcaSMauro Carvalho Chehab    :ref:`v4l2_std_id <v4l2-std-id>` field named ``id`` was added as
39754f38fcaSMauro Carvalho Chehab    machine readable identifier, also replacing the ``transmission``
39854f38fcaSMauro Carvalho Chehab    field. The misleading ``framerate`` field was renamed to
39954f38fcaSMauro Carvalho Chehab    ``frameperiod``. The now obsolete ``colorstandard`` information,
40054f38fcaSMauro Carvalho Chehab    originally needed to distguish between variations of standards, were
40154f38fcaSMauro Carvalho Chehab    removed.
40254f38fcaSMauro Carvalho Chehab
40354f38fcaSMauro Carvalho Chehab    Struct ``v4l2_enumstd`` ceased to be.
40454f38fcaSMauro Carvalho Chehab    :ref:`VIDIOC_ENUMSTD` now takes a pointer to a
405cae045f4SMauro Carvalho Chehab    struct v4l2_standard directly. The
40654f38fcaSMauro Carvalho Chehab    information which standards are supported by a particular video
407cae045f4SMauro Carvalho Chehab    input or output moved into struct v4l2_input
408cae045f4SMauro Carvalho Chehab    and struct v4l2_output fields named ``std``,
40954f38fcaSMauro Carvalho Chehab    respectively.
41054f38fcaSMauro Carvalho Chehab
41154f38fcaSMauro Carvalho Chehab8.  The struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` fields
41254f38fcaSMauro Carvalho Chehab    ``category`` and ``group`` did not catch on and/or were not
41354f38fcaSMauro Carvalho Chehab    implemented as expected and therefore removed.
41454f38fcaSMauro Carvalho Chehab
41554f38fcaSMauro Carvalho Chehab9.  The :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl was added to
41654f38fcaSMauro Carvalho Chehab    negotiate data formats as with
41754f38fcaSMauro Carvalho Chehab    :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, but without the overhead of
41854f38fcaSMauro Carvalho Chehab    programming the hardware and regardless of I/O in progress.
41954f38fcaSMauro Carvalho Chehab
420cae045f4SMauro Carvalho Chehab    In struct v4l2_format the ``fmt`` union was
421cae045f4SMauro Carvalho Chehab    extended to contain struct v4l2_window. All
42254f38fcaSMauro Carvalho Chehab    image format negotiations are now possible with ``VIDIOC_G_FMT``,
42354f38fcaSMauro Carvalho Chehab    ``VIDIOC_S_FMT`` and ``VIDIOC_TRY_FMT``; ioctl. The ``VIDIOC_G_WIN``
42454f38fcaSMauro Carvalho Chehab    and ``VIDIOC_S_WIN`` ioctls to prepare for a video overlay were
425cae045f4SMauro Carvalho Chehab    removed. The ``type`` field changed to type enum v4l2_buf_type and
426cae045f4SMauro Carvalho Chehab    the buffer type names changed as follows.
42754f38fcaSMauro Carvalho Chehab
42854f38fcaSMauro Carvalho Chehab
42954f38fcaSMauro Carvalho Chehab    .. flat-table::
43054f38fcaSMauro Carvalho Chehab	:header-rows:  1
43154f38fcaSMauro Carvalho Chehab	:stub-columns: 0
43254f38fcaSMauro Carvalho Chehab
43354f38fcaSMauro Carvalho Chehab	* - Old defines
434cae045f4SMauro Carvalho Chehab	  - enum v4l2_buf_type
43554f38fcaSMauro Carvalho Chehab	* - ``V4L2_BUF_TYPE_CAPTURE``
43654f38fcaSMauro Carvalho Chehab	  - ``V4L2_BUF_TYPE_VIDEO_CAPTURE``
43754f38fcaSMauro Carvalho Chehab	* - ``V4L2_BUF_TYPE_CODECIN``
43854f38fcaSMauro Carvalho Chehab	  - Omitted for now
43954f38fcaSMauro Carvalho Chehab	* - ``V4L2_BUF_TYPE_CODECOUT``
44054f38fcaSMauro Carvalho Chehab	  - Omitted for now
44154f38fcaSMauro Carvalho Chehab	* - ``V4L2_BUF_TYPE_EFFECTSIN``
44254f38fcaSMauro Carvalho Chehab	  - Omitted for now
44354f38fcaSMauro Carvalho Chehab	* - ``V4L2_BUF_TYPE_EFFECTSIN2``
44454f38fcaSMauro Carvalho Chehab	  - Omitted for now
44554f38fcaSMauro Carvalho Chehab	* - ``V4L2_BUF_TYPE_EFFECTSOUT``
44654f38fcaSMauro Carvalho Chehab	  - Omitted for now
44754f38fcaSMauro Carvalho Chehab	* - ``V4L2_BUF_TYPE_VIDEOOUT``
44854f38fcaSMauro Carvalho Chehab	  - ``V4L2_BUF_TYPE_VIDEO_OUTPUT``
44954f38fcaSMauro Carvalho Chehab	* - ``-``
45054f38fcaSMauro Carvalho Chehab	  - ``V4L2_BUF_TYPE_VIDEO_OVERLAY``
45154f38fcaSMauro Carvalho Chehab	* - ``-``
45254f38fcaSMauro Carvalho Chehab	  - ``V4L2_BUF_TYPE_VBI_CAPTURE``
45354f38fcaSMauro Carvalho Chehab	* - ``-``
45454f38fcaSMauro Carvalho Chehab	  - ``V4L2_BUF_TYPE_VBI_OUTPUT``
45554f38fcaSMauro Carvalho Chehab	* - ``-``
45654f38fcaSMauro Carvalho Chehab	  - ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE``
45754f38fcaSMauro Carvalho Chehab	* - ``-``
45854f38fcaSMauro Carvalho Chehab	  - ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``
45954f38fcaSMauro Carvalho Chehab	* - ``V4L2_BUF_TYPE_PRIVATE_BASE``
46054f38fcaSMauro Carvalho Chehab	  - ``V4L2_BUF_TYPE_PRIVATE`` (but this is deprecated)
46154f38fcaSMauro Carvalho Chehab
462cae045f4SMauro Carvalho Chehab10. In struct v4l2_fmtdesc a enum v4l2_buf_type field named ``type`` was
463cae045f4SMauro Carvalho Chehab    added as in struct v4l2_format. The ``VIDIOC_ENUM_FBUFFMT`` ioctl is no
464cae045f4SMauro Carvalho Chehab    longer needed and was removed. These calls can be replaced by
465cae045f4SMauro Carvalho Chehab    :ref:`VIDIOC_ENUM_FMT` with type ``V4L2_BUF_TYPE_VIDEO_OVERLAY``.
46654f38fcaSMauro Carvalho Chehab
467cae045f4SMauro Carvalho Chehab11. In struct v4l2_pix_format the ``depth``
46854f38fcaSMauro Carvalho Chehab    field was removed, assuming applications which recognize the format
46954f38fcaSMauro Carvalho Chehab    by its four-character-code already know the color depth, and others
47054f38fcaSMauro Carvalho Chehab    do not care about it. The same rationale lead to the removal of the
47154f38fcaSMauro Carvalho Chehab    ``V4L2_FMT_FLAG_COMPRESSED`` flag. The
47254f38fcaSMauro Carvalho Chehab    ``V4L2_FMT_FLAG_SWCONVECOMPRESSED`` flag was removed because drivers
47354f38fcaSMauro Carvalho Chehab    are not supposed to convert images in kernel space. A user library
47454f38fcaSMauro Carvalho Chehab    of conversion functions should be provided instead. The
47554f38fcaSMauro Carvalho Chehab    ``V4L2_FMT_FLAG_BYTESPERLINE`` flag was redundant. Applications can
47654f38fcaSMauro Carvalho Chehab    set the ``bytesperline`` field to zero to get a reasonable default.
47754f38fcaSMauro Carvalho Chehab    Since the remaining flags were replaced as well, the ``flags`` field
47854f38fcaSMauro Carvalho Chehab    itself was removed.
47954f38fcaSMauro Carvalho Chehab
480cae045f4SMauro Carvalho Chehab    The interlace flags were replaced by a enum v4l2_field value in a
481cae045f4SMauro Carvalho Chehab    newly added ``field`` field.
48254f38fcaSMauro Carvalho Chehab
48354f38fcaSMauro Carvalho Chehab    .. flat-table::
48454f38fcaSMauro Carvalho Chehab	:header-rows:  1
48554f38fcaSMauro Carvalho Chehab	:stub-columns: 0
48654f38fcaSMauro Carvalho Chehab
48754f38fcaSMauro Carvalho Chehab	* - Old flag
488cae045f4SMauro Carvalho Chehab	  - enum v4l2_field
48954f38fcaSMauro Carvalho Chehab	* - ``V4L2_FMT_FLAG_NOT_INTERLACED``
49054f38fcaSMauro Carvalho Chehab	  - ?
49154f38fcaSMauro Carvalho Chehab	* - ``V4L2_FMT_FLAG_INTERLACED`` = ``V4L2_FMT_FLAG_COMBINED``
49254f38fcaSMauro Carvalho Chehab	  - ``V4L2_FIELD_INTERLACED``
49354f38fcaSMauro Carvalho Chehab	* - ``V4L2_FMT_FLAG_TOPFIELD`` = ``V4L2_FMT_FLAG_ODDFIELD``
49454f38fcaSMauro Carvalho Chehab	  - ``V4L2_FIELD_TOP``
49554f38fcaSMauro Carvalho Chehab	* - ``V4L2_FMT_FLAG_BOTFIELD`` = ``V4L2_FMT_FLAG_EVENFIELD``
49654f38fcaSMauro Carvalho Chehab	  - ``V4L2_FIELD_BOTTOM``
49754f38fcaSMauro Carvalho Chehab	* - ``-``
49854f38fcaSMauro Carvalho Chehab	  - ``V4L2_FIELD_SEQ_TB``
49954f38fcaSMauro Carvalho Chehab	* - ``-``
50054f38fcaSMauro Carvalho Chehab	  - ``V4L2_FIELD_SEQ_BT``
50154f38fcaSMauro Carvalho Chehab	* - ``-``
50254f38fcaSMauro Carvalho Chehab	  - ``V4L2_FIELD_ALTERNATE``
50354f38fcaSMauro Carvalho Chehab
504cae045f4SMauro Carvalho Chehab    The color space flags were replaced by a enum v4l2_colorspace value in
505cae045f4SMauro Carvalho Chehab    a newly added ``colorspace`` field, where one of
506cae045f4SMauro Carvalho Chehab    ``V4L2_COLORSPACE_SMPTE170M``, ``V4L2_COLORSPACE_BT878``,
507cae045f4SMauro Carvalho Chehab    ``V4L2_COLORSPACE_470_SYSTEM_M`` or
50854f38fcaSMauro Carvalho Chehab    ``V4L2_COLORSPACE_470_SYSTEM_BG`` replaces ``V4L2_FMT_CS_601YUV``.
50954f38fcaSMauro Carvalho Chehab
510cae045f4SMauro Carvalho Chehab12. In struct v4l2_requestbuffers the
511cae045f4SMauro Carvalho Chehab    ``type`` field was properly defined as enum v4l2_buf_type. Buffer types
512cae045f4SMauro Carvalho Chehab    changed as mentioned above. A new ``memory`` field of type
513cae045f4SMauro Carvalho Chehab    enum v4l2_memory was added to distinguish between
51454f38fcaSMauro Carvalho Chehab    I/O methods using buffers allocated by the driver or the
51554f38fcaSMauro Carvalho Chehab    application. See :ref:`io` for details.
51654f38fcaSMauro Carvalho Chehab
517cae045f4SMauro Carvalho Chehab13. In struct v4l2_buffer the ``type`` field was
518cae045f4SMauro Carvalho Chehab    properly defined as enum v4l2_buf_type.
51954f38fcaSMauro Carvalho Chehab    Buffer types changed as mentioned above. A ``field`` field of type
520cae045f4SMauro Carvalho Chehab    enum v4l2_field was added to indicate if a
52154f38fcaSMauro Carvalho Chehab    buffer contains a top or bottom field. The old field flags were
52254f38fcaSMauro Carvalho Chehab    removed. Since no unadjusted system time clock was added to the
52354f38fcaSMauro Carvalho Chehab    kernel as planned, the ``timestamp`` field changed back from type
52454f38fcaSMauro Carvalho Chehab    stamp_t, an unsigned 64 bit integer expressing the sample time in
525cae045f4SMauro Carvalho Chehab    nanoseconds, to struct timeval. With the addition
52654f38fcaSMauro Carvalho Chehab    of a second memory mapping method the ``offset`` field moved into
527cae045f4SMauro Carvalho Chehab    union ``m``, and a new ``memory`` field of type enum v4l2_memory
528cae045f4SMauro Carvalho Chehab    was added to distinguish between
52954f38fcaSMauro Carvalho Chehab    I/O methods. See :ref:`io` for details.
53054f38fcaSMauro Carvalho Chehab
53154f38fcaSMauro Carvalho Chehab    The ``V4L2_BUF_REQ_CONTIG`` flag was used by the V4L compatibility
53254f38fcaSMauro Carvalho Chehab    layer, after changes to this code it was no longer needed. The
53354f38fcaSMauro Carvalho Chehab    ``V4L2_BUF_ATTR_DEVICEMEM`` flag would indicate if the buffer was
53454f38fcaSMauro Carvalho Chehab    indeed allocated in device memory rather than DMA-able system
53554f38fcaSMauro Carvalho Chehab    memory. It was barely useful and so was removed.
53654f38fcaSMauro Carvalho Chehab
537cae045f4SMauro Carvalho Chehab14. In struct v4l2_framebuffer the
53854f38fcaSMauro Carvalho Chehab    ``base[3]`` array anticipating double- and triple-buffering in
53954f38fcaSMauro Carvalho Chehab    off-screen video memory, however without defining a synchronization
54054f38fcaSMauro Carvalho Chehab    mechanism, was replaced by a single pointer. The
54154f38fcaSMauro Carvalho Chehab    ``V4L2_FBUF_CAP_SCALEUP`` and ``V4L2_FBUF_CAP_SCALEDOWN`` flags were
54254f38fcaSMauro Carvalho Chehab    removed. Applications can determine this capability more accurately
54354f38fcaSMauro Carvalho Chehab    using the new cropping and scaling interface. The
54454f38fcaSMauro Carvalho Chehab    ``V4L2_FBUF_CAP_CLIPPING`` flag was replaced by
54554f38fcaSMauro Carvalho Chehab    ``V4L2_FBUF_CAP_LIST_CLIPPING`` and
54654f38fcaSMauro Carvalho Chehab    ``V4L2_FBUF_CAP_BITMAP_CLIPPING``.
54754f38fcaSMauro Carvalho Chehab
548cae045f4SMauro Carvalho Chehab15. In struct v4l2_clip the ``x``, ``y``,
54954f38fcaSMauro Carvalho Chehab    ``width`` and ``height`` field moved into a ``c`` substructure of
550cae045f4SMauro Carvalho Chehab    type struct v4l2_rect. The ``x`` and ``y``
55154f38fcaSMauro Carvalho Chehab    fields were renamed to ``left`` and ``top``, i. e. offsets to a
55254f38fcaSMauro Carvalho Chehab    context dependent origin.
55354f38fcaSMauro Carvalho Chehab
554cae045f4SMauro Carvalho Chehab16. In struct v4l2_window the ``x``, ``y``,
55554f38fcaSMauro Carvalho Chehab    ``width`` and ``height`` field moved into a ``w`` substructure as
556cae045f4SMauro Carvalho Chehab    above. A ``field`` field of type enum v4l2_field was added to
55754f38fcaSMauro Carvalho Chehab    distinguish between field and frame (interlaced) overlay.
55854f38fcaSMauro Carvalho Chehab
559f69249fcSMauro Carvalho Chehab17. The digital zoom interface, including struct ``v4l2_zoomcap``,
56054f38fcaSMauro Carvalho Chehab    struct ``v4l2_zoom``, ``V4L2_ZOOM_NONCAP`` and
56154f38fcaSMauro Carvalho Chehab    ``V4L2_ZOOM_WHILESTREAMING`` was replaced by a new cropping and
562f69249fcSMauro Carvalho Chehab    scaling interface. The previously unused
563cae045f4SMauro Carvalho Chehab    struct v4l2_cropcap and struct v4l2_crop
56454f38fcaSMauro Carvalho Chehab    where redefined for this purpose. See :ref:`crop` for details.
56554f38fcaSMauro Carvalho Chehab
566cae045f4SMauro Carvalho Chehab18. In struct v4l2_vbi_format the
56754f38fcaSMauro Carvalho Chehab    ``SAMPLE_FORMAT`` field now contains a four-character-code as used
56854f38fcaSMauro Carvalho Chehab    to identify video image formats and ``V4L2_PIX_FMT_GREY`` replaces
56954f38fcaSMauro Carvalho Chehab    the ``V4L2_VBI_SF_UBYTE`` define. The ``reserved`` field was
57054f38fcaSMauro Carvalho Chehab    extended.
57154f38fcaSMauro Carvalho Chehab
572cae045f4SMauro Carvalho Chehab19. In struct v4l2_captureparm the type of
573cae045f4SMauro Carvalho Chehab    the ``timeperframe`` field changed from unsigned long to
574cae045f4SMauro Carvalho Chehab    struct v4l2_fract. This allows the accurate
57554f38fcaSMauro Carvalho Chehab    expression of multiples of the NTSC-M frame rate 30000 / 1001. A new
57654f38fcaSMauro Carvalho Chehab    field ``readbuffers`` was added to control the driver behaviour in
57754f38fcaSMauro Carvalho Chehab    read I/O mode.
57854f38fcaSMauro Carvalho Chehab
579cae045f4SMauro Carvalho Chehab    Similar changes were made to struct v4l2_outputparm.
58054f38fcaSMauro Carvalho Chehab
58154f38fcaSMauro Carvalho Chehab20. The struct ``v4l2_performance`` and
58254f38fcaSMauro Carvalho Chehab    ``VIDIOC_G_PERF`` ioctl were dropped. Except when using the
58354f38fcaSMauro Carvalho Chehab    :ref:`read/write I/O method <rw>`, which is limited anyway, this
58454f38fcaSMauro Carvalho Chehab    information is already available to applications.
58554f38fcaSMauro Carvalho Chehab
58654f38fcaSMauro Carvalho Chehab21. The example transformation from RGB to YCbCr color space in the old
58754f38fcaSMauro Carvalho Chehab    V4L2 documentation was inaccurate, this has been corrected in
58854f38fcaSMauro Carvalho Chehab    :ref:`pixfmt`.
58954f38fcaSMauro Carvalho Chehab
59054f38fcaSMauro Carvalho ChehabV4L2 2003-06-19
59154f38fcaSMauro Carvalho Chehab===============
59254f38fcaSMauro Carvalho Chehab
59354f38fcaSMauro Carvalho Chehab1. A new capability flag ``V4L2_CAP_RADIO`` was added for radio devices.
59454f38fcaSMauro Carvalho Chehab   Prior to this change radio devices would identify solely by having
59554f38fcaSMauro Carvalho Chehab   exactly one tuner whose type field reads ``V4L2_TUNER_RADIO``.
59654f38fcaSMauro Carvalho Chehab
59754f38fcaSMauro Carvalho Chehab2. An optional driver access priority mechanism was added, see
59854f38fcaSMauro Carvalho Chehab   :ref:`app-pri` for details.
59954f38fcaSMauro Carvalho Chehab
60054f38fcaSMauro Carvalho Chehab3. The audio input and output interface was found to be incomplete.
60154f38fcaSMauro Carvalho Chehab
60254f38fcaSMauro Carvalho Chehab   Previously the :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` ioctl would
60354f38fcaSMauro Carvalho Chehab   enumerate the available audio inputs. An ioctl to determine the
60454f38fcaSMauro Carvalho Chehab   current audio input, if more than one combines with the current video
60554f38fcaSMauro Carvalho Chehab   input, did not exist. So ``VIDIOC_G_AUDIO`` was renamed to
60654f38fcaSMauro Carvalho Chehab   ``VIDIOC_G_AUDIO_OLD``, this ioctl was removed on Kernel 2.6.39. The
60754f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_ENUMAUDIO` ioctl was added to
60854f38fcaSMauro Carvalho Chehab   enumerate audio inputs, while
60954f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` now reports the current
61054f38fcaSMauro Carvalho Chehab   audio input.
61154f38fcaSMauro Carvalho Chehab
61254f38fcaSMauro Carvalho Chehab   The same changes were made to
61354f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_G_AUDOUT <VIDIOC_G_AUDOUT>` and
61454f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDOUT>`.
61554f38fcaSMauro Carvalho Chehab
61654f38fcaSMauro Carvalho Chehab   Until further the "videodev" module will automatically translate
61754f38fcaSMauro Carvalho Chehab   between the old and new ioctls, but drivers and applications must be
61854f38fcaSMauro Carvalho Chehab   updated to successfully compile again.
61954f38fcaSMauro Carvalho Chehab
62054f38fcaSMauro Carvalho Chehab4. The :ref:`VIDIOC_OVERLAY` ioctl was incorrectly
62154f38fcaSMauro Carvalho Chehab   defined with write-read parameter. It was changed to write-only,
62254f38fcaSMauro Carvalho Chehab   while the write-read version was renamed to ``VIDIOC_OVERLAY_OLD``.
62354f38fcaSMauro Carvalho Chehab   The old ioctl was removed on Kernel 2.6.39. Until further the
62454f38fcaSMauro Carvalho Chehab   "videodev" kernel module will automatically translate to the new
62554f38fcaSMauro Carvalho Chehab   version, so drivers must be recompiled, but not applications.
62654f38fcaSMauro Carvalho Chehab
62754f38fcaSMauro Carvalho Chehab5. :ref:`overlay` incorrectly stated that clipping rectangles define
62854f38fcaSMauro Carvalho Chehab   regions where the video can be seen. Correct is that clipping
62954f38fcaSMauro Carvalho Chehab   rectangles define regions where *no* video shall be displayed and so
63054f38fcaSMauro Carvalho Chehab   the graphics surface can be seen.
63154f38fcaSMauro Carvalho Chehab
63254f38fcaSMauro Carvalho Chehab6. The :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` and
63354f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls were defined with
63454f38fcaSMauro Carvalho Chehab   write-only parameter, inconsistent with other ioctls modifying their
63554f38fcaSMauro Carvalho Chehab   argument. They were changed to write-read, while a ``_OLD`` suffix
63654f38fcaSMauro Carvalho Chehab   was added to the write-only versions. The old ioctls were removed on
63754f38fcaSMauro Carvalho Chehab   Kernel 2.6.39. Drivers and applications assuming a constant parameter
63854f38fcaSMauro Carvalho Chehab   need an update.
63954f38fcaSMauro Carvalho Chehab
64054f38fcaSMauro Carvalho ChehabV4L2 2003-11-05
64154f38fcaSMauro Carvalho Chehab===============
64254f38fcaSMauro Carvalho Chehab
64354f38fcaSMauro Carvalho Chehab1. In :ref:`pixfmt-rgb` the following pixel formats were incorrectly
64454f38fcaSMauro Carvalho Chehab   transferred from Bill Dirks' V4L2 specification. Descriptions below
64554f38fcaSMauro Carvalho Chehab   refer to bytes in memory, in ascending address order.
64654f38fcaSMauro Carvalho Chehab
64754f38fcaSMauro Carvalho Chehab
64854f38fcaSMauro Carvalho Chehab   .. flat-table::
64954f38fcaSMauro Carvalho Chehab       :header-rows:  1
65054f38fcaSMauro Carvalho Chehab       :stub-columns: 0
65154f38fcaSMauro Carvalho Chehab
65254f38fcaSMauro Carvalho Chehab       * - Symbol
65354f38fcaSMauro Carvalho Chehab	 - In this document prior to revision 0.5
65454f38fcaSMauro Carvalho Chehab	 - Corrected
65554f38fcaSMauro Carvalho Chehab       * - ``V4L2_PIX_FMT_RGB24``
65654f38fcaSMauro Carvalho Chehab	 - B, G, R
65754f38fcaSMauro Carvalho Chehab	 - R, G, B
65854f38fcaSMauro Carvalho Chehab       * - ``V4L2_PIX_FMT_BGR24``
65954f38fcaSMauro Carvalho Chehab	 - R, G, B
66054f38fcaSMauro Carvalho Chehab	 - B, G, R
66154f38fcaSMauro Carvalho Chehab       * - ``V4L2_PIX_FMT_RGB32``
66254f38fcaSMauro Carvalho Chehab	 - B, G, R, X
66354f38fcaSMauro Carvalho Chehab	 - R, G, B, X
66454f38fcaSMauro Carvalho Chehab       * - ``V4L2_PIX_FMT_BGR32``
66554f38fcaSMauro Carvalho Chehab	 - R, G, B, X
66654f38fcaSMauro Carvalho Chehab	 - B, G, R, X
66754f38fcaSMauro Carvalho Chehab
66854f38fcaSMauro Carvalho Chehab   The ``V4L2_PIX_FMT_BGR24`` example was always correct.
66954f38fcaSMauro Carvalho Chehab
67054f38fcaSMauro Carvalho Chehab   In :ref:`v4l-image-properties` the mapping of the V4L
67154f38fcaSMauro Carvalho Chehab   ``VIDEO_PALETTE_RGB24`` and ``VIDEO_PALETTE_RGB32`` formats to V4L2
67254f38fcaSMauro Carvalho Chehab   pixel formats was accordingly corrected.
67354f38fcaSMauro Carvalho Chehab
67454f38fcaSMauro Carvalho Chehab2. Unrelated to the fixes above, drivers may still interpret some V4L2
67554f38fcaSMauro Carvalho Chehab   RGB pixel formats differently. These issues have yet to be addressed,
67654f38fcaSMauro Carvalho Chehab   for details see :ref:`pixfmt-rgb`.
67754f38fcaSMauro Carvalho Chehab
67854f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.6, 2004-05-09
67954f38fcaSMauro Carvalho Chehab===============================
68054f38fcaSMauro Carvalho Chehab
68154f38fcaSMauro Carvalho Chehab1. The :ref:`VIDIOC_CROPCAP` ioctl was incorrectly
68254f38fcaSMauro Carvalho Chehab   defined with read-only parameter. It is now defined as write-read
68354f38fcaSMauro Carvalho Chehab   ioctl, while the read-only version was renamed to
68454f38fcaSMauro Carvalho Chehab   ``VIDIOC_CROPCAP_OLD``. The old ioctl was removed on Kernel 2.6.39.
68554f38fcaSMauro Carvalho Chehab
68654f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.8
68754f38fcaSMauro Carvalho Chehab===================
68854f38fcaSMauro Carvalho Chehab
68954f38fcaSMauro Carvalho Chehab1. A new field ``input`` (former ``reserved[0]``) was added to the
690cae045f4SMauro Carvalho Chehab   struct v4l2_buffer. Purpose of this
69154f38fcaSMauro Carvalho Chehab   field is to alternate between video inputs (e. g. cameras) in step
69254f38fcaSMauro Carvalho Chehab   with the video capturing process. This function must be enabled with
69354f38fcaSMauro Carvalho Chehab   the new ``V4L2_BUF_FLAG_INPUT`` flag. The ``flags`` field is no
69454f38fcaSMauro Carvalho Chehab   longer read-only.
69554f38fcaSMauro Carvalho Chehab
69654f38fcaSMauro Carvalho ChehabV4L2 spec erratum 2004-08-01
69754f38fcaSMauro Carvalho Chehab============================
69854f38fcaSMauro Carvalho Chehab
69954f38fcaSMauro Carvalho Chehab1. The return value of the :ref:`func-open` function was incorrectly
70054f38fcaSMauro Carvalho Chehab   documented.
70154f38fcaSMauro Carvalho Chehab
70254f38fcaSMauro Carvalho Chehab2. Audio output ioctls end in -AUDOUT, not -AUDIOOUT.
70354f38fcaSMauro Carvalho Chehab
70454f38fcaSMauro Carvalho Chehab3. In the Current Audio Input example the ``VIDIOC_G_AUDIO`` ioctl took
70554f38fcaSMauro Carvalho Chehab   the wrong argument.
70654f38fcaSMauro Carvalho Chehab
70754f38fcaSMauro Carvalho Chehab4. The documentation of the :ref:`VIDIOC_QBUF` and
70854f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctls did not mention the
709cae045f4SMauro Carvalho Chehab   struct v4l2_buffer ``memory`` field. It was
71054f38fcaSMauro Carvalho Chehab   also missing from examples. Also on the ``VIDIOC_DQBUF`` page the ``EIO``
71154f38fcaSMauro Carvalho Chehab   error code was not documented.
71254f38fcaSMauro Carvalho Chehab
71354f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.14
71454f38fcaSMauro Carvalho Chehab====================
71554f38fcaSMauro Carvalho Chehab
71654f38fcaSMauro Carvalho Chehab1. A new sliced VBI interface was added. It is documented in
71754f38fcaSMauro Carvalho Chehab   :ref:`sliced` and replaces the interface first proposed in V4L2
71854f38fcaSMauro Carvalho Chehab   specification 0.8.
71954f38fcaSMauro Carvalho Chehab
72054f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.15
72154f38fcaSMauro Carvalho Chehab====================
72254f38fcaSMauro Carvalho Chehab
72354f38fcaSMauro Carvalho Chehab1. The :ref:`VIDIOC_LOG_STATUS` ioctl was added.
72454f38fcaSMauro Carvalho Chehab
72554f38fcaSMauro Carvalho Chehab2. New video standards ``V4L2_STD_NTSC_443``, ``V4L2_STD_SECAM_LC``,
72654f38fcaSMauro Carvalho Chehab   ``V4L2_STD_SECAM_DK`` (a set of SECAM D, K and K1), and
72754f38fcaSMauro Carvalho Chehab   ``V4L2_STD_ATSC`` (a set of ``V4L2_STD_ATSC_8_VSB`` and
72854f38fcaSMauro Carvalho Chehab   ``V4L2_STD_ATSC_16_VSB``) were defined. Note the ``V4L2_STD_525_60``
72954f38fcaSMauro Carvalho Chehab   set now includes ``V4L2_STD_NTSC_443``. See also
73054f38fcaSMauro Carvalho Chehab   :ref:`v4l2-std-id`.
73154f38fcaSMauro Carvalho Chehab
73254f38fcaSMauro Carvalho Chehab3. The ``VIDIOC_G_COMP`` and ``VIDIOC_S_COMP`` ioctl were renamed to
73354f38fcaSMauro Carvalho Chehab   ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` respectively. Their
73454f38fcaSMauro Carvalho Chehab   argument was replaced by a struct
73554f38fcaSMauro Carvalho Chehab   ``v4l2_mpeg_compression`` pointer. (The
73654f38fcaSMauro Carvalho Chehab   ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls where removed
73754f38fcaSMauro Carvalho Chehab   in Linux 2.6.25.)
73854f38fcaSMauro Carvalho Chehab
73954f38fcaSMauro Carvalho ChehabV4L2 spec erratum 2005-11-27
74054f38fcaSMauro Carvalho Chehab============================
74154f38fcaSMauro Carvalho Chehab
74254f38fcaSMauro Carvalho ChehabThe capture example in :ref:`capture-example` called the
74354f38fcaSMauro Carvalho Chehab:ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctl without checking if
74454f38fcaSMauro Carvalho Chehabcropping is supported. In the video standard selection example in
74554f38fcaSMauro Carvalho Chehab:ref:`standard` the :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` call used
74654f38fcaSMauro Carvalho Chehabthe wrong argument type.
74754f38fcaSMauro Carvalho Chehab
74854f38fcaSMauro Carvalho ChehabV4L2 spec erratum 2006-01-10
74954f38fcaSMauro Carvalho Chehab============================
75054f38fcaSMauro Carvalho Chehab
751cae045f4SMauro Carvalho Chehab1. The ``V4L2_IN_ST_COLOR_KILL`` flag in struct v4l2_input not only
752cae045f4SMauro Carvalho Chehab   indicates if the color killer is enabled, but also if it is active.
753cae045f4SMauro Carvalho Chehab   (The color killer disables color decoding when it detects no color
754cae045f4SMauro Carvalho Chehab   in the video signal to improve the image quality.)
75554f38fcaSMauro Carvalho Chehab
75654f38fcaSMauro Carvalho Chehab2. :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` is a write-read ioctl, not
75754f38fcaSMauro Carvalho Chehab   write-only as stated on its reference page. The ioctl changed in 2003
75854f38fcaSMauro Carvalho Chehab   as noted above.
75954f38fcaSMauro Carvalho Chehab
76054f38fcaSMauro Carvalho ChehabV4L2 spec erratum 2006-02-03
76154f38fcaSMauro Carvalho Chehab============================
76254f38fcaSMauro Carvalho Chehab
763cae045f4SMauro Carvalho Chehab1. In struct v4l2_captureparm and struct v4l2_outputparm the ``timeperframe``
76454f38fcaSMauro Carvalho Chehab   field gives the time in seconds, not microseconds.
76554f38fcaSMauro Carvalho Chehab
76654f38fcaSMauro Carvalho ChehabV4L2 spec erratum 2006-02-04
76754f38fcaSMauro Carvalho Chehab============================
76854f38fcaSMauro Carvalho Chehab
769cae045f4SMauro Carvalho Chehab1. The ``clips`` field in struct v4l2_window
770cae045f4SMauro Carvalho Chehab   must point to an array of struct v4l2_clip, not
771f69249fcSMauro Carvalho Chehab   a linked list, because drivers ignore the
772cae045f4SMauro Carvalho Chehab   struct v4l2_clip. ``next`` pointer.
77354f38fcaSMauro Carvalho Chehab
77454f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.17
77554f38fcaSMauro Carvalho Chehab====================
77654f38fcaSMauro Carvalho Chehab
77754f38fcaSMauro Carvalho Chehab1. New video standard macros were added: ``V4L2_STD_NTSC_M_KR`` (NTSC M
77854f38fcaSMauro Carvalho Chehab   South Korea), and the sets ``V4L2_STD_MN``, ``V4L2_STD_B``,
77954f38fcaSMauro Carvalho Chehab   ``V4L2_STD_GH`` and ``V4L2_STD_DK``. The ``V4L2_STD_NTSC`` and
78054f38fcaSMauro Carvalho Chehab   ``V4L2_STD_SECAM`` sets now include ``V4L2_STD_NTSC_M_KR`` and
78154f38fcaSMauro Carvalho Chehab   ``V4L2_STD_SECAM_LC`` respectively.
78254f38fcaSMauro Carvalho Chehab
78354f38fcaSMauro Carvalho Chehab2. A new ``V4L2_TUNER_MODE_LANG1_LANG2`` was defined to record both
78454f38fcaSMauro Carvalho Chehab   languages of a bilingual program. The use of
78554f38fcaSMauro Carvalho Chehab   ``V4L2_TUNER_MODE_STEREO`` for this purpose is deprecated now. See
78654f38fcaSMauro Carvalho Chehab   the :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` section for details.
78754f38fcaSMauro Carvalho Chehab
78854f38fcaSMauro Carvalho ChehabV4L2 spec erratum 2006-09-23 (Draft 0.15)
78954f38fcaSMauro Carvalho Chehab=========================================
79054f38fcaSMauro Carvalho Chehab
79154f38fcaSMauro Carvalho Chehab1. In various places ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` and
79254f38fcaSMauro Carvalho Chehab   ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT`` of the sliced VBI interface were
79354f38fcaSMauro Carvalho Chehab   not mentioned along with other buffer types.
79454f38fcaSMauro Carvalho Chehab
795cae045f4SMauro Carvalho Chehab2. In :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` it was clarified that the
796cae045f4SMauro Carvalho Chehab   struct v4l2_audio ``mode`` field is a flags field.
79754f38fcaSMauro Carvalho Chehab
79854f38fcaSMauro Carvalho Chehab3. :ref:`VIDIOC_QUERYCAP` did not mention the sliced VBI and radio
79954f38fcaSMauro Carvalho Chehab   capability flags.
80054f38fcaSMauro Carvalho Chehab
801cae045f4SMauro Carvalho Chehab4. In :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` it was clarified that
802cae045f4SMauro Carvalho Chehab   applications must initialize the tuner ``type`` field of
803cae045f4SMauro Carvalho Chehab   struct v4l2_frequency before calling
80454f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>`.
80554f38fcaSMauro Carvalho Chehab
806cae045f4SMauro Carvalho Chehab5. The ``reserved`` array in struct v4l2_requestbuffers has 2 elements,
80754f38fcaSMauro Carvalho Chehab   not 32.
80854f38fcaSMauro Carvalho Chehab
80954f38fcaSMauro Carvalho Chehab6. In :ref:`output` and :ref:`raw-vbi` the device file names
81054f38fcaSMauro Carvalho Chehab   ``/dev/vout`` which never caught on were replaced by ``/dev/video``.
81154f38fcaSMauro Carvalho Chehab
81254f38fcaSMauro Carvalho Chehab7. With Linux 2.6.15 the possible range for VBI device minor numbers was
81354f38fcaSMauro Carvalho Chehab   extended from 224-239 to 224-255. Accordingly device file names
81454f38fcaSMauro Carvalho Chehab   ``/dev/vbi0`` to ``/dev/vbi31`` are possible now.
81554f38fcaSMauro Carvalho Chehab
81654f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.18
81754f38fcaSMauro Carvalho Chehab====================
81854f38fcaSMauro Carvalho Chehab
81954f38fcaSMauro Carvalho Chehab1. New ioctls :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`,
82054f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and
82154f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` were added, a
82254f38fcaSMauro Carvalho Chehab   flag to skip unsupported controls with
82354f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_QUERYCTRL`, new control types
82454f38fcaSMauro Carvalho Chehab   ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_TYPE_CTRL_CLASS``
825cae045f4SMauro Carvalho Chehab   (enum v4l2_ctrl_type), and new control flags
82654f38fcaSMauro Carvalho Chehab   ``V4L2_CTRL_FLAG_READ_ONLY``, ``V4L2_CTRL_FLAG_UPDATE``,
82754f38fcaSMauro Carvalho Chehab   ``V4L2_CTRL_FLAG_INACTIVE`` and ``V4L2_CTRL_FLAG_SLIDER``
82854f38fcaSMauro Carvalho Chehab   (:ref:`control-flags`). See :ref:`extended-controls` for details.
82954f38fcaSMauro Carvalho Chehab
83054f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.19
83154f38fcaSMauro Carvalho Chehab====================
83254f38fcaSMauro Carvalho Chehab
833cae045f4SMauro Carvalho Chehab1. In struct v4l2_sliced_vbi_cap a
83454f38fcaSMauro Carvalho Chehab   buffer type field was added replacing a reserved field. Note on
83554f38fcaSMauro Carvalho Chehab   architectures where the size of enum types differs from int types the
83654f38fcaSMauro Carvalho Chehab   size of the structure changed. The
83754f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl
83854f38fcaSMauro Carvalho Chehab   was redefined from being read-only to write-read. Applications must
83954f38fcaSMauro Carvalho Chehab   initialize the type field and clear the reserved fields now. These
84054f38fcaSMauro Carvalho Chehab   changes may *break the compatibility* with older drivers and
84154f38fcaSMauro Carvalho Chehab   applications.
84254f38fcaSMauro Carvalho Chehab
84354f38fcaSMauro Carvalho Chehab2. The ioctls :ref:`VIDIOC_ENUM_FRAMESIZES`
84454f38fcaSMauro Carvalho Chehab   and
84554f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_ENUM_FRAMEINTERVALS`
84654f38fcaSMauro Carvalho Chehab   were added.
84754f38fcaSMauro Carvalho Chehab
84854f38fcaSMauro Carvalho Chehab3. A new pixel format ``V4L2_PIX_FMT_RGB444`` (:ref:`pixfmt-rgb`) was
84954f38fcaSMauro Carvalho Chehab   added.
85054f38fcaSMauro Carvalho Chehab
85154f38fcaSMauro Carvalho ChehabV4L2 spec erratum 2006-10-12 (Draft 0.17)
85254f38fcaSMauro Carvalho Chehab=========================================
85354f38fcaSMauro Carvalho Chehab
85454f38fcaSMauro Carvalho Chehab1. ``V4L2_PIX_FMT_HM12`` (:ref:`reserved-formats`) is a YUV 4:2:0, not
85554f38fcaSMauro Carvalho Chehab   4:2:2 format.
85654f38fcaSMauro Carvalho Chehab
85754f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.21
85854f38fcaSMauro Carvalho Chehab====================
85954f38fcaSMauro Carvalho Chehab
86054f38fcaSMauro Carvalho Chehab1. The ``videodev2.h`` header file is now dual licensed under GNU
86154f38fcaSMauro Carvalho Chehab   General Public License version two or later, and under a 3-clause
86254f38fcaSMauro Carvalho Chehab   BSD-style license.
86354f38fcaSMauro Carvalho Chehab
86454f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.22
86554f38fcaSMauro Carvalho Chehab====================
86654f38fcaSMauro Carvalho Chehab
86754f38fcaSMauro Carvalho Chehab1. Two new field orders ``V4L2_FIELD_INTERLACED_TB`` and
868cae045f4SMauro Carvalho Chehab   ``V4L2_FIELD_INTERLACED_BT`` were added. See enum v4l2_field for
86954f38fcaSMauro Carvalho Chehab   details.
87054f38fcaSMauro Carvalho Chehab
87154f38fcaSMauro Carvalho Chehab2. Three new clipping/blending methods with a global or straight or
87254f38fcaSMauro Carvalho Chehab   inverted local alpha value were added to the video overlay interface.
87354f38fcaSMauro Carvalho Chehab   See the description of the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`
87454f38fcaSMauro Carvalho Chehab   and :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctls for details.
87554f38fcaSMauro Carvalho Chehab
876cae045f4SMauro Carvalho Chehab   A new ``global_alpha`` field was added to struct v4l2_window,
877cae045f4SMauro Carvalho Chehab   extending the structure. This may **break compatibility** with
878cae045f4SMauro Carvalho Chehab   applications using a struct v4l2_window directly. However the
87954f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_G/S/TRY_FMT <VIDIOC_G_FMT>` ioctls, which take a
880cae045f4SMauro Carvalho Chehab   pointer to a struct v4l2_format parent structure
88154f38fcaSMauro Carvalho Chehab   with padding bytes at the end, are not affected.
88254f38fcaSMauro Carvalho Chehab
883cae045f4SMauro Carvalho Chehab3. The format of the ``chromakey`` field in struct v4l2_window changed from
884cae045f4SMauro Carvalho Chehab   "host order RGB32" to a pixel value in the same format as the framebuffer.
885cae045f4SMauro Carvalho Chehab   This may **break compatibility** with existing applications. Drivers
886cae045f4SMauro Carvalho Chehab   supporting the "host order RGB32" format are not known.
88754f38fcaSMauro Carvalho Chehab
88854f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.24
88954f38fcaSMauro Carvalho Chehab====================
89054f38fcaSMauro Carvalho Chehab
89154f38fcaSMauro Carvalho Chehab1. The pixel formats ``V4L2_PIX_FMT_PAL8``, ``V4L2_PIX_FMT_YUV444``,
89254f38fcaSMauro Carvalho Chehab   ``V4L2_PIX_FMT_YUV555``, ``V4L2_PIX_FMT_YUV565`` and
89354f38fcaSMauro Carvalho Chehab   ``V4L2_PIX_FMT_YUV32`` were added.
89454f38fcaSMauro Carvalho Chehab
89554f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.25
89654f38fcaSMauro Carvalho Chehab====================
89754f38fcaSMauro Carvalho Chehab
89854f38fcaSMauro Carvalho Chehab1. The pixel formats :ref:`V4L2_PIX_FMT_Y16 <V4L2-PIX-FMT-Y16>` and
89954f38fcaSMauro Carvalho Chehab   :ref:`V4L2_PIX_FMT_SBGGR16 <V4L2-PIX-FMT-SBGGR16>` were added.
90054f38fcaSMauro Carvalho Chehab
90154f38fcaSMauro Carvalho Chehab2. New :ref:`controls <control>` ``V4L2_CID_POWER_LINE_FREQUENCY``,
90254f38fcaSMauro Carvalho Chehab   ``V4L2_CID_HUE_AUTO``, ``V4L2_CID_WHITE_BALANCE_TEMPERATURE``,
90354f38fcaSMauro Carvalho Chehab   ``V4L2_CID_SHARPNESS`` and ``V4L2_CID_BACKLIGHT_COMPENSATION`` were
90454f38fcaSMauro Carvalho Chehab   added. The controls ``V4L2_CID_BLACK_LEVEL``, ``V4L2_CID_WHITENESS``,
90554f38fcaSMauro Carvalho Chehab   ``V4L2_CID_HCENTER`` and ``V4L2_CID_VCENTER`` were deprecated.
90654f38fcaSMauro Carvalho Chehab
90754f38fcaSMauro Carvalho Chehab3. A :ref:`Camera controls class <camera-controls>` was added, with
90854f38fcaSMauro Carvalho Chehab   the new controls ``V4L2_CID_EXPOSURE_AUTO``,
90954f38fcaSMauro Carvalho Chehab   ``V4L2_CID_EXPOSURE_ABSOLUTE``, ``V4L2_CID_EXPOSURE_AUTO_PRIORITY``,
91054f38fcaSMauro Carvalho Chehab   ``V4L2_CID_PAN_RELATIVE``, ``V4L2_CID_TILT_RELATIVE``,
91154f38fcaSMauro Carvalho Chehab   ``V4L2_CID_PAN_RESET``, ``V4L2_CID_TILT_RESET``,
91254f38fcaSMauro Carvalho Chehab   ``V4L2_CID_PAN_ABSOLUTE``, ``V4L2_CID_TILT_ABSOLUTE``,
91354f38fcaSMauro Carvalho Chehab   ``V4L2_CID_FOCUS_ABSOLUTE``, ``V4L2_CID_FOCUS_RELATIVE`` and
91454f38fcaSMauro Carvalho Chehab   ``V4L2_CID_FOCUS_AUTO``.
91554f38fcaSMauro Carvalho Chehab
91654f38fcaSMauro Carvalho Chehab4. The ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls, which
91754f38fcaSMauro Carvalho Chehab   were superseded by the :ref:`extended controls <extended-controls>`
91854f38fcaSMauro Carvalho Chehab   interface in Linux 2.6.18, where finally removed from the
91954f38fcaSMauro Carvalho Chehab   ``videodev2.h`` header file.
92054f38fcaSMauro Carvalho Chehab
92154f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.26
92254f38fcaSMauro Carvalho Chehab====================
92354f38fcaSMauro Carvalho Chehab
92454f38fcaSMauro Carvalho Chehab1. The pixel formats ``V4L2_PIX_FMT_Y16`` and ``V4L2_PIX_FMT_SBGGR16``
92554f38fcaSMauro Carvalho Chehab   were added.
92654f38fcaSMauro Carvalho Chehab
92754f38fcaSMauro Carvalho Chehab2. Added user controls ``V4L2_CID_CHROMA_AGC`` and
92854f38fcaSMauro Carvalho Chehab   ``V4L2_CID_COLOR_KILLER``.
92954f38fcaSMauro Carvalho Chehab
93054f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.27
93154f38fcaSMauro Carvalho Chehab====================
93254f38fcaSMauro Carvalho Chehab
93354f38fcaSMauro Carvalho Chehab1. The :ref:`VIDIOC_S_HW_FREQ_SEEK` ioctl
93454f38fcaSMauro Carvalho Chehab   and the ``V4L2_CAP_HW_FREQ_SEEK`` capability were added.
93554f38fcaSMauro Carvalho Chehab
93654f38fcaSMauro Carvalho Chehab2. The pixel formats ``V4L2_PIX_FMT_YVYU``, ``V4L2_PIX_FMT_PCA501``,
93754f38fcaSMauro Carvalho Chehab   ``V4L2_PIX_FMT_PCA505``, ``V4L2_PIX_FMT_PCA508``,
93854f38fcaSMauro Carvalho Chehab   ``V4L2_PIX_FMT_PCA561``, ``V4L2_PIX_FMT_SGBRG8``,
93954f38fcaSMauro Carvalho Chehab   ``V4L2_PIX_FMT_PAC207`` and ``V4L2_PIX_FMT_PJPG`` were added.
94054f38fcaSMauro Carvalho Chehab
94154f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.28
94254f38fcaSMauro Carvalho Chehab====================
94354f38fcaSMauro Carvalho Chehab
94454f38fcaSMauro Carvalho Chehab1. Added ``V4L2_MPEG_AUDIO_ENCODING_AAC`` and
94554f38fcaSMauro Carvalho Chehab   ``V4L2_MPEG_AUDIO_ENCODING_AC3`` MPEG audio encodings.
94654f38fcaSMauro Carvalho Chehab
94754f38fcaSMauro Carvalho Chehab2. Added ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC`` MPEG video encoding.
94854f38fcaSMauro Carvalho Chehab
94954f38fcaSMauro Carvalho Chehab3. The pixel formats ``V4L2_PIX_FMT_SGRBG10`` and
95054f38fcaSMauro Carvalho Chehab   ``V4L2_PIX_FMT_SGRBG10DPCM8`` were added.
95154f38fcaSMauro Carvalho Chehab
95254f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.29
95354f38fcaSMauro Carvalho Chehab====================
95454f38fcaSMauro Carvalho Chehab
95554f38fcaSMauro Carvalho Chehab1. The ``VIDIOC_G_CHIP_IDENT`` ioctl was renamed to
95654f38fcaSMauro Carvalho Chehab   ``VIDIOC_G_CHIP_IDENT_OLD`` and ``VIDIOC_DBG_G_CHIP_IDENT`` was
957f69249fcSMauro Carvalho Chehab   introduced in its place. The old struct ``v4l2_chip_ident`` was renamed to
95854f38fcaSMauro Carvalho Chehab   struct ``v4l2_chip_ident_old``.
95954f38fcaSMauro Carvalho Chehab
96054f38fcaSMauro Carvalho Chehab2. The pixel formats ``V4L2_PIX_FMT_VYUY``, ``V4L2_PIX_FMT_NV16`` and
96154f38fcaSMauro Carvalho Chehab   ``V4L2_PIX_FMT_NV61`` were added.
96254f38fcaSMauro Carvalho Chehab
96354f38fcaSMauro Carvalho Chehab3. Added camera controls ``V4L2_CID_ZOOM_ABSOLUTE``,
96454f38fcaSMauro Carvalho Chehab   ``V4L2_CID_ZOOM_RELATIVE``, ``V4L2_CID_ZOOM_CONTINUOUS`` and
96554f38fcaSMauro Carvalho Chehab   ``V4L2_CID_PRIVACY``.
96654f38fcaSMauro Carvalho Chehab
96754f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.30
96854f38fcaSMauro Carvalho Chehab====================
96954f38fcaSMauro Carvalho Chehab
97054f38fcaSMauro Carvalho Chehab1. New control flag ``V4L2_CTRL_FLAG_WRITE_ONLY`` was added.
97154f38fcaSMauro Carvalho Chehab
97254f38fcaSMauro Carvalho Chehab2. New control ``V4L2_CID_COLORFX`` was added.
97354f38fcaSMauro Carvalho Chehab
97454f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.32
97554f38fcaSMauro Carvalho Chehab====================
97654f38fcaSMauro Carvalho Chehab
97754f38fcaSMauro Carvalho Chehab1. In order to be easier to compare a V4L2 API and a kernel version, now
97854f38fcaSMauro Carvalho Chehab   V4L2 API is numbered using the Linux Kernel version numeration.
97954f38fcaSMauro Carvalho Chehab
98054f38fcaSMauro Carvalho Chehab2. Finalized the RDS capture API. See :ref:`rds` for more information.
98154f38fcaSMauro Carvalho Chehab
98254f38fcaSMauro Carvalho Chehab3. Added new capabilities for modulators and RDS encoders.
98354f38fcaSMauro Carvalho Chehab
98454f38fcaSMauro Carvalho Chehab4. Add description for libv4l API.
98554f38fcaSMauro Carvalho Chehab
98654f38fcaSMauro Carvalho Chehab5. Added support for string controls via new type
98754f38fcaSMauro Carvalho Chehab   ``V4L2_CTRL_TYPE_STRING``.
98854f38fcaSMauro Carvalho Chehab
98954f38fcaSMauro Carvalho Chehab6. Added ``V4L2_CID_BAND_STOP_FILTER`` documentation.
99054f38fcaSMauro Carvalho Chehab
99154f38fcaSMauro Carvalho Chehab7. Added FM Modulator (FM TX) Extended Control Class:
99254f38fcaSMauro Carvalho Chehab   ``V4L2_CTRL_CLASS_FM_TX`` and their Control IDs.
99354f38fcaSMauro Carvalho Chehab
99454f38fcaSMauro Carvalho Chehab8. Added FM Receiver (FM RX) Extended Control Class:
99554f38fcaSMauro Carvalho Chehab   ``V4L2_CTRL_CLASS_FM_RX`` and their Control IDs.
99654f38fcaSMauro Carvalho Chehab
99754f38fcaSMauro Carvalho Chehab9. Added Remote Controller chapter, describing the default Remote
99854f38fcaSMauro Carvalho Chehab   Controller mapping for media devices.
99954f38fcaSMauro Carvalho Chehab
100054f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.33
100154f38fcaSMauro Carvalho Chehab====================
100254f38fcaSMauro Carvalho Chehab
100354f38fcaSMauro Carvalho Chehab1. Added support for Digital Video timings in order to support HDTV
100454f38fcaSMauro Carvalho Chehab   receivers and transmitters.
100554f38fcaSMauro Carvalho Chehab
100654f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.34
100754f38fcaSMauro Carvalho Chehab====================
100854f38fcaSMauro Carvalho Chehab
100954f38fcaSMauro Carvalho Chehab1. Added ``V4L2_CID_IRIS_ABSOLUTE`` and ``V4L2_CID_IRIS_RELATIVE``
101054f38fcaSMauro Carvalho Chehab   controls to the :ref:`Camera controls class <camera-controls>`.
101154f38fcaSMauro Carvalho Chehab
101254f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.37
101354f38fcaSMauro Carvalho Chehab====================
101454f38fcaSMauro Carvalho Chehab
101554f38fcaSMauro Carvalho Chehab1. Remove the vtx (videotext/teletext) API. This API was no longer used
101654f38fcaSMauro Carvalho Chehab   and no hardware exists to verify the API. Nor were any userspace
101754f38fcaSMauro Carvalho Chehab   applications found that used it. It was originally scheduled for
101854f38fcaSMauro Carvalho Chehab   removal in 2.6.35.
101954f38fcaSMauro Carvalho Chehab
102054f38fcaSMauro Carvalho ChehabV4L2 in Linux 2.6.39
102154f38fcaSMauro Carvalho Chehab====================
102254f38fcaSMauro Carvalho Chehab
102354f38fcaSMauro Carvalho Chehab1. The old VIDIOC_*_OLD symbols and V4L1 support were removed.
102454f38fcaSMauro Carvalho Chehab
102554f38fcaSMauro Carvalho Chehab2. Multi-planar API added. Does not affect the compatibility of current
102654f38fcaSMauro Carvalho Chehab   drivers and applications. See :ref:`multi-planar API <planar-apis>`
102754f38fcaSMauro Carvalho Chehab   for details.
102854f38fcaSMauro Carvalho Chehab
102954f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.1
103054f38fcaSMauro Carvalho Chehab=================
103154f38fcaSMauro Carvalho Chehab
103254f38fcaSMauro Carvalho Chehab1. VIDIOC_QUERYCAP now returns a per-subsystem version instead of a
103354f38fcaSMauro Carvalho Chehab   per-driver one.
103454f38fcaSMauro Carvalho Chehab
103554f38fcaSMauro Carvalho Chehab   Standardize an error code for invalid ioctl.
103654f38fcaSMauro Carvalho Chehab
103754f38fcaSMauro Carvalho Chehab   Added V4L2_CTRL_TYPE_BITMASK.
103854f38fcaSMauro Carvalho Chehab
103954f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.2
104054f38fcaSMauro Carvalho Chehab=================
104154f38fcaSMauro Carvalho Chehab
104254f38fcaSMauro Carvalho Chehab1. V4L2_CTRL_FLAG_VOLATILE was added to signal volatile controls to
104354f38fcaSMauro Carvalho Chehab   userspace.
104454f38fcaSMauro Carvalho Chehab
104554f38fcaSMauro Carvalho Chehab2. Add selection API for extended control over cropping and composing.
104654f38fcaSMauro Carvalho Chehab   Does not affect the compatibility of current drivers and
104754f38fcaSMauro Carvalho Chehab   applications. See :ref:`selection API <selection-api>` for details.
104854f38fcaSMauro Carvalho Chehab
104954f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.3
105054f38fcaSMauro Carvalho Chehab=================
105154f38fcaSMauro Carvalho Chehab
105254f38fcaSMauro Carvalho Chehab1. Added ``V4L2_CID_ALPHA_COMPONENT`` control to the
105354f38fcaSMauro Carvalho Chehab   :ref:`User controls class <control>`.
105454f38fcaSMauro Carvalho Chehab
105554f38fcaSMauro Carvalho Chehab2. Added the device_caps field to struct v4l2_capabilities and added
105654f38fcaSMauro Carvalho Chehab   the new V4L2_CAP_DEVICE_CAPS capability.
105754f38fcaSMauro Carvalho Chehab
105854f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.4
105954f38fcaSMauro Carvalho Chehab=================
106054f38fcaSMauro Carvalho Chehab
106154f38fcaSMauro Carvalho Chehab1. Added :ref:`JPEG compression control class <jpeg-controls>`.
106254f38fcaSMauro Carvalho Chehab
106354f38fcaSMauro Carvalho Chehab2. Extended the DV Timings API:
106454f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_ENUM_DV_TIMINGS`,
106554f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_QUERY_DV_TIMINGS` and
106654f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_DV_TIMINGS_CAP`.
106754f38fcaSMauro Carvalho Chehab
106854f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.5
106954f38fcaSMauro Carvalho Chehab=================
107054f38fcaSMauro Carvalho Chehab
107154f38fcaSMauro Carvalho Chehab1. Added integer menus, the new type will be
107254f38fcaSMauro Carvalho Chehab   V4L2_CTRL_TYPE_INTEGER_MENU.
107354f38fcaSMauro Carvalho Chehab
107454f38fcaSMauro Carvalho Chehab2. Added selection API for V4L2 subdev interface:
107554f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_SUBDEV_G_SELECTION` and
107654f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_SUBDEV_S_SELECTION <VIDIOC_SUBDEV_G_SELECTION>`.
107754f38fcaSMauro Carvalho Chehab
107854f38fcaSMauro Carvalho Chehab3. Added ``V4L2_COLORFX_ANTIQUE``, ``V4L2_COLORFX_ART_FREEZE``,
107954f38fcaSMauro Carvalho Chehab   ``V4L2_COLORFX_AQUA``, ``V4L2_COLORFX_SILHOUETTE``,
108054f38fcaSMauro Carvalho Chehab   ``V4L2_COLORFX_SOLARIZATION``, ``V4L2_COLORFX_VIVID`` and
108154f38fcaSMauro Carvalho Chehab   ``V4L2_COLORFX_ARBITRARY_CBCR`` menu items to the
108254f38fcaSMauro Carvalho Chehab   ``V4L2_CID_COLORFX`` control.
108354f38fcaSMauro Carvalho Chehab
108454f38fcaSMauro Carvalho Chehab4. Added ``V4L2_CID_COLORFX_CBCR`` control.
108554f38fcaSMauro Carvalho Chehab
108654f38fcaSMauro Carvalho Chehab5. Added camera controls ``V4L2_CID_AUTO_EXPOSURE_BIAS``,
108754f38fcaSMauro Carvalho Chehab   ``V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE``,
108854f38fcaSMauro Carvalho Chehab   ``V4L2_CID_IMAGE_STABILIZATION``, ``V4L2_CID_ISO_SENSITIVITY``,
108954f38fcaSMauro Carvalho Chehab   ``V4L2_CID_ISO_SENSITIVITY_AUTO``, ``V4L2_CID_EXPOSURE_METERING``,
109054f38fcaSMauro Carvalho Chehab   ``V4L2_CID_SCENE_MODE``, ``V4L2_CID_3A_LOCK``,
109154f38fcaSMauro Carvalho Chehab   ``V4L2_CID_AUTO_FOCUS_START``, ``V4L2_CID_AUTO_FOCUS_STOP``,
109254f38fcaSMauro Carvalho Chehab   ``V4L2_CID_AUTO_FOCUS_STATUS`` and ``V4L2_CID_AUTO_FOCUS_RANGE``.
109354f38fcaSMauro Carvalho Chehab
109454f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.6
109554f38fcaSMauro Carvalho Chehab=================
109654f38fcaSMauro Carvalho Chehab
1097cae045f4SMauro Carvalho Chehab1. Replaced ``input`` in struct v4l2_buffer by
109854f38fcaSMauro Carvalho Chehab   ``reserved2`` and removed ``V4L2_BUF_FLAG_INPUT``.
109954f38fcaSMauro Carvalho Chehab
110054f38fcaSMauro Carvalho Chehab2. Added V4L2_CAP_VIDEO_M2M and V4L2_CAP_VIDEO_M2M_MPLANE
110154f38fcaSMauro Carvalho Chehab   capabilities.
110254f38fcaSMauro Carvalho Chehab
110354f38fcaSMauro Carvalho Chehab3. Added support for frequency band enumerations:
110454f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_ENUM_FREQ_BANDS`.
110554f38fcaSMauro Carvalho Chehab
110654f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.9
110754f38fcaSMauro Carvalho Chehab=================
110854f38fcaSMauro Carvalho Chehab
110954f38fcaSMauro Carvalho Chehab1. Added timestamp types to ``flags`` field in
1110cae045f4SMauro Carvalho Chehab   struct v4l2_buffer. See :ref:`buffer-flags`.
111154f38fcaSMauro Carvalho Chehab
111254f38fcaSMauro Carvalho Chehab2. Added ``V4L2_EVENT_CTRL_CH_RANGE`` control event changes flag. See
111354f38fcaSMauro Carvalho Chehab   :ref:`ctrl-changes-flags`.
111454f38fcaSMauro Carvalho Chehab
111554f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.10
111654f38fcaSMauro Carvalho Chehab==================
111754f38fcaSMauro Carvalho Chehab
111854f38fcaSMauro Carvalho Chehab1. Removed obsolete and unused DV_PRESET ioctls VIDIOC_G_DV_PRESET,
111954f38fcaSMauro Carvalho Chehab   VIDIOC_S_DV_PRESET, VIDIOC_QUERY_DV_PRESET and
112054f38fcaSMauro Carvalho Chehab   VIDIOC_ENUM_DV_PRESET. Remove the related v4l2_input/output
112154f38fcaSMauro Carvalho Chehab   capability flags V4L2_IN_CAP_PRESETS and V4L2_OUT_CAP_PRESETS.
112254f38fcaSMauro Carvalho Chehab
112354f38fcaSMauro Carvalho Chehab2. Added new debugging ioctl
112454f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_DBG_G_CHIP_INFO`.
112554f38fcaSMauro Carvalho Chehab
112654f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.11
112754f38fcaSMauro Carvalho Chehab==================
112854f38fcaSMauro Carvalho Chehab
112954f38fcaSMauro Carvalho Chehab1. Remove obsolete ``VIDIOC_DBG_G_CHIP_IDENT`` ioctl.
113054f38fcaSMauro Carvalho Chehab
113154f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.14
113254f38fcaSMauro Carvalho Chehab==================
113354f38fcaSMauro Carvalho Chehab
1134cae045f4SMauro Carvalho Chehab1. In struct v4l2_rect, the type of ``width`` and
113554f38fcaSMauro Carvalho Chehab   ``height`` fields changed from _s32 to _u32.
113654f38fcaSMauro Carvalho Chehab
113754f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.15
113854f38fcaSMauro Carvalho Chehab==================
113954f38fcaSMauro Carvalho Chehab
114054f38fcaSMauro Carvalho Chehab1. Added Software Defined Radio (SDR) Interface.
114154f38fcaSMauro Carvalho Chehab
114254f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.16
114354f38fcaSMauro Carvalho Chehab==================
114454f38fcaSMauro Carvalho Chehab
114554f38fcaSMauro Carvalho Chehab1. Added event V4L2_EVENT_SOURCE_CHANGE.
114654f38fcaSMauro Carvalho Chehab
114754f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.17
114854f38fcaSMauro Carvalho Chehab==================
114954f38fcaSMauro Carvalho Chehab
1150cae045f4SMauro Carvalho Chehab1. Extended struct v4l2_pix_format. Added
115154f38fcaSMauro Carvalho Chehab   format flags.
115254f38fcaSMauro Carvalho Chehab
115354f38fcaSMauro Carvalho Chehab2. Added compound control types and
115454f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`.
115554f38fcaSMauro Carvalho Chehab
115654f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.18
115754f38fcaSMauro Carvalho Chehab==================
115854f38fcaSMauro Carvalho Chehab
115954f38fcaSMauro Carvalho Chehab1. Added ``V4L2_CID_PAN_SPEED`` and ``V4L2_CID_TILT_SPEED`` camera
116054f38fcaSMauro Carvalho Chehab   controls.
116154f38fcaSMauro Carvalho Chehab
116254f38fcaSMauro Carvalho ChehabV4L2 in Linux 3.19
116354f38fcaSMauro Carvalho Chehab==================
116454f38fcaSMauro Carvalho Chehab
1165cae045f4SMauro Carvalho Chehab1. Rewrote Colorspace chapter, added new enum v4l2_ycbcr_encoding
1166cae045f4SMauro Carvalho Chehab   and enum v4l2_quantization fields to struct v4l2_pix_format,
1167cae045f4SMauro Carvalho Chehab   struct v4l2_pix_format_mplane and struct v4l2_mbus_framefmt.
116854f38fcaSMauro Carvalho Chehab
116954f38fcaSMauro Carvalho ChehabV4L2 in Linux 4.4
117054f38fcaSMauro Carvalho Chehab=================
117154f38fcaSMauro Carvalho Chehab
117254f38fcaSMauro Carvalho Chehab1. Renamed ``V4L2_TUNER_ADC`` to ``V4L2_TUNER_SDR``. The use of
117354f38fcaSMauro Carvalho Chehab   ``V4L2_TUNER_ADC`` is deprecated now.
117454f38fcaSMauro Carvalho Chehab
117554f38fcaSMauro Carvalho Chehab2. Added ``V4L2_CID_RF_TUNER_RF_GAIN`` RF Tuner control.
117654f38fcaSMauro Carvalho Chehab
117754f38fcaSMauro Carvalho Chehab3. Added transmitter support for Software Defined Radio (SDR) Interface.
117854f38fcaSMauro Carvalho Chehab
117954f38fcaSMauro Carvalho Chehab.. _other:
118054f38fcaSMauro Carvalho Chehab
118154f38fcaSMauro Carvalho ChehabRelation of V4L2 to other Linux multimedia APIs
118254f38fcaSMauro Carvalho Chehab===============================================
118354f38fcaSMauro Carvalho Chehab
118454f38fcaSMauro Carvalho Chehab.. _xvideo:
118554f38fcaSMauro Carvalho Chehab
118654f38fcaSMauro Carvalho ChehabX Video Extension
118754f38fcaSMauro Carvalho Chehab-----------------
118854f38fcaSMauro Carvalho Chehab
118954f38fcaSMauro Carvalho ChehabThe X Video Extension (abbreviated XVideo or just Xv) is an extension of
119054f38fcaSMauro Carvalho Chehabthe X Window system, implemented for example by the XFree86 project. Its
119154f38fcaSMauro Carvalho Chehabscope is similar to V4L2, an API to video capture and output devices for
119254f38fcaSMauro Carvalho ChehabX clients. Xv allows applications to display live video in a window,
119354f38fcaSMauro Carvalho Chehabsend window contents to a TV output, and capture or output still images
119454f38fcaSMauro Carvalho Chehabin XPixmaps [#f1]_. With their implementation XFree86 makes the extension
119554f38fcaSMauro Carvalho Chehabavailable across many operating systems and architectures.
119654f38fcaSMauro Carvalho Chehab
119754f38fcaSMauro Carvalho ChehabBecause the driver is embedded into the X server Xv has a number of
119854f38fcaSMauro Carvalho Chehabadvantages over the V4L2 :ref:`video overlay interface <overlay>`. The
119954f38fcaSMauro Carvalho Chehabdriver can easily determine the overlay target, i. e. visible graphics
120054f38fcaSMauro Carvalho Chehabmemory or off-screen buffers for a destructive overlay. It can program
120154f38fcaSMauro Carvalho Chehabthe RAMDAC for a non-destructive overlay, scaling or color-keying, or
120254f38fcaSMauro Carvalho Chehabthe clipping functions of the video capture hardware, always in sync
120354f38fcaSMauro Carvalho Chehabwith drawing operations or windows moving or changing their stacking
120454f38fcaSMauro Carvalho Chehaborder.
120554f38fcaSMauro Carvalho Chehab
120654f38fcaSMauro Carvalho ChehabTo combine the advantages of Xv and V4L a special Xv driver exists in
120754f38fcaSMauro Carvalho ChehabXFree86 and XOrg, just programming any overlay capable Video4Linux
120854f38fcaSMauro Carvalho Chehabdevice it finds. To enable it ``/etc/X11/XF86Config`` must contain these
120954f38fcaSMauro Carvalho Chehablines:
121054f38fcaSMauro Carvalho Chehab
121154f38fcaSMauro Carvalho Chehab::
121254f38fcaSMauro Carvalho Chehab
121354f38fcaSMauro Carvalho Chehab    Section "Module"
121454f38fcaSMauro Carvalho Chehab	Load "v4l"
121554f38fcaSMauro Carvalho Chehab    EndSection
121654f38fcaSMauro Carvalho Chehab
121754f38fcaSMauro Carvalho ChehabAs of XFree86 4.2 this driver still supports only V4L ioctls, however it
121854f38fcaSMauro Carvalho Chehabshould work just fine with all V4L2 devices through the V4L2
121954f38fcaSMauro Carvalho Chehabbackward-compatibility layer. Since V4L2 permits multiple opens it is
122054f38fcaSMauro Carvalho Chehabpossible (if supported by the V4L2 driver) to capture video while an X
122154f38fcaSMauro Carvalho Chehabclient requested video overlay. Restrictions of simultaneous capturing
122254f38fcaSMauro Carvalho Chehaband overlay are discussed in :ref:`overlay` apply.
122354f38fcaSMauro Carvalho Chehab
122454f38fcaSMauro Carvalho ChehabOnly marginally related to V4L2, XFree86 extended Xv to support hardware
122554f38fcaSMauro Carvalho ChehabYUV to RGB conversion and scaling for faster video playback, and added
122654f38fcaSMauro Carvalho Chehaban interface to MPEG-2 decoding hardware. This API is useful to display
122754f38fcaSMauro Carvalho Chehabimages captured with V4L2 devices.
122854f38fcaSMauro Carvalho Chehab
122954f38fcaSMauro Carvalho ChehabDigital Video
123054f38fcaSMauro Carvalho Chehab-------------
123154f38fcaSMauro Carvalho Chehab
123254f38fcaSMauro Carvalho ChehabV4L2 does not support digital terrestrial, cable or satellite broadcast.
123354f38fcaSMauro Carvalho ChehabA separate project aiming at digital receivers exists. You can find its
123454f38fcaSMauro Carvalho Chehabhomepage at `https://linuxtv.org <https://linuxtv.org>`__. The Linux
123554f38fcaSMauro Carvalho ChehabDVB API has no connection to the V4L2 API except that drivers for hybrid
123654f38fcaSMauro Carvalho Chehabhardware may support both.
123754f38fcaSMauro Carvalho Chehab
123854f38fcaSMauro Carvalho ChehabAudio Interfaces
123954f38fcaSMauro Carvalho Chehab----------------
124054f38fcaSMauro Carvalho Chehab
124154f38fcaSMauro Carvalho Chehab[to do - OSS/ALSA]
124254f38fcaSMauro Carvalho Chehab
124354f38fcaSMauro Carvalho Chehab.. _experimental:
124454f38fcaSMauro Carvalho Chehab
124554f38fcaSMauro Carvalho ChehabExperimental API Elements
124654f38fcaSMauro Carvalho Chehab=========================
124754f38fcaSMauro Carvalho Chehab
124854f38fcaSMauro Carvalho ChehabThe following V4L2 API elements are currently experimental and may
124954f38fcaSMauro Carvalho Chehabchange in the future.
125054f38fcaSMauro Carvalho Chehab
125154f38fcaSMauro Carvalho Chehab-  :ref:`VIDIOC_DBG_G_REGISTER` and
125254f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_DBG_S_REGISTER <VIDIOC_DBG_G_REGISTER>` ioctls.
125354f38fcaSMauro Carvalho Chehab
125454f38fcaSMauro Carvalho Chehab-  :ref:`VIDIOC_DBG_G_CHIP_INFO` ioctl.
125554f38fcaSMauro Carvalho Chehab
125654f38fcaSMauro Carvalho Chehab.. _obsolete:
125754f38fcaSMauro Carvalho Chehab
125854f38fcaSMauro Carvalho ChehabObsolete API Elements
125954f38fcaSMauro Carvalho Chehab=====================
126054f38fcaSMauro Carvalho Chehab
126154f38fcaSMauro Carvalho ChehabThe following V4L2 API elements were superseded by new interfaces and
126254f38fcaSMauro Carvalho Chehabshould not be implemented in new drivers.
126354f38fcaSMauro Carvalho Chehab
126454f38fcaSMauro Carvalho Chehab-  ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls. Use Extended
126554f38fcaSMauro Carvalho Chehab   Controls, :ref:`extended-controls`.
126654f38fcaSMauro Carvalho Chehab
126754f38fcaSMauro Carvalho Chehab-  VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET,
126854f38fcaSMauro Carvalho Chehab   VIDIOC_ENUM_DV_PRESETS and VIDIOC_QUERY_DV_PRESET ioctls. Use
126954f38fcaSMauro Carvalho Chehab   the DV Timings API (:ref:`dv-timings`).
127054f38fcaSMauro Carvalho Chehab
127154f38fcaSMauro Carvalho Chehab-  ``VIDIOC_SUBDEV_G_CROP`` and ``VIDIOC_SUBDEV_S_CROP`` ioctls. Use
127254f38fcaSMauro Carvalho Chehab   ``VIDIOC_SUBDEV_G_SELECTION`` and ``VIDIOC_SUBDEV_S_SELECTION``,
127354f38fcaSMauro Carvalho Chehab   :ref:`VIDIOC_SUBDEV_G_SELECTION`.
127454f38fcaSMauro Carvalho Chehab
127554f38fcaSMauro Carvalho Chehab.. [#f1]
127654f38fcaSMauro Carvalho Chehab   This is not implemented in XFree86.
1277