18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci.. c:namespace:: V4L
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci.. _VIDIOC_DV_TIMINGS_CAP:
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci*********************************************************
78c2ecf20Sopenharmony_ciioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP
88c2ecf20Sopenharmony_ci*********************************************************
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciName
118c2ecf20Sopenharmony_ci====
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciVIDIOC_DV_TIMINGS_CAP - VIDIOC_SUBDEV_DV_TIMINGS_CAP - The capabilities of the Digital Video receiver/transmitter
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciSynopsis
168c2ecf20Sopenharmony_ci========
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci.. c:macro:: VIDIOC_DV_TIMINGS_CAP
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci``int ioctl(int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp)``
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci.. c:macro:: VIDIOC_SUBDEV_DV_TIMINGS_CAP
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci``int ioctl(int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *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_dv_timings_cap`.
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciDescription
368c2ecf20Sopenharmony_ci===========
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciTo query the capabilities of the DV receiver/transmitter applications
398c2ecf20Sopenharmony_ciinitialize the ``pad`` field to 0, zero the reserved array of struct
408c2ecf20Sopenharmony_ci:c:type:`v4l2_dv_timings_cap` and call the
418c2ecf20Sopenharmony_ci``VIDIOC_DV_TIMINGS_CAP`` ioctl on a video node and the driver will fill
428c2ecf20Sopenharmony_ciin the structure.
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci.. note::
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci   Drivers may return different values after
478c2ecf20Sopenharmony_ci   switching the video input or output.
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ciWhen implemented by the driver DV capabilities of subdevices can be
508c2ecf20Sopenharmony_ciqueried by calling the ``VIDIOC_SUBDEV_DV_TIMINGS_CAP`` ioctl directly
518c2ecf20Sopenharmony_cion a subdevice node. The capabilities are specific to inputs (for DV
528c2ecf20Sopenharmony_cireceivers) or outputs (for DV transmitters), applications must specify
538c2ecf20Sopenharmony_cithe desired pad number in the struct
548c2ecf20Sopenharmony_ci:c:type:`v4l2_dv_timings_cap` ``pad`` field and
558c2ecf20Sopenharmony_cizero the ``reserved`` array. Attempts to query capabilities on a pad
568c2ecf20Sopenharmony_cithat doesn't support them will return an ``EINVAL`` error code.
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci.. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}|
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci.. c:type:: v4l2_bt_timings_cap
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci.. flat-table:: struct v4l2_bt_timings_cap
638c2ecf20Sopenharmony_ci    :header-rows:  0
648c2ecf20Sopenharmony_ci    :stub-columns: 0
658c2ecf20Sopenharmony_ci    :widths:       1 1 2
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci    * - __u32
688c2ecf20Sopenharmony_ci      - ``min_width``
698c2ecf20Sopenharmony_ci      - Minimum width of the active video in pixels.
708c2ecf20Sopenharmony_ci    * - __u32
718c2ecf20Sopenharmony_ci      - ``max_width``
728c2ecf20Sopenharmony_ci      - Maximum width of the active video in pixels.
738c2ecf20Sopenharmony_ci    * - __u32
748c2ecf20Sopenharmony_ci      - ``min_height``
758c2ecf20Sopenharmony_ci      - Minimum height of the active video in lines.
768c2ecf20Sopenharmony_ci    * - __u32
778c2ecf20Sopenharmony_ci      - ``max_height``
788c2ecf20Sopenharmony_ci      - Maximum height of the active video in lines.
798c2ecf20Sopenharmony_ci    * - __u64
808c2ecf20Sopenharmony_ci      - ``min_pixelclock``
818c2ecf20Sopenharmony_ci      - Minimum pixelclock frequency in Hz.
828c2ecf20Sopenharmony_ci    * - __u64
838c2ecf20Sopenharmony_ci      - ``max_pixelclock``
848c2ecf20Sopenharmony_ci      - Maximum pixelclock frequency in Hz.
858c2ecf20Sopenharmony_ci    * - __u32
868c2ecf20Sopenharmony_ci      - ``standards``
878c2ecf20Sopenharmony_ci      - The video standard(s) supported by the hardware. See
888c2ecf20Sopenharmony_ci	:ref:`dv-bt-standards` for a list of standards.
898c2ecf20Sopenharmony_ci    * - __u32
908c2ecf20Sopenharmony_ci      - ``capabilities``
918c2ecf20Sopenharmony_ci      - Several flags giving more information about the capabilities. See
928c2ecf20Sopenharmony_ci	:ref:`dv-bt-cap-capabilities` for a description of the flags.
938c2ecf20Sopenharmony_ci    * - __u32
948c2ecf20Sopenharmony_ci      - ``reserved``\ [16]
958c2ecf20Sopenharmony_ci      - Reserved for future extensions.
968c2ecf20Sopenharmony_ci	Drivers must set the array to zero.
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci.. tabularcolumns:: |p{1.0cm}|p{4.0cm}|p{3.5cm}|p{9.2cm}|
1008c2ecf20Sopenharmony_ci
1018c2ecf20Sopenharmony_ci.. c:type:: v4l2_dv_timings_cap
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci.. flat-table:: struct v4l2_dv_timings_cap
1048c2ecf20Sopenharmony_ci    :header-rows:  0
1058c2ecf20Sopenharmony_ci    :stub-columns: 0
1068c2ecf20Sopenharmony_ci    :widths:       1 1 2
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci    * - __u32
1098c2ecf20Sopenharmony_ci      - ``type``
1108c2ecf20Sopenharmony_ci      - Type of DV timings as listed in :ref:`dv-timing-types`.
1118c2ecf20Sopenharmony_ci    * - __u32
1128c2ecf20Sopenharmony_ci      - ``pad``
1138c2ecf20Sopenharmony_ci      - Pad number as reported by the media controller API. This field is
1148c2ecf20Sopenharmony_ci	only used when operating on a subdevice node. When operating on a
1158c2ecf20Sopenharmony_ci	video node applications must set this field to zero.
1168c2ecf20Sopenharmony_ci    * - __u32
1178c2ecf20Sopenharmony_ci      - ``reserved``\ [2]
1188c2ecf20Sopenharmony_ci      - Reserved for future extensions.
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ci	Drivers and applications must set the array to zero.
1218c2ecf20Sopenharmony_ci    * - union {
1228c2ecf20Sopenharmony_ci      - (anonymous)
1238c2ecf20Sopenharmony_ci    * - struct :c:type:`v4l2_bt_timings_cap`
1248c2ecf20Sopenharmony_ci      - ``bt``
1258c2ecf20Sopenharmony_ci      - BT.656/1120 timings capabilities of the hardware.
1268c2ecf20Sopenharmony_ci    * - __u32
1278c2ecf20Sopenharmony_ci      - ``raw_data``\ [32]
1288c2ecf20Sopenharmony_ci    * - }
1298c2ecf20Sopenharmony_ci      -
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ci.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|
1328c2ecf20Sopenharmony_ci
1338c2ecf20Sopenharmony_ci.. _dv-bt-cap-capabilities:
1348c2ecf20Sopenharmony_ci
1358c2ecf20Sopenharmony_ci.. flat-table:: DV BT Timing capabilities
1368c2ecf20Sopenharmony_ci    :header-rows:  0
1378c2ecf20Sopenharmony_ci    :stub-columns: 0
1388c2ecf20Sopenharmony_ci
1398c2ecf20Sopenharmony_ci    * - Flag
1408c2ecf20Sopenharmony_ci      - Description
1418c2ecf20Sopenharmony_ci    * -
1428c2ecf20Sopenharmony_ci      -
1438c2ecf20Sopenharmony_ci    * - ``V4L2_DV_BT_CAP_INTERLACED``
1448c2ecf20Sopenharmony_ci      - Interlaced formats are supported.
1458c2ecf20Sopenharmony_ci    * - ``V4L2_DV_BT_CAP_PROGRESSIVE``
1468c2ecf20Sopenharmony_ci      - Progressive formats are supported.
1478c2ecf20Sopenharmony_ci    * - ``V4L2_DV_BT_CAP_REDUCED_BLANKING``
1488c2ecf20Sopenharmony_ci      - CVT/GTF specific: the timings can make use of reduced blanking
1498c2ecf20Sopenharmony_ci	(CVT) or the 'Secondary GTF' curve (GTF).
1508c2ecf20Sopenharmony_ci    * - ``V4L2_DV_BT_CAP_CUSTOM``
1518c2ecf20Sopenharmony_ci      - Can support non-standard timings, i.e. timings not belonging to
1528c2ecf20Sopenharmony_ci	the standards set in the ``standards`` field.
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_ciReturn Value
1558c2ecf20Sopenharmony_ci============
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_ciOn success 0 is returned, on error -1 and the ``errno`` variable is set
1588c2ecf20Sopenharmony_ciappropriately. The generic error codes are described at the
1598c2ecf20Sopenharmony_ci:ref:`Generic Error Codes <gen-errors>` chapter.
160