Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) .. c:namespace:: V4L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) .. _VIDIOC_G_EXT_CTRLS:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) ******************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) ioctl VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS, VIDIOC_TRY_EXT_CTRLS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) ******************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) Name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) ====
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) VIDIOC_G_EXT_CTRLS - VIDIOC_S_EXT_CTRLS - VIDIOC_TRY_EXT_CTRLS - Get or set the value of several controls, try control values
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) Synopsis
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) .. c:macro:: VIDIOC_G_EXT_CTRLS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) ``int ioctl(int fd, VIDIOC_G_EXT_CTRLS, struct v4l2_ext_controls *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) .. c:macro:: VIDIOC_S_EXT_CTRLS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) ``int ioctl(int fd, VIDIOC_S_EXT_CTRLS, struct v4l2_ext_controls *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) .. c:macro:: VIDIOC_TRY_EXT_CTRLS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) ``int ioctl(int fd, VIDIOC_TRY_EXT_CTRLS, struct v4l2_ext_controls *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) Arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) ``fd``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34)     File descriptor returned by :c:func:`open()`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) ``argp``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37)     Pointer to struct :c:type:`v4l2_ext_controls`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) These ioctls allow the caller to get or set multiple controls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) atomically. Control IDs are grouped into control classes (see
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) :ref:`ctrl-class`) and all controls in the control array must belong
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) to the same control class.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) Applications must always fill in the ``count``, ``which``, ``controls``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) and ``reserved`` fields of struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) :c:type:`v4l2_ext_controls`, and initialize the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) struct :c:type:`v4l2_ext_control` array pointed to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) by the ``controls`` fields.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) To get the current value of a set of controls applications initialize
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) the ``id``, ``size`` and ``reserved2`` fields of each struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) :c:type:`v4l2_ext_control` and call the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. String controls controls must also set the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) ``string`` field. Controls of compound types
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) (``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set) must set the ``ptr`` field.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) If the ``size`` is too small to receive the control result (only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) relevant for pointer-type controls like strings), then the driver will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) set ``size`` to a valid value and return an ``ENOSPC`` error code. You
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) should re-allocate the memory to this new size and try again. For the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) string type it is possible that the same issue occurs again if the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) string has grown in the meantime. It is recommended to call
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) :ref:`VIDIOC_QUERYCTRL` first and use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) ``maximum``\ +1 as the new ``size`` value. It is guaranteed that that is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) sufficient memory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) N-dimensional arrays are set and retrieved row-by-row. You cannot set a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) partial array, all elements have to be set or retrieved. The total size
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) is calculated as ``elems`` * ``elem_size``. These values can be obtained
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) by calling :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) To change the value of a set of controls applications initialize the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) ``id``, ``size``, ``reserved2`` and ``value/value64/string/ptr`` fields
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) of each struct :c:type:`v4l2_ext_control` and call
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) the :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. The controls will only be set if *all*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) control values are valid.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) To check if a set of controls have correct values applications
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) initialize the ``id``, ``size``, ``reserved2`` and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) ``value/value64/string/ptr`` fields of each struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) :c:type:`v4l2_ext_control` and call the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. It is up to the driver whether wrong
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) values are automatically adjusted to a valid value or if an error is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) When the ``id`` or ``which`` is invalid drivers return an ``EINVAL`` error
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) code. When the value is out of bounds drivers can choose to take the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) closest valid value or return an ``ERANGE`` error code, whatever seems more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) appropriate. In the first case the new value is set in struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) :c:type:`v4l2_ext_control`. If the new control value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) is inappropriate (e.g. the given menu index is not supported by the menu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) control), then this will also result in an ``EINVAL`` error code error.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) If ``request_fd`` is set to a not-yet-queued :ref:`request <media-request-api>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) file descriptor and ``which`` is set to ``V4L2_CTRL_WHICH_REQUEST_VAL``,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) then the controls are not applied immediately when calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, but instead are applied by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) the driver for the buffer associated with the same request.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) If the device does not support requests, then ``EACCES`` will be returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) If requests are supported but an invalid request file descriptor is given,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) then ``EINVAL`` will be returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) An attempt to call :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` for a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) request that has already been queued will result in an ``EBUSY`` error.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) If ``request_fd`` is specified and ``which`` is set to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) ``V4L2_CTRL_WHICH_REQUEST_VAL`` during a call to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, then it will return the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) values of the controls at the time of request completion.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) If the request is not yet completed, then this will result in an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) ``EACCES`` error.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) The driver will only set/get these controls if all control values are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) correct. This prevents the situation where only some of the controls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) were set/get. Only low-level errors (e. g. a failed i2c command) can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) still cause this situation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{1.5cm}|p{11.8cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) .. c:type:: v4l2_ext_control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) .. cssclass: longtable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) .. flat-table:: struct v4l2_ext_control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)     :widths:       1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)       - ``id``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)       - Identifies the control, set by the application.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)       - ``size``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)       - The total size in bytes of the payload of this control. This is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	normally 0, but for pointer controls this should be set to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	size of the memory containing the payload, or that will receive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	the payload. If :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` finds that this value is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	less than is required to store the payload result, then it is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	to a value large enough to store the payload result and ``ENOSPC`` is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	.. note::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	   For string controls, this ``size`` field should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	   not be confused with the length of the string. This field refers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	   to the size of the memory that contains the string. The actual
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	   *length* of the string may well be much smaller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)       - ``reserved2``\ [1]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153)       - Reserved for future extensions. Drivers and applications must set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	the array to zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)     * - union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)       - (anonymous)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)     * - __s32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)       - ``value``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)       - New value or current value. Valid if this control is not of type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	not set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)     * - __s64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)       - ``value64``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)       - New value or current value. Valid if this control is of type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	not set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)     * - char *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)       - ``string``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)       - A pointer to a string. Valid if this control is of type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	``V4L2_CTRL_TYPE_STRING``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171)     * - __u8 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)       - ``p_u8``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173)       - A pointer to a matrix control of unsigned 8-bit values. Valid if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	this control is of type ``V4L2_CTRL_TYPE_U8``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)     * - __u16 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)       - ``p_u16``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)       - A pointer to a matrix control of unsigned 16-bit values. Valid if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	this control is of type ``V4L2_CTRL_TYPE_U16``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179)     * - __u32 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)       - ``p_u32``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181)       - A pointer to a matrix control of unsigned 32-bit values. Valid if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	this control is of type ``V4L2_CTRL_TYPE_U32``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183)     * - :c:type:`v4l2_area` *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)       - ``p_area``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185)       - A pointer to a struct :c:type:`v4l2_area`. Valid if this control is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)         of type ``V4L2_CTRL_TYPE_AREA``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)     * - struct :c:type:`v4l2_ctrl_hdr10_cll_info` *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)       - ``p_hdr10_cll``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189)       - A pointer to a struct :c:type:`v4l2_ctrl_hdr10_cll_info`. Valid if this control is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)         of type ``V4L2_CTRL_TYPE_HDR10_CLL_INFO``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)     * - struct :c:type:`v4l2_ctrl_hdr10_mastering_display` *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)       - ``p_hdr10_mastering``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193)       - A pointer to a struct :c:type:`v4l2_ctrl_hdr10_mastering_display`. Valid if this control is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)         of type ``V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)     * - void *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)       - ``ptr``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197)       - A pointer to a compound type which can be an N-dimensional array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	and/or a compound type (the control's type is >=
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	``V4L2_CTRL_COMPOUND_TYPES``). Valid if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set for this control.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)     * - }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)       -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) .. tabularcolumns:: |p{4.0cm}|p{2.2cm}|p{2.1cm}|p{8.2cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) .. c:type:: v4l2_ext_controls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) .. cssclass:: longtable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) .. flat-table:: struct v4l2_ext_controls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213)     :widths:       1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)     * - union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)       - (anonymous)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)       - ``ctrl_class``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)       - The control class to which all controls belong, see
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	:ref:`ctrl-class`. Drivers that use a kernel framework for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 	handling controls will also accept a value of 0 here, meaning that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	the controls can belong to any control class. Whether drivers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	support this can be tested by setting ``ctrl_class`` to 0 and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	calling :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` with a ``count`` of 0. If that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	succeeds, then the driver supports this feature.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)       - ``which``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)       - Which value of the control to get/set/try.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	``V4L2_CTRL_WHICH_CUR_VAL`` will return the current value of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	control, ``V4L2_CTRL_WHICH_DEF_VAL`` will return the default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 	value of the control and ``V4L2_CTRL_WHICH_REQUEST_VAL`` indicates that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	these controls have to be retrieved from a request or tried/set for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 	a request. In the latter case the ``request_fd`` field contains the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 	file descriptor of the request that should be used. If the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 	does not support requests, then ``EACCES`` will be returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 	.. note::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 	   When using ``V4L2_CTRL_WHICH_DEF_VAL`` be aware that you can only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 	   get the default value of the control, you cannot set or try it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 	For backwards compatibility you can also use a control class here
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 	(see :ref:`ctrl-class`). In that case all controls have to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	belong to that control class. This usage is deprecated, instead
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 	just use ``V4L2_CTRL_WHICH_CUR_VAL``. There are some very old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 	drivers that do not yet support ``V4L2_CTRL_WHICH_CUR_VAL`` and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 	that require a control class here. You can test for such drivers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 	by setting ctrl_class to ``V4L2_CTRL_WHICH_CUR_VAL`` and calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 	VIDIOC_TRY_EXT_CTRLS with a count of 0. If that fails, then the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	driver does not support ``V4L2_CTRL_WHICH_CUR_VAL``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)     * - }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)       -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)       - ``count``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255)       - The number of controls in the controls array. May also be zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257)       - ``error_idx``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)       - Set by the driver in case of an error. If the error is associated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 	with a particular control, then ``error_idx`` is set to the index
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 	of that control. If the error is not related to a specific
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 	control, or the validation step failed (see below), then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	``error_idx`` is set to ``count``. The value is undefined if the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 	ioctl returned 0 (success).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 	Before controls are read from/written to hardware a validation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 	step takes place: this checks if all controls in the list are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	valid controls, if no attempt is made to write to a read-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 	control or read from a write-only control, and any other up-front
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 	checks that can be done without accessing the hardware. The exact
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 	validations done during this step are driver dependent since some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 	checks might require hardware access for some devices, thus making
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 	it impossible to do those checks up-front. However, drivers should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 	make a best-effort to do as many up-front checks as possible.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 	This check is done to avoid leaving the hardware in an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 	inconsistent state due to easy-to-avoid problems. But it leads to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 	another problem: the application needs to know whether an error
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 	came from the validation step (meaning that the hardware was not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 	touched) or from an error during the actual reading from/writing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 	to hardware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 	The, in hindsight quite poor, solution for that is to set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 	``error_idx`` to ``count`` if the validation failed. This has the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 	unfortunate side-effect that it is not possible to see which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 	control failed the validation. If the validation was successful
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 	and the error happened while accessing the hardware, then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 	``error_idx`` is less than ``count`` and only the controls up to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 	``error_idx-1`` were read or written correctly, and the state of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 	the remaining controls is undefined.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 	Since :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` does not access hardware there is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 	also no need to handle the validation step in this special way, so
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 	``error_idx`` will just be set to the control that failed the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 	validation step instead of to ``count``. This means that if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) 	:ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` fails with ``error_idx`` set to ``count``,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 	then you can call :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` to try to discover the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 	actual control that failed the validation step. Unfortunately,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 	there is no ``TRY`` equivalent for :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299)     * - __s32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300)       - ``request_fd``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301)       - File descriptor of the request to be used by this operation. Only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 	valid if ``which`` is set to ``V4L2_CTRL_WHICH_REQUEST_VAL``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 	If the device does not support requests, then ``EACCES`` will be returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	If requests are supported but an invalid request file descriptor is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 	given, then ``EINVAL`` will be returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306)     * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307)       - ``reserved``\ [1]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308)       - Reserved for future extensions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 	Drivers and applications must set the array to zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311)     * - struct :c:type:`v4l2_ext_control` *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)       - ``controls``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313)       - Pointer to an array of ``count`` v4l2_ext_control structures.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 	Ignored if ``count`` equals zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) .. _ctrl-class:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) .. flat-table:: Control classes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322)     :header-rows:  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323)     :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324)     :widths:       3 1 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326)     * - ``V4L2_CTRL_CLASS_USER``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327)       - 0x980000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328)       - The class containing user controls. These controls are described
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 	in :ref:`control`. All controls that can be set using the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) 	:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 	:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl belong to this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 	class.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333)     * - ``V4L2_CTRL_CLASS_MPEG``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334)       - 0x990000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335)       - The class containing MPEG compression controls. These controls are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 	described in :ref:`mpeg-controls`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337)     * - ``V4L2_CTRL_CLASS_CAMERA``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338)       - 0x9a0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339)       - The class containing camera controls. These controls are described
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) 	in :ref:`camera-controls`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341)     * - ``V4L2_CTRL_CLASS_FM_TX``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342)       - 0x9b0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343)       - The class containing FM Transmitter (FM TX) controls. These
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) 	controls are described in :ref:`fm-tx-controls`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345)     * - ``V4L2_CTRL_CLASS_FLASH``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346)       - 0x9c0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347)       - The class containing flash device controls. These controls are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) 	described in :ref:`flash-controls`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349)     * - ``V4L2_CTRL_CLASS_JPEG``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350)       - 0x9d0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351)       - The class containing JPEG compression controls. These controls are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) 	described in :ref:`jpeg-controls`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353)     * - ``V4L2_CTRL_CLASS_IMAGE_SOURCE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354)       - 0x9e0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355)       - The class containing image source controls. These controls are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) 	described in :ref:`image-source-controls`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357)     * - ``V4L2_CTRL_CLASS_IMAGE_PROC``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358)       - 0x9f0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359)       - The class containing image processing controls. These controls are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) 	described in :ref:`image-process-controls`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361)     * - ``V4L2_CTRL_CLASS_FM_RX``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362)       - 0xa10000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363)       - The class containing FM Receiver (FM RX) controls. These controls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) 	are described in :ref:`fm-rx-controls`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365)     * - ``V4L2_CTRL_CLASS_RF_TUNER``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366)       - 0xa20000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367)       - The class containing RF tuner controls. These controls are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) 	described in :ref:`rf-tuner-controls`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369)     * - ``V4L2_CTRL_CLASS_COLORIMETRY``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370)       - 0xa50000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371)       - The class containing colorimetry controls. These controls are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372)         described in :ref:`colorimetry-controls`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) EINVAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382)     The struct :c:type:`v4l2_ext_control` ``id`` is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383)     invalid, or the struct :c:type:`v4l2_ext_controls`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384)     ``which`` is invalid, or the struct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385)     :c:type:`v4l2_ext_control` ``value`` was
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386)     inappropriate (e.g. the given menu index is not supported by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387)     driver), or the ``which`` field was set to ``V4L2_CTRL_WHICH_REQUEST_VAL``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388)     but the given ``request_fd`` was invalid or ``V4L2_CTRL_WHICH_REQUEST_VAL``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389)     is not supported by the kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390)     This error code is also returned by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391)     :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctls if two or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392)     more control values are in conflict.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) ERANGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395)     The struct :c:type:`v4l2_ext_control` ``value``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396)     is out of bounds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) EBUSY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399)     The control is temporarily not changeable, possibly because another
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400)     applications took over control of the device function this control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401)     belongs to, or (if the ``which`` field was set to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402)     ``V4L2_CTRL_WHICH_REQUEST_VAL``) the request was queued but not yet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403)     completed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) ENOSPC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406)     The space reserved for the control's payload is insufficient. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407)     field ``size`` is set to a value that is enough to store the payload
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408)     and this error code is returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) EACCES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411)     Attempt to try or set a read-only control, or to get a write-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412)     control, or to get a control from a request that has not yet been
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413)     completed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415)     Or the ``which`` field was set to ``V4L2_CTRL_WHICH_REQUEST_VAL`` but the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416)     device does not support requests.