Lưu ý
Mục đích của file này là để độc giả tiếng Việt có thể đọc và hiểu tài liệu nhân kernel dễ dàng hơn, không phải để tạo ra một nhánh tài liệu riêng. Nếu bạn có bất kỳ nhận xét hoặc cập nhật nào cho file này, vui lòng thử cập nhật file tiếng Anh gốc trước. Nếu bạn thấy có sự khác biệt giữa bản dịch và bản gốc, hoặc có vấn đề về bản dịch, vui lòng gửi góp ý hoặc patch cho người dịch của file này, hoặc nhờ người bảo trì và người review tài liệu tiếng Việt giúp đỡ.
- Bản gốc:
- Người dịch:
Google Translate (machine translation)
- Phiên bản gốc:
8541d8f725c6
Cảnh báo
Tài liệu này được dịch tự động bằng máy và chưa được review bởi người dịch. Nội dung có thể không chính xác hoặc khó hiểu ở một số chỗ. Khi có sự khác biệt với bản gốc, bản gốc luôn là chuẩn. Bản dịch chất lượng cao (được review) được đặt trong thư mục vi_VN/.
7.26. ioctl VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS¶
7.26.1. Tên¶
VIDIOC_G_DV_TIMINGS - VIDIOC_S_DV_TIMINGS - VIDIOC_SUBDEV_G_DV_TIMINGS - VIDIOC_SUBDEV_S_DV_TIMINGS - Nhận hoặc đặt thời gian DV cho đầu vào hoặc đầu ra
7.26.2. Tóm tắt¶
-
VIDIOC_G_DV_TIMINGS¶
ZZ0000ZZ
-
VIDIOC_S_DV_TIMINGS¶
ZZ0000ZZ
-
VIDIOC_SUBDEV_G_DV_TIMINGS¶
ZZ0000ZZ
-
VIDIOC_SUBDEV_S_DV_TIMINGS¶
ZZ0000ZZ
7.26.3. Đối số¶
- ZZ0001ZZ
Bộ mô tả tệp được trả về bởi ZZ0000ZZ.
- ZZ0001ZZ
Con trỏ tới cấu trúc ZZ0000ZZ.
7.26.4. Sự miêu tả¶
Để đặt thời gian DV cho đầu vào hoặc đầu ra, các ứng dụng sử dụng
ZZ0000ZZ ioctl và để có được thời gian hiện tại,
các ứng dụng sử dụng ZZ0001ZZ ioctl. Thời gian chi tiết
thông tin được điền bằng cách sử dụng cấu trúc struct
ZZ0002ZZ. Những ioctls này mất một
con trỏ tới cấu trúc ZZ0003ZZ
cấu trúc làm đối số. Nếu ioctl không được hỗ trợ hoặc thời gian
giá trị không chính xác, trình điều khiển trả về mã lỗi ZZ0004ZZ.
Gọi ZZ0000ZZ trên nút thiết bị subdev đã được đăng ký ở chế độ chỉ đọc không được phép. Một lỗi được trả về và lỗi đó biến được đặt thành ZZ0001ZZ.
Tiêu đề ZZ0003ZZ có thể được sử dụng để lấy thời gian của các định dạng trong tiêu chuẩn ZZ0000ZZ và ZZ0001ZZ. Nếu đầu vào hoặc đầu ra hiện tại không hỗ trợ định giờ DV (ví dụ: nếu ZZ0002ZZ không đặt ZZ0004ZZ), sau đó mã lỗi ZZ0005ZZ được trả về.
7.26.5. Giá trị trả về¶
Khi thành công, trả về 0, lỗi -1 và biến ZZ0001ZZ được đặt một cách thích hợp. Các mã lỗi chung được mô tả tại Chương ZZ0000ZZ.
- EINVAL
Ioctl này không được hỗ trợ hoặc ZZ0000ZZ tham số không phù hợp.
- ENODATA
Định giờ video kỹ thuật số không được hỗ trợ cho đầu vào hoặc đầu ra này.
- EBUSY
Máy đang bận nên không thể thay đổi thời gian được.
- EPERM
ZZ0000ZZ đã được gọi trên thiết bị con chỉ đọc.
-
type v4l2_bt_timings¶
__u32 |
|
Width of the active video in pixels. |
__u32 |
|
Height of the active video frame in lines. So for interlaced
formats the height of the active video in each field is
|
__u32 |
|
Progressive ( |
__u32 |
|
This is a bit mask that defines polarities of sync signals. bit 0
( |
__u64 |
|
Pixel clock in Hz. Ex. 74.25MHz->74250000 |
__u32 |
|
Horizontal front porch in pixels |
__u32 |
|
Horizontal sync length in pixels |
__u32 |
|
Horizontal back porch in pixels |
__u32 |
|
Vertical front porch in lines. For interlaced formats this refers to the odd field (aka field 1). |
__u32 |
|
Vertical sync length in lines. For interlaced formats this refers to the odd field (aka field 1). |
__u32 |
|
Vertical back porch in lines. For interlaced formats this refers to the odd field (aka field 1). |
__u32 |
|
Vertical front porch in lines for the even field (aka field 2) of interlaced field formats. Must be 0 for progressive formats. |
__u32 |
|
Vertical sync length in lines for the even field (aka field 2) of interlaced field formats. Must be 0 for progressive formats. |
__u32 |
|
Vertical back porch in lines for the even field (aka field 2) of interlaced field formats. Must be 0 for progressive formats. |
__u32 |
|
The video standard(s) this format belongs to. This will be filled in by the driver. Applications must set this to 0. See DV BT Timing standards for a list of standards. |
__u32 |
|
Several flags giving more information about the format. See DV BT Timing flags for a description of the flags. |
struct |
|
The picture aspect if the pixels are not square. Only valid if the
|
__u8 |
|
The Video Identification Code according to the CEA-861 standard.
Only valid if the |
__u8 |
|
The Video Identification Code according to the HDMI standard.
Only valid if the |
__u8 |
|
Reserved for future extensions. Drivers and applications must set the array to zero. |
-
type v4l2_dv_timings¶
__u32 |
|
Type of DV timings as listed in DV Timing types. |
union { |
(anonymous) |
|
struct |
|
Timings defined by BT.656/1120 specifications |
__u32 |
|
|
} |
||
Timing type |
value |
Description |
|
0 |
BT.656/1120 timings |
Timing standard |
Description |
|
The timings follow the CEA-861 Digital TV Profile standard |
|
The timings follow the VESA Discrete Monitor Timings standard |
|
The timings follow the VESA Coordinated Video Timings standard |
|
The timings follow the VESA Generalized Timings Formula standard |
|
The timings follow the SDI Timings standard. There are no horizontal syncs/porches at all in this format. Total blanking timings must be set in hsync or vsync fields only. |
Flag |
Description |
|
CVT/GTF specific: the timings use reduced blanking (CVT) or the ‘Secondary GTF’ curve (GTF). In both cases the horizontal and/or vertical blanking intervals are reduced, allowing a higher resolution over the same bandwidth. This is a read-only flag, applications must not set this. |
|
CEA-861 specific: set for CEA-861 formats with a framerate that is a multiple of six. These formats can be optionally played at 1 / 1.001 speed to be compatible with 60 Hz based standards such as NTSC and PAL-M that use a framerate of 29.97 frames per second. If the transmitter can’t generate such frequencies, then the flag will also be cleared. This is a read-only flag, applications must not set this. |
|
CEA-861 specific: only valid for video transmitters or video
receivers that have the If the application sets this flag for a transmitter, then the pixelclock used to set up the transmitter is divided by 1.001 to make it compatible with NTSC framerates. If the transmitter can’t generate such frequencies, then the flag will be cleared. If a video receiver detects that the format uses a reduced framerate, then it will set this flag to signal this to the application. |
|
Specific to interlaced formats: if set, then the vertical frontporch of field 1 (aka the odd field) is really one half-line longer and the vertical backporch of field 2 (aka the even field) is really one half-line shorter, so each field has exactly the same number of half-lines. Whether half-lines can be detected or used depends on the hardware. |
|
If set, then this is a Consumer Electronics (CE) video format. Such formats differ from other formats (commonly called IT formats) in that if R’G’B’ encoding is used then by default the R’G’B’ values use limited range (i.e. 16-235) as opposed to full range (i.e. 0-255). All formats defined in CEA-861 except for the 640x480p59.94 format are CE formats. |
|
Some formats like SMPTE-125M have an interlaced signal with a odd total height. For these formats, if this flag is set, the first field has the extra line. Else, it is the second field. |
|
If set, then the picture_aspect field is valid. Otherwise assume that the pixels are square, so the picture aspect ratio is the same as the width to height ratio. |
|
If set, then the cea861_vic field is valid and contains the Video Identification Code as per the CEA-861 standard. |
|
If set, then the hdmi_vic field is valid and contains the Video Identification Code as per the HDMI standard (HDMI Vendor Specific InfoFrame). |
|
CEA-861 specific: only valid for video receivers, the flag is cleared by transmitters. If set, then the hardware can detect the difference between regular framerates and framerates reduced by 1000/1001. E.g.: 60 vs 59.94 Hz, 30 vs 29.97 Hz or 24 vs 23.976 Hz. |