^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_ENUMINPUT:
^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_ENUMINPUT
^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_ENUMINPUT - Enumerate video inputs
^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_ENUMINPUT
^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_ENUMINPUT, struct v4l2_input *argp)``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) Arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) =========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) ``fd``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) File descriptor returned by :c:func:`open()`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) ``argp``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) Pointer to struct :c:type:`v4l2_input`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) To query the attributes of a video input applications initialize the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) ``index`` field of struct :c:type:`v4l2_input` and call the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) :ref:`VIDIOC_ENUMINPUT` with a pointer to this structure. Drivers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) fill the rest of the structure or return an ``EINVAL`` error code when the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) index is out of bounds. To enumerate all inputs applications shall begin
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) at index zero, incrementing by one until the driver returns ``EINVAL``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) .. c:type:: v4l2_input
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) .. flat-table:: struct v4l2_input
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) :widths: 1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) - ``index``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) - Identifies the input, set by the application.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) * - __u8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) - ``name``\ [32]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) - Name of the video input, a NUL-terminated ASCII string, for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) example: "Vin (Composite 2)". This information is intended for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) user, preferably the connector label on the device itself.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) - ``type``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) - Type of the input, see :ref:`input-type`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) - ``audioset``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) - Drivers can enumerate up to 32 video and audio inputs. This field
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) shows which audio inputs were selectable as audio source if this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) was the currently selected video input. It is a bit mask. The LSB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) corresponds to audio input 0, the MSB to input 31. Any number of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) bits can be set, or none.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) When the driver does not enumerate audio inputs no bits must be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) set. Applications shall not interpret this as lack of audio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) support. Some drivers automatically select audio sources and do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) not enumerate them since there is no choice anyway.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) For details on audio inputs and how to select the current input
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) see :ref:`audio`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) - ``tuner``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) - Capture devices can have zero or more tuners (RF demodulators).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) When the ``type`` is set to ``V4L2_INPUT_TYPE_TUNER`` this is an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) RF connector and this field identifies the tuner. It corresponds
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) to struct :c:type:`v4l2_tuner` field ``index``. For
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) details on tuners see :ref:`tuner`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) * - :ref:`v4l2_std_id <v4l2-std-id>`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) - ``std``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) - Every video input supports one or more different video standards.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) This field is a set of all supported standards. For details on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) video standards and how to switch see :ref:`standard`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) - ``status``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) - This field provides status information about the input. See
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) :ref:`input-status` for flags. With the exception of the sensor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) orientation bits ``status`` is only valid when this is the current
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) input.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) - ``capabilities``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) - This field provides capabilities for the input. See
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) :ref:`input-capabilities` for flags.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) * - __u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) - ``reserved``\ [3]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) - Reserved for future extensions. Drivers must set the array to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) .. _input-type:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) .. flat-table:: Input Types
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) :widths: 3 1 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) * - ``V4L2_INPUT_TYPE_TUNER``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) - This input uses a tuner (RF demodulator).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) * - ``V4L2_INPUT_TYPE_CAMERA``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) - 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) - Any non-tuner video input, for example Composite Video,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) S-Video, HDMI, camera sensor. The naming as ``_TYPE_CAMERA`` is historical,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) today we would have called it ``_TYPE_VIDEO``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) * - ``V4L2_INPUT_TYPE_TOUCH``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) - 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) - This input is a touch device for capturing raw touch data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) .. tabularcolumns:: |p{4.8cm}|p{2.6cm}|p{10.1cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) .. _input-status:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) .. flat-table:: Input Status Flags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) * - :cspan:`2` General
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) * - ``V4L2_IN_ST_NO_POWER``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) - 0x00000001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) - Attached device is off.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) * - ``V4L2_IN_ST_NO_SIGNAL``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) - 0x00000002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) * - ``V4L2_IN_ST_NO_COLOR``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) - 0x00000004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) - The hardware supports color decoding, but does not detect color
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) modulation in the signal.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) * - :cspan:`2` Sensor Orientation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) * - ``V4L2_IN_ST_HFLIP``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) - 0x00000010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) - The input is connected to a device that produces a signal that is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) flipped horizontally and does not correct this before passing the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) signal to userspace.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) * - ``V4L2_IN_ST_VFLIP``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) - 0x00000020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) - The input is connected to a device that produces a signal that is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) flipped vertically and does not correct this before passing the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) signal to userspace.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) .. note:: A 180 degree rotation is the same as HFLIP | VFLIP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) * - :cspan:`2` Analog Video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) * - ``V4L2_IN_ST_NO_H_LOCK``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) - 0x00000100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) - No horizontal sync lock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) * - ``V4L2_IN_ST_COLOR_KILL``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) - 0x00000200
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) - A color killer circuit automatically disables color decoding when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) it detects no color modulation. When this flag is set the color
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) killer is enabled *and* has shut off color decoding.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) * - ``V4L2_IN_ST_NO_V_LOCK``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) - 0x00000400
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) - No vertical sync lock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) * - ``V4L2_IN_ST_NO_STD_LOCK``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) - 0x00000800
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) - No standard format lock in case of auto-detection format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) by the component.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) * - :cspan:`2` Digital Video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) * - ``V4L2_IN_ST_NO_SYNC``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) - 0x00010000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) - No synchronization lock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) * - ``V4L2_IN_ST_NO_EQU``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) - 0x00020000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) - No equalizer lock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) * - ``V4L2_IN_ST_NO_CARRIER``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) - 0x00040000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) - Carrier recovery failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) * - :cspan:`2` VCR and Set-Top Box
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) * - ``V4L2_IN_ST_MACROVISION``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) - 0x01000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) - Macrovision is an analog copy prevention system mangling the video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) signal to confuse video recorders. When this flag is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) Macrovision has been detected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) * - ``V4L2_IN_ST_NO_ACCESS``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) - 0x02000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) - Conditional access denied.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) * - ``V4L2_IN_ST_VTR``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) - 0x04000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) - VTR time constant. [?]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) .. _input-capabilities:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) .. flat-table:: Input capabilities
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) :header-rows: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) :widths: 3 1 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) * - ``V4L2_IN_CAP_DV_TIMINGS``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) - 0x00000002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) - This input supports setting video timings by using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) ``VIDIOC_S_DV_TIMINGS``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) * - ``V4L2_IN_CAP_STD``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) - 0x00000004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) - This input supports setting the TV standard by using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) ``VIDIOC_S_STD``.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) * - ``V4L2_IN_CAP_NATIVE_SIZE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) - 0x00000008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) - This input supports setting the native size using the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) :ref:`v4l2-selections-common`.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) Return Value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) On success 0 is returned, on error -1 and the ``errno`` variable is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) appropriately. The generic error codes are described at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) :ref:`Generic Error Codes <gen-errors>` chapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) EINVAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) The struct :c:type:`v4l2_input` ``index`` is out of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) bounds.