1 .. -*- coding: utf-8; mode: rst -*-
3 .. _VIDIOC_G_DV_TIMINGS:
5 **********************************************
6 ioctl VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS
7 **********************************************
9 *man VIDIOC_G_DV_TIMINGS(2)*
12 VIDIOC_SUBDEV_G_DV_TIMINGS
13 VIDIOC_SUBDEV_S_DV_TIMINGS
14 Get or set DV timings for input or output
20 .. c:function:: int ioctl( int fd, int request, struct v4l2_dv_timings *argp )
26 File descriptor returned by :ref:`open() <func-open>`.
29 VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS,
30 VIDIOC_SUBDEV_G_DV_TIMINGS, VIDIOC_SUBDEV_S_DV_TIMINGS
38 To set DV timings for the input or output, applications use the
39 :ref:`VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl and to get the current timings,
40 applications use the :ref:`VIDIOC_G_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl. The detailed timing
41 information is filled in using the structure struct
42 :ref:`v4l2_dv_timings <v4l2-dv-timings>`. These ioctls take a
43 pointer to the struct :ref:`v4l2_dv_timings <v4l2-dv-timings>`
44 structure as argument. If the ioctl is not supported or the timing
45 values are not correct, the driver returns EINVAL error code.
47 The ``linux/v4l2-dv-timings.h`` header can be used to get the timings of
48 the formats in the :ref:`cea861` and :ref:`vesadmt` standards. If
49 the current input or output does not support DV timings (e.g. if
50 :ref:`VIDIOC_ENUMINPUT` does not set the
51 ``V4L2_IN_CAP_DV_TIMINGS`` flag), then ENODATA error code is returned.
57 On success 0 is returned, on error -1 and the ``errno`` variable is set
58 appropriately. The generic error codes are described at the
59 :ref:`Generic Error Codes <gen-errors>` chapter.
62 This ioctl is not supported, or the :ref:`VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>`
63 parameter was unsuitable.
66 Digital video timings are not supported for this input or output.
69 The device is busy and therefore can not change the timings.
74 .. flat-table:: struct v4l2_bt_timings
86 - Width of the active video in pixels.
94 - Height of the active video frame in lines. So for interlaced
95 formats the height of the active video in each field is
104 - Progressive (0) or interlaced (1)
112 - This is a bit mask that defines polarities of sync signals. bit 0
113 (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit
114 1 (V4L2_DV_HSYNC_POS_POL) is for horizontal sync polarity. If
115 the bit is set (1) it is positive polarity and if is cleared (0),
116 it is negative polarity.
124 - Pixel clock in Hz. Ex. 74.25MHz->74250000
132 - Horizontal front porch in pixels
140 - Horizontal sync length in pixels
148 - Horizontal back porch in pixels
156 - Vertical front porch in lines. For interlaced formats this refers
157 to the odd field (aka field 1).
165 - Vertical sync length in lines. For interlaced formats this refers
166 to the odd field (aka field 1).
174 - Vertical back porch in lines. For interlaced formats this refers
175 to the odd field (aka field 1).
183 - Vertical front porch in lines for the even field (aka field 2) of
184 interlaced field formats. Must be 0 for progressive formats.
192 - Vertical sync length in lines for the even field (aka field 2) of
193 interlaced field formats. Must be 0 for progressive formats.
201 - Vertical back porch in lines for the even field (aka field 2) of
202 interlaced field formats. Must be 0 for progressive formats.
210 - The video standard(s) this format belongs to. This will be filled
211 in by the driver. Applications must set this to 0. See
212 :ref:`dv-bt-standards` for a list of standards.
220 - Several flags giving more information about the format. See
221 :ref:`dv-bt-flags` for a description of the flags.
227 .. flat-table:: struct v4l2_dv_timings
240 - Type of DV timings as listed in :ref:`dv-timing-types`.
252 - struct :ref:`v4l2_bt_timings <v4l2-bt-timings>`
256 - Timings defined by BT.656/1120 specifications
271 .. flat-table:: DV Timing types
293 - V4L2_DV_BT_656_1120
297 - BT.656/1120 timings
303 .. flat-table:: DV BT Timing standards
321 - V4L2_DV_BT_STD_CEA861
323 - The timings follow the CEA-861 Digital TV Profile standard
329 - The timings follow the VESA Discrete Monitor Timings standard
335 - The timings follow the VESA Coordinated Video Timings standard
341 - The timings follow the VESA Generalized Timings Formula standard
347 .. flat-table:: DV BT Timing flags
365 - V4L2_DV_FL_REDUCED_BLANKING
367 - CVT/GTF specific: the timings use reduced blanking (CVT) or the
368 'Secondary GTF' curve (GTF). In both cases the horizontal and/or
369 vertical blanking intervals are reduced, allowing a higher
370 resolution over the same bandwidth. This is a read-only flag,
371 applications must not set this.
375 - V4L2_DV_FL_CAN_REDUCE_FPS
377 - CEA-861 specific: set for CEA-861 formats with a framerate that is
378 a multiple of six. These formats can be optionally played at 1 /
379 1.001 speed to be compatible with 60 Hz based standards such as
380 NTSC and PAL-M that use a framerate of 29.97 frames per second. If
381 the transmitter can't generate such frequencies, then the flag
382 will also be cleared. This is a read-only flag, applications must
387 - V4L2_DV_FL_REDUCED_FPS
389 - CEA-861 specific: only valid for video transmitters, the flag is
390 cleared by receivers. It is also only valid for formats with the
391 V4L2_DV_FL_CAN_REDUCE_FPS flag set, for other formats the
392 flag will be cleared by the driver. If the application sets this
393 flag, then the pixelclock used to set up the transmitter is
394 divided by 1.001 to make it compatible with NTSC framerates. If
395 the transmitter can't generate such frequencies, then the flag
396 will also be cleared.
400 - V4L2_DV_FL_HALF_LINE
402 - Specific to interlaced formats: if set, then the vertical
403 frontporch of field 1 (aka the odd field) is really one half-line
404 longer and the vertical backporch of field 2 (aka the even field)
405 is really one half-line shorter, so each field has exactly the
406 same number of half-lines. Whether half-lines can be detected or
407 used depends on the hardware.
411 - V4L2_DV_FL_IS_CE_VIDEO
413 - If set, then this is a Consumer Electronics (CE) video format.
414 Such formats differ from other formats (commonly called IT
415 formats) in that if R'G'B' encoding is used then by default the
416 R'G'B' values use limited range (i.e. 16-235) as opposed to full
417 range (i.e. 0-255). All formats defined in CEA-861 except for the
418 640x480p59.94 format are CE formats.
423 .. ------------------------------------------------------------------------------
424 .. This file was automatically converted from DocBook-XML with the dbxml
425 .. library (https://github.com/return42/sphkerneldoc). The origin XML comes
426 .. from the linux kernel, refer to:
428 .. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
429 .. ------------------------------------------------------------------------------