Merge tag 'docs-4.9-2' of git://git.lwn.net/linux
[sfrench/cifs-2.6.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     * - __u32
68       - ``min_width``
69       - Minimum width of the active video in pixels.
70     * - __u32
71       - ``max_width``
72       - Maximum width of the active video in pixels.
73     * - __u32
74       - ``min_height``
75       - Minimum height of the active video in lines.
76     * - __u32
77       - ``max_height``
78       - Maximum height of the active video in lines.
79     * - __u64
80       - ``min_pixelclock``
81       - Minimum pixelclock frequency in Hz.
82     * - __u64
83       - ``max_pixelclock``
84       - Maximum pixelclock frequency in Hz.
85     * - __u32
86       - ``standards``
87       - The video standard(s) supported by the hardware. See
88         :ref:`dv-bt-standards` for a list of standards.
89     * - __u32
90       - ``capabilities``
91       - Several flags giving more information about the capabilities. See
92         :ref:`dv-bt-cap-capabilities` for a description of the flags.
93     * - __u32
94       - ``reserved``\ [16]
95       - Reserved for future extensions.
96         Drivers must set the array to zero.
97
98
99
100 .. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{3.5cm}|p{9.5cm}|
101
102 .. c:type:: v4l2_dv_timings_cap
103
104 .. flat-table:: struct v4l2_dv_timings_cap
105     :header-rows:  0
106     :stub-columns: 0
107     :widths:       1 1 2 1
108
109     * - __u32
110       - ``type``
111       - Type of DV timings as listed in :ref:`dv-timing-types`.
112     * - __u32
113       - ``pad``
114       - Pad number as reported by the media controller API. This field is
115         only used when operating on a subdevice node. When operating on a
116         video node applications must set this field to zero.
117     * - __u32
118       - ``reserved``\ [2]
119       - Reserved for future extensions.
120
121         Drivers and applications must set the array to zero.
122     * - union
123       -
124       -
125     * -
126       - struct :c:type:`v4l2_bt_timings_cap`
127       - ``bt``
128       - BT.656/1120 timings capabilities of the hardware.
129     * -
130       - __u32
131       - ``raw_data``\ [32]
132       -
133
134 .. tabularcolumns:: |p{7.0cm}|p{10.5cm}|
135
136 .. _dv-bt-cap-capabilities:
137
138 .. flat-table:: DV BT Timing capabilities
139     :header-rows:  0
140     :stub-columns: 0
141
142     * - Flag
143       - Description
144     * -
145       -
146     * - ``V4L2_DV_BT_CAP_INTERLACED``
147       - Interlaced formats are supported.
148     * - ``V4L2_DV_BT_CAP_PROGRESSIVE``
149       - Progressive formats are supported.
150     * - ``V4L2_DV_BT_CAP_REDUCED_BLANKING``
151       - CVT/GTF specific: the timings can make use of reduced blanking
152         (CVT) or the 'Secondary GTF' curve (GTF).
153     * - ``V4L2_DV_BT_CAP_CUSTOM``
154       - Can support non-standard timings, i.e. timings not belonging to
155         the standards set in the ``standards`` field.
156
157
158 Return Value
159 ============
160
161 On success 0 is returned, on error -1 and the ``errno`` variable is set
162 appropriately. The generic error codes are described at the
163 :ref:`Generic Error Codes <gen-errors>` chapter.