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