Name

VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS — Get or set custom DV timings for input or output

Synopsis

int ioctl(int fd,
 int request,
 struct v4l2_dv_timings *argp);
 

Arguments

fd

File descriptor returned by open().

request

VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS

argp

Description

To set custom DV timings for the input or output, applications use the VIDIOC_S_DV_TIMINGS ioctl and to get the current custom timings, applications use the VIDIOC_G_DV_TIMINGS ioctl. The detailed timing information is filled in using the structure struct v4l2_dv_timings. These ioctls take a pointer to the struct v4l2_dv_timings structure as argument. If the ioctl is not supported or the timing values are not correct, the driver returns EINVAL error code.

Return Value

On success 0 is returned, on error -1 and the errno variable is set appropriately:

EINVAL

This ioctl is not supported, or the VIDIOC_S_DV_TIMINGS parameter was unsuitable.

EBUSY

The device is busy and therefore can not change the timings.

Table A.43. struct v4l2_bt_timings

__u32widthWidth of the active video in pixels
__u32heightHeight of the active video in lines
__u32interlacedProgressive (0) or interlaced (1)
__u32polaritiesThis is a bit mask that defines polarities of sync signals. bit 0 (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit 1 (V4L2_DV_HSYNC_POS_POL) is for horizontal sync polarity. If the bit is set (1) it is positive polarity and if is cleared (0), it is negative polarity.
__u64pixelclockPixel clock in Hz. Ex. 74.25MHz->74250000
__u32hfrontporchHorizontal front porch in pixels
__u32hsyncHorizontal sync length in pixels
__u32hbackporchHorizontal back porch in pixels
__u32vfrontporchVertical front porch in lines
__u32vsyncVertical sync length in lines
__u32vbackporchVertical back porch in lines
__u32il_vfrontporchVertical front porch in lines for bottom field of interlaced field formats
__u32il_vsyncVertical sync length in lines for bottom field of interlaced field formats
__u32il_vbackporchVertical back porch in lines for bottom field of interlaced field formats

Table A.44. struct v4l2_dv_timings

__u32type Type of DV timings as listed in Table A.45, “DV Timing types”.
union  
 struct v4l2_bt_timingsbtTimings defined by BT.656/1120 specifications
 __u32reserved[32] 

Table A.45. DV Timing types

Timing typevalueDescription
   
V4L2_DV_BT_656_11200BT.656/1120 timings