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.42. ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER¶
7.42.1. Tên¶
VIDIOC_G_TUNER - VIDIOC_S_TUNER - Nhận hoặc đặt thuộc tính bộ điều chỉnh
7.42.2. Tóm tắt¶
-
VIDIOC_G_TUNER¶
ZZ0000ZZ
-
VIDIOC_S_TUNER¶
ZZ0000ZZ
7.42.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.42.4. Sự miêu tả¶
Để truy vấn các thuộc tính của ứng dụng bộ dò, hãy khởi tạo ZZ0001ZZ trường và loại bỏ mảng ZZ0002ZZ của cấu trúc ZZ0000ZZ và gọi ZZ0003ZZ ioctl với một con trỏ tới cấu trúc này. Trình điều khiển lấp đầy phần còn lại của cấu trúc hoặc trả về mã lỗi ZZ0004ZZ khi chỉ số nằm ngoài giới hạn. Đến liệt kê tất cả các ứng dụng bộ điều chỉnh sẽ bắt đầu ở chỉ số 0, tăng dần một cho đến khi trình điều khiển trả về ZZ0005ZZ.
Bộ điều chỉnh có hai thuộc tính có thể ghi, chế độ âm thanh và đài phát thanh. tần số. Để thay đổi chế độ âm thanh, các ứng dụng sẽ khởi tạo Các trường ZZ0000ZZ, ZZ0001ZZ và ZZ0002ZZ và gọi ZZ0003ZZ ioctl. Điều này sẽ ZZ0004ZZ thay đổi bộ chỉnh sóng hiện tại, được xác định bởi đầu vào video hiện tại. Người lái xe có thể chọn một chế độ âm thanh khác nếu chế độ được yêu cầu không hợp lệ hoặc không được hỗ trợ. Vì đây là ioctl chỉ ghi nên nó không trả về kết quả thực sự chế độ âm thanh đã chọn.
Các loại bộ điều chỉnh cụ thể của ZZ0000ZZ là ZZ0001ZZ và ZZ0002ZZ. Đối với thiết bị SDR, trường ZZ0003ZZ phải được khởi tạo về không. Thuật ngữ ‘bộ điều chỉnh’ có nghĩa là bộ thu SDR trong ngữ cảnh này.
Để thay đổi tần số vô tuyến, ZZ0000ZZ ioctl có sẵn.
-
type v4l2_tuner¶
__u32 |
|
Identifies the tuner, set by the application. |
|
__u8 |
|
Name of the tuner, a NUL-terminated ASCII string. This information is intended for the user. |
|
__u32 |
|
Type of the tuner, see |
|
__u32 |
|
Tuner capability flags, see Tuner and Modulator Capability Flags. Audio flags indicate the ability to decode audio subprograms. They will not change, for example with the current video standard. When the structure refers to a radio tuner the
If multiple frequency bands are supported, then |
|
__u32 |
|
The lowest tunable frequency in units of 62.5 kHz, or
if the |
|
__u32 |
|
The highest tunable frequency in units of 62.5 kHz,
or if the |
|
__u32 |
|
Some tuners or audio decoders can determine the received audio subprograms by analyzing audio carriers, pilot tones or other indicators. To pass this information drivers set flags defined in Tuner Audio Reception Flags in this field. For example: |
|
|
receiving mono audio |
||
|
receiving stereo audio and a secondary audio program |
||
|
receiving mono or stereo audio, the hardware cannot distinguish |
||
|
receiving bilingual audio |
||
|
receiving mono, stereo or bilingual audio |
||
|
When the This field is valid only if this is the tuner of the current video input, or when the structure refers to a radio tuner. |
|||
__u32 |
|
The selected audio mode, see Tuner Audio Modes for valid values. The audio mode does not affect audio subprogram detection, and like a User Controls it does not automatically change unless the requested mode is invalid or unsupported. See Tuner Audio Matrix for possible results when the selected and received audio programs do not match. Currently this is the only field of struct
struct |
|
__u32 |
|
The signal strength if known. Ranging from 0 to 65535. Higher values indicate a better signal. |
|
__s32 |
|
Automatic frequency control. When the |
|
__u32 |
|
Reserved for future extensions. Drivers and applications must set the array to zero. |
|
-
type v4l2_tuner_type¶
|
1 |
Tuner supports radio |
|
2 |
Tuner supports analog TV |
|
4 |
Tuner controls the A/D and/or D/A block of a Software Digital Radio (SDR) |
|
5 |
Tuner controls the RF part of a Software Digital Radio (SDR) |
|
0x0001 |
When set, tuning frequencies are expressed in units of 62.5 Hz instead of 62.5 kHz. |
|
0x0002 |
This is a multi-standard tuner; the video standard can or must be
switched. (B/G PAL tuners for example are typically not considered
multi-standard because the video standard is automatically
determined from the frequency band.) The set of supported video
standards is available from the struct
|
|
0x0004 |
If set, then this tuner supports the hardware seek functionality where the seek stops when it reaches the end of the frequency range. |
|
0x0008 |
If set, then this tuner supports the hardware seek functionality where the seek wraps around when it reaches the end of the frequency range. |
|
0x0010 |
Stereo audio reception is supported. |
|
0x0040 |
Reception of the primary language of a bilingual audio program is
supported. Bilingual audio is a feature of two-channel systems,
transmitting the primary language monaural on the main audio
carrier and a secondary language monaural on a second carrier.
Only |
|
0x0020 |
Reception of the secondary language of a bilingual audio program
is supported. Only |
|
0x0020 |
Reception of a secondary audio program is supported. This is a
feature of the BTSC system which accompanies the NTSC video
standard. Two audio carriers are available for mono or stereo
transmissions of a primary language, and an independent third
carrier for a monaural secondary language. Only
Lưu ý The |
|
0x0080 |
RDS capture is supported. This capability is only valid for radio tuners. |
|
0x0100 |
The RDS data is passed as unparsed RDS blocks. |
|
0x0200 |
The RDS data is parsed by the hardware and set via controls. |
|
0x0400 |
The ioctl VIDIOC_ENUM_FREQ_BANDS ioctl can be used to enumerate the available frequency bands. |
|
0x0800 |
The range to search when using the hardware seek functionality is programmable, see ioctl VIDIOC_S_HW_FREQ_SEEK for details. |
|
0x1000 |
When set, tuning frequencies are expressed in units of 1 Hz instead of 62.5 kHz. |
|
0x0001 |
The tuner receives a mono audio signal. |
|
0x0002 |
The tuner receives a stereo audio signal. |
|
0x0008 |
The tuner receives the primary language of a bilingual audio
signal. Drivers must clear this flag when the current video
standard is |
|
0x0004 |
The tuner receives the secondary language of a bilingual audio signal (or a second audio program). |
|
0x0004 |
The tuner receives a Second Audio Program. Lưu ý The |
|
0x0010 |
The tuner receives an RDS channel. |
|
0 |
Play mono audio. When the tuner receives a stereo signal this a down-mix of the left and right channel. When the tuner receives a bilingual or SAP signal this mode selects the primary language. |
|
1 |
Play stereo audio. When the tuner receives bilingual audio it may play different languages on the left and right channel or the primary language is played on both channels. Playing different languages in this mode is deprecated. New
drivers should do this only in When the tuner receives no stereo signal or does not support
stereo reception the driver shall fall back to |
|
3 |
Play the primary language, mono or stereo. Only
|
|
2 |
Play the secondary language, mono. When the tuner receives no
bilingual audio or SAP, or their reception is not supported the
driver shall fall back to mono or stereo mode. Only
|
|
2 |
Play the Second Audio Program. When the tuner receives no
bilingual audio or SAP, or their reception is not supported the
driver shall fall back to mono or stereo mode. Only
Lưu ý The |
|
4 |
Play the primary language on the left channel, the secondary
language on the right channel. When the tuner receives no
bilingual audio or SAP, it shall fall back to |
Selected |
|||||
|---|---|---|---|---|---|
Received |
|
|
|
|
|
|
Mono |
Mono/Mono |
Mono |
Mono |
Mono/Mono |
|
Mono |
Mono/Mono |
Mono |
SAP |
Mono/SAP (preferred) or Mono/Mono |
|
L+R |
L/R |
Stereo L/R (preferred) or Mono L+R |
Stereo L/R (preferred) or Mono L+R |
L/R (preferred) or L+R/L+R |
|
L+R |
L/R |
Stereo L/R (preferred) or Mono L+R |
SAP |
L+R/SAP (preferred) or L/R or L+R/L+R |
|
Language 1 |
Lang1/Lang2 (deprecated[2]) or Lang1/Lang1 |
Language 1 |
Language 2 |
Lang1/Lang2 (preferred) or Lang1/Lang1 |
7.42.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
Cấu trúc ZZ0000ZZ ZZ0001ZZ đã hết giới hạn.