1.. Permission is granted to copy, distribute and/or modify this 2.. document under the terms of the GNU Free Documentation License, 3.. Version 1.1 or any later version published by the Free Software 4.. Foundation, with no Invariant Sections, no Front-Cover Texts 5.. and no Back-Cover Texts. A copy of the license is included at 6.. Documentation/userspace-api/media/fdl-appendix.rst. 7.. 8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections 9 10.. _VIDIOC_ENUMOUTPUT: 11 12*********************** 13ioctl VIDIOC_ENUMOUTPUT 14*********************** 15 16Name 17==== 18 19VIDIOC_ENUMOUTPUT - Enumerate video outputs 20 21 22Synopsis 23======== 24 25.. c:function:: int ioctl( int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp ) 26 :name: VIDIOC_ENUMOUTPUT 27 28 29Arguments 30========= 31 32``fd`` 33 File descriptor returned by :ref:`open() <func-open>`. 34 35``argp`` 36 Pointer to struct :c:type:`v4l2_output`. 37 38 39Description 40=========== 41 42To query the attributes of a video outputs applications initialize the 43``index`` field of struct :c:type:`v4l2_output` and call 44the :ref:`VIDIOC_ENUMOUTPUT` with a pointer to this structure. 45Drivers fill the rest of the structure or return an ``EINVAL`` error code 46when the index is out of bounds. To enumerate all outputs applications 47shall begin at index zero, incrementing by one until the driver returns 48``EINVAL``. 49 50 51.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 52 53.. c:type:: v4l2_output 54 55.. flat-table:: struct v4l2_output 56 :header-rows: 0 57 :stub-columns: 0 58 :widths: 1 1 2 59 60 * - __u32 61 - ``index`` 62 - Identifies the output, set by the application. 63 * - __u8 64 - ``name``\ [32] 65 - Name of the video output, a NUL-terminated ASCII string, for 66 example: "Vout". This information is intended for the user, 67 preferably the connector label on the device itself. 68 * - __u32 69 - ``type`` 70 - Type of the output, see :ref:`output-type`. 71 * - __u32 72 - ``audioset`` 73 - Drivers can enumerate up to 32 video and audio outputs. This field 74 shows which audio outputs were selectable as the current output if 75 this was the currently selected video output. It is a bit mask. 76 The LSB corresponds to audio output 0, the MSB to output 31. Any 77 number of bits can be set, or none. 78 79 When the driver does not enumerate audio outputs no bits must be 80 set. Applications shall not interpret this as lack of audio 81 support. Drivers may automatically select audio outputs without 82 enumerating them. 83 84 For details on audio outputs and how to select the current output 85 see :ref:`audio`. 86 * - __u32 87 - ``modulator`` 88 - Output devices can have zero or more RF modulators. When the 89 ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector 90 and this field identifies the modulator. It corresponds to struct 91 :c:type:`v4l2_modulator` field ``index``. For 92 details on modulators see :ref:`tuner`. 93 * - :ref:`v4l2_std_id <v4l2-std-id>` 94 - ``std`` 95 - Every video output supports one or more different video standards. 96 This field is a set of all supported standards. For details on 97 video standards and how to switch see :ref:`standard`. 98 * - __u32 99 - ``capabilities`` 100 - This field provides capabilities for the output. See 101 :ref:`output-capabilities` for flags. 102 * - __u32 103 - ``reserved``\ [3] 104 - Reserved for future extensions. Drivers must set the array to 105 zero. 106 107 108 109.. tabularcolumns:: |p{7.0cm}|p{1.8cm}|p{8.7cm}| 110 111.. _output-type: 112 113.. flat-table:: Output Type 114 :header-rows: 0 115 :stub-columns: 0 116 :widths: 3 1 4 117 118 * - ``V4L2_OUTPUT_TYPE_MODULATOR`` 119 - 1 120 - This output is an analog TV modulator. 121 * - ``V4L2_OUTPUT_TYPE_ANALOG`` 122 - 2 123 - Any non-modulator video output, for example Composite Video, 124 S-Video, HDMI. The naming as ``_TYPE_ANALOG`` is historical, 125 today we would have called it ``_TYPE_VIDEO``. 126 * - ``V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY`` 127 - 3 128 - The video output will be copied to a :ref:`video overlay <overlay>`. 129 130 131 132.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 133 134.. _output-capabilities: 135 136.. flat-table:: Output capabilities 137 :header-rows: 0 138 :stub-columns: 0 139 :widths: 3 1 4 140 141 * - ``V4L2_OUT_CAP_DV_TIMINGS`` 142 - 0x00000002 143 - This output supports setting video timings by using 144 ``VIDIOC_S_DV_TIMINGS``. 145 * - ``V4L2_OUT_CAP_STD`` 146 - 0x00000004 147 - This output supports setting the TV standard by using 148 ``VIDIOC_S_STD``. 149 * - ``V4L2_OUT_CAP_NATIVE_SIZE`` 150 - 0x00000008 151 - This output supports setting the native size using the 152 ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see 153 :ref:`v4l2-selections-common`. 154 155 156Return Value 157============ 158 159On success 0 is returned, on error -1 and the ``errno`` variable is set 160appropriately. The generic error codes are described at the 161:ref:`Generic Error Codes <gen-errors>` chapter. 162 163EINVAL 164 The struct :c:type:`v4l2_output` ``index`` is out of 165 bounds. 166