18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 28c2ecf20Sopenharmony_ci.. c:namespace:: V4L 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci.. _VIDIOC_ENUM_DV_TIMINGS: 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci*********************************************************** 78c2ecf20Sopenharmony_ciioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS 88c2ecf20Sopenharmony_ci*********************************************************** 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciName 118c2ecf20Sopenharmony_ci==== 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciVIDIOC_ENUM_DV_TIMINGS - VIDIOC_SUBDEV_ENUM_DV_TIMINGS - Enumerate supported Digital Video timings 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciSynopsis 168c2ecf20Sopenharmony_ci======== 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci.. c:macro:: VIDIOC_ENUM_DV_TIMINGS 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci``int ioctl(int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)`` 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci.. c:macro:: VIDIOC_SUBDEV_ENUM_DV_TIMINGS 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)`` 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciArguments 278c2ecf20Sopenharmony_ci========= 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci``fd`` 308c2ecf20Sopenharmony_ci File descriptor returned by :c:func:`open()`. 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci``argp`` 338c2ecf20Sopenharmony_ci Pointer to struct :c:type:`v4l2_enum_dv_timings`. 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciDescription 368c2ecf20Sopenharmony_ci=========== 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciWhile some DV receivers or transmitters support a wide range of timings, 398c2ecf20Sopenharmony_ciothers support only a limited number of timings. With this ioctl 408c2ecf20Sopenharmony_ciapplications can enumerate a list of known supported timings. Call 418c2ecf20Sopenharmony_ci:ref:`VIDIOC_DV_TIMINGS_CAP` to check if it 428c2ecf20Sopenharmony_cialso supports other standards or even custom timings that are not in 438c2ecf20Sopenharmony_cithis list. 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciTo query the available timings, applications initialize the ``index`` 468c2ecf20Sopenharmony_cifield, set the ``pad`` field to 0, zero the reserved array of struct 478c2ecf20Sopenharmony_ci:c:type:`v4l2_enum_dv_timings` and call the 488c2ecf20Sopenharmony_ci``VIDIOC_ENUM_DV_TIMINGS`` ioctl on a video node with a pointer to this 498c2ecf20Sopenharmony_cistructure. Drivers fill the rest of the structure or return an ``EINVAL`` 508c2ecf20Sopenharmony_cierror code when the index is out of bounds. To enumerate all supported 518c2ecf20Sopenharmony_ciDV timings, applications shall begin at index zero, incrementing by one 528c2ecf20Sopenharmony_ciuntil the driver returns ``EINVAL``. 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci.. note:: 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci Drivers may enumerate a different set of DV timings after 578c2ecf20Sopenharmony_ci switching the video input or output. 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ciWhen implemented by the driver DV timings of subdevices can be queried 608c2ecf20Sopenharmony_ciby calling the ``VIDIOC_SUBDEV_ENUM_DV_TIMINGS`` ioctl directly on a 618c2ecf20Sopenharmony_cisubdevice node. The DV timings are specific to inputs (for DV receivers) 628c2ecf20Sopenharmony_cior outputs (for DV transmitters), applications must specify the desired 638c2ecf20Sopenharmony_cipad number in the struct 648c2ecf20Sopenharmony_ci:c:type:`v4l2_enum_dv_timings` ``pad`` field. 658c2ecf20Sopenharmony_ciAttempts to enumerate timings on a pad that doesn't support them will 668c2ecf20Sopenharmony_cireturn an ``EINVAL`` error code. 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci.. c:type:: v4l2_enum_dv_timings 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci.. flat-table:: struct v4l2_enum_dv_timings 738c2ecf20Sopenharmony_ci :header-rows: 0 748c2ecf20Sopenharmony_ci :stub-columns: 0 758c2ecf20Sopenharmony_ci :widths: 1 1 2 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci * - __u32 788c2ecf20Sopenharmony_ci - ``index`` 798c2ecf20Sopenharmony_ci - Number of the DV timings, set by the application. 808c2ecf20Sopenharmony_ci * - __u32 818c2ecf20Sopenharmony_ci - ``pad`` 828c2ecf20Sopenharmony_ci - Pad number as reported by the media controller API. This field is 838c2ecf20Sopenharmony_ci only used when operating on a subdevice node. When operating on a 848c2ecf20Sopenharmony_ci video node applications must set this field to zero. 858c2ecf20Sopenharmony_ci * - __u32 868c2ecf20Sopenharmony_ci - ``reserved``\ [2] 878c2ecf20Sopenharmony_ci - Reserved for future extensions. Drivers and applications must set 888c2ecf20Sopenharmony_ci the array to zero. 898c2ecf20Sopenharmony_ci * - struct :c:type:`v4l2_dv_timings` 908c2ecf20Sopenharmony_ci - ``timings`` 918c2ecf20Sopenharmony_ci - The timings. 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ciReturn Value 948c2ecf20Sopenharmony_ci============ 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ciOn success 0 is returned, on error -1 and the ``errno`` variable is set 978c2ecf20Sopenharmony_ciappropriately. The generic error codes are described at the 988c2ecf20Sopenharmony_ci:ref:`Generic Error Codes <gen-errors>` chapter. 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ciEINVAL 1018c2ecf20Sopenharmony_ci The struct :c:type:`v4l2_enum_dv_timings` 1028c2ecf20Sopenharmony_ci ``index`` is out of bounds or the ``pad`` number is invalid. 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ciENODATA 1058c2ecf20Sopenharmony_ci Digital video presets are not supported for this input or output. 106