1059b1c5bSMauro Carvalho Chehab.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2407e84cdSMauro Carvalho Chehab.. c:namespace:: V4L 354f38fcaSMauro Carvalho Chehab 454f38fcaSMauro Carvalho Chehab.. _VIDIOC_ENUM_DV_TIMINGS: 554f38fcaSMauro Carvalho Chehab 654f38fcaSMauro Carvalho Chehab*********************************************************** 754f38fcaSMauro Carvalho Chehabioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS 854f38fcaSMauro Carvalho Chehab*********************************************************** 954f38fcaSMauro Carvalho Chehab 1054f38fcaSMauro Carvalho ChehabName 1154f38fcaSMauro Carvalho Chehab==== 1254f38fcaSMauro Carvalho Chehab 1354f38fcaSMauro Carvalho ChehabVIDIOC_ENUM_DV_TIMINGS - VIDIOC_SUBDEV_ENUM_DV_TIMINGS - Enumerate supported Digital Video timings 1454f38fcaSMauro Carvalho Chehab 1554f38fcaSMauro Carvalho ChehabSynopsis 1654f38fcaSMauro Carvalho Chehab======== 1754f38fcaSMauro Carvalho Chehab 18407e84cdSMauro Carvalho Chehab.. c:macro:: VIDIOC_ENUM_DV_TIMINGS 1954f38fcaSMauro Carvalho Chehab 20407e84cdSMauro Carvalho Chehab``int ioctl(int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)`` 2154f38fcaSMauro Carvalho Chehab 22407e84cdSMauro Carvalho Chehab.. c:macro:: VIDIOC_SUBDEV_ENUM_DV_TIMINGS 23407e84cdSMauro Carvalho Chehab 24407e84cdSMauro Carvalho Chehab``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)`` 2554f38fcaSMauro Carvalho Chehab 2654f38fcaSMauro Carvalho ChehabArguments 2754f38fcaSMauro Carvalho Chehab========= 2854f38fcaSMauro Carvalho Chehab 2954f38fcaSMauro Carvalho Chehab``fd`` 30407e84cdSMauro Carvalho Chehab File descriptor returned by :c:func:`open()`. 3154f38fcaSMauro Carvalho Chehab 3254f38fcaSMauro Carvalho Chehab``argp`` 3354f38fcaSMauro Carvalho Chehab Pointer to struct :c:type:`v4l2_enum_dv_timings`. 3454f38fcaSMauro Carvalho Chehab 3554f38fcaSMauro Carvalho ChehabDescription 3654f38fcaSMauro Carvalho Chehab=========== 3754f38fcaSMauro Carvalho Chehab 3854f38fcaSMauro Carvalho ChehabWhile some DV receivers or transmitters support a wide range of timings, 3954f38fcaSMauro Carvalho Chehabothers support only a limited number of timings. With this ioctl 4054f38fcaSMauro Carvalho Chehabapplications can enumerate a list of known supported timings. Call 4154f38fcaSMauro Carvalho Chehab:ref:`VIDIOC_DV_TIMINGS_CAP` to check if it 4254f38fcaSMauro Carvalho Chehabalso supports other standards or even custom timings that are not in 4354f38fcaSMauro Carvalho Chehabthis list. 4454f38fcaSMauro Carvalho Chehab 4554f38fcaSMauro Carvalho ChehabTo query the available timings, applications initialize the ``index`` 4654f38fcaSMauro Carvalho Chehabfield, set the ``pad`` field to 0, zero the reserved array of struct 4754f38fcaSMauro Carvalho Chehab:c:type:`v4l2_enum_dv_timings` and call the 4854f38fcaSMauro Carvalho Chehab``VIDIOC_ENUM_DV_TIMINGS`` ioctl on a video node with a pointer to this 4954f38fcaSMauro Carvalho Chehabstructure. Drivers fill the rest of the structure or return an ``EINVAL`` 5054f38fcaSMauro Carvalho Chehaberror code when the index is out of bounds. To enumerate all supported 5154f38fcaSMauro Carvalho ChehabDV timings, applications shall begin at index zero, incrementing by one 5254f38fcaSMauro Carvalho Chehabuntil the driver returns ``EINVAL``. 5354f38fcaSMauro Carvalho Chehab 5454f38fcaSMauro Carvalho Chehab.. note:: 5554f38fcaSMauro Carvalho Chehab 5654f38fcaSMauro Carvalho Chehab Drivers may enumerate a different set of DV timings after 5754f38fcaSMauro Carvalho Chehab switching the video input or output. 5854f38fcaSMauro Carvalho Chehab 5954f38fcaSMauro Carvalho ChehabWhen implemented by the driver DV timings of subdevices can be queried 6054f38fcaSMauro Carvalho Chehabby calling the ``VIDIOC_SUBDEV_ENUM_DV_TIMINGS`` ioctl directly on a 6154f38fcaSMauro Carvalho Chehabsubdevice node. The DV timings are specific to inputs (for DV receivers) 6254f38fcaSMauro Carvalho Chehabor outputs (for DV transmitters), applications must specify the desired 6354f38fcaSMauro Carvalho Chehabpad number in the struct 6454f38fcaSMauro Carvalho Chehab:c:type:`v4l2_enum_dv_timings` ``pad`` field. 6554f38fcaSMauro Carvalho ChehabAttempts to enumerate timings on a pad that doesn't support them will 6654f38fcaSMauro Carvalho Chehabreturn an ``EINVAL`` error code. 6754f38fcaSMauro Carvalho Chehab 6854f38fcaSMauro Carvalho Chehab.. c:type:: v4l2_enum_dv_timings 6954f38fcaSMauro Carvalho Chehab 70*fea13a69SMauro Carvalho Chehab.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}| 7154f38fcaSMauro Carvalho Chehab 7254f38fcaSMauro Carvalho Chehab.. flat-table:: struct v4l2_enum_dv_timings 7354f38fcaSMauro Carvalho Chehab :header-rows: 0 7454f38fcaSMauro Carvalho Chehab :stub-columns: 0 7554f38fcaSMauro Carvalho Chehab :widths: 1 1 2 7654f38fcaSMauro Carvalho Chehab 7754f38fcaSMauro Carvalho Chehab * - __u32 7854f38fcaSMauro Carvalho Chehab - ``index`` 7954f38fcaSMauro Carvalho Chehab - Number of the DV timings, set by the application. 8054f38fcaSMauro Carvalho Chehab * - __u32 8154f38fcaSMauro Carvalho Chehab - ``pad`` 8254f38fcaSMauro Carvalho Chehab - Pad number as reported by the media controller API. This field is 8354f38fcaSMauro Carvalho Chehab only used when operating on a subdevice node. When operating on a 8454f38fcaSMauro Carvalho Chehab video node applications must set this field to zero. 8554f38fcaSMauro Carvalho Chehab * - __u32 8654f38fcaSMauro Carvalho Chehab - ``reserved``\ [2] 8754f38fcaSMauro Carvalho Chehab - Reserved for future extensions. Drivers and applications must set 8854f38fcaSMauro Carvalho Chehab the array to zero. 8954f38fcaSMauro Carvalho Chehab * - struct :c:type:`v4l2_dv_timings` 9054f38fcaSMauro Carvalho Chehab - ``timings`` 9154f38fcaSMauro Carvalho Chehab - The timings. 9254f38fcaSMauro Carvalho Chehab 9354f38fcaSMauro Carvalho ChehabReturn Value 9454f38fcaSMauro Carvalho Chehab============ 9554f38fcaSMauro Carvalho Chehab 9654f38fcaSMauro Carvalho ChehabOn success 0 is returned, on error -1 and the ``errno`` variable is set 9754f38fcaSMauro Carvalho Chehabappropriately. The generic error codes are described at the 9854f38fcaSMauro Carvalho Chehab:ref:`Generic Error Codes <gen-errors>` chapter. 9954f38fcaSMauro Carvalho Chehab 10054f38fcaSMauro Carvalho ChehabEINVAL 10154f38fcaSMauro Carvalho Chehab The struct :c:type:`v4l2_enum_dv_timings` 10254f38fcaSMauro Carvalho Chehab ``index`` is out of bounds or the ``pad`` number is invalid. 10354f38fcaSMauro Carvalho Chehab 10454f38fcaSMauro Carvalho ChehabENODATA 10554f38fcaSMauro Carvalho Chehab Digital video presets are not supported for this input or output. 106