162306a36Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 262306a36Sopenharmony_ci.. c:namespace:: V4L 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci.. _VIDIOC_ENUMOUTPUT: 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci*********************** 762306a36Sopenharmony_ciioctl VIDIOC_ENUMOUTPUT 862306a36Sopenharmony_ci*********************** 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ciName 1162306a36Sopenharmony_ci==== 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ciVIDIOC_ENUMOUTPUT - Enumerate video outputs 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciSynopsis 1662306a36Sopenharmony_ci======== 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci.. c:macro:: VIDIOC_ENUMOUTPUT 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci``int ioctl(int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp)`` 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ciArguments 2362306a36Sopenharmony_ci========= 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci``fd`` 2662306a36Sopenharmony_ci File descriptor returned by :c:func:`open()`. 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci``argp`` 2962306a36Sopenharmony_ci Pointer to struct :c:type:`v4l2_output`. 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciDescription 3262306a36Sopenharmony_ci=========== 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ciTo query the attributes of a video outputs applications initialize the 3562306a36Sopenharmony_ci``index`` field of struct :c:type:`v4l2_output` and call 3662306a36Sopenharmony_cithe :ref:`VIDIOC_ENUMOUTPUT` with a pointer to this structure. 3762306a36Sopenharmony_ciDrivers fill the rest of the structure or return an ``EINVAL`` error code 3862306a36Sopenharmony_ciwhen the index is out of bounds. To enumerate all outputs applications 3962306a36Sopenharmony_cishall begin at index zero, incrementing by one until the driver returns 4062306a36Sopenharmony_ci``EINVAL``. 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}| 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci.. c:type:: v4l2_output 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci.. flat-table:: struct v4l2_output 4762306a36Sopenharmony_ci :header-rows: 0 4862306a36Sopenharmony_ci :stub-columns: 0 4962306a36Sopenharmony_ci :widths: 1 1 2 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci * - __u32 5262306a36Sopenharmony_ci - ``index`` 5362306a36Sopenharmony_ci - Identifies the output, set by the application. 5462306a36Sopenharmony_ci * - __u8 5562306a36Sopenharmony_ci - ``name``\ [32] 5662306a36Sopenharmony_ci - Name of the video output, a NUL-terminated ASCII string, for 5762306a36Sopenharmony_ci example: "Vout". This information is intended for the user, 5862306a36Sopenharmony_ci preferably the connector label on the device itself. 5962306a36Sopenharmony_ci * - __u32 6062306a36Sopenharmony_ci - ``type`` 6162306a36Sopenharmony_ci - Type of the output, see :ref:`output-type`. 6262306a36Sopenharmony_ci * - __u32 6362306a36Sopenharmony_ci - ``audioset`` 6462306a36Sopenharmony_ci - Drivers can enumerate up to 32 video and audio outputs. This field 6562306a36Sopenharmony_ci shows which audio outputs were selectable as the current output if 6662306a36Sopenharmony_ci this was the currently selected video output. It is a bit mask. 6762306a36Sopenharmony_ci The LSB corresponds to audio output 0, the MSB to output 31. Any 6862306a36Sopenharmony_ci number of bits can be set, or none. 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci When the driver does not enumerate audio outputs no bits must be 7162306a36Sopenharmony_ci set. Applications shall not interpret this as lack of audio 7262306a36Sopenharmony_ci support. Drivers may automatically select audio outputs without 7362306a36Sopenharmony_ci enumerating them. 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci For details on audio outputs and how to select the current output 7662306a36Sopenharmony_ci see :ref:`audio`. 7762306a36Sopenharmony_ci * - __u32 7862306a36Sopenharmony_ci - ``modulator`` 7962306a36Sopenharmony_ci - Output devices can have zero or more RF modulators. When the 8062306a36Sopenharmony_ci ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector 8162306a36Sopenharmony_ci and this field identifies the modulator. It corresponds to struct 8262306a36Sopenharmony_ci :c:type:`v4l2_modulator` field ``index``. For 8362306a36Sopenharmony_ci details on modulators see :ref:`tuner`. 8462306a36Sopenharmony_ci * - :ref:`v4l2_std_id <v4l2-std-id>` 8562306a36Sopenharmony_ci - ``std`` 8662306a36Sopenharmony_ci - Every video output supports one or more different video standards. 8762306a36Sopenharmony_ci This field is a set of all supported standards. For details on 8862306a36Sopenharmony_ci video standards and how to switch see :ref:`standard`. 8962306a36Sopenharmony_ci * - __u32 9062306a36Sopenharmony_ci - ``capabilities`` 9162306a36Sopenharmony_ci - This field provides capabilities for the output. See 9262306a36Sopenharmony_ci :ref:`output-capabilities` for flags. 9362306a36Sopenharmony_ci * - __u32 9462306a36Sopenharmony_ci - ``reserved``\ [3] 9562306a36Sopenharmony_ci - Reserved for future extensions. Drivers must set the array to 9662306a36Sopenharmony_ci zero. 9762306a36Sopenharmony_ci 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci.. tabularcolumns:: |p{7.5cm}|p{0.6cm}|p{9.2cm}| 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ci.. _output-type: 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ci.. flat-table:: Output Type 10462306a36Sopenharmony_ci :header-rows: 0 10562306a36Sopenharmony_ci :stub-columns: 0 10662306a36Sopenharmony_ci :widths: 3 1 4 10762306a36Sopenharmony_ci 10862306a36Sopenharmony_ci * - ``V4L2_OUTPUT_TYPE_MODULATOR`` 10962306a36Sopenharmony_ci - 1 11062306a36Sopenharmony_ci - This output is an analog TV modulator. 11162306a36Sopenharmony_ci * - ``V4L2_OUTPUT_TYPE_ANALOG`` 11262306a36Sopenharmony_ci - 2 11362306a36Sopenharmony_ci - Any non-modulator video output, for example Composite Video, 11462306a36Sopenharmony_ci S-Video, HDMI. The naming as ``_TYPE_ANALOG`` is historical, 11562306a36Sopenharmony_ci today we would have called it ``_TYPE_VIDEO``. 11662306a36Sopenharmony_ci * - ``V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY`` 11762306a36Sopenharmony_ci - 3 11862306a36Sopenharmony_ci - The video output will be copied to a :ref:`video overlay <overlay>`. 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ci.. tabularcolumns:: |p{6.4cm}|p{2.4cm}|p{8.5cm}| 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci.. _output-capabilities: 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_ci.. flat-table:: Output capabilities 12662306a36Sopenharmony_ci :header-rows: 0 12762306a36Sopenharmony_ci :stub-columns: 0 12862306a36Sopenharmony_ci :widths: 3 1 4 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci * - ``V4L2_OUT_CAP_DV_TIMINGS`` 13162306a36Sopenharmony_ci - 0x00000002 13262306a36Sopenharmony_ci - This output supports setting video timings by using 13362306a36Sopenharmony_ci ``VIDIOC_S_DV_TIMINGS``. 13462306a36Sopenharmony_ci * - ``V4L2_OUT_CAP_STD`` 13562306a36Sopenharmony_ci - 0x00000004 13662306a36Sopenharmony_ci - This output supports setting the TV standard by using 13762306a36Sopenharmony_ci ``VIDIOC_S_STD``. 13862306a36Sopenharmony_ci * - ``V4L2_OUT_CAP_NATIVE_SIZE`` 13962306a36Sopenharmony_ci - 0x00000008 14062306a36Sopenharmony_ci - This output supports setting the native size using the 14162306a36Sopenharmony_ci ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see 14262306a36Sopenharmony_ci :ref:`v4l2-selections-common`. 14362306a36Sopenharmony_ci 14462306a36Sopenharmony_ciReturn Value 14562306a36Sopenharmony_ci============ 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ciOn success 0 is returned, on error -1 and the ``errno`` variable is set 14862306a36Sopenharmony_ciappropriately. The generic error codes are described at the 14962306a36Sopenharmony_ci:ref:`Generic Error Codes <gen-errors>` chapter. 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ciEINVAL 15262306a36Sopenharmony_ci The struct :c:type:`v4l2_output` ``index`` is out of 15362306a36Sopenharmony_ci bounds. 154