Merge tag 'docs-next' of git://git.lwn.net/linux.git into patchwork
[cascardo/linux.git] / Documentation / media / uapi / v4l / vidioc-dv-timings-cap.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _VIDIOC_DV_TIMINGS_CAP:
4
5 *********************************************************
6 ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP
7 *********************************************************
8
9 Name
10 ====
11
12 VIDIOC_DV_TIMINGS_CAP - VIDIOC_SUBDEV_DV_TIMINGS_CAP - The capabilities of the Digital Video receiver/transmitter
13
14
15 Synopsis
16 ========
17
18 .. c:function:: int ioctl( int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp )
19     :name: VIDIOC_DV_TIMINGS_CAP
20
21 .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp )
22     :name: VIDIOC_SUBDEV_DV_TIMINGS_CAP
23
24
25 Arguments
26 =========
27
28 ``fd``
29     File descriptor returned by :ref:`open() <func-open>`.
30
31 ``argp``
32
33
34 Description
35 ===========
36
37 To query the capabilities of the DV receiver/transmitter applications
38 initialize the ``pad`` field to 0, zero the reserved array of struct
39 :c:type:`v4l2_dv_timings_cap` and call the
40 ``VIDIOC_DV_TIMINGS_CAP`` ioctl on a video node and the driver will fill
41 in the structure.
42
43 .. note::
44
45    Drivers may return different values after
46    switching the video input or output.
47
48 When implemented by the driver DV capabilities of subdevices can be
49 queried by calling the ``VIDIOC_SUBDEV_DV_TIMINGS_CAP`` ioctl directly
50 on a subdevice node. The capabilities are specific to inputs (for DV
51 receivers) or outputs (for DV transmitters), applications must specify
52 the desired pad number in the struct
53 :c:type:`v4l2_dv_timings_cap` ``pad`` field and
54 zero the ``reserved`` array. Attempts to query capabilities on a pad
55 that doesn't support them will return an ``EINVAL`` error code.
56
57
58 .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}|
59
60 .. c:type:: v4l2_bt_timings_cap
61
62 .. flat-table:: struct v4l2_bt_timings_cap
63     :header-rows:  0
64     :stub-columns: 0
65     :widths:       1 1 2
66
67
68     -  .. row 1
69
70        -  __u32
71
72        -  ``min_width``
73
74        -  Minimum width of the active video in pixels.
75
76     -  .. row 2
77
78        -  __u32
79
80        -  ``max_width``
81
82        -  Maximum width of the active video in pixels.
83
84     -  .. row 3
85
86        -  __u32
87
88        -  ``min_height``
89
90        -  Minimum height of the active video in lines.
91
92     -  .. row 4
93
94        -  __u32
95
96        -  ``max_height``
97
98        -  Maximum height of the active video in lines.
99
100     -  .. row 5
101
102        -  __u64
103
104        -  ``min_pixelclock``
105
106        -  Minimum pixelclock frequency in Hz.
107
108     -  .. row 6
109
110        -  __u64
111
112        -  ``max_pixelclock``
113
114        -  Maximum pixelclock frequency in Hz.
115
116     -  .. row 7
117
118        -  __u32
119
120        -  ``standards``
121
122        -  The video standard(s) supported by the hardware. See
123           :ref:`dv-bt-standards` for a list of standards.
124
125     -  .. row 8
126
127        -  __u32
128
129        -  ``capabilities``
130
131        -  Several flags giving more information about the capabilities. See
132           :ref:`dv-bt-cap-capabilities` for a description of the flags.
133
134     -  .. row 9
135
136        -  __u32
137
138        -  ``reserved``\ [16]
139
140        -  Reserved for future extensions.
141           Drivers must set the array to zero.
142
143
144
145 .. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{3.5cm}|p{9.5cm}|
146
147 .. c:type:: v4l2_dv_timings_cap
148
149 .. flat-table:: struct v4l2_dv_timings_cap
150     :header-rows:  0
151     :stub-columns: 0
152     :widths:       1 1 2 1
153
154
155     -  .. row 1
156
157        -  __u32
158
159        -  ``type``
160
161        -  Type of DV timings as listed in :ref:`dv-timing-types`.
162
163     -  .. row 2
164
165        -  __u32
166
167        -  ``pad``
168
169        -  Pad number as reported by the media controller API. This field is
170           only used when operating on a subdevice node. When operating on a
171           video node applications must set this field to zero.
172
173     -  .. row 3
174
175        -  __u32
176
177        -  ``reserved``\ [2]
178
179        -  Reserved for future extensions.
180
181           Drivers and applications must set the array to zero.
182
183     -  .. row 4
184
185        -  union
186
187        -
188        -
189
190     -  .. row 5
191
192        -
193        -  struct :c:type:`v4l2_bt_timings_cap`
194
195        -  ``bt``
196
197        -  BT.656/1120 timings capabilities of the hardware.
198
199     -  .. row 6
200
201        -
202        -  __u32
203
204        -  ``raw_data``\ [32]
205
206        -
207
208 .. tabularcolumns:: |p{7.0cm}|p{10.5cm}|
209
210 .. _dv-bt-cap-capabilities:
211
212 .. flat-table:: DV BT Timing capabilities
213     :header-rows:  0
214     :stub-columns: 0
215
216
217     -  .. row 1
218
219        -  Flag
220
221        -  Description
222
223     -  .. row 2
224
225        -
226        -
227
228     -  .. row 3
229
230        -  ``V4L2_DV_BT_CAP_INTERLACED``
231
232        -  Interlaced formats are supported.
233
234     -  .. row 4
235
236        -  ``V4L2_DV_BT_CAP_PROGRESSIVE``
237
238        -  Progressive formats are supported.
239
240     -  .. row 5
241
242        -  ``V4L2_DV_BT_CAP_REDUCED_BLANKING``
243
244        -  CVT/GTF specific: the timings can make use of reduced blanking
245           (CVT) or the 'Secondary GTF' curve (GTF).
246
247     -  .. row 6
248
249        -  ``V4L2_DV_BT_CAP_CUSTOM``
250
251        -  Can support non-standard timings, i.e. timings not belonging to
252           the standards set in the ``standards`` field.
253
254
255 Return Value
256 ============
257
258 On success 0 is returned, on error -1 and the ``errno`` variable is set
259 appropriately. The generic error codes are described at the
260 :ref:`Generic Error Codes <gen-errors>` chapter.