Commit | Line | Data |
---|---|---|
5377d91f MH |
1 | .. -*- coding: utf-8; mode: rst -*- |
2 | ||
af4a4d0d | 3 | .. _VIDIOC_ENUM_DV_TIMINGS: |
5377d91f MH |
4 | |
5 | *********************************************************** | |
6 | ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS | |
7 | *********************************************************** | |
8 | ||
15e7d615 | 9 | Name |
586027ce | 10 | ==== |
5377d91f | 11 | |
586027ce | 12 | VIDIOC_ENUM_DV_TIMINGS - VIDIOC_SUBDEV_ENUM_DV_TIMINGS - Enumerate supported Digital Video timings |
5377d91f | 13 | |
15e7d615 MCC |
14 | |
15 | Synopsis | |
5377d91f MH |
16 | ======== |
17 | ||
41d80465 MCC |
18 | .. c:function:: int ioctl( int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp ) |
19 | :name: VIDIOC_ENUM_DV_TIMINGS | |
20 | ||
21 | .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp ) | |
22 | :name: VIDIOC_SUBDEV_ENUM_DV_TIMINGS | |
5377d91f | 23 | |
586027ce | 24 | |
15e7d615 | 25 | Arguments |
5377d91f MH |
26 | ========= |
27 | ||
28 | ``fd`` | |
29 | File descriptor returned by :ref:`open() <func-open>`. | |
30 | ||
5377d91f MH |
31 | ``argp`` |
32 | ||
33 | ||
15e7d615 | 34 | Description |
5377d91f MH |
35 | =========== |
36 | ||
37 | While some DV receivers or transmitters support a wide range of timings, | |
38 | others support only a limited number of timings. With this ioctl | |
39 | applications can enumerate a list of known supported timings. Call | |
7347081e | 40 | :ref:`VIDIOC_DV_TIMINGS_CAP` to check if it |
5377d91f MH |
41 | also supports other standards or even custom timings that are not in |
42 | this list. | |
43 | ||
44 | To query the available timings, applications initialize the ``index`` | |
45 | field, set the ``pad`` field to 0, zero the reserved array of struct | |
e8be7e97 | 46 | :c:type:`v4l2_enum_dv_timings` and call the |
5377d91f | 47 | ``VIDIOC_ENUM_DV_TIMINGS`` ioctl on a video node with a pointer to this |
cdb4af0f | 48 | structure. Drivers fill the rest of the structure or return an ``EINVAL`` |
5377d91f MH |
49 | error code when the index is out of bounds. To enumerate all supported |
50 | DV timings, applications shall begin at index zero, incrementing by one | |
706f8a99 MCC |
51 | until the driver returns ``EINVAL``. |
52 | ||
b6b6e678 MCC |
53 | .. note:: |
54 | ||
55 | Drivers may enumerate a different set of DV timings after | |
706f8a99 | 56 | switching the video input or output. |
5377d91f MH |
57 | |
58 | When implemented by the driver DV timings of subdevices can be queried | |
59 | by calling the ``VIDIOC_SUBDEV_ENUM_DV_TIMINGS`` ioctl directly on a | |
60 | subdevice node. The DV timings are specific to inputs (for DV receivers) | |
61 | or outputs (for DV transmitters), applications must specify the desired | |
62 | pad number in the struct | |
e8be7e97 | 63 | :c:type:`v4l2_enum_dv_timings` ``pad`` field. |
5377d91f | 64 | Attempts to enumerate timings on a pad that doesn't support them will |
cdb4af0f | 65 | return an ``EINVAL`` error code. |
5377d91f MH |
66 | |
67 | ||
e8be7e97 | 68 | .. c:type:: v4l2_enum_dv_timings |
5377d91f | 69 | |
5bd4bb78 MCC |
70 | .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| |
71 | ||
5377d91f MH |
72 | .. flat-table:: struct v4l2_enum_dv_timings |
73 | :header-rows: 0 | |
74 | :stub-columns: 0 | |
75 | :widths: 1 1 2 | |
76 | ||
77 | ||
78 | - .. row 1 | |
79 | ||
80 | - __u32 | |
81 | ||
82 | - ``index`` | |
83 | ||
84 | - Number of the DV timings, set by the application. | |
85 | ||
86 | - .. row 2 | |
87 | ||
88 | - __u32 | |
89 | ||
90 | - ``pad`` | |
91 | ||
92 | - Pad number as reported by the media controller API. This field is | |
0579e6e3 MCC |
93 | only used when operating on a subdevice node. When operating on a |
94 | video node applications must set this field to zero. | |
5377d91f MH |
95 | |
96 | - .. row 3 | |
97 | ||
98 | - __u32 | |
99 | ||
8968da9b | 100 | - ``reserved``\ [2] |
5377d91f MH |
101 | |
102 | - Reserved for future extensions. Drivers and applications must set | |
0579e6e3 | 103 | the array to zero. |
5377d91f MH |
104 | |
105 | - .. row 4 | |
106 | ||
e8be7e97 | 107 | - struct :c:type:`v4l2_dv_timings` |
5377d91f MH |
108 | |
109 | - ``timings`` | |
110 | ||
111 | - The timings. | |
112 | ||
113 | ||
15e7d615 | 114 | Return Value |
5377d91f MH |
115 | ============ |
116 | ||
117 | On success 0 is returned, on error -1 and the ``errno`` variable is set | |
118 | appropriately. The generic error codes are described at the | |
119 | :ref:`Generic Error Codes <gen-errors>` chapter. | |
120 | ||
121 | EINVAL | |
e8be7e97 | 122 | The struct :c:type:`v4l2_enum_dv_timings` |
5377d91f MH |
123 | ``index`` is out of bounds or the ``pad`` number is invalid. |
124 | ||
125 | ENODATA | |
126 | Digital video presets are not supported for this input or output. |