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_DV_TIMINGS_CAP:
11
12*********************************************************
13ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP
14*********************************************************
15
16Name
17====
18
19VIDIOC_DV_TIMINGS_CAP - VIDIOC_SUBDEV_DV_TIMINGS_CAP - The capabilities of the Digital Video receiver/transmitter
20
21
22Synopsis
23========
24
25.. c:function:: int ioctl( int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp )
26    :name: VIDIOC_DV_TIMINGS_CAP
27
28.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp )
29    :name: VIDIOC_SUBDEV_DV_TIMINGS_CAP
30
31
32Arguments
33=========
34
35``fd``
36    File descriptor returned by :ref:`open() <func-open>`.
37
38``argp``
39    Pointer to struct :c:type:`v4l2_dv_timings_cap`.
40
41
42Description
43===========
44
45To query the capabilities of the DV receiver/transmitter applications
46initialize the ``pad`` field to 0, zero the reserved array of struct
47:c:type:`v4l2_dv_timings_cap` and call the
48``VIDIOC_DV_TIMINGS_CAP`` ioctl on a video node and the driver will fill
49in the structure.
50
51.. note::
52
53   Drivers may return different values after
54   switching the video input or output.
55
56When implemented by the driver DV capabilities of subdevices can be
57queried by calling the ``VIDIOC_SUBDEV_DV_TIMINGS_CAP`` ioctl directly
58on a subdevice node. The capabilities are specific to inputs (for DV
59receivers) or outputs (for DV transmitters), applications must specify
60the desired pad number in the struct
61:c:type:`v4l2_dv_timings_cap` ``pad`` field and
62zero the ``reserved`` array. Attempts to query capabilities on a pad
63that doesn't support them will return an ``EINVAL`` error code.
64
65
66.. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}|
67
68.. c:type:: v4l2_bt_timings_cap
69
70.. flat-table:: struct v4l2_bt_timings_cap
71    :header-rows:  0
72    :stub-columns: 0
73    :widths:       1 1 2
74
75    * - __u32
76      - ``min_width``
77      - Minimum width of the active video in pixels.
78    * - __u32
79      - ``max_width``
80      - Maximum width of the active video in pixels.
81    * - __u32
82      - ``min_height``
83      - Minimum height of the active video in lines.
84    * - __u32
85      - ``max_height``
86      - Maximum height of the active video in lines.
87    * - __u64
88      - ``min_pixelclock``
89      - Minimum pixelclock frequency in Hz.
90    * - __u64
91      - ``max_pixelclock``
92      - Maximum pixelclock frequency in Hz.
93    * - __u32
94      - ``standards``
95      - The video standard(s) supported by the hardware. See
96	:ref:`dv-bt-standards` for a list of standards.
97    * - __u32
98      - ``capabilities``
99      - Several flags giving more information about the capabilities. See
100	:ref:`dv-bt-cap-capabilities` for a description of the flags.
101    * - __u32
102      - ``reserved``\ [16]
103      - Reserved for future extensions.
104	Drivers must set the array to zero.
105
106
107
108.. tabularcolumns:: |p{1.0cm}|p{4.0cm}|p{3.5cm}|p{9.2cm}|
109
110.. c:type:: v4l2_dv_timings_cap
111
112.. flat-table:: struct v4l2_dv_timings_cap
113    :header-rows:  0
114    :stub-columns: 0
115    :widths:       1 1 2
116
117    * - __u32
118      - ``type``
119      - Type of DV timings as listed in :ref:`dv-timing-types`.
120    * - __u32
121      - ``pad``
122      - Pad number as reported by the media controller API. This field is
123	only used when operating on a subdevice node. When operating on a
124	video node applications must set this field to zero.
125    * - __u32
126      - ``reserved``\ [2]
127      - Reserved for future extensions.
128
129	Drivers and applications must set the array to zero.
130    * - union {
131      - (anonymous)
132    * - struct :c:type:`v4l2_bt_timings_cap`
133      - ``bt``
134      - BT.656/1120 timings capabilities of the hardware.
135    * - __u32
136      - ``raw_data``\ [32]
137    * - }
138      -
139
140.. tabularcolumns:: |p{7.0cm}|p{10.5cm}|
141
142.. _dv-bt-cap-capabilities:
143
144.. flat-table:: DV BT Timing capabilities
145    :header-rows:  0
146    :stub-columns: 0
147
148    * - Flag
149      - Description
150    * -
151      -
152    * - ``V4L2_DV_BT_CAP_INTERLACED``
153      - Interlaced formats are supported.
154    * - ``V4L2_DV_BT_CAP_PROGRESSIVE``
155      - Progressive formats are supported.
156    * - ``V4L2_DV_BT_CAP_REDUCED_BLANKING``
157      - CVT/GTF specific: the timings can make use of reduced blanking
158	(CVT) or the 'Secondary GTF' curve (GTF).
159    * - ``V4L2_DV_BT_CAP_CUSTOM``
160      - Can support non-standard timings, i.e. timings not belonging to
161	the standards set in the ``standards`` field.
162
163
164Return Value
165============
166
167On success 0 is returned, on error -1 and the ``errno`` variable is set
168appropriately. The generic error codes are described at the
169:ref:`Generic Error Codes <gen-errors>` chapter.
170