]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
doc-rst: linux_tv: Error codes should be const
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 3 Jul 2016 14:53:09 +0000 (11:53 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 3 Jul 2016 15:06:32 +0000 (12:06 -0300)
All error codes should be const. Most are, but there are
lots of places where we forgot to add <constant> at the DocBook.

Fix those via this small script:
for i in $(git grep -lE "\s+E[A-Z]+\b" Documentation/linux_tv/); do perl -ne 's,([^\`])\b(E[A-Z]+)\b,\1``\2``,g; print $_' <$i >a && mv a $i; done

As there are false positives, we needed to merge only the changes
that make sense, skipping the c blocks and skipping things like
EDID, EN, ETS that were also converted by the above code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
68 files changed:
Documentation/linux_tv/media/dvb/FE_GET_EVENT.rst
Documentation/linux_tv/media/dvb/FE_GET_FRONTEND.rst
Documentation/linux_tv/media/dvb/FE_SET_FRONTEND.rst
Documentation/linux_tv/media/dvb/audio_function_calls.rst
Documentation/linux_tv/media/dvb/ca_function_calls.rst
Documentation/linux_tv/media/dvb/dmx_fcalls.rst
Documentation/linux_tv/media/dvb/frontend_f_open.rst
Documentation/linux_tv/media/dvb/intro_files/dvbstb.png
Documentation/linux_tv/media/dvb/video_function_calls.rst
Documentation/linux_tv/media/v4l/app-pri.rst
Documentation/linux_tv/media/v4l/buffer.rst
Documentation/linux_tv/media/v4l/dev-overlay.rst
Documentation/linux_tv/media/v4l/dev-raw-vbi.rst
Documentation/linux_tv/media/v4l/dev-sliced-vbi.rst
Documentation/linux_tv/media/v4l/dev-subdev.rst
Documentation/linux_tv/media/v4l/diff-v4l.rst
Documentation/linux_tv/media/v4l/dmabuf.rst
Documentation/linux_tv/media/v4l/field-order_files/fieldseq_tb.gif
Documentation/linux_tv/media/v4l/func-open.rst
Documentation/linux_tv/media/v4l/func-read.rst
Documentation/linux_tv/media/v4l/gen-errors.rst
Documentation/linux_tv/media/v4l/hist-v4l2.rst
Documentation/linux_tv/media/v4l/lirc_write.rst
Documentation/linux_tv/media/v4l/media-ioc-enum-entities.rst
Documentation/linux_tv/media/v4l/media-ioc-setup-link.rst
Documentation/linux_tv/media/v4l/mmap.rst
Documentation/linux_tv/media/v4l/open.rst
Documentation/linux_tv/media/v4l/querycap.rst
Documentation/linux_tv/media/v4l/remote_controllers_sysfs_nodes.rst
Documentation/linux_tv/media/v4l/standard.rst
Documentation/linux_tv/media/v4l/streaming-par.rst
Documentation/linux_tv/media/v4l/userp.rst
Documentation/linux_tv/media/v4l/vidioc-create-bufs.rst
Documentation/linux_tv/media/v4l/vidioc-dbg-g-chip-info.rst
Documentation/linux_tv/media/v4l/vidioc-decoder-cmd.rst
Documentation/linux_tv/media/v4l/vidioc-dv-timings-cap.rst
Documentation/linux_tv/media/v4l/vidioc-encoder-cmd.rst
Documentation/linux_tv/media/v4l/vidioc-enum-dv-timings.rst
Documentation/linux_tv/media/v4l/vidioc-enum-fmt.rst
Documentation/linux_tv/media/v4l/vidioc-enumaudio.rst
Documentation/linux_tv/media/v4l/vidioc-enumaudioout.rst
Documentation/linux_tv/media/v4l/vidioc-enuminput.rst
Documentation/linux_tv/media/v4l/vidioc-enumoutput.rst
Documentation/linux_tv/media/v4l/vidioc-enumstd.rst
Documentation/linux_tv/media/v4l/vidioc-g-audio.rst
Documentation/linux_tv/media/v4l/vidioc-g-audioout.rst
Documentation/linux_tv/media/v4l/vidioc-g-crop.rst
Documentation/linux_tv/media/v4l/vidioc-g-ctrl.rst
Documentation/linux_tv/media/v4l/vidioc-g-dv-timings.rst
Documentation/linux_tv/media/v4l/vidioc-g-edid.rst
Documentation/linux_tv/media/v4l/vidioc-g-ext-ctrls.rst
Documentation/linux_tv/media/v4l/vidioc-g-fmt.rst
Documentation/linux_tv/media/v4l/vidioc-g-input.rst
Documentation/linux_tv/media/v4l/vidioc-g-modulator.rst
Documentation/linux_tv/media/v4l/vidioc-g-output.rst
Documentation/linux_tv/media/v4l/vidioc-g-selection.rst
Documentation/linux_tv/media/v4l/vidioc-g-sliced-vbi-cap.rst
Documentation/linux_tv/media/v4l/vidioc-g-std.rst
Documentation/linux_tv/media/v4l/vidioc-g-tuner.rst
Documentation/linux_tv/media/v4l/vidioc-qbuf.rst
Documentation/linux_tv/media/v4l/vidioc-query-dv-timings.rst
Documentation/linux_tv/media/v4l/vidioc-querycap.rst
Documentation/linux_tv/media/v4l/vidioc-queryctrl.rst
Documentation/linux_tv/media/v4l/vidioc-reqbufs.rst
Documentation/linux_tv/media/v4l/vidioc-s-hw-freq-seek.rst
Documentation/linux_tv/media/v4l/vidioc-subdev-enum-frame-interval.rst
Documentation/linux_tv/media/v4l/vidioc-subdev-enum-mbus-code.rst
Documentation/linux_tv/media/v4l/vidioc-subdev-g-crop.rst

index 8d1caedd2f97925f51337538982c572b791f6e09..1951857cde655abf11ae1c4e81361c2093ffba6a 100644 (file)
@@ -11,7 +11,7 @@ DESCRIPTION
 This ioctl call returns a frontend event if available. If an event is
 not available, the behavior depends on whether the device is in blocking
 or non-blocking mode. In the latter case, the call fails immediately
-with errno set to EWOULDBLOCK. In the former case, the call blocks until
+with errno set to ``EWOULDBLOCK``. In the former case, the call blocks until
 an event becomes available.
 
 SYNOPSIS
@@ -67,13 +67,13 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EWOULDBLOCK
+       -  ``EWOULDBLOCK``
 
        -  There is no event pending, and the device is in non-blocking mode.
 
     -  .. row 2
 
-       -  EOVERFLOW
+       -  ``EOVERFLOW``
 
        -  Overflow in event queue - one or more events were lost.
 
index 2e60b239d1da25e64209ddefc0e92f87883f5d8f..5bf39ff72bd707eead5489a19b37a37feea48cbf 100644 (file)
@@ -61,7 +61,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  Maximum supported symbol rate reached.
 
index f18e12cb3dff18e5ff021f48e78af3eecb281ec7..4cb393bbc2e11df399f7c0922238939a3ee46898 100644 (file)
@@ -68,7 +68,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  Maximum supported symbol rate reached.
 
index a68149e161165e5994574d0f652e848a0cbb9818..d8abdd0e9417d225b6aa42f30259bcf974fc5453 100644 (file)
@@ -85,19 +85,19 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  ENODEV
+       -  ``ENODEV``
 
        -  Device driver not loaded/available.
 
     -  .. row 2
 
-       -  EBUSY
+       -  ``EBUSY``
 
        -  Device or resource busy.
 
     -  .. row 3
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  Invalid argument.
 
@@ -143,7 +143,7 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  EBADF
+       -  ``EBADF``
 
        -  fd is not a valid open file descriptor.
 
@@ -205,19 +205,19 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  EPERM
+       -  ``EPERM``
 
        -  Mode AUDIO_SOURCE_MEMORY not selected.
 
     -  .. row 2
 
-       -  ENOMEM
+       -  ``ENOMEM``
 
        -  Attempted to write more data than the internal buffer can hold.
 
     -  .. row 3
 
-       -  EBADF
+       -  ``EBADF``
 
        -  fd is not a valid open file descriptor.
 
@@ -1102,7 +1102,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  type is not a valid or supported stream type.
 
@@ -1165,7 +1165,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  id is not a valid id.
 
@@ -1229,7 +1229,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  attr is not a valid or supported attribute setting.
 
@@ -1292,7 +1292,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  karaoke is not a valid or supported karaoke setting.
 
index 9984b355f48ff1c4d7b782e3626abba8e57fca12..83bce04208813edeff4b35c94d1e6d66990fa536 100644 (file)
@@ -84,25 +84,25 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  ENODEV
+       -  ``ENODEV``
 
        -  Device driver not loaded/available.
 
     -  .. row 2
 
-       -  EINTERNAL
+       -  ``EINTERNAL``
 
        -  Internal error.
 
     -  .. row 3
 
-       -  EBUSY
+       -  ``EBUSY``
 
        -  Device or resource busy.
 
     -  .. row 4
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  Invalid argument.
 
@@ -148,7 +148,7 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  EBADF
+       -  ``EBADF``
 
        -  fd is not a valid open file descriptor.
 
index 5982b57f0a3bcc0b8929d39885f354dbb86c4004..4563c8f2a1b87c28cd33e074bbcafeacf1b7d014 100644 (file)
@@ -83,25 +83,25 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  ENODEV
+       -  ``ENODEV``
 
        -  Device driver not loaded/available.
 
     -  .. row 2
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  Invalid argument.
 
     -  .. row 3
 
-       -  EMFILE
+       -  ``EMFILE``
 
        -  “Too many open files”, i.e. no more filters available.
 
     -  .. row 4
 
-       -  ENOMEM
+       -  ``ENOMEM``
 
        -  The driver failed to allocate enough memory.
 
@@ -148,7 +148,7 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  EBADF
+       -  ``EBADF``
 
        -  fd is not a valid open file descriptor.
 
@@ -209,26 +209,26 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  EWOULDBLOCK
+       -  ``EWOULDBLOCK``
 
        -  No data to return and O_NONBLOCK was specified.
 
     -  .. row 2
 
-       -  EBADF
+       -  ``EBADF``
 
        -  fd is not a valid open file descriptor.
 
     -  .. row 3
 
-       -  ECRC
+       -  ``ECRC``
 
        -  Last section had a CRC error - no data returned. The buffer is
           flushed.
 
     -  .. row 4
 
-       -  EOVERFLOW
+       -  ``EOVERFLOW``
 
        -  
 
@@ -240,14 +240,14 @@ RETURN VALUE
 
     -  .. row 6
 
-       -  ETIMEDOUT
+       -  ``ETIMEDOUT``
 
        -  The section was not loaded within the stated timeout period. See
           ioctl DMX_SET_FILTER for how to set a timeout.
 
     -  .. row 7
 
-       -  EFAULT
+       -  ``EFAULT``
 
        -  The driver failed to write to the callers buffer due to an invalid
           *buf pointer.
@@ -311,7 +311,7 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  EWOULDBLOCK
+       -  ``EWOULDBLOCK``
 
        -  No data was written. This might happen if O_NONBLOCK was
           specified and there is no more buffer space available (if
@@ -320,7 +320,7 @@ RETURN VALUE
 
     -  .. row 2
 
-       -  EBUSY
+       -  ``EBUSY``
 
        -  This error code indicates that there are conflicting requests. The
           corresponding demux device is setup to receive data from the
@@ -329,7 +329,7 @@ RETURN VALUE
 
     -  .. row 3
 
-       -  EBADF
+       -  ``EBADF``
 
        -  fd is not a valid open file descriptor.
 
@@ -386,14 +386,14 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  Invalid argument, i.e. no filtering parameters provided via the
           DMX_SET_FILTER or DMX_SET_PES_FILTER functions.
 
     -  .. row 2
 
-       -  EBUSY
+       -  ``EBUSY``
 
        -  This error code indicates that there are conflicting requests.
           There are active filters filtering data from another input source.
@@ -564,7 +564,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EBUSY
+       -  ``EBUSY``
 
        -  This error code indicates that there are conflicting requests.
           There are active filters filtering data from another input source.
@@ -635,7 +635,7 @@ DESCRIPTION
 This ioctl call returns an event if available. If an event is not
 available, the behavior depends on whether the device is in blocking or
 non-blocking mode. In the latter case, the call fails immediately with
-errno set to EWOULDBLOCK. In the former case, the call blocks until an
+errno set to ``EWOULDBLOCK``. In the former case, the call blocks until an
 event becomes available.
 
 SYNOPSIS
@@ -686,7 +686,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EWOULDBLOCK
+       -  ``EWOULDBLOCK``
 
        -  There is no event pending, and the device is in non-blocking mode.
 
@@ -753,7 +753,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  Invalid stc number.
 
index 9ef430abcba48db5e85a86881e8bc2a272389527..bdc9a81394441d5d1f07d1bb50b68e5106fd7c0c 100644 (file)
@@ -37,7 +37,7 @@ Arguments
     allowed.
 
     When the ``O_NONBLOCK`` flag is given, the system calls may return
-    EAGAIN error code when no data is available or when the device
+    ``EAGAIN`` error code when no data is available or when the device
     driver is temporarily busy.
 
     Other flags have no effect.
index 9b8f372e7afd9d016854973ba705dcdfbd1bbf13..5836ea94eba4ec4fd13a83e89ef86b312cc04c02 100644 (file)
Binary files a/Documentation/linux_tv/media/dvb/intro_files/dvbstb.png and b/Documentation/linux_tv/media/dvb/intro_files/dvbstb.png differ
index 78917bdf51ed07f4443e711aa4c883d3fe7b52fa..39eaecd8755a69f809663dc0d12f5d191f613bfc 100644 (file)
@@ -87,25 +87,25 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  ENODEV
+       -  ``ENODEV``
 
        -  Device driver not loaded/available.
 
     -  .. row 2
 
-       -  EINTERNAL
+       -  ``EINTERNAL``
 
        -  Internal error.
 
     -  .. row 3
 
-       -  EBUSY
+       -  ``EBUSY``
 
        -  Device or resource busy.
 
     -  .. row 4
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  Invalid argument.
 
@@ -151,7 +151,7 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  EBADF
+       -  ``EBADF``
 
        -  fd is not a valid open file descriptor.
 
@@ -213,19 +213,19 @@ RETURN VALUE
 
     -  .. row 1
 
-       -  EPERM
+       -  ``EPERM``
 
        -  Mode VIDEO_SOURCE_MEMORY not selected.
 
     -  .. row 2
 
-       -  ENOMEM
+       -  ``ENOMEM``
 
        -  Attempted to write more data than the internal buffer can hold.
 
     -  .. row 3
 
-       -  EBADF
+       -  ``EBADF``
 
        -  fd is not a valid open file descriptor.
 
@@ -768,7 +768,7 @@ use the V4L2 :ref:`VIDIOC_DQEVENT` ioctl instead.
 This ioctl call returns an event of type video_event if available. If
 an event is not available, the behavior depends on whether the device is
 in blocking or non-blocking mode. In the latter case, the call fails
-immediately with errno set to EWOULDBLOCK. In the former case, the call
+immediately with errno set to ``EWOULDBLOCK``. In the former case, the call
 blocks until an event becomes available. The standard Linux poll()
 and/or select() system calls can be used with the device file descriptor
 to watch for new events. For select(), the file descriptor should be
@@ -823,13 +823,13 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EWOULDBLOCK
+       -  ``EWOULDBLOCK``
 
        -  There is no event pending, and the device is in non-blocking mode.
 
     -  .. row 2
 
-       -  EOVERFLOW
+       -  ``EOVERFLOW``
 
        -  Overflow in event queue - one or more events were lost.
 
@@ -1154,7 +1154,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EPERM
+       -  ``EPERM``
 
        -  Mode VIDEO_SOURCE_MEMORY not selected.
 
@@ -1218,7 +1218,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EPERM
+       -  ``EPERM``
 
        -  Mode VIDEO_SOURCE_MEMORY not selected.
 
@@ -1332,7 +1332,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  Invalid sub-stream id.
 
@@ -1490,7 +1490,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  format is not a valid video format.
 
@@ -1556,7 +1556,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  system is not a valid or supported video system.
 
@@ -1670,7 +1670,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  input is not a valid spu setting or driver cannot handle SPU.
 
@@ -1733,7 +1733,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  input is not a valid palette or driver doesn’t handle SPU.
 
@@ -1798,7 +1798,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EFAULT
+       -  ``EFAULT``
 
        -  driver is not able to return navigational information
 
@@ -1864,7 +1864,7 @@ appropriately. The generic error codes are described at the
 
     -  .. row 1
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  input is not a valid attribute setting.
 
index 7ff6f44eb591896f9da84f3afa0248199c31459b..8c4624dd50e22fc358a10b0c86b6a2017b806b9e 100644 (file)
@@ -26,7 +26,7 @@ different priority will usually call :ref:`VIDIOC_S_PRIORITY
 :ref:`VIDIOC_QUERYCAP` ioctl.
 
 Ioctls changing driver properties, such as
-:ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>`, return an EBUSY error code
+:ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>`, return an ``EBUSY`` error code
 after another application obtained higher priority.
 
 
index 374e9ba6b4bb48fb64eb77b05f4b4f523d29aff6..b535177724b9b1b3061f530a8e23d8b663cadb83 100644 (file)
@@ -651,7 +651,7 @@ buffer.
           the driver will set the ``bytesused`` field to 0, regardless of
           the format. Any Any subsequent call to the
           :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
-          but return an EPIPE error code.
+          but return an ``EPIPE`` error code.
 
     -  .. row 13
 
index 083cf07e55c5f364bb9061b5ed482708ef47a4dd..fc71406369a80ff76b267c6aef235c4ae03f4328 100644 (file)
@@ -102,7 +102,7 @@ When simultaneous capturing and overlay is supported and the hardware
 prohibits different image and frame buffer formats, the format requested
 first takes precedence. The attempt to capture
 (:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) or overlay
-(:ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`) may fail with an EBUSY error
+(:ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`) may fail with an ``EBUSY`` error
 code or return accordingly modified parameters..
 
 
@@ -142,7 +142,7 @@ of the cropping rectangle. For more information see :ref:`crop`.
 When simultaneous capturing and overlay is supported and the hardware
 prohibits different image and window sizes, the size requested first
 takes precedence. The attempt to capture or overlay as well
-(:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) may fail with an EBUSY error
+(:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) may fail with an ``EBUSY`` error
 code or return accordingly modified parameters.
 
 
index 596b0a6b2177d2d0bd576bb2e9107ee8992d570a..20942bf9232e49766c715138b044526f37f8746c 100644 (file)
@@ -81,16 +81,16 @@ struct :ref:`v4l2_format <v4l2-format>` as above and initialize all
 fields of the struct :ref:`v4l2_vbi_format <v4l2-vbi-format>`
 ``vbi`` member of the ``fmt`` union, or better just modify the results
 of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
-ioctl with a pointer to this structure. Drivers return an EINVAL error
+ioctl with a pointer to this structure. Drivers return an ``EINVAL`` error
 code only when the given parameters are ambiguous, otherwise they modify
 the parameters according to the hardware capabilities and return the
 actual parameters. When the driver allocates resources at this point, it
-may return an EBUSY error code to indicate the returned parameters are
+may return an ``EBUSY`` error code to indicate the returned parameters are
 valid but the required resources are currently not available. That may
 happen for instance when the video and VBI areas to capture would
 overlap, or when the driver supports multiple opens and another process
 already requested VBI capturing or output. Anyway, applications must
-expect other resource allocation points which may return EBUSY, at the
+expect other resource allocation points which may return ``EBUSY``, at the
 :ref:`VIDIOC_STREAMON` ioctl and the first read(),
 write() and select() call.
 
@@ -341,7 +341,7 @@ using buffer timestamps.
 
 Remember the :ref:`VIDIOC_STREAMON` ioctl and the
 first read(), write() and select() call can be resource allocation
-points returning an EBUSY error code if the required hardware resources
+points returning an ``EBUSY`` error code if the required hardware resources
 are temporarily unavailable, for example the device is already in use by
 another process.
 
index 3692cdf8e756d8d5331378db31d33f17455c6d18..b3e89f93d6adeb1ee5062ad79333def4264ca05a 100644 (file)
@@ -92,9 +92,9 @@ explicitly.
 
 The :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl modifies the parameters
 according to hardware capabilities. When the driver allocates resources
-at this point, it may return an EBUSY error code if the required
+at this point, it may return an ``EBUSY`` error code if the required
 resources are temporarily unavailable. Other resource allocation points
-which may return EBUSY can be the
+which may return ``EBUSY`` can be the
 :ref:`VIDIOC_STREAMON` ioctl and the first
 :ref:`read() <func-read>`, :ref:`write() <func-write>` and
 :ref:`select() <func-select>` call.
@@ -336,12 +336,12 @@ which may return EBUSY can be the
        -  :cspan:`2` Set of services applicable to 625 line systems.
 
 
-Drivers may return an EINVAL error code when applications attempt to
+Drivers may return an ``EINVAL`` error code when applications attempt to
 read or write data without prior format negotiation, after switching the
 video standard (which may invalidate the negotiated VBI parameters) and
 after switching the video input (which may change the video standard as
 a side effect). The :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl may
-return an EBUSY error code when applications attempt to change the
+return an ``EBUSY`` error code when applications attempt to change the
 format while i/o is in progress (between a
 :ref:`VIDIOC_STREAMON` and
 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` call, and after the first
@@ -428,7 +428,7 @@ of one video frame. The ``id`` of unused
 
 Packets are always passed in ascending line number order, without
 duplicate line numbers. The :ref:`write() <func-write>` function and
-the :ref:`VIDIOC_QBUF` ioctl must return an EINVAL
+the :ref:`VIDIOC_QBUF` ioctl must return an ``EINVAL``
 error code when applications violate this rule. They must also return an
 EINVAL error code when applications pass an incorrect field or line
 number, or a combination of ``field``, ``line`` and ``id`` which has not
index 67732da53be5fd4fb7659d824152961b560e0c68..87a2cec376458faa46abf3eb373b40760282a063 100644 (file)
@@ -125,12 +125,12 @@ negotiate formats on a per-pad basis.
 Applications are responsible for configuring coherent parameters on the
 whole pipeline and making sure that connected pads have compatible
 formats. The pipeline is checked for formats mismatch at
-:ref:`VIDIOC_STREAMON` time, and an EPIPE error
+:ref:`VIDIOC_STREAMON` time, and an ``EPIPE`` error
 code is then returned if the configuration is invalid.
 
 Pad-level image format configuration support can be tested by calling
 the :ref:`VIDIOC_SUBDEV_G_FMT` ioctl on pad
-0. If the driver returns an EINVAL error code pad-level format
+0. If the driver returns an ``EINVAL`` error code pad-level format
 configuration is not supported by the sub-device.
 
 
index ee9623b454a4b2f8eb4b851117540282a428f395..da4b391116b5a0069635071ba2406273ce5e0152 100644 (file)
@@ -78,7 +78,7 @@ V4L prohibits (or used to prohibit) multiple opens of a device file.
 V4L2 drivers *may* support multiple opens, see :ref:`open` for details
 and consequences.
 
-V4L drivers respond to V4L2 ioctls with an EINVAL error code.
+V4L drivers respond to V4L2 ioctls with an ``EINVAL`` error code.
 
 
 Querying Capabilities
@@ -207,7 +207,7 @@ introduction.
        -  Applications can call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>`
           ioctl to determine if the device supports capturing a subsection
           of the full picture ("cropping" in V4L2). If not, the ioctl
-          returns the EINVAL error code. For more information on cropping
+          returns the ``EINVAL`` error code. For more information on cropping
           and scaling see :ref:`crop`.
 
     -  .. row 12
@@ -791,7 +791,7 @@ differences.
 
        -  The ``VIDIOCMCAPTURE`` ioctl prepares a buffer for capturing. It
           also determines the image format for this buffer. The ioctl
-          returns immediately, eventually with an EAGAIN error code if no
+          returns immediately, eventually with an ``EAGAIN`` error code if no
           video signal had been detected. When the driver supports more than
           one buffer applications can call the ioctl multiple times and thus
           have multiple outstanding capture requests.
@@ -899,7 +899,7 @@ remaining fields are probably equivalent to struct
 Apparently only the Zoran (ZR 36120) driver implements these ioctls. The
 semantics differ from those specified for V4L2 in two ways. The
 parameters are reset on :ref:`open() <func-open>` and
-``VIDIOCSVBIFMT`` always returns an EINVAL error code if the parameters
+``VIDIOCSVBIFMT`` always returns an ``EINVAL`` error code if the parameters
 are invalid.
 
 
index 773d39308fd63f37a741a58744380bd8f9b76808..6f4f0f03e91d09f8fd86c211ad5ee71b8cbbf172 100644 (file)
@@ -129,7 +129,7 @@ Two methods exist to suspend execution of the application until one or
 more buffers can be dequeued. By default ``VIDIOC_DQBUF`` blocks when no
 buffer is in the outgoing queue. When the ``O_NONBLOCK`` flag was given
 to the :ref:`open() <func-open>` function, ``VIDIOC_DQBUF`` returns
-immediately with an EAGAIN error code when no buffer is available. The
+immediately with an ``EAGAIN`` error code when no buffer is available. The
 :ref:`select() <func-select>` and :ref:`poll() <func-poll>`
 functions are always available.
 
index 718492f1cfc703e6553c3b0e2afc4b269258412b..bf1c3f1b50d5ff04b196659ca5c2629ec9deae03 100644 (file)
Binary files a/Documentation/linux_tv/media/v4l/field-order_files/fieldseq_tb.gif and b/Documentation/linux_tv/media/v4l/field-order_files/fieldseq_tb.gif differ
index 06937b925be3b1e14eb412d7f280c4a5397f9f34..dcfce511e2730043c0e39cccd67d8c75b4539267 100644 (file)
@@ -33,7 +33,7 @@ Arguments
     devices only writing.
 
     When the ``O_NONBLOCK`` flag is given, the read() function and the
-    :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will return the EAGAIN
+    :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will return the ``EAGAIN``
     error code when no data is available or no buffer is in the driver
     outgoing queue, otherwise these functions block until data becomes
     available. All V4L2 drivers exchanging data with applications must
index 94349fa19215a8505d0fadd52dd13a551c397f6d..4a4f3e86fd1351d50499241fe99a0449021ae0b7 100644 (file)
@@ -45,7 +45,7 @@ worth of data.
 
 By default :c:func:`read()` blocks until data becomes available. When
 the ``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>`
-function it returns immediately with an EAGAIN error code when no data
+function it returns immediately with an ``EAGAIN`` error code when no data
 is available. The :ref:`select() <func-select>` or
 :ref:`poll() <func-poll>` functions can always be used to suspend
 execution until data becomes available. All drivers supporting the
index 862cdff45f3609433a63b01973b1aedd863041b1..ad119579e9ea0cf1bae26073694448dcb644da0c 100644 (file)
@@ -16,7 +16,7 @@ Generic Error Codes
 
     -  .. row 1
 
-       -  EAGAIN (aka EWOULDBLOCK)
+       -  ``EAGAIN`` (aka ``EWOULDBLOCK``)
 
        -  The ioctl can't be handled because the device is in state where it
           can't perform it. This could happen for example in case where
@@ -26,13 +26,13 @@ Generic Error Codes
 
     -  .. row 2
 
-       -  EBADF
+       -  ``EBADF``
 
        -  The file descriptor is not a valid.
 
     -  .. row 3
 
-       -  EBUSY
+       -  ``EBUSY``
 
        -  The ioctl can't be handled because the device is busy. This is
           typically return while device is streaming, and an ioctl tried to
@@ -43,14 +43,14 @@ Generic Error Codes
 
     -  .. row 4
 
-       -  EFAULT
+       -  ``EFAULT``
 
        -  There was a failure while copying data from/to userspace, probably
           caused by an invalid pointer reference.
 
     -  .. row 5
 
-       -  EINVAL
+       -  ``EINVAL``
 
        -  One or more of the ioctl parameters are invalid or out of the
           allowed range. This is a widely used error code. See the
@@ -58,19 +58,19 @@ Generic Error Codes
 
     -  .. row 6
 
-       -  ENODEV
+       -  ``ENODEV``
 
        -  Device not found or was removed.
 
     -  .. row 7
 
-       -  ENOMEM
+       -  ``ENOMEM``
 
        -  There's not enough memory to handle the desired operation.
 
     -  .. row 8
 
-       -  ENOTTY
+       -  ``ENOTTY``
 
        -  The ioctl is not supported by the driver, actually meaning that
           the required functionality is not available, or the file
@@ -78,7 +78,7 @@ Generic Error Codes
 
     -  .. row 9
 
-       -  ENOSPC
+       -  ``ENOSPC``
 
        -  On USB devices, the stream ioctl's can return this error, meaning
           that this request would overcommit the usb bandwidth reserved for
@@ -86,7 +86,7 @@ Generic Error Codes
 
     -  .. row 10
 
-       -  EPERM
+       -  ``EPERM``
 
        -  Permission denied. Can be returned if the device needs write
           permission, or some special capabilities is needed (e. g. root)
index bb115a0f2427414072a054c0bc58de07434dda5f..664fbe4780af9baaebed76157a71c77202f1dbcd 100644 (file)
@@ -280,14 +280,14 @@ A number of changes were made to the raw VBI interface.
    transmitted only on the first field. The comment that both ``count``
    values will usually be equal is misleading and pointless and has been
    removed. This change *breaks compatibility* with earlier versions:
-   Drivers may return EINVAL, applications may not function correctly.
+   Drivers may return ``EINVAL``, applications may not function correctly.
 
 3. Drivers are again permitted to return negative (unknown) start values
    as proposed earlier. Why this feature was dropped is unclear. This
    change may *break compatibility* with applications depending on the
    start values being positive. The use of ``EBUSY`` and ``EINVAL``
    error codes with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl was
-   clarified. The EBUSY error code was finally documented, and the
+   clarified. The ``EBUSY`` error code was finally documented, and the
    ``reserved2`` field which was previously mentioned only in the
    ``videodev.h`` header file.
 
@@ -324,7 +324,7 @@ This unnamed version was finally merged into Linux 2.5.46.
 3.  The struct :ref:`v4l2_capability <v4l2-capability>` changed
     dramatically. Note that also the size of the structure changed,
     which is encoded in the ioctl request code, thus older V4L2 devices
-    will respond with an EINVAL error code to the new
+    will respond with an ``EINVAL`` error code to the new
     :ref:`VIDIOC_QUERYCAP` ioctl.
 
     There are new fields to identify the driver, a new RDS device
@@ -855,7 +855,7 @@ V4L2 spec erratum 2004-08-01
 4. The documentation of the :ref:`VIDIOC_QBUF` and
    :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctls did not mention the
    struct :ref:`v4l2_buffer <v4l2-buffer>` ``memory`` field. It was
-   also missing from examples. Also on the ``VIDIOC_DQBUF`` page the EIO
+   also missing from examples. Also on the ``VIDIOC_DQBUF`` page the ``EIO``
    error code was not documented.
 
 
index 167d8b5198d887dd7705862adec1727fd68a6841..234c8f43613e2eb8551e10df8718be7b88ed30d4 100644 (file)
@@ -11,7 +11,7 @@ values. Pulses and spaces are only marked implicitly by their position.
 The data must start and end with a pulse, therefore, the data must
 always include an uneven number of samples. The write function must
 block until the data has been transmitted by the hardware. If more data
-is provided than the hardware can send, the driver returns EINVAL.
+is provided than the hardware can send, the driver returns ``EINVAL``.
 
 
 .. ------------------------------------------------------------------------------
index 2549857e681e3fd2aa532aab18b6ac9dd7409f13..6d2deba8dea8081cf195c324b26e1f989e28afdd 100644 (file)
@@ -40,7 +40,7 @@ EINVAL error code when the id is invalid.
 Entities can be enumerated by or'ing the id with the
 ``MEDIA_ENT_ID_FLAG_NEXT`` flag. The driver will return information
 about the entity with the smallest id strictly larger than the requested
-one ('next entity'), or the EINVAL error code if there is none.
+one ('next entity'), or the ``EINVAL`` error code if there is none.
 
 Entity IDs can be non-contiguous. Applications must *not* try to
 enumerate entities by calling MEDIA_IOC_ENUM_ENTITIES with increasing
index aa6495fe3608a32d4e8c0dc3ab938b7dbc8159b1..5b9c44e4ee77f350d0509f01d622e8fe2eba6f9c 100644 (file)
@@ -43,13 +43,13 @@ not be enabled or disabled.
 
 Link configuration has no side effect on other links. If an enabled link
 at the sink pad prevents the link from being enabled, the driver returns
-with an EBUSY error code.
+with an ``EBUSY`` error code.
 
 Only links marked with the ``DYNAMIC`` link flag can be enabled/disabled
 while streaming media data. Attempting to enable or disable a streaming
-non-dynamic link will return an EBUSY error code.
+non-dynamic link will return an ``EBUSY`` error code.
 
-If the specified link can't be found the driver returns with an EINVAL
+If the specified link can't be found the driver returns with an ``EINVAL``
 error code.
 
 
index 2013e882f0d4b0861451e1d469612168920da286..5f7450ff16c2256e6b98a76955634c762a9fd223 100644 (file)
@@ -235,7 +235,7 @@ suspend execution of the application until one or more buffers can be
 dequeued. By default ``VIDIOC_DQBUF`` blocks when no buffer is in the
 outgoing queue. When the ``O_NONBLOCK`` flag was given to the
 :ref:`open() <func-open>` function, ``VIDIOC_DQBUF`` returns
-immediately with an EAGAIN error code when no buffer is available. The
+immediately with an ``EAGAIN`` error code when no buffer is available. The
 :ref:`select() <func-select>` or :ref:`poll() <func-poll>` functions
 are always available.
 
index ec6b456e37f079e917ff8533d3a96741e4a7827e..963d2923aaa3b3302ba09005537edff934c1c489 100644 (file)
@@ -146,7 +146,7 @@ sections.
 .. [1]
    There are still some old and obscure drivers that have not been
    updated to allow for multiple opens. This implies that for such
-   drivers :ref:`open() <func-open>` can return an EBUSY error code
+   drivers :ref:`open() <func-open>` can return an ``EBUSY`` error code
    when the device is already in use.
 
 .. [2]
index bb905eb82c082e56306b9ebe3b5de367bf3dc3d7..f3fa6cb6befe7569644226aeb00b3753997ad894 100644 (file)
@@ -20,7 +20,7 @@ Starting with kernel version 3.1, :ref:`VIDIOC_QUERYCAP`
 will return the V4L2 API version used by the driver, with generally
 matches the Kernel version. There's no need of using
 :ref:`VIDIOC_QUERYCAP` to check if a specific ioctl
-is supported, the V4L2 core now returns ENOTTY if a driver doesn't
+is supported, the V4L2 core now returns ``ENOTTY`` if a driver doesn't
 provide support for an ioctl.
 
 Other features can be queried by calling the respective ioctl, for
index e2fb81144a4dd704d10355a545459a46e0b83587..03d2d422d4c0ca601ba9bab21b8601484bd979c3 100644 (file)
@@ -49,7 +49,7 @@ Writing "proto" will enable only "proto".
 
 Writing "none" will disable all protocols.
 
-Write fails with EINVAL if an invalid protocol combination or unknown
+Write fails with ``EINVAL`` if an invalid protocol combination or unknown
 protocol name is used.
 
 
@@ -106,7 +106,7 @@ Writing "proto" will use "proto" for wakeup events.
 
 Writing "none" will disable wakeup.
 
-Write fails with EINVAL if an invalid protocol combination or unknown
+Write fails with ``EINVAL`` if an invalid protocol combination or unknown
 protocol name is used, or if wakeup is not supported by the hardware.
 
 
index 4131ca8802685418848e14702d600e5b527f09ea..67e295daa054db6771382a51ff51bbc2dacbe499 100644 (file)
@@ -58,7 +58,7 @@ Here the driver shall set the ``std`` field of struct
 :ref:`v4l2_input <v4l2-input>` and struct
 :ref:`v4l2_output <v4l2-output>` to zero and the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>`,
 :ref:`VIDIOC_S_STD <VIDIOC_G_STD>`, :ref:`VIDIOC_QUERYSTD` and :ref:`VIDIOC_ENUMSTD` ioctls
-shall return the ENOTTY error code or the EINVAL error code.
+shall return the ``ENOTTY`` error code or the ``EINVAL`` error code.
 
 Applications can make use of the :ref:`input-capabilities` and
 :ref:`output-capabilities` flags to determine whether the video
index bb8100b6ef87cbf32777db48563ac1f1f98f2d13..643bad8cfc1a4ed7442c691bc97df226946a6f09 100644 (file)
@@ -30,7 +30,7 @@ contains a union holding separate parameters for input and output
 devices.
 
 These ioctls are optional, drivers need not implement them. If so, they
-return the EINVAL error code.
+return the ``EINVAL`` error code.
 
 
 .. ------------------------------------------------------------------------------
index a5426d10ceb8f59fdccadd589427939e971fcde7..23ef4b71444d59e817f1b729f3d89d291b2478dc 100644 (file)
@@ -77,7 +77,7 @@ Two methods exist to suspend execution of the application until one or
 more buffers can be dequeued. By default ``VIDIOC_DQBUF`` blocks when no
 buffer is in the outgoing queue. When the ``O_NONBLOCK`` flag was given
 to the :ref:`open() <func-open>` function, ``VIDIOC_DQBUF`` returns
-immediately with an EAGAIN error code when no buffer is available. The
+immediately with an ``EAGAIN`` error code when no buffer is available. The
 :ref:`select() <func-select>` or :ref:`poll() <func-poll>` function
 are always available.
 
index fc9542e4204ca8a2d87d24006683e79a16c3887c..9d872e3b9c2291f135508f7980de346d2c953d44 100644 (file)
@@ -97,8 +97,8 @@ than the number requested.
           :ref:`VIDIOC_CREATE_BUFS` will set ``index`` to the current number of
           created buffers, and it will check the validity of ``memory`` and
           ``format.type``. If those are invalid -1 is returned and errno is
-          set to EINVAL error code, otherwise :ref:`VIDIOC_CREATE_BUFS` returns
-          0. It will never set errno to EBUSY error code in this particular
+          set to ``EINVAL`` error code, otherwise :ref:`VIDIOC_CREATE_BUFS` returns
+          0. It will never set errno to ``EBUSY`` error code in this particular
           case.
 
     -  .. row 3
index 4baf472b658b24b903351644346f8c7e4958b0bb..7fc1e6b3e8922d490387c94286da4d69d5532639 100644 (file)
@@ -56,7 +56,7 @@ and ``flags`` fields.
 When ``match.type`` is ``V4L2_CHIP_MATCH_BRIDGE``, ``match.addr``
 selects the nth bridge 'chip' on the TV card. You can enumerate all
 chips by starting at zero and incrementing ``match.addr`` by one until
-:ref:`VIDIOC_DBG_G_CHIP_INFO` fails with an EINVAL error code. The number
+:ref:`VIDIOC_DBG_G_CHIP_INFO` fails with an ``EINVAL`` error code. The number
 zero always selects the bridge chip itself, e. g. the chip connected to
 the PCI or USB bus. Non-zero numbers identify specific parts of the
 bridge chip such as an AC97 register block.
index d3b3c8a2ad08c15684072f97e62dbf4e0cb14f0f..3fd1da8c113276f67a7386291579390daa2e9624 100644 (file)
@@ -225,7 +225,7 @@ introduced in Linux 3.3.
           indicated by the driver setting the ``bytesused`` field to 0. Once
           the ``V4L2_BUF_FLAG_LAST`` flag was set, the
           :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
-          but return an EPIPE error code. If
+          but return an ``EPIPE`` error code. If
           ``V4L2_DEC_CMD_STOP_IMMEDIATELY`` is set, then the decoder stops
           immediately (ignoring the ``pts`` value), otherwise it will keep
           decoding until timestamp >= pts or until the last of the pending
@@ -238,7 +238,7 @@ introduced in Linux 3.3.
        -  2
 
        -  Pause the decoder. When the decoder has not been started yet, the
-          driver will return an EPERM error code. When the decoder is
+          driver will return an ``EPERM`` error code. When the decoder is
           already paused, this command does nothing. This command has one
           flag: if ``V4L2_DEC_CMD_PAUSE_TO_BLACK`` is set, then set the
           decoder output to black when paused.
@@ -250,7 +250,7 @@ introduced in Linux 3.3.
        -  3
 
        -  Resume decoding after a PAUSE command. When the decoder has not
-          been started yet, the driver will return an EPERM error code. When
+          been started yet, the driver will return an ``EPERM`` error code. When
           the decoder is already running, this command does nothing. No
           flags are defined for this command.
 
index 50133087af5b5fd0719db883bd28453bc56d9137..dbfc5e92faf3d4bd1b67207ec4f4a34a85b4acd8 100644 (file)
@@ -46,7 +46,7 @@ receivers) or outputs (for DV transmitters), applications must specify
 the desired pad number in the struct
 :ref:`v4l2_dv_timings_cap <v4l2-dv-timings-cap>` ``pad`` field and
 zero the ``reserved`` array. Attempts to query capabilities on a pad
-that doesn't support them will return an EINVAL error code.
+that doesn't support them will return an ``EINVAL`` error code.
 
 
 .. _v4l2-bt-timings-cap:
index 7d029498d7007e7e296637ebc9e9628e394cc937..b62b508c83a7a40028c657347324626eabb9877a 100644 (file)
@@ -135,7 +135,7 @@ introduced in Linux 2.6.21.
           driver setting the ``bytesused`` field to 0. Once the
           ``V4L2_BUF_FLAG_LAST`` flag was set, the
           :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
-          but return an EPIPE error code.
+          but return an ``EPIPE`` error code.
 
     -  .. row 3
 
@@ -144,7 +144,7 @@ introduced in Linux 2.6.21.
        -  2
 
        -  Pause the encoder. When the encoder has not been started yet, the
-          driver will return an EPERM error code. When the encoder is
+          driver will return an ``EPERM`` error code. When the encoder is
           already paused, this command does nothing. No flags are defined
           for this command.
 
@@ -155,7 +155,7 @@ introduced in Linux 2.6.21.
        -  3
 
        -  Resume encoding after a PAUSE command. When the encoder has not
-          been started yet, the driver will return an EPERM error code. When
+          been started yet, the driver will return an ``EPERM`` error code. When
           the encoder is already running, this command does nothing. No
           flags are defined for this command.
 
index 4639d9a9f0a6b75f122ff7d8ec2aeea66ca8c54f..a3deae4844f51e33229b781080a1577a0b57d581 100644 (file)
@@ -43,10 +43,10 @@ To query the available timings, applications initialize the ``index``
 field, set the ``pad`` field to 0, zero the reserved array of struct
 :ref:`v4l2_enum_dv_timings <v4l2-enum-dv-timings>` and call the
 ``VIDIOC_ENUM_DV_TIMINGS`` ioctl on a video node with a pointer to this
-structure. Drivers fill the rest of the structure or return an EINVAL
+structure. Drivers fill the rest of the structure or return an ``EINVAL``
 error code when the index is out of bounds. To enumerate all supported
 DV timings, applications shall begin at index zero, incrementing by one
-until the driver returns EINVAL. Note that drivers may enumerate a
+until the driver returns ``EINVAL``. Note that drivers may enumerate a
 different set of DV timings after switching the video input or output.
 
 When implemented by the driver DV timings of subdevices can be queried
@@ -56,7 +56,7 @@ or outputs (for DV transmitters), applications must specify the desired
 pad number in the struct
 :ref:`v4l2_enum_dv_timings <v4l2-enum-dv-timings>` ``pad`` field.
 Attempts to enumerate timings on a pad that doesn't support them will
-return an EINVAL error code.
+return an ``EINVAL`` error code.
 
 
 .. _v4l2-enum-dv-timings:
index a20ed3ae341700a71a0883bdcbd3d8148654d43e..a8b162ed85a0a4a5695342b32171b6e755689013 100644 (file)
@@ -34,9 +34,9 @@ Description
 To enumerate image formats applications initialize the ``type`` and
 ``index`` field of struct :ref:`v4l2_fmtdesc <v4l2-fmtdesc>` and call
 the :ref:`VIDIOC_ENUM_FMT` ioctl with a pointer to this structure. Drivers
-fill the rest of the structure or return an EINVAL error code. All
+fill the rest of the structure or return an ``EINVAL`` error code. All
 formats are enumerable by beginning at index zero and incrementing by
-one until EINVAL is returned.
+one until ``EINVAL`` is returned.
 
 Note that after switching input or output the list of enumerated image
 formats may be different.
index 32ef1fcb013d7987b761b16e3c30fd7369f3ddbc..51d7837341071801f4eeb24e914a9b8d21de588c 100644 (file)
@@ -35,9 +35,9 @@ To query the attributes of an audio input applications initialize the
 ``index`` field and zero out the ``reserved`` array of a struct
 :ref:`v4l2_audio <v4l2-audio>` and call the :ref:`VIDIOC_ENUMAUDIO`
 ioctl with a pointer to this structure. Drivers fill the rest of the
-structure or return an EINVAL error code when the index is out of
+structure or return an ``EINVAL`` error code when the index is out of
 bounds. To enumerate all audio inputs applications shall begin at index
-zero, incrementing by one until the driver returns EINVAL.
+zero, incrementing by one until the driver returns ``EINVAL``.
 
 See :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` for a description of struct
 :ref:`v4l2_audio <v4l2-audio>`.
index 8412f1c0e4cfd127ab73922b4330b0e5ec2fcdfa..660bcee62fcf56a0e9cf7aa06679e66b28586527 100644 (file)
@@ -35,9 +35,9 @@ To query the attributes of an audio output applications initialize the
 ``index`` field and zero out the ``reserved`` array of a struct
 :ref:`v4l2_audioout <v4l2-audioout>` and call the ``VIDIOC_G_AUDOUT``
 ioctl with a pointer to this structure. Drivers fill the rest of the
-structure or return an EINVAL error code when the index is out of
+structure or return an ``EINVAL`` error code when the index is out of
 bounds. To enumerate all audio outputs applications shall begin at index
-zero, incrementing by one until the driver returns EINVAL.
+zero, incrementing by one until the driver returns ``EINVAL``.
 
 Note connectors on a TV card to loop back the received audio signal to a
 sound card are not audio outputs in this sense.
index 3b0577a307e991614584cdc787a3e70c56ad5eb8..7344777e35145f4b748b6aa9d1deb64a347f54a9 100644 (file)
@@ -34,9 +34,9 @@ Description
 To query the attributes of a video input applications initialize the
 ``index`` field of struct :ref:`v4l2_input <v4l2-input>` and call the
 :ref:`VIDIOC_ENUMINPUT` ioctl with a pointer to this structure. Drivers
-fill the rest of the structure or return an EINVAL error code when the
+fill the rest of the structure or return an ``EINVAL`` error code when the
 index is out of bounds. To enumerate all inputs applications shall begin
-at index zero, incrementing by one until the driver returns EINVAL.
+at index zero, incrementing by one until the driver returns ``EINVAL``.
 
 
 .. _v4l2-input:
index 1ad68a88e594fea95576a66151fe982e4f0c6eae..de0952353ad0e5cd477ffcc6c86b06b6aee1a9a8 100644 (file)
@@ -34,7 +34,7 @@ Description
 To query the attributes of a video outputs applications initialize the
 ``index`` field of struct :ref:`v4l2_output <v4l2-output>` and call
 the :ref:`VIDIOC_ENUMOUTPUT` ioctl with a pointer to this structure.
-Drivers fill the rest of the structure or return an EINVAL error code
+Drivers fill the rest of the structure or return an ``EINVAL`` error code
 when the index is out of bounds. To enumerate all outputs applications
 shall begin at index zero, incrementing by one until the driver returns
 EINVAL.
index 6421b37b5ace0396acf487577b8c10c7bc7d640b..f4866719e099bd1374c7db0dd415f26f1658623c 100644 (file)
@@ -35,9 +35,9 @@ To query the attributes of a video standard, especially a custom (driver
 defined) one, applications initialize the ``index`` field of struct
 :ref:`v4l2_standard <v4l2-standard>` and call the :ref:`VIDIOC_ENUMSTD`
 ioctl with a pointer to this structure. Drivers fill the rest of the
-structure or return an EINVAL error code when the index is out of
+structure or return an ``EINVAL`` error code when the index is out of
 bounds. To enumerate all standards applications shall begin at index
-zero, incrementing by one until the driver returns EINVAL. Drivers may
+zero, incrementing by one until the driver returns ``EINVAL``. Drivers may
 enumerate a different set of standards after switching the video input
 or output. [1]_
 
index 66d74f3964f3b200feda782b3f3f1ca035ecd3be..8430b49b770a75c9c165dc452867fa6f9abc39c4 100644 (file)
@@ -37,7 +37,7 @@ Description
 To query the current audio input applications zero out the ``reserved``
 array of a struct :ref:`v4l2_audio <v4l2-audio>` and call the
 :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` ioctl with a pointer to this structure. Drivers fill
-the rest of the structure or return an EINVAL error code when the device
+the rest of the structure or return an ``EINVAL`` error code when the device
 has no audio inputs, or none which combine with the current video input.
 
 Audio inputs have one writable property, the audio mode. To select the
index 990f86a20bd2cece7d1f21a6287eab235b76d37b..e2ca42cbe9ae791fb7e1d62d9c1e2d633e9724d2 100644 (file)
@@ -37,7 +37,7 @@ Description
 To query the current audio output applications zero out the ``reserved``
 array of a struct :ref:`v4l2_audioout <v4l2-audioout>` and call the
 ``VIDIOC_G_AUDOUT`` ioctl with a pointer to this structure. Drivers fill
-the rest of the structure or return an EINVAL error code when the device
+the rest of the structure or return an ``EINVAL`` error code when the device
 has no audio inputs, or none which combine with the current video
 output.
 
@@ -46,7 +46,7 @@ current audio output applications can initialize the ``index`` field and
 ``reserved`` array (which in the future may contain writable properties)
 of a :c:type:`struct v4l2_audioout` structure and call the
 ``VIDIOC_S_AUDOUT`` ioctl. Drivers switch to the requested output or
-return the EINVAL error code when the index is out of bounds. This is a
+return the ``EINVAL`` error code when the index is out of bounds. This is a
 write-only ioctl, it does not return the current audio output attributes
 as ``VIDIOC_G_AUDOUT`` does.
 
index e2ffef351edf56d8615271106a6c3845dc7e66ac..888ddb0453400535513d4ae4593351e80b9ed335 100644 (file)
@@ -38,7 +38,7 @@ To query the cropping rectangle size and position applications set the
 ``type`` field of a :c:type:`struct v4l2_crop` structure to the
 respective buffer (stream) type and call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` ioctl
 with a pointer to this structure. The driver fills the rest of the
-structure or returns the EINVAL error code if cropping is not supported.
+structure or returns the ``EINVAL`` error code if cropping is not supported.
 
 To change the cropping rectangle applications initialize the ``type``
 and struct :ref:`v4l2_rect <v4l2-rect>` substructure named ``c`` of a
@@ -72,7 +72,7 @@ image parameters and repeat the cycle until satisfactory parameters have
 been negotiated.
 
 When cropping is not supported then no parameters are changed and
-:ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` returns the EINVAL error code.
+:ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` returns the ``EINVAL`` error code.
 
 
 .. _v4l2-crop:
index 333eb4fa50993f9142d7d6525163d6a2eba8d680..07e27e474326bf9039aa3e039b7f96680685b4ac 100644 (file)
@@ -39,9 +39,9 @@ value of a control applications initialize the ``id`` and ``value``
 fields of a struct :c:type:`struct v4l2_control` and call the
 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctl.
 
-When the ``id`` is invalid drivers return an EINVAL error code. When the
+When the ``id`` is invalid drivers return an ``EINVAL`` error code. When the
 ``value`` is out of bounds drivers can choose to take the closest valid
-value or return an ERANGE error code, whatever seems more appropriate.
+value or return an ``ERANGE`` error code, whatever seems more appropriate.
 However, :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` is a write-only ioctl, it does not return the
 actual new value. If the ``value`` is inappropriate for the control
 (e.g. if it refers to an unsupported menu index of a menu control), then
index c9de292ca1d297e4caf6a023bcf6d2e5e04448af..2b2e154a2d1f82f4035a9bd5807edcaa4829de0a 100644 (file)
@@ -42,13 +42,13 @@ information is filled in using the structure struct
 :ref:`v4l2_dv_timings <v4l2-dv-timings>`. These ioctls take a
 pointer to the struct :ref:`v4l2_dv_timings <v4l2-dv-timings>`
 structure as argument. If the ioctl is not supported or the timing
-values are not correct, the driver returns EINVAL error code.
+values are not correct, the driver returns ``EINVAL`` error code.
 
 The ``linux/v4l2-dv-timings.h`` header can be used to get the timings of
 the formats in the :ref:`cea861` and :ref:`vesadmt` standards. If
 the current input or output does not support DV timings (e.g. if
 :ref:`VIDIOC_ENUMINPUT` does not set the
-``V4L2_IN_CAP_DV_TIMINGS`` flag), then ENODATA error code is returned.
+``V4L2_IN_CAP_DV_TIMINGS`` flag), then ``ENODATA`` error code is returned.
 
 
 Return Value
index 54f364bdde8e7d67f602a9bb2051fb54cae6bd46..b7d56ba0032a92386963816f0a9cf5a78066bf50 100644 (file)
@@ -48,7 +48,7 @@ returned by :ref:`VIDIOC_ENUMINPUT` and
 :ref:`VIDIOC_ENUMOUTPUT` respectively. When used
 with subdevice nodes the ``pad`` field represents the input or output
 pad of the subdevice. If there is no EDID support for the given ``pad``
-value, then the EINVAL error code will be returned.
+value, then the ``EINVAL`` error code will be returned.
 
 To get the EDID data the application has to fill in the ``pad``,
 ``start_block``, ``blocks`` and ``edid`` fields, zero the ``reserved``
@@ -59,7 +59,7 @@ array and call :ref:`VIDIOC_G_EDID <VIDIOC_G_EDID>`. The current EDID from block
 
 If there are fewer blocks than specified, then the driver will set
 ``blocks`` to the actual number of blocks. If there are no EDID blocks
-available at all, then the error code ENODATA is set.
+available at all, then the error code ``ENODATA`` is set.
 
 If blocks have to be retrieved from the sink, then this call will block
 until they have been read.
@@ -79,9 +79,9 @@ receivers as it makes no sense for a transmitter.
 
 The driver assumes that the full EDID is passed in. If there are more
 EDID blocks than the hardware can handle then the EDID is not written,
-but instead the error code E2BIG is set and ``blocks`` is set to the
+but instead the error code ``E2BIG`` is set and ``blocks`` is set to the
 maximum that the hardware supports. If ``start_block`` is any value
-other than 0 then the error code EINVAL is set.
+other than 0 then the error code ``EINVAL`` is set.
 
 To disable an EDID you set ``blocks`` to 0. Depending on the hardware
 this will drive the hotplug pin low and/or block the source from reading
@@ -155,10 +155,10 @@ On success 0 is returned, on error -1 and the ``errno`` variable is set
 appropriately. The generic error codes are described at the
 :ref:`Generic Error Codes <gen-errors>` chapter.
 
-ENODATA
+``ENODATA``
     The EDID data is not available.
 
-E2BIG
+``E2BIG``
     The EDID data you provided is more than the hardware can handle.
 
 
index 91a0b8227423534deaffab49d293e94daf734197..d12021c6fbb8133093a0db598ceb3696507b0195 100644 (file)
@@ -54,7 +54,7 @@ the ``id``, ``size`` and ``reserved2`` fields of each struct
 
 If the ``size`` is too small to receive the control result (only
 relevant for pointer-type controls like strings), then the driver will
-set ``size`` to a valid value and return an ENOSPC error code. You
+set ``size`` to a valid value and return an ``ENOSPC`` error code. You
 should re-allocate the memory to this new size and try again. For the
 string type it is possible that the same issue occurs again if the
 string has grown in the meantime. It is recommended to call
@@ -81,13 +81,13 @@ initialize the ``id``, ``size``, ``reserved2`` and
 values are automatically adjusted to a valid value or if an error is
 returned.
 
-When the ``id`` or ``which`` is invalid drivers return an EINVAL error
+When the ``id`` or ``which`` is invalid drivers return an ``EINVAL`` error
 code. When the value is out of bounds drivers can choose to take the
-closest valid value or return an ERANGE error code, whatever seems more
+closest valid value or return an ``ERANGE`` error code, whatever seems more
 appropriate. In the first case the new value is set in struct
 :ref:`v4l2_ext_control <v4l2-ext-control>`. If the new control value
 is inappropriate (e.g. the given menu index is not supported by the menu
-control), then this will also result in an EINVAL error code error.
+control), then this will also result in an ``EINVAL`` error code error.
 
 The driver will only set/get these controls if all control values are
 correct. This prevents the situation where only some of the controls
@@ -124,7 +124,7 @@ still cause this situation.
           size of the memory containing the payload, or that will receive
           the payload. If :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` finds that this value is
           less than is required to store the payload result, then it is set
-          to a value large enough to store the payload result and ENOSPC is
+          to a value large enough to store the payload result and ``ENOSPC`` is
           returned. Note that for string controls this ``size`` field should
           not be confused with the length of the string. This field refers
           to the size of the memory that contains the string. The actual
index 173e4aca7ee1b4218cc0490996f3d69629882b09..24fac4536196add5b93eb5d4776632419797849d 100644 (file)
@@ -47,7 +47,7 @@ devices that is either the struct
 :ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct
 :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp``
 member. When the requested buffer type is not supported drivers return
-an EINVAL error code.
+an ``EINVAL`` error code.
 
 To change the current format parameters applications initialize the
 ``type`` field and all fields of the respective ``fmt`` union member.
@@ -69,11 +69,11 @@ application must implement the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDI
 ioctl. When the requested buffer type is not supported drivers return an
 EINVAL error code on a :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` attempt. When I/O is already in
 progress or the resource is not available for other reasons drivers
-return the EBUSY error code.
+return the ``EBUSY`` error code.
 
 The :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl is equivalent to :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` with one
 exception: it does not change driver state. It can also be called at any
-time, never returning EBUSY. This function is provided to negotiate
+time, never returning ``EBUSY``. This function is provided to negotiate
 parameters, to learn about hardware limitations, without disabling I/O
 or possibly time consuming hardware preparations. Although strongly
 recommended drivers are not required to implement this ioctl.
index 6b1fc39c602f876540227ec7cf0d002168057e3b..1c14f7dcffebb8201afb99b8e40d78ef68ca85b2 100644 (file)
@@ -36,7 +36,7 @@ To query the current video input applications call the
 :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer to an integer where the driver
 stores the number of the input, as in the struct
 :ref:`v4l2_input <v4l2-input>` ``index`` field. This ioctl will fail
-only when there are no video inputs, returning EINVAL.
+only when there are no video inputs, returning ``EINVAL``.
 
 To select a video input applications store the number of the desired
 input in an integer and call the :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer
index b41ec0fe6accdaf8ff625988db39783e576422e2..2342e036850b1aa23740e93e83c7a104b9d8bc18 100644 (file)
@@ -38,7 +38,7 @@ To query the attributes of a modulator applications initialize the
 ``index`` field and zero out the ``reserved`` array of a struct
 :ref:`v4l2_modulator <v4l2-modulator>` and call the
 :ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl with a pointer to this structure. Drivers
-fill the rest of the structure or return an EINVAL error code when the
+fill the rest of the structure or return an ``EINVAL`` error code when the
 index is out of bounds. To enumerate all modulators applications shall
 begin at index zero, incrementing by one until the driver returns
 EINVAL.
@@ -199,7 +199,7 @@ To change the radio frequency the
           ``V4L2_TUNER_SUB_SAP``. If the hardware does not support the
           respective audio matrix, or the current video standard does not
           permit bilingual audio the :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall
-          return an EINVAL error code and the driver shall fall back to mono
+          return an ``EINVAL`` error code and the driver shall fall back to mono
           or stereo mode.
 
     -  .. row 4
@@ -230,7 +230,7 @@ To change the radio frequency the
           ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_STEREO``. If the
           hardware does not support the respective audio matrix, or the
           current video standard does not permit SAP the
-          :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall return an EINVAL error code and
+          :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall return an ``EINVAL`` error code and
           driver shall fall back to mono or stereo mode.
 
     -  .. row 6
index 95d7a9b191660592cc13481a41b0cbd007c1dd13..03defa561e5b5adb967ce9f698675098fd24bca8 100644 (file)
@@ -36,7 +36,7 @@ To query the current video output applications call the
 :ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a pointer to an integer where the driver
 stores the number of the output, as in the struct
 :ref:`v4l2_output <v4l2-output>` ``index`` field. This ioctl will
-fail only when there are no video outputs, returning the EINVAL error
+fail only when there are no video outputs, returning the ``EINVAL`` error
 code.
 
 To select a video output applications store the number of the desired
index 271610e06b2b4808e79b1a0a24bdc83a9ff98aae..1159b012a0a176004de7ac95ddea472622f0f484 100644 (file)
@@ -113,7 +113,7 @@ On success the struct :ref:`v4l2_rect <v4l2-rect>` ``r`` field
 contains the adjusted rectangle. When the parameters are unsuitable the
 application may modify the cropping (composing) or image parameters and
 repeat the cycle until satisfactory parameters have been negotiated. If
-constraints flags have to be violated at then ERANGE is returned. The
+constraints flags have to be violated at then ``ERANGE`` is returned. The
 error indicates that *there exist no rectangle* that satisfies the
 constraints.
 
index 00a9b61002de0359d1cc2bdb219391ea28f4bbc2..ac08f606fdd84f4885f0a048ddb0cb8befbb8c16 100644 (file)
@@ -35,7 +35,7 @@ To find out which data services are supported by a sliced VBI capture or
 output device, applications initialize the ``type`` field of a struct
 :ref:`v4l2_sliced_vbi_cap <v4l2-sliced-vbi-cap>`, clear the
 ``reserved`` array and call the :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl. The
-driver fills in the remaining fields or returns an EINVAL error code if
+driver fills in the remaining fields or returns an ``EINVAL`` error code if
 the sliced VBI API is unsupported or ``type`` is invalid.
 
 Note the ``type`` field was added, and the ioctl changed from read-only
index 5644cc670381cbf9628b74571f0358505f9ad372..67b4d7da6473297347e5e9cf5fb04a0ef546832a 100644 (file)
@@ -45,11 +45,11 @@ unambiguous such that they appear in only one enumerated
 :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` accepts one or more flags, being a write-only ioctl it
 does not return the actual new standard as :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` does. When
 no flags are given or the current input does not support the requested
-standard the driver returns an EINVAL error code. When the standard set
-is ambiguous drivers may return EINVAL or choose any of the requested
+standard the driver returns an ``EINVAL`` error code. When the standard set
+is ambiguous drivers may return ``EINVAL`` or choose any of the requested
 standards. If the current input or output does not support standard
 video timings (e.g. if :ref:`VIDIOC_ENUMINPUT`
-does not set the ``V4L2_IN_CAP_STD`` flag), then ENODATA error code is
+does not set the ``V4L2_IN_CAP_STD`` flag), then ``ENODATA`` error code is
 returned.
 
 
index 8e119fa28ccdac0d45f49b3b039ef533b9d5e851..078fe6db751ea22faf705074f6c4f5485532558e 100644 (file)
@@ -38,9 +38,9 @@ To query the attributes of a tuner applications initialize the ``index``
 field and zero out the ``reserved`` array of a struct
 :ref:`v4l2_tuner <v4l2-tuner>` and call the ``VIDIOC_G_TUNER`` ioctl
 with a pointer to this structure. Drivers fill the rest of the structure
-or return an EINVAL error code when the index is out of bounds. To
+or return an ``EINVAL`` error code when the index is out of bounds. To
 enumerate all tuners applications shall begin at index zero,
-incrementing by one until the driver returns EINVAL.
+incrementing by one until the driver returns ``EINVAL``.
 
 Tuners have two writable properties, the audio mode and the radio
 frequency. To change the audio mode, applications initialize the
index 380970ba9a12ee7cd5b852be786e17f20eab8b67..ab567559a0ac2c467f470278f6ff9632091dd310 100644 (file)
@@ -110,7 +110,7 @@ array must be passed in as well.
 By default ``VIDIOC_DQBUF`` blocks when no buffer is in the outgoing
 queue. When the ``O_NONBLOCK`` flag was given to the
 :ref:`open() <func-open>` function, ``VIDIOC_DQBUF`` returns
-immediately with an EAGAIN error code when no buffer is available.
+immediately with an ``EAGAIN`` error code when no buffer is available.
 
 The :c:type:`struct v4l2_buffer` structure is specified in
 :ref:`buffer`.
index 9f067f587e424e8de9f2354bc14358629daa8e85..0c01ed49065f9a4011b5b64435dd5623c0553e0b 100644 (file)
@@ -51,11 +51,11 @@ and start streaming again.
 
 If the timings could not be detected because there was no signal, then
 ENOLINK is returned. If a signal was detected, but it was unstable and
-the receiver could not lock to the signal, then ENOLCK is returned. If
+the receiver could not lock to the signal, then ``ENOLCK`` is returned. If
 the receiver could lock to the signal, but the format is unsupported
 (e.g. because the pixelclock is out of range of the hardware
 capabilities), then the driver fills in whatever timings it could find
-and returns ERANGE. In that case the application can call
+and returns ``ERANGE``. In that case the application can call
 :ref:`VIDIOC_DV_TIMINGS_CAP` to compare the
 found timings with the hardware's capabilities in order to give more
 precise feedback to the user.
index 91551fe448fc25d1afea63e43a2847316d120b14..0776232be5200d1f5ae9c0d016fb91efe3b494f9 100644 (file)
@@ -36,7 +36,7 @@ identify kernel devices compatible with this specification and to obtain
 information about driver and hardware capabilities. The ioctl takes a
 pointer to a struct :ref:`v4l2_capability <v4l2-capability>` which is
 filled by the driver. When the driver is not compatible with this
-specification the ioctl returns an EINVAL error code.
+specification the ioctl returns an ``EINVAL`` error code.
 
 
 .. _v4l2-capability:
index a08c682628711964bdbb0e8189bf17518866fcfe..2c8ef053a1abdd0cb703c160b761c1c239d78409 100644 (file)
@@ -40,30 +40,30 @@ Description
 To query the attributes of a control applications set the ``id`` field
 of a struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` and call the
 ``VIDIOC_QUERYCTRL`` ioctl with a pointer to this structure. The driver
-fills the rest of the structure or returns an EINVAL error code when the
+fills the rest of the structure or returns an ``EINVAL`` error code when the
 ``id`` is invalid.
 
 It is possible to enumerate controls by calling ``VIDIOC_QUERYCTRL``
 with successive ``id`` values starting from ``V4L2_CID_BASE`` up to and
-exclusive ``V4L2_CID_LASTP1``. Drivers may return EINVAL if a control in
+exclusive ``V4L2_CID_LASTP1``. Drivers may return ``EINVAL`` if a control in
 this range is not supported. Further applications can enumerate private
 controls, which are not defined in this specification, by starting at
 ``V4L2_CID_PRIVATE_BASE`` and incrementing ``id`` until the driver
-returns EINVAL.
+returns ``EINVAL``.
 
 In both cases, when the driver sets the ``V4L2_CTRL_FLAG_DISABLED`` flag
 in the ``flags`` field this control is permanently disabled and should
 be ignored by the application. [1]_
 
 When the application ORs ``id`` with ``V4L2_CTRL_FLAG_NEXT_CTRL`` the
-driver returns the next supported non-compound control, or EINVAL if
+driver returns the next supported non-compound control, or ``EINVAL`` if
 there is none. In addition, the ``V4L2_CTRL_FLAG_NEXT_COMPOUND`` flag
 can be specified to enumerate all compound controls (i.e. controls with
 type ≥ ``V4L2_CTRL_COMPOUND_TYPES`` and/or array control, in other words
 controls that contain more than one value). Specify both
 ``V4L2_CTRL_FLAG_NEXT_CTRL`` and ``V4L2_CTRL_FLAG_NEXT_COMPOUND`` in
 order to enumerate all controls, compound or not. Drivers which do not
-support these flags yet always return EINVAL.
+support these flags yet always return ``EINVAL``.
 
 The ``VIDIOC_QUERY_EXT_CTRL`` ioctl was introduced in order to better
 support controls that can use compound types, and to expose additional
@@ -78,12 +78,12 @@ Additional information is required for menu controls: the names of the
 menu items. To query them applications set the ``id`` and ``index``
 fields of struct :ref:`v4l2_querymenu <v4l2-querymenu>` and call the
 ``VIDIOC_QUERYMENU`` ioctl with a pointer to this structure. The driver
-fills the rest of the structure or returns an EINVAL error code when the
+fills the rest of the structure or returns an ``EINVAL`` error code when the
 ``id`` or ``index`` is invalid. Menu items are enumerated by calling
 ``VIDIOC_QUERYMENU`` with successive ``index`` values from struct
 :ref:`v4l2_queryctrl <v4l2-queryctrl>` ``minimum`` to ``maximum``,
 inclusive. Note that it is possible for ``VIDIOC_QUERYMENU`` to return
-an EINVAL error code for some indices between ``minimum`` and
+an ``EINVAL`` error code for some indices between ``minimum`` and
 ``maximum``. In that case that particular menu item is not supported by
 this driver. Also note that the ``minimum`` value is not necessarily 0.
 
@@ -108,7 +108,7 @@ See also the examples in :ref:`control`.
           :ref:`control-id` for predefined IDs. When the ID is ORed with
           V4L2_CTRL_FLAG_NEXT_CTRL the driver clears the flag and
           returns the first control with a higher ID. Drivers which do not
-          support this flag yet always return an EINVAL error code.
+          support this flag yet always return an ``EINVAL`` error code.
 
     -  .. row 2
 
@@ -533,7 +533,7 @@ See also the examples in :ref:`control`.
        -  0
 
        -  A control which performs an action when set. Drivers must ignore
-          the value passed with ``VIDIOC_S_CTRL`` and return an EINVAL error
+          the value passed with ``VIDIOC_S_CTRL`` and return an ``EINVAL`` error
           code on a ``VIDIOC_G_CTRL`` attempt.
 
     -  .. row 8
@@ -588,7 +588,7 @@ See also the examples in :ref:`control`.
           control ID equal to a control class code (see :ref:`ctrl-class`)
           + 1, the ioctl returns the name of the control class and this
           control type. Older drivers which do not support this feature
-          return an EINVAL error code.
+          return an ``EINVAL`` error code.
 
     -  .. row 11
 
@@ -647,7 +647,7 @@ See also the examples in :ref:`control`.
 
        -  This control is permanently disabled and should be ignored by the
           application. Any attempt to change the control will result in an
-          EINVAL error code.
+          ``EINVAL`` error code.
 
     -  .. row 2
 
@@ -658,7 +658,7 @@ See also the examples in :ref:`control`.
        -  This control is temporarily unchangeable, for example because
           another application took over control of the respective resource.
           Such controls may be displayed specially in a user interface.
-          Attempts to change the control may result in an EBUSY error code.
+          Attempts to change the control may result in an ``EBUSY`` error code.
 
     -  .. row 3
 
@@ -667,7 +667,7 @@ See also the examples in :ref:`control`.
        -  0x0004
 
        -  This control is permanently readable only. Any attempt to change
-          the control will result in an EINVAL error code.
+          the control will result in an ``EINVAL`` error code.
 
     -  .. row 4
 
@@ -706,7 +706,7 @@ See also the examples in :ref:`control`.
        -  0x0040
 
        -  This control is permanently writable only. Any attempt to read the
-          control will result in an EACCES error code error code. This flag
+          control will result in an ``EACCES`` error code error code. This flag
           is typically present for relative controls or action controls
           where writing a value will cause the device to carry out a given
           action (e. g. motor control) but no meaningful value can be
@@ -775,9 +775,9 @@ EACCES
 .. [1]
    ``V4L2_CTRL_FLAG_DISABLED`` was intended for two purposes: Drivers
    can skip predefined controls not supported by the hardware (although
-   returning EINVAL would do as well), or disable predefined and private
+   returning ``EINVAL`` would do as well), or disable predefined and private
    controls after hardware detection without the trouble of reordering
-   control arrays and indices (EINVAL cannot be used to skip private
+   control arrays and indices (``EINVAL`` cannot be used to skip private
    controls because it would prematurely end the enumeration).
 
 
index 23b2fee646a1b026247b942ec68ac2445ee53c33..411b5bf8031339e1cf8b58cebad7b47b91f22929 100644 (file)
@@ -55,7 +55,7 @@ number is also possible when the driver requires more buffers to
 function correctly. For example video output requires at least two
 buffers, one displayed and one filled by the application.
 
-When the I/O method is not supported the ioctl returns an EINVAL error
+When the I/O method is not supported the ioctl returns an ``EINVAL`` error
 code.
 
 Applications can call :ref:`VIDIOC_REQBUFS` again to change the number of
index 226440e4bb76fbab34a181a6bca65fc8be6835f5..68c96236806d7ea5c57de31c0acc8bfb0d170a66 100644 (file)
@@ -55,7 +55,7 @@ If an error is returned, then the original frequency will be restored.
 This ioctl is supported if the ``V4L2_CAP_HW_FREQ_SEEK`` capability is
 set.
 
-If this ioctl is called from a non-blocking filehandle, then EAGAIN
+If this ioctl is called from a non-blocking filehandle, then ``EAGAIN``
 error code is returned and no seek takes place.
 
 
index bcf161cd50122d8b14f207afa588b0558bbf168f..8c5298175ba5aa221196833065b57adb63ac8c3e 100644 (file)
@@ -48,7 +48,7 @@ and call the :ref:`VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL` ioctl with a pointer
 to this structure. Drivers fill the rest of the structure or return an
 EINVAL error code if one of the input fields is invalid. All frame
 intervals are enumerable by beginning at index zero and incrementing by
-one until EINVAL is returned.
+one until ``EINVAL`` is returned.
 
 Available frame intervals may depend on the current 'try' formats at
 other pads of the sub-device, as well as on the current active links.
index dbaf866e82fe7c47843e6ff2e628dc35199b2078..13d466c2a4e1d39254a669616c3981650356a28f 100644 (file)
@@ -36,10 +36,10 @@ applications initialize the ``pad``, ``which`` and ``index`` fields of
 struct
 :ref:`v4l2_subdev_mbus_code_enum <v4l2-subdev-mbus-code-enum>` and
 call the :ref:`VIDIOC_SUBDEV_ENUM_MBUS_CODE` ioctl with a pointer to this
-structure. Drivers fill the rest of the structure or return an EINVAL
+structure. Drivers fill the rest of the structure or return an ``EINVAL``
 error code if either the ``pad`` or ``index`` are invalid. All media bus
 formats are enumerable by beginning at index zero and incrementing by
-one until EINVAL is returned.
+one until ``EINVAL`` is returned.
 
 Available media bus formats may depend on the current 'try' formats at
 other pads of the sub-device, as well as on the current active links.
index 46776cdfa7b590acf9ebdd60a3e98d2ee9ea902d..88416ba28d86c2d75211520b8673770caecebd59 100644 (file)
@@ -45,7 +45,7 @@ field of a struct :ref:`v4l2_subdev_crop <v4l2-subdev-crop>` to the
 desired pad number as reported by the media API and the ``which`` field
 to ``V4L2_SUBDEV_FORMAT_ACTIVE``. They then call the
 ``VIDIOC_SUBDEV_G_CROP`` ioctl with a pointer to this structure. The
-driver fills the members of the ``rect`` field or returns EINVAL error
+driver fills the members of the ``rect`` field or returns ``EINVAL`` error
 code if the input arguments are invalid, or if cropping is not supported
 on the given pad.