From e5fd91f1ef340da553f7a79da9540c3db711c937 Mon Sep 17 00:00:00 2001 From: AndrĂ© Fabian Silva Delgado Date: Tue, 8 Sep 2015 01:01:14 -0300 Subject: Linux-libre 4.2-gnu --- Documentation/DocBook/media/dvb/audio.xml | 6 +- Documentation/DocBook/media/dvb/ca.xml | 4 +- Documentation/DocBook/media/dvb/demux.xml | 61 +- Documentation/DocBook/media/dvb/dvbapi.xml | 34 +- Documentation/DocBook/media/dvb/dvbproperty.xml | 1117 ++++++++----- Documentation/DocBook/media/dvb/examples.xml | 6 +- .../media/dvb/fe-diseqc-recv-slave-reply.xml | 78 + .../DocBook/media/dvb/fe-diseqc-reset-overload.xml | 51 + .../DocBook/media/dvb/fe-diseqc-send-burst.xml | 89 + .../media/dvb/fe-diseqc-send-master-cmd.xml | 72 + .../media/dvb/fe-enable-high-lnb-voltage.xml | 61 + Documentation/DocBook/media/dvb/fe-get-info.xml | 266 +++ .../DocBook/media/dvb/fe-get-property.xml | 81 + Documentation/DocBook/media/dvb/fe-read-status.xml | 107 ++ .../media/dvb/fe-set-frontend-tune-mode.xml | 64 + Documentation/DocBook/media/dvb/fe-set-tone.xml | 91 + Documentation/DocBook/media/dvb/fe-set-voltage.xml | 69 + Documentation/DocBook/media/dvb/frontend.xml | 1747 +++----------------- .../DocBook/media/dvb/frontend_legacy_api.xml | 654 ++++++++ Documentation/DocBook/media/dvb/intro.xml | 30 +- Documentation/DocBook/media/dvb/kdapi.xml | 4 +- Documentation/DocBook/media/dvb/net.xml | 374 +++-- Documentation/DocBook/media/dvb/video.xml | 10 +- 23 files changed, 2981 insertions(+), 2095 deletions(-) create mode 100644 Documentation/DocBook/media/dvb/fe-diseqc-recv-slave-reply.xml create mode 100644 Documentation/DocBook/media/dvb/fe-diseqc-reset-overload.xml create mode 100644 Documentation/DocBook/media/dvb/fe-diseqc-send-burst.xml create mode 100644 Documentation/DocBook/media/dvb/fe-diseqc-send-master-cmd.xml create mode 100644 Documentation/DocBook/media/dvb/fe-enable-high-lnb-voltage.xml create mode 100644 Documentation/DocBook/media/dvb/fe-get-info.xml create mode 100644 Documentation/DocBook/media/dvb/fe-get-property.xml create mode 100644 Documentation/DocBook/media/dvb/fe-read-status.xml create mode 100644 Documentation/DocBook/media/dvb/fe-set-frontend-tune-mode.xml create mode 100644 Documentation/DocBook/media/dvb/fe-set-tone.xml create mode 100644 Documentation/DocBook/media/dvb/fe-set-voltage.xml create mode 100644 Documentation/DocBook/media/dvb/frontend_legacy_api.xml (limited to 'Documentation/DocBook/media/dvb') diff --git a/Documentation/DocBook/media/dvb/audio.xml b/Documentation/DocBook/media/dvb/audio.xml index a7ea56c71..ea56743dd 100644 --- a/Documentation/DocBook/media/dvb/audio.xml +++ b/Documentation/DocBook/media/dvb/audio.xml @@ -1,7 +1,7 @@ DVB Audio Device The DVB audio device controls the MPEG2 audio decoder of the DVB hardware. It -can be accessed through /dev/dvb/adapter0/audio0. Data types and and -ioctl definitions can be accessed by including linux/dvb/audio.h in your +can be accessed through /dev/dvb/adapter?/audio?. Data types and and +ioctl definitions can be accessed by including linux/dvb/audio.h in your application. Please note that some DVB cards don’t have their own MPEG decoder, which results in @@ -32,7 +32,7 @@ typedef enum { AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the DVR device) as the source of the video stream. If AUDIO_SOURCE_MEMORY -is selected the stream comes from the application through the write() system +is selected the stream comes from the application through the write() system call. diff --git a/Documentation/DocBook/media/dvb/ca.xml b/Documentation/DocBook/media/dvb/ca.xml index 85eaf4fe2..d0b07e763 100644 --- a/Documentation/DocBook/media/dvb/ca.xml +++ b/Documentation/DocBook/media/dvb/ca.xml @@ -1,7 +1,7 @@ DVB CA Device The DVB CA device controls the conditional access hardware. It can be accessed through -/dev/dvb/adapter0/ca0. Data types and and ioctl definitions can be accessed by -including linux/dvb/ca.h in your application. +/dev/dvb/adapter?/ca?. Data types and and ioctl definitions can be accessed by +including linux/dvb/ca.h in your application.
diff --git a/Documentation/DocBook/media/dvb/demux.xml b/Documentation/DocBook/media/dvb/demux.xml index c8683d66f..34f2fb1cd 100644 --- a/Documentation/DocBook/media/dvb/demux.xml +++ b/Documentation/DocBook/media/dvb/demux.xml @@ -1,33 +1,50 @@ DVB Demux Device The DVB demux device controls the filters of the DVB hardware/software. It can be -accessed through /dev/adapter0/demux0. Data types and and ioctl definitions can be -accessed by including linux/dvb/dmx.h in your application. +accessed through /dev/adapter?/demux?. Data types and and ioctl definitions can be +accessed by including linux/dvb/dmx.h in your application.
Demux Data Types
-dmx_output_t - -typedef enum -{ - DMX_OUT_DECODER, /⋆ Streaming directly to decoder. ⋆/ - DMX_OUT_TAP, /⋆ Output going to a memory buffer ⋆/ - /⋆ (to be retrieved via the read command).⋆/ - DMX_OUT_TS_TAP, /⋆ Output multiplexed into a new TS ⋆/ - /⋆ (to be retrieved by reading from the ⋆/ - /⋆ logical DVR device). ⋆/ - DMX_OUT_TSDEMUX_TAP /⋆ Like TS_TAP but retrieved from the DMX device ⋆/ -} dmx_output_t; - -DMX_OUT_TAP delivers the stream output to the demux device on which the ioctl is -called. - -DMX_OUT_TS_TAP routes output to the logical DVR device /dev/dvb/adapter0/dvr0, -which delivers a TS multiplexed from all filters for which DMX_OUT_TS_TAP was -specified. - +Output for the demux + + + enum dmx_output + + &cs-def; + + + ID + Description + + + + + DMX_OUT_DECODER + Streaming directly to decoder. + + DMX_OUT_TAP + Output going to a memory buffer (to be retrieved via the + read command). Delivers the stream output to the demux + device on which the ioctl is called. + + DMX_OUT_TS_TAP + Output multiplexed into a new TS (to be retrieved by + reading from the logical DVR device). Routes output to the + logical DVR device /dev/dvb/adapter?/dvr?, + which delivers a TS multiplexed from all filters for which + DMX_OUT_TS_TAP was specified. + + DMX_OUT_TSDEMUX_TAP + Like &DMX-OUT-TS-TAP; but retrieved from the DMX + device. + + + +
+
diff --git a/Documentation/DocBook/media/dvb/dvbapi.xml b/Documentation/DocBook/media/dvb/dvbapi.xml index 4c15396c6..858fd7d17 100644 --- a/Documentation/DocBook/media/dvb/dvbapi.xml +++ b/Documentation/DocBook/media/dvb/dvbapi.xml @@ -28,12 +28,22 @@ Convergence GmbH - 2009-2014 + 2009-2015 Mauro Carvalho Chehab + + 2.1.0 + 2015-05-29 + mcc + + DocBook improvements and cleanups, in order to document the + system calls on a more standard way and provide more description + about the current DVB API. + + 2.0.4 2011-05-06 @@ -95,18 +105,26 @@ Added ISDB-T test originally written by Patrick Boettcher &sub-demux; - - &sub-video; - - - &sub-audio; - &sub-ca; - + &sub-net; + + DVB Deprecated APIs + The APIs described here are kept only for historical reasons. There's + just one driver for a very legacy hardware that uses this API. No + modern drivers should use it. Instead, audio and video should be using + the V4L2 and ALSA APIs, and the pipelines should be set using the + Media Controller API +
+ &sub-video; +
+
+ &sub-audio; +
+
&sub-kdapi; diff --git a/Documentation/DocBook/media/dvb/dvbproperty.xml b/Documentation/DocBook/media/dvb/dvbproperty.xml index 3018564dd..08227d4e9 100644 --- a/Documentation/DocBook/media/dvb/dvbproperty.xml +++ b/Documentation/DocBook/media/dvb/dvbproperty.xml @@ -1,14 +1,88 @@ -
-<constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant> -This section describes the DVB version 5 extension of the DVB-API, also -called "S2API", as this API were added to provide support for DVB-S2. It was -designed to be able to replace the old frontend API. Yet, the DISEQC and -the capability ioctls weren't implemented yet via the new way. -The typical usage for the FE_GET_PROPERTY/FE_SET_PROPERTY -API is to replace the ioctl's were the -struct dvb_frontend_parameters were used. +
+DVB Frontend properties +Tuning into a Digital TV physical channel and starting decoding it + requires changing a set of parameters, in order to control the + tuner, the demodulator, the Linear Low-noise Amplifier (LNA) and to set the + antenna subsystem via Satellite Equipment Control (SEC), on satellite + systems. The actual parameters are specific to each particular digital + TV standards, and may change as the digital TV specs evolves. +In the past, the strategy used was to have a union with the parameters + needed to tune for DVB-S, DVB-C, DVB-T and ATSC delivery systems grouped + there. The problem is that, as the second generation standards appeared, + those structs were not big enough to contain the additional parameters. + Also, the union didn't have any space left to be expanded without breaking + userspace. So, the decision was to deprecate the legacy union/struct based + approach, in favor of a properties set approach. + +NOTE: on Linux DVB API version 3, setting a frontend were done via + struct dvb_frontend_parameters. + This got replaced on version 5 (also called "S2API", as this API were + added originally_enabled to provide support for DVB-S2), because the old + API has a very limited support to new standards and new hardware. This + section describes the new and recommended way to set the frontend, with + suppports all digital TV delivery systems. + +Example: with the properties based approach, in order to set the tuner + to a DVB-C channel at 651 kHz, modulated with 256-QAM, FEC 3/4 and symbol + rate of 5.217 Mbauds, those properties should be sent to + FE_SET_PROPERTY ioctl: + + &DTV-DELIVERY-SYSTEM; = SYS_DVBC_ANNEX_A + &DTV-FREQUENCY; = 651000000 + &DTV-MODULATION; = QAM_256 + &DTV-INVERSION; = INVERSION_AUTO + &DTV-SYMBOL-RATE; = 5217000 + &DTV-INNER-FEC; = FEC_3_4 + &DTV-TUNE; + + +The code that would do the above is: + +#include <stdio.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <linux/dvb/frontend.h> + +static struct dtv_property props[] = { + { .cmd = DTV_DELIVERY_SYSTEM, .u.data = SYS_DVBC_ANNEX_A }, + { .cmd = DTV_FREQUENCY, .u.data = 651000000 }, + { .cmd = DTV_MODULATION, .u.data = QAM_256 }, + { .cmd = DTV_INVERSION, .u.data = INVERSION_AUTO }, + { .cmd = DTV_SYMBOL_RATE, .u.data = 5217000 }, + { .cmd = DTV_INNER_FEC, .u.data = FEC_3_4 }, + { .cmd = DTV_TUNE } +}; + +static struct dtv_properties dtv_prop = { + .num = 6, .props = props +}; + +int main(void) +{ + int fd = open("/dev/dvb/adapter0/frontend0", O_RDWR); + + if (!fd) { + perror ("open"); + return -1; + } + if (ioctl(fd, FE_SET_PROPERTY, &dtv_prop) == -1) { + perror("ioctl"); + return -1; + } + printf("Frontend set\n"); + return 0; +} + + +NOTE: While it is possible to directly call the Kernel code like the + above example, it is strongly recommended to use + libdvbv5, + as it provides abstraction to work with the supported digital TV standards + and provides methods for usual operations like program scanning and to + read/write channel descriptor files. +
-DTV stats type +struct <structname>dtv_stats</structname> struct dtv_stats { __u8 scale; /* enum fecap_scale_params type */ @@ -20,19 +94,19 @@ struct dtv_stats {
-DTV stats type +struct <structname>dtv_fe_stats</structname> #define MAX_DTV_STATS 4 struct dtv_fe_stats { __u8 len; - struct dtv_stats stat[MAX_DTV_STATS]; + &dtv-stats; stat[MAX_DTV_STATS]; } __packed;
-DTV property type +struct <structname>dtv_property</structname> /* Reserved fields should be set to 0 */ @@ -41,7 +115,7 @@ struct dtv_property { __u32 reserved[3]; union { __u32 data; - struct dtv_fe_stats st; + &dtv-fe-stats; st; struct { __u8 data[32]; __u32 len; @@ -57,115 +131,19 @@ struct dtv_property {
-DTV properties type +struct <structname>dtv_properties</structname> struct dtv_properties { __u32 num; - struct dtv_property *props; + &dtv-property; *props; };
-
-FE_GET_PROPERTY -DESCRIPTION - - -This ioctl call returns one or more frontend properties. This call only - requires read-only access to the device. - - -SYNOPSIS - - -int ioctl(int fd, int request = FE_GET_PROPERTY, - dtv_properties ⋆props); - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int num - -Equals FE_GET_PROPERTY for this command. - - -struct dtv_property *props - -Points to the location where the front-end property commands are stored. - - -&return-value-dvb; - - EOPNOTSUPP - Property type not supported. - -
- -
-FE_SET_PROPERTY -DESCRIPTION - - -This ioctl call sets one or more frontend properties. This call - requires read/write access to the device. - - -SYNOPSIS - - -int ioctl(int fd, int request = FE_SET_PROPERTY, - dtv_properties ⋆props); - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int num - -Equals FE_SET_PROPERTY for this command. - - -struct dtv_property *props - -Points to the location where the front-end property commands are stored. - - -&return-value-dvb; - - EOPNOTSUPP - Property type not supported. - -
-
Property types -On FE_GET_PROPERTY/FE_SET_PROPERTY, +On FE_GET_PROPERTY and FE_SET_PROPERTY, the actual action is determined by the dtv_property cmd/data pairs. With one single ioctl, is possible to get/set up to 64 properties. The actual meaning of each property is described on the next sections. @@ -193,7 +171,7 @@ get/set up to 64 properties. The actual meaning of each property is described on Central frequency of the channel. Notes: - 1)For satellital delivery systems, it is measured in kHz. + 1)For satellite delivery systems, it is measured in kHz. For the other ones, it is measured in Hz. 2)For ISDB-T, the channels are usually transmitted with an offset of 143kHz. E.g. a valid frequency could be 474143 kHz. The stepping is bound to the bandwidth of @@ -205,25 +183,78 @@ get/set up to 64 properties. The actual meaning of each property is described on
<constant>DTV_MODULATION</constant> -Specifies the frontend modulation type for cable and satellite types. The modulation can be one of the types bellow: - - typedef enum fe_modulation { - QPSK, - QAM_16, - QAM_32, - QAM_64, - QAM_128, - QAM_256, - QAM_AUTO, - VSB_8, - VSB_16, - PSK_8, - APSK_16, - APSK_32, - DQPSK, - QAM_4_NR, - } fe_modulation_t; - +Specifies the frontend modulation type for delivery systems that supports + more than one modulation type. The modulation can be one of the types + defined by &fe-modulation;. + + +
+Modulation property + +Most of the digital TV standards currently offers more than one possible + modulation (sometimes called as "constellation" on some standards). This + enum contains the values used by the Kernel. Please note that not all + modulations are supported by a given standard. + + + enum fe_modulation + + &cs-def; + + + ID + Description + + + + + QPSK + QPSK modulation + + QAM_16 + 16-QAM modulation + + QAM_32 + 32-QAM modulation + + QAM_64 + 64-QAM modulation + + QAM_128 + 128-QAM modulation + + QAM_256 + 256-QAM modulation + + QAM_AUTO + Autodetect QAM modulation + + VSB_8 + 8-VSB modulation + + VSB_16 + 16-VSB modulation + + PSK_8 + 8-PSK modulation + + APSK_16 + 16-APSK modulation + + APSK_32 + 32-APSK modulation + + DQPSK + DQPSK modulation + + QAM_4_NR + 4-QAM-NR modulation + + + +
+
+
<constant>DTV_BANDWIDTH_HZ</constant> @@ -253,19 +284,45 @@ get/set up to 64 properties. The actual meaning of each property is described on
<constant>DTV_INVERSION</constant> - The Inversion field can take one of these values: - - - typedef enum fe_spectral_inversion { - INVERSION_OFF, - INVERSION_ON, - INVERSION_AUTO - } fe_spectral_inversion_t; - - It indicates if spectral inversion should be presumed or not. In the automatic setting - (INVERSION_AUTO) the hardware will try to figure out the correct setting by - itself. - + + Specifies if the frontend should do spectral inversion or not. + +
+enum fe_modulation: Frontend spectral inversion + +This parameter indicates if spectral inversion should be presumed or not. + In the automatic setting (INVERSION_AUTO) the hardware + will try to figure out the correct setting by itself. If the hardware + doesn't support, the DVB core will try to lock at the carrier first with + inversion off. If it fails, it will try to enable inversion. + + + + enum fe_modulation + + &cs-def; + + + ID + Description + + + + + INVERSION_OFF + Don't do spectral band inversion. + + INVERSION_ON + Do spectral band inversion. + + INVERSION_AUTO + Autodetect spectral band inversion. + + + +
+
+
<constant>DTV_DISEQC_MASTER</constant> @@ -279,25 +336,64 @@ get/set up to 64 properties. The actual meaning of each property is described on <constant>DTV_INNER_FEC</constant> Used cable/satellite transmissions. The acceptable values are: - -typedef enum fe_code_rate { - FEC_NONE = 0, - FEC_1_2, - FEC_2_3, - FEC_3_4, - FEC_4_5, - FEC_5_6, - FEC_6_7, - FEC_7_8, - FEC_8_9, - FEC_AUTO, - FEC_3_5, - FEC_9_10, - FEC_2_5, -} fe_code_rate_t; - - which correspond to error correction rates of 1/2, 2/3, etc., - no error correction or auto detection. +
+enum fe_code_rate: type of the Forward Error Correction. + + + enum fe_code_rate + + &cs-def; + + + ID + Description + + + + + FEC_NONE + No Forward Error Correction Code + + FEC_AUTO + Autodetect Error Correction Code + + FEC_1_2 + Forward Error Correction Code 1/2 + + FEC_2_3 + Forward Error Correction Code 2/3 + + FEC_3_4 + Forward Error Correction Code 3/4 + + FEC_4_5 + Forward Error Correction Code 4/5 + + FEC_5_6 + Forward Error Correction Code 5/6 + + FEC_6_7 + Forward Error Correction Code 6/7 + + FEC_7_8 + Forward Error Correction Code 7/8 + + FEC_8_9 + Forward Error Correction Code 8/9 + + FEC_9_10 + Forward Error Correction Code 9/10 + + FEC_2_5 + Forward Error Correction Code 2/5 + + FEC_3_5 + Forward Error Correction Code 3/5 + + + +
+
<constant>DTV_VOLTAGE</constant> @@ -305,12 +401,31 @@ typedef enum fe_code_rate { the polarzation (horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched consistently to the DiSEqC commands as described in the DiSEqC spec. - - typedef enum fe_sec_voltage { - SEC_VOLTAGE_13, - SEC_VOLTAGE_18 - } fe_sec_voltage_t; - + + + enum fe_sec_voltage + + &cs-def; + + + ID + Description + + + + + SEC_VOLTAGE_13 + Set DC voltage level to 13V + + SEC_VOLTAGE_18 + Set DC voltage level to 18V + + SEC_VOLTAGE_OFF + Don't send any voltage to the antenna + + + +
<constant>DTV_TONE</constant> @@ -321,13 +436,30 @@ typedef enum fe_code_rate { Sets DVB-S2 pilot
fe_pilot type - -typedef enum fe_pilot { - PILOT_ON, - PILOT_OFF, - PILOT_AUTO, -} fe_pilot_t; - + + enum fe_pilot + + &cs-def; + + + ID + Description + + + + + PILOT_ON + Pilot tones enabled + + PILOT_OFF + Pilot tones disabled + + PILOT_AUTO + Autodetect pilot tones + + + +
@@ -336,14 +468,33 @@ typedef enum fe_pilot {
fe_rolloff type - -typedef enum fe_rolloff { - ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */ - ROLLOFF_20, - ROLLOFF_25, - ROLLOFF_AUTO, -} fe_rolloff_t; - + + enum fe_rolloff + + &cs-def; + + + ID + Description + + + + + ROLLOFF_35 + Roloff factor: α=35% + + ROLLOFF_20 + Roloff factor: α=20% + + ROLLOFF_25 + Roloff factor: α=25% + + ROLLOFF_AUTO + Auto-detect the roloff factor. + + + +
@@ -364,31 +515,82 @@ typedef enum fe_rolloff {
fe_delivery_system type Possible values: - -typedef enum fe_delivery_system { - SYS_UNDEFINED, - SYS_DVBC_ANNEX_A, - SYS_DVBC_ANNEX_B, - SYS_DVBT, - SYS_DSS, - SYS_DVBS, - SYS_DVBS2, - SYS_DVBH, - SYS_ISDBT, - SYS_ISDBS, - SYS_ISDBC, - SYS_ATSC, - SYS_ATSCMH, - SYS_DTMB, - SYS_CMMB, - SYS_DAB, - SYS_DVBT2, - SYS_TURBO, - SYS_DVBC_ANNEX_C, -} fe_delivery_system_t; - -
+ + enum fe_delivery_system + + &cs-def; + + + ID + Description + + + + + SYS_UNDEFINED + Undefined standard. Generally, indicates an error + + SYS_DVBC_ANNEX_A + Cable TV: DVB-C following ITU-T J.83 Annex A spec + + SYS_DVBC_ANNEX_B + Cable TV: DVB-C following ITU-T J.83 Annex B spec (ClearQAM) + + SYS_DVBC_ANNEX_C + Cable TV: DVB-C following ITU-T J.83 Annex C spec + + SYS_ISDBC + Cable TV: ISDB-C (no drivers yet) + + SYS_DVBT + Terrestral TV: DVB-T + + SYS_DVBT2 + Terrestral TV: DVB-T2 + + SYS_ISDBT + Terrestral TV: ISDB-T + + SYS_ATSC + Terrestral TV: ATSC + + SYS_ATSCMH + Terrestral TV (mobile): ATSC-M/H + + SYS_DTMB + Terrestrial TV: DTMB + + SYS_DVBS + Satellite TV: DVB-S + + SYS_DVBS2 + Satellite TV: DVB-S2 + + SYS_TURBO + Satellite TV: DVB-S Turbo + + SYS_ISDBS + Satellite TV: ISDB-S + + SYS_DAB + Digital audio: DAB (not fully supported) + + SYS_DSS + Satellite TV:"DSS (not fully supported) + + SYS_CMMB + Terrestral TV (mobile):CMMB (not fully supported) + + SYS_DVBH + Terrestral TV (mobile): DVB-H (standard deprecated) + + + +
+ + +
<constant>DTV_ISDBT_PARTIAL_RECEPTION</constant> @@ -630,114 +832,177 @@ typedef enum fe_delivery_system {
<constant>DTV_ATSCMH_RS_FRAME_MODE</constant> - RS frame mode. + Reed Solomon (RS) frame mode. Possible values are: - - -typedef enum atscmh_rs_frame_mode { - ATSCMH_RSFRAME_PRI_ONLY = 0, - ATSCMH_RSFRAME_PRI_SEC = 1, -} atscmh_rs_frame_mode_t; - - + + enum atscmh_rs_frame_mode + + &cs-def; + + + ID + Description + + + + + ATSCMH_RSFRAME_PRI_ONLY + Single Frame: There is only a primary RS Frame for all + Group Regions. + + ATSCMH_RSFRAME_PRI_SEC + Dual Frame: There are two separate RS Frames: Primary RS + Frame for Group Region A and B and Secondary RS Frame for Group + Region C and D. + + + +
<constant>DTV_ATSCMH_RS_FRAME_ENSEMBLE</constant> - RS frame ensemble. + Reed Solomon(RS) frame ensemble. Possible values are: - - -typedef enum atscmh_rs_frame_ensemble { - ATSCMH_RSFRAME_ENS_PRI = 0, - ATSCMH_RSFRAME_ENS_SEC = 1, -} atscmh_rs_frame_ensemble_t; - - + + enum atscmh_rs_frame_ensemble + + &cs-def; + + + ID + Description + + + + + ATSCMH_RSFRAME_ENS_PRI + Primary Ensemble. + + AATSCMH_RSFRAME_PRI_SEC + Secondary Ensemble. + + AATSCMH_RSFRAME_RES + Reserved. Shouldn't be used. + + + +
<constant>DTV_ATSCMH_RS_CODE_MODE_PRI</constant> - RS code mode (primary). + Reed Solomon (RS) code mode (primary). Possible values are: - - -typedef enum atscmh_rs_code_mode { - ATSCMH_RSCODE_211_187 = 0, - ATSCMH_RSCODE_223_187 = 1, - ATSCMH_RSCODE_235_187 = 2, -} atscmh_rs_code_mode_t; - - + + enum atscmh_rs_code_mode + + &cs-def; + + + ID + Description + + + + + ATSCMH_RSCODE_211_187 + Reed Solomon code (211,187). + + ATSCMH_RSCODE_223_187 + Reed Solomon code (223,187). + + ATSCMH_RSCODE_235_187 + Reed Solomon code (235,187). + + ATSCMH_RSCODE_RES + Reserved. Shouldn't be used. + + + +
<constant>DTV_ATSCMH_RS_CODE_MODE_SEC</constant> - RS code mode (secondary). - Possible values are: - -typedef enum atscmh_rs_code_mode { - ATSCMH_RSCODE_211_187 = 0, - ATSCMH_RSCODE_223_187 = 1, - ATSCMH_RSCODE_235_187 = 2, -} atscmh_rs_code_mode_t; - + Reed Solomon (RS) code mode (secondary). + Possible values are the same as documented on + &atscmh-rs-code-mode;:
<constant>DTV_ATSCMH_SCCC_BLOCK_MODE</constant> Series Concatenated Convolutional Code Block Mode. Possible values are: - - -typedef enum atscmh_sccc_block_mode { - ATSCMH_SCCC_BLK_SEP = 0, - ATSCMH_SCCC_BLK_COMB = 1, -} atscmh_sccc_block_mode_t; - - + + enum atscmh_scc_block_mode + + &cs-def; + + + ID + Description + + + + + ATSCMH_SCCC_BLK_SEP + Separate SCCC: the SCCC outer code mode shall be set independently + for each Group Region (A, B, C, D) + + ATSCMH_SCCC_BLK_COMB + Combined SCCC: all four Regions shall have the same SCCC outer + code mode. + + ATSCMH_SCCC_BLK_RES + Reserved. Shouldn't be used. + + + +
<constant>DTV_ATSCMH_SCCC_CODE_MODE_A</constant> Series Concatenated Convolutional Code Rate. Possible values are: - - -typedef enum atscmh_sccc_code_mode { - ATSCMH_SCCC_CODE_HLF = 0, - ATSCMH_SCCC_CODE_QTR = 1, -} atscmh_sccc_code_mode_t; - - + + enum atscmh_sccc_code_mode + + &cs-def; + + + ID + Description + + + + + ATSCMH_SCCC_CODE_HLF + The outer code rate of a SCCC Block is 1/2 rate. + + ATSCMH_SCCC_CODE_QTR + The outer code rate of a SCCC Block is 1/4 rate. + + ATSCMH_SCCC_CODE_RES + to be documented. + + + +
<constant>DTV_ATSCMH_SCCC_CODE_MODE_B</constant> Series Concatenated Convolutional Code Rate. - Possible values are: - -typedef enum atscmh_sccc_code_mode { - ATSCMH_SCCC_CODE_HLF = 0, - ATSCMH_SCCC_CODE_QTR = 1, -} atscmh_sccc_code_mode_t; - + Possible values are the same as documented on + &atscmh-sccc-code-mode;.
<constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant> Series Concatenated Convolutional Code Rate. - Possible values are: - -typedef enum atscmh_sccc_code_mode { - ATSCMH_SCCC_CODE_HLF = 0, - ATSCMH_SCCC_CODE_QTR = 1, -} atscmh_sccc_code_mode_t; - + Possible values are the same as documented on + &atscmh-sccc-code-mode;.
<constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant> Series Concatenated Convolutional Code Rate. - Possible values are: - -typedef enum atscmh_sccc_code_mode { - ATSCMH_SCCC_CODE_HLF = 0, - ATSCMH_SCCC_CODE_QTR = 1, -} atscmh_sccc_code_mode_t; - + Possible values are the same as documented on + &atscmh-sccc-code-mode;.
@@ -746,65 +1011,74 @@ typedef enum atscmh_sccc_code_mode {
<constant>DTV_CODE_RATE_HP</constant> - Used on terrestrial transmissions. The acceptable values are: + Used on terrestrial transmissions. The acceptable values are + the ones described at &fe-transmit-mode-t;. - -typedef enum fe_code_rate { - FEC_NONE = 0, - FEC_1_2, - FEC_2_3, - FEC_3_4, - FEC_4_5, - FEC_5_6, - FEC_6_7, - FEC_7_8, - FEC_8_9, - FEC_AUTO, - FEC_3_5, - FEC_9_10, -} fe_code_rate_t; -
<constant>DTV_CODE_RATE_LP</constant> - Used on terrestrial transmissions. The acceptable values are: + Used on terrestrial transmissions. The acceptable values are + the ones described at &fe-transmit-mode-t;. - -typedef enum fe_code_rate { - FEC_NONE = 0, - FEC_1_2, - FEC_2_3, - FEC_3_4, - FEC_4_5, - FEC_5_6, - FEC_6_7, - FEC_7_8, - FEC_8_9, - FEC_AUTO, - FEC_3_5, - FEC_9_10, -} fe_code_rate_t; - +
+
<constant>DTV_GUARD_INTERVAL</constant> Possible values are: - -typedef enum fe_guard_interval { - GUARD_INTERVAL_1_32, - GUARD_INTERVAL_1_16, - GUARD_INTERVAL_1_8, - GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO, - GUARD_INTERVAL_1_128, - GUARD_INTERVAL_19_128, - GUARD_INTERVAL_19_256, - GUARD_INTERVAL_PN420, - GUARD_INTERVAL_PN595, - GUARD_INTERVAL_PN945, -} fe_guard_interval_t; - + +
+Modulation guard interval + + + enum fe_guard_interval + + &cs-def; + + + ID + Description + + + + + GUARD_INTERVAL_AUTO + Autodetect the guard interval + + GUARD_INTERVAL_1_128 + Guard interval 1/128 + + GUARD_INTERVAL_1_32 + Guard interval 1/32 + + GUARD_INTERVAL_1_16 + Guard interval 1/16 + + GUARD_INTERVAL_1_8 + Guard interval 1/8 + + GUARD_INTERVAL_1_4 + Guard interval 1/4 + + GUARD_INTERVAL_19_128 + Guard interval 19/128 + + GUARD_INTERVAL_19_256 + Guard interval 19/256 + + GUARD_INTERVAL_PN420 + PN length 420 (1/4) + + GUARD_INTERVAL_PN595 + PN length 595 (1/6) + + GUARD_INTERVAL_PN945 + PN length 945 (1/9) + + + +
Notes: 1) If DTV_GUARD_INTERVAL is set the GUARD_INTERVAL_AUTO the hardware will @@ -812,26 +1086,64 @@ typedef enum fe_guard_interval { in the missing parameters. 2) Intervals 1/128, 19/128 and 19/256 are used only for DVB-T2 at present 3) DTMB specifies PN420, PN595 and PN945. +
<constant>DTV_TRANSMISSION_MODE</constant> - Specifies the number of carriers used by the standard + Specifies the number of carriers used by the standard. + This is used only on OFTM-based standards, e. g. + DVB-T/T2, ISDB-T, DTMB + +
+enum fe_transmit_mode: Number of carriers per channel + + + enum fe_transmit_mode + + &cs-def; + + + ID + Description + + + + + TRANSMISSION_MODE_AUTO + Autodetect transmission mode. The hardware will try to find + the correct FFT-size (if capable) to fill in the missing + parameters. + + TRANSMISSION_MODE_1K + Transmission mode 1K + + TRANSMISSION_MODE_2K + Transmission mode 2K + + TRANSMISSION_MODE_8K + Transmission mode 8K + + TRANSMISSION_MODE_4K + Transmission mode 4K + + TRANSMISSION_MODE_16K + Transmission mode 16K + + TRANSMISSION_MODE_32K + Transmission mode 32K + + TRANSMISSION_MODE_C1 + Single Carrier (C=1) transmission mode (DTMB) + + TRANSMISSION_MODE_C3780 + Multi Carrier (C=3780) transmission mode (DTMB) + + + +
+ - Possible values are: - -typedef enum fe_transmit_mode { - TRANSMISSION_MODE_2K, - TRANSMISSION_MODE_8K, - TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K, - TRANSMISSION_MODE_1K, - TRANSMISSION_MODE_16K, - TRANSMISSION_MODE_32K, - TRANSMISSION_MODE_C1, - TRANSMISSION_MODE_C3780, -} fe_transmit_mode_t; - Notes: 1) ISDB-T supports three carrier/symbol-size: 8K, 4K, 2K. It is called 'mode' in the standard: Mode 1 is 2K, mode 2 is 4K, mode 3 is 8K @@ -842,19 +1154,48 @@ typedef enum fe_transmit_mode { 3) DVB-T specifies 2K and 8K as valid sizes. 4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K. 5) DTMB specifies C1 and C3780. +
<constant>DTV_HIERARCHY</constant> Frontend hierarchy - -typedef enum fe_hierarchy { - HIERARCHY_NONE, - HIERARCHY_1, - HIERARCHY_2, - HIERARCHY_4, - HIERARCHY_AUTO - } fe_hierarchy_t; - + + +
+Frontend hierarchy + + + enum fe_hierarchy + + &cs-def; + + + ID + Description + + + + + HIERARCHY_NONE + No hierarchy + + HIERARCHY_AUTO + Autodetect hierarchy (if supported) + + HIERARCHY_1 + Hierarchy 1 + + HIERARCHY_2 + Hierarchy 2 + + HIERARCHY_4 + Hierarchy 4 + + + +
+
+
<constant>DTV_STREAM_ID</constant> @@ -891,15 +1232,37 @@ typedef enum fe_hierarchy {
<constant>DTV_INTERLEAVING</constant> - Interleaving mode - -enum fe_interleaving { - INTERLEAVING_NONE, - INTERLEAVING_AUTO, - INTERLEAVING_240, - INTERLEAVING_720, -}; - + +Time interleaving to be used. Currently, used only on DTMB. + + + enum fe_interleaving + + &cs-def; + + + ID + Description + + + + + INTERLEAVING_NONE + No interleaving. + + INTERLEAVING_AUTO + Auto-detect interleaving. + + INTERLEAVING_240 + Interleaving of 240 symbols. + + INTERLEAVING_720 + Interleaving of 720 symbols. + + + +
+
<constant>DTV_LNA</constant> @@ -921,7 +1284,7 @@ enum fe_interleaving { For most delivery systems, dtv_property.stat.len will be 1 if the stats is supported, and the properties will return a single value for each parameter. - It should be noticed, however, that new OFDM delivery systems + It should be noted, however, that new OFDM delivery systems like ISDB can use different modulation types for each group of carriers. On such standards, up to 3 groups of statistics can be provided, and dtv_property.stat.len is updated @@ -940,10 +1303,10 @@ enum fe_interleaving { and uvalue is for unsigned values (counters, relative scale) scale - Scale for the value. It can be: - FE_SCALE_NOT_AVAILABLE - The parameter is supported by the frontend, but it was not possible to collect it (could be a transitory or permanent condition) - FE_SCALE_DECIBEL - parameter is a signed value, measured in 1/1000 dB - FE_SCALE_RELATIVE - parameter is a unsigned value, where 0 means 0% and 65535 means 100%. - FE_SCALE_COUNTER - parameter is a unsigned value that counts the occurrence of an event, like bit error, block error, or lapsed time. + FE_SCALE_NOT_AVAILABLE - The parameter is supported by the frontend, but it was not possible to collect it (could be a transitory or permanent condition) + FE_SCALE_DECIBEL - parameter is a signed value, measured in 1/1000 dB + FE_SCALE_RELATIVE - parameter is a unsigned value, where 0 means 0% and 65535 means 100%. + FE_SCALE_COUNTER - parameter is a unsigned value that counts the occurrence of an event, like bit error, block error, or lapsed time. @@ -953,7 +1316,7 @@ enum fe_interleaving { Possible scales for this metric are: FE_SCALE_NOT_AVAILABLE - it failed to measure it, or the measurement was not complete yet. - FE_SCALE_DECIBEL - signal strength is in 0.0001 dBm units, power measured in miliwatts. This value is generally negative. + FE_SCALE_DECIBEL - signal strength is in 0.001 dBm units, power measured in miliwatts. This value is generally negative. FE_SCALE_RELATIVE - The frontend provides a 0% to 100% measurement for power (actually, 0 to 65535).
@@ -963,7 +1326,7 @@ enum fe_interleaving { Possible scales for this metric are: FE_SCALE_NOT_AVAILABLE - it failed to measure it, or the measurement was not complete yet. - FE_SCALE_DECIBEL - Signal/Noise ratio is in 0.0001 dB units. + FE_SCALE_DECIBEL - Signal/Noise ratio is in 0.001 dB units. FE_SCALE_RELATIVE - The frontend provides a 0% to 100% measurement for Signal/Noise (actually, 0 to 65535).
@@ -985,7 +1348,7 @@ enum fe_interleaving { <constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant> Measures the amount of bits received before the inner code block, during the same period as DTV_STAT_PRE_ERROR_BIT_COUNT measurement was taken. - It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream, + It should be noted that this measurement can be smaller than the total amount of bits on the transport stream, as the frontend may need to manually restart the measurement, losing some data between each measurement interval. This measurement is monotonically increased, as the frontend gets more bit count measurements. The frontend may reset it when a channel/transponder is tuned. @@ -1014,7 +1377,7 @@ enum fe_interleaving { <constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant> Measures the amount of bits received after the inner coding, during the same period as DTV_STAT_POST_ERROR_BIT_COUNT measurement was taken. - It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream, + It should be noted that this measurement can be smaller than the total amount of bits on the transport stream, as the frontend may need to manually restart the measurement, losing some data between each measurement interval. This measurement is monotonically increased, as the frontend gets more bit count measurements. The frontend may reset it when a channel/transponder is tuned. @@ -1255,8 +1618,8 @@ enum fe_interleaving { In addition, the DTV QoS statistics are also valid.
-
- Properties used on satellital delivery systems +
+ Properties used on satellite delivery systems
DVB-S delivery system The following parameters are valid for DVB-S: diff --git a/Documentation/DocBook/media/dvb/examples.xml b/Documentation/DocBook/media/dvb/examples.xml index f037e568e..c9f68c718 100644 --- a/Documentation/DocBook/media/dvb/examples.xml +++ b/Documentation/DocBook/media/dvb/examples.xml @@ -1,8 +1,10 @@ Examples In this section we would like to present some examples for using the DVB API. -Maintainer note: This section is out of date. Please refer to the sample programs packaged -with the driver distribution from . +NOTE: This section is out of date, and the code below won't even + compile. Please refer to the + libdvbv5 + for updated/recommended examples.
diff --git a/Documentation/DocBook/media/dvb/fe-diseqc-recv-slave-reply.xml b/Documentation/DocBook/media/dvb/fe-diseqc-recv-slave-reply.xml new file mode 100644 index 000000000..4595dbfff --- /dev/null +++ b/Documentation/DocBook/media/dvb/fe-diseqc-recv-slave-reply.xml @@ -0,0 +1,78 @@ + + + ioctl FE_DISEQC_RECV_SLAVE_REPLY + &manvol; + + + + FE_DISEQC_RECV_SLAVE_REPLY + Receives reply from a DiSEqC 2.0 command + + + + + + int ioctl + int fd + int request + struct dvb_diseqc_slave_reply *argp + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_DISEQC_RECV_SLAVE_REPLY + + + + argp + + pointer to &dvb-diseqc-slave-reply; + + + + + + + Description + + Receives reply from a DiSEqC 2.0 command. +&return-value-dvb; + + + struct <structname>dvb_diseqc_slave_reply</structname> + + &cs-str; + + + uint8_t + msg[4] + DiSEqC message (framing, data[3]) + + uint8_t + msg_len + Length of the DiSEqC message. Valid values are 0 to 4, + where 0 means no msg + + int + timeout + Return from ioctl after timeout ms with errorcode when no + message was received + + + +
+ +
+
diff --git a/Documentation/DocBook/media/dvb/fe-diseqc-reset-overload.xml b/Documentation/DocBook/media/dvb/fe-diseqc-reset-overload.xml new file mode 100644 index 000000000..c104df77e --- /dev/null +++ b/Documentation/DocBook/media/dvb/fe-diseqc-reset-overload.xml @@ -0,0 +1,51 @@ + + + ioctl FE_DISEQC_RESET_OVERLOAD + &manvol; + + + + FE_DISEQC_RESET_OVERLOAD + Restores the power to the antenna subsystem, if it was powered + off due to power overload. + + + + + + int ioctl + int fd + int request + NULL + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_DISEQC_RESET_OVERLOAD + + + + + + + Description + + If the bus has been automatically powered off due to power overload, this ioctl + call restores the power to the bus. The call requires read/write access to the + device. This call has no effect if the device is manually powered off. Not all + DVB adapters support this ioctl. +&return-value-dvb; + + diff --git a/Documentation/DocBook/media/dvb/fe-diseqc-send-burst.xml b/Documentation/DocBook/media/dvb/fe-diseqc-send-burst.xml new file mode 100644 index 000000000..9f6a68f32 --- /dev/null +++ b/Documentation/DocBook/media/dvb/fe-diseqc-send-burst.xml @@ -0,0 +1,89 @@ + + + ioctl FE_DISEQC_SEND_BURST + &manvol; + + + + FE_DISEQC_SEND_BURST + Sends a 22KHz tone burst for 2x1 mini DiSEqC satellite selection. + + + + + + int ioctl + int fd + int request + enum fe_sec_mini_cmd *tone + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_DISEQC_SEND_BURST + + + + tone + + pointer to &fe-sec-mini-cmd; + + + + + + + Description + +This ioctl is used to set the generation of a 22kHz tone burst for mini + DiSEqC satellite + selection for 2x1 switches. + This call requires read/write permissions. +It provides support for what's specified at + Digital Satellite Equipment Control + (DiSEqC) - Simple "ToneBurst" Detection Circuit specification. + +&return-value-dvb; + + + +enum fe_sec_mini_cmd + + + enum fe_sec_mini_cmd + + &cs-def; + + + ID + Description + + + + + SEC_MINI_A + Sends a mini-DiSEqC 22kHz '0' Tone Burst to + select satellite-A + + SEC_MINI_B + Sends a mini-DiSEqC 22kHz '1' Data Burst to + select satellite-B + + + +
+
+ +
diff --git a/Documentation/DocBook/media/dvb/fe-diseqc-send-master-cmd.xml b/Documentation/DocBook/media/dvb/fe-diseqc-send-master-cmd.xml new file mode 100644 index 000000000..38cf313e1 --- /dev/null +++ b/Documentation/DocBook/media/dvb/fe-diseqc-send-master-cmd.xml @@ -0,0 +1,72 @@ + + + ioctl FE_DISEQC_SEND_MASTER_CMD + &manvol; + + + + FE_DISEQC_SEND_MASTER_CMD + Sends a DiSEqC command + + + + + + int ioctl + int fd + int request + struct dvb_diseqc_master_cmd *argp + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_DISEQC_SEND_MASTER_CMD + + + + argp + + pointer to &dvb-diseqc-master-cmd; + + + + + + + Description + + Sends a DiSEqC command to the antenna subsystem. +&return-value-dvb; + + + struct <structname>dvb_diseqc_master_cmd</structname> + + &cs-str; + + + uint8_t + msg[6] + DiSEqC message (framing, address, command, data[3]) + + uint8_t + msg_len + Length of the DiSEqC message. Valid values are 3 to 6 + + + +
+ +
+
diff --git a/Documentation/DocBook/media/dvb/fe-enable-high-lnb-voltage.xml b/Documentation/DocBook/media/dvb/fe-enable-high-lnb-voltage.xml new file mode 100644 index 000000000..c11890b18 --- /dev/null +++ b/Documentation/DocBook/media/dvb/fe-enable-high-lnb-voltage.xml @@ -0,0 +1,61 @@ + + + ioctl FE_ENABLE_HIGH_LNB_VOLTAGE + &manvol; + + + + FE_ENABLE_HIGH_LNB_VOLTAGE + Select output DC level between normal LNBf voltages or higher + LNBf voltages. + + + + + + int ioctl + int fd + int request + unsigned int high + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_ENABLE_HIGH_LNB_VOLTAGE + + + + high + + Valid flags: + + 0 - normal 13V and 18V. + >0 - enables slightly higher voltages instead of + 13/18V, in order to compensate for long antenna cables. + + + + + + + + Description + + Select output DC level between normal LNBf voltages or higher + LNBf voltages between 0 (normal) or a value grater than 0 for higher + voltages. +&return-value-dvb; + + diff --git a/Documentation/DocBook/media/dvb/fe-get-info.xml b/Documentation/DocBook/media/dvb/fe-get-info.xml new file mode 100644 index 000000000..ed0eeb29d --- /dev/null +++ b/Documentation/DocBook/media/dvb/fe-get-info.xml @@ -0,0 +1,266 @@ + + + ioctl FE_GET_INFO + &manvol; + + + + FE_GET_INFO + Query DVB frontend capabilities and returns information about + the front-end. This call only requires read-only access to the device + + + + + + int ioctl + int fd + int request + struct dvb_frontend_info *argp + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_GET_INFO + + + + argp + + pointer to struct &dvb-frontend-info; + + + + + + + Description + + All DVB frontend devices support the +FE_GET_INFO ioctl. It is used to identify +kernel devices compatible with this specification and to obtain +information about driver and hardware capabilities. The ioctl takes a +pointer to dvb_frontend_info which is filled by the driver. When the +driver is not compatible with this specification the ioctl returns an error. + +&return-value-dvb; + + + struct <structname>dvb_frontend_info</structname> + + &cs-str; + + + char + name[128] + Name of the frontend + + fe_type_t + type + DEPRECATED. DVBv3 type. Should not be used on modern programs, as a + frontend may have more than one type. So, the DVBv5 API should + be used instead to enumerate and select the frontend type. + + uint32_t + frequency_min + Minimal frequency supported by the frontend + + uint32_t + frequency_max + Maximal frequency supported by the frontend + + uint32_t + frequency_stepsize + Frequency step - all frequencies are multiple of this value + + uint32_t + frequency_tolerance + Tolerance of the frequency + + uint32_t + symbol_rate_min + Minimal symbol rate (for Cable/Satellite systems), in bauds + + uint32_t + symbol_rate_max + Maximal symbol rate (for Cable/Satellite systems), in bauds + + uint32_t + symbol_rate_tolerance + Maximal symbol rate tolerance, in ppm + + uint32_t + notifier_delay + DEPRECATED. Not used by any driver. + + &fe-caps; + caps + Capabilities supported by the frontend + + + +
+ + NOTE: The frequencies are specified in Hz for Terrestrial and Cable + systems. They're specified in kHz for Satellite systems +
+ + +frontend capabilities + +Capabilities describe what a frontend can do. Some capabilities are + supported only on some specific frontend types. + + + enum fe_caps + + &cs-def; + + + ID + Description + + + + + FE_IS_STUPID + There's something wrong at the frontend, and it can't + report its capabilities + + + FE_CAN_INVERSION_AUTO + The frontend is capable of auto-detecting inversion + + + FE_CAN_FEC_1_2 + The frontend supports FEC 1/2 + + + FE_CAN_FEC_2_3 + The frontend supports FEC 2/3 + + + FE_CAN_FEC_3_4 + The frontend supports FEC 3/4 + + + FE_CAN_FEC_4_5 + The frontend supports FEC 4/5 + + + FE_CAN_FEC_5_6 + The frontend supports FEC 5/6 + + + FE_CAN_FEC_6_7 + The frontend supports FEC 6/7 + + + FE_CAN_FEC_7_8 + The frontend supports FEC 7/8 + + + FE_CAN_FEC_8_9 + The frontend supports FEC 8/9 + + + FE_CAN_FEC_AUTO + The frontend can autodetect FEC. + + + FE_CAN_QPSK + The frontend supports QPSK modulation + + + FE_CAN_QAM_16 + The frontend supports 16-QAM modulation + + + FE_CAN_QAM_32 + The frontend supports 32-QAM modulation + + + FE_CAN_QAM_64 + The frontend supports 64-QAM modulation + + + FE_CAN_QAM_128 + The frontend supports 128-QAM modulation + + + FE_CAN_QAM_256 + The frontend supports 256-QAM modulation + + + FE_CAN_QAM_AUTO + The frontend can autodetect modulation + + + FE_CAN_TRANSMISSION_MODE_AUTO + The frontend can autodetect the transmission mode + + + FE_CAN_BANDWIDTH_AUTO + The frontend can autodetect the bandwidth + + + FE_CAN_GUARD_INTERVAL_AUTO + The frontend can autodetect the guard interval + + + FE_CAN_HIERARCHY_AUTO + The frontend can autodetect hierarch + + + FE_CAN_8VSB + The frontend supports 8-VSB modulation + + + FE_CAN_16VSB + The frontend supports 16-VSB modulation + + + FE_HAS_EXTENDED_CAPS + Currently, unused + + + FE_CAN_MULTISTREAM + The frontend supports multistream filtering + + + FE_CAN_TURBO_FEC + The frontend supports turbo FEC modulation + + + FE_CAN_2G_MODULATION + The frontend supports "2nd generation modulation" (DVB-S2/T2)> + + + FE_NEEDS_BENDING + Not supported anymore, don't use it + + + FE_CAN_RECOVER + The frontend can recover from a cable unplug automatically + + + FE_CAN_MUTE_TS + The frontend can stop spurious TS data output + + + +
+
+
diff --git a/Documentation/DocBook/media/dvb/fe-get-property.xml b/Documentation/DocBook/media/dvb/fe-get-property.xml new file mode 100644 index 000000000..53a170ed3 --- /dev/null +++ b/Documentation/DocBook/media/dvb/fe-get-property.xml @@ -0,0 +1,81 @@ + + + ioctl FE_SET_PROPERTY, FE_GET_PROPERTY + &manvol; + + + + FE_SET_PROPERTY + FE_GET_PROPERTY + FE_SET_PROPERTY sets one or more frontend properties. + FE_GET_PROPERTY returns one or more frontend properties. + + + + + + int ioctl + int fd + int request + struct dtv_properties *argp + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_SET_PROPERTY, FE_GET_PROPERTY + + + + argp + + pointer to &dtv-properties; + + + + + + + Description + + All DVB frontend devices support the +FE_SET_PROPERTY and FE_GET_PROPERTY +ioctls. The supported properties and statistics depends on the delivery system +and on the device: + + + FE_SET_PROPERTY: + +This ioctl is used to set one or more + frontend properties. +This is the basic command to request the frontend to tune into some + frequency and to start decoding the digital TV signal. +This call requires read/write access to the device. +At return, the values are updated to reflect the + actual parameters used. + + + + FE_GET_PROPERTY: + +This ioctl is used to get properties and +statistics from the frontend. +No properties are changed, and statistics aren't reset. +This call only requires read-only access to the device. + + + +&return-value-dvb; + + diff --git a/Documentation/DocBook/media/dvb/fe-read-status.xml b/Documentation/DocBook/media/dvb/fe-read-status.xml new file mode 100644 index 000000000..bc0dc2a55 --- /dev/null +++ b/Documentation/DocBook/media/dvb/fe-read-status.xml @@ -0,0 +1,107 @@ + + + ioctl FE_READ_STATUS + &manvol; + + + + FE_READ_STATUS + Returns status information about the front-end. This call only + requires read-only access to the device + + + + + + int ioctl + int fd + int request + unsigned int *status + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_READ_STATUS + + + + status + + pointer to a bitmask integer filled with the values defined by + &fe-status;. + + + + + + + Description + + All DVB frontend devices support the +FE_READ_STATUS ioctl. It is used to check about the +locking status of the frontend after being tuned. The ioctl takes a +pointer to an integer where the status will be written. + +NOTE: the size of status is actually sizeof(enum fe_status), with varies + according with the architecture. This needs to be fixed in the future. +&return-value-dvb; + + + +int fe_status + +The fe_status parameter is used to indicate the current state + and/or state changes of the frontend hardware. It is produced using + the &fe-status; values on a bitmask + + + enum fe_status + + &cs-def; + + + ID + Description + + + + + FE_HAS_SIGNAL + The frontend has found something above the noise level + + FE_HAS_CARRIER + The frontend has found a DVB signal + + FE_HAS_VITERBI + The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable + + FE_HAS_SYNC + Synchronization bytes was found + + FE_HAS_LOCK + The DVB were locked and everything is working + + FE_TIMEDOUT + no lock within the last about 2 seconds + + FE_REINIT + The frontend was reinitialized, application is + recommended to reset DiSEqC, tone and parameters + + + +
+
+
diff --git a/Documentation/DocBook/media/dvb/fe-set-frontend-tune-mode.xml b/Documentation/DocBook/media/dvb/fe-set-frontend-tune-mode.xml new file mode 100644 index 000000000..99fa8a015 --- /dev/null +++ b/Documentation/DocBook/media/dvb/fe-set-frontend-tune-mode.xml @@ -0,0 +1,64 @@ + + + ioctl FE_SET_FRONTEND_TUNE_MODE + &manvol; + + + + FE_SET_FRONTEND_TUNE_MODE + Allow setting tuner mode flags to the frontend. + + + + + + int ioctl + int fd + int request + unsigned int flags + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_SET_FRONTEND_TUNE_MODE + + + + flags + + Valid flags: + + 0 - normal tune mode + FE_TUNE_MODE_ONESHOT - When set, this flag will + disable any zigzagging or other "normal" tuning behaviour. + Additionally, there will be no automatic monitoring of the + lock status, and hence no frontend events will be + generated. If a frontend device is closed, this flag will + be automatically turned off when the device is reopened + read-write. + + + + + + + + Description + + Allow setting tuner mode flags to the frontend, between 0 (normal) + or FE_TUNE_MODE_ONESHOT mode +&return-value-dvb; + + diff --git a/Documentation/DocBook/media/dvb/fe-set-tone.xml b/Documentation/DocBook/media/dvb/fe-set-tone.xml new file mode 100644 index 000000000..62d44e4cc --- /dev/null +++ b/Documentation/DocBook/media/dvb/fe-set-tone.xml @@ -0,0 +1,91 @@ + + + ioctl FE_SET_TONE + &manvol; + + + + FE_SET_TONE + Sets/resets the generation of the continuous 22kHz tone. + + + + + + int ioctl + int fd + int request + enum fe_sec_tone_mode *tone + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_SET_TONE + + + + tone + + pointer to &fe-sec-tone-mode; + + + + + + + Description + +This ioctl is used to set the generation of the continuous 22kHz tone. + This call requires read/write permissions. +Usually, satellite antenna subsystems require that the digital TV + device to send a 22kHz tone in order to select between high/low band on + some dual-band LNBf. It is also used to send signals to DiSEqC equipment, + but this is done using the DiSEqC ioctls. +NOTE: if more than one device is connected to the same antenna, + setting a tone may interfere on other devices, as they may lose + the capability of selecting the band. So, it is recommended that + applications would change to SEC_TONE_OFF when the device is not used. + +&return-value-dvb; + + + +enum fe_sec_tone_mode + + + enum fe_sec_tone_mode + + &cs-def; + + + ID + Description + + + + + SEC_TONE_ON + Sends a 22kHz tone burst to the antenna + + SEC_TONE_OFF + Don't send a 22kHz tone to the antenna + (except if the FE_DISEQC_* ioctls are called) + + + +
+
+ +
diff --git a/Documentation/DocBook/media/dvb/fe-set-voltage.xml b/Documentation/DocBook/media/dvb/fe-set-voltage.xml new file mode 100644 index 000000000..c89a6f79b --- /dev/null +++ b/Documentation/DocBook/media/dvb/fe-set-voltage.xml @@ -0,0 +1,69 @@ + + + ioctl FE_SET_VOLTAGE + &manvol; + + + + FE_SET_VOLTAGE + Allow setting the DC level sent to the antenna subsystem. + + + + + + int ioctl + int fd + int request + enum fe_sec_voltage *voltage + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_SET_VOLTAGE + + + + voltage + + pointer to &fe-sec-voltage; + Valid values are described at &fe-sec-voltage;. + + + + + + + Description + +This ioctl allows to set the DC voltage level sent through the antenna + cable to 13V, 18V or off. +Usually, a satellite antenna subsystems require that the digital TV + device to send a DC voltage to feed power to the LNBf. Depending on the + LNBf type, the polarization or the intermediate frequency (IF) of the LNBf + can controlled by the voltage level. Other devices (for example, the ones + that implement DISEqC and multipoint LNBf's don't need to control the + voltage level, provided that either 13V or 18V is sent to power up the + LNBf. +NOTE: if more than one device is connected to the same antenna, + setting a voltage level may interfere on other devices, as they may lose + the capability of setting polarization or IF. So, on those + cases, setting the voltage to SEC_VOLTAGE_OFF while the device is not is + used is recommended. + +&return-value-dvb; + + + diff --git a/Documentation/DocBook/media/dvb/frontend.xml b/Documentation/DocBook/media/dvb/frontend.xml index 8a6a6ff27..01210b33c 100644 --- a/Documentation/DocBook/media/dvb/frontend.xml +++ b/Documentation/DocBook/media/dvb/frontend.xml @@ -1,485 +1,112 @@ DVB Frontend API -The DVB frontend device controls the tuner and DVB demodulator -hardware. It can be accessed through /dev/dvb/adapter0/frontend0. Data types and and -ioctl definitions can be accessed by including linux/dvb/frontend.h in your application. - -DVB frontends come in three varieties: DVB-S (satellite), DVB-C -(cable) and DVB-T (terrestrial). Transmission via the internet (DVB-IP) -is not yet handled by this API but a future extension is possible. For -DVB-S the frontend device also supports satellite equipment control -(SEC) via DiSEqC and V-SEC protocols. The DiSEqC (digital SEC) -specification is available from +The DVB frontend API was designed to support three types of delivery systems: + + Terrestrial systems: DVB-T, DVB-T2, ATSC, ATSC M/H, ISDB-T, DVB-H, DTMB, CMMB + Cable systems: DVB-C Annex A/C, ClearQAM (DVB-C Annex B), ISDB-C + Satellite systems: DVB-S, DVB-S2, DVB Turbo, ISDB-S, DSS + +The DVB frontend controls several sub-devices including: + + Tuner + Digital TV demodulator + Low noise amplifier (LNA) + Satellite Equipment Control (SEC) hardware (only for Satellite). + +The frontend can be accessed through + /dev/dvb/adapter?/frontend?. Data types and + ioctl definitions can be accessed by including + linux/dvb/frontend.h in your application. + + +NOTE: Transmission via the internet (DVB-IP) + is not yet handled by this API but a future extension is possible. +On Satellite systems, the API support for the Satellite Equipment Control + (SEC) allows to power control and to send/receive signals to control the + antenna subsystem, selecting the polarization and choosing the Intermediate + Frequency IF) of the Low Noise Block Converter Feed Horn (LNBf). It + supports the DiSEqC and V-SEC protocols. The DiSEqC (digital SEC) +specification is available at Eutelsat. -Note that the DVB API may also be used for MPEG decoder-only PCI -cards, in which case there exists no frontend device. - -
-Frontend Data Types - -
-Frontend type - -For historical reasons, frontend types are named by the type of modulation used in -transmission. The fontend types are given by fe_type_t type, defined as: - - -Frontend types - - &cs-def; - - - fe_type - Description - DTV_DELIVERY_SYSTEM equivalent type - - - - - FE_QPSK - For DVB-S standard - SYS_DVBS - - - FE_QAM - For DVB-C annex A standard - SYS_DVBC_ANNEX_A - - - FE_OFDM - For DVB-T standard - SYS_DVBT - - - FE_ATSC - For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used in US. - SYS_ATSC (terrestrial) or SYS_DVBC_ANNEX_B (cable) - -
- -Newer formats like DVB-S2, ISDB-T, ISDB-S and DVB-T2 are not described at the above, as they're -supported via the new FE_GET_PROPERTY/FE_GET_SET_PROPERTY ioctl's, using the DTV_DELIVERY_SYSTEM parameter. - - -The usage of this field is deprecated, as it doesn't report all supported standards, and -will provide an incomplete information for frontends that support multiple delivery systems. -Please use DTV_ENUM_DELSYS instead. -
- -
-frontend capabilities - -Capabilities describe what a frontend can do. Some capabilities can only be supported for -a specific frontend type. - - typedef enum fe_caps { - FE_IS_STUPID = 0, - FE_CAN_INVERSION_AUTO = 0x1, - FE_CAN_FEC_1_2 = 0x2, - FE_CAN_FEC_2_3 = 0x4, - FE_CAN_FEC_3_4 = 0x8, - FE_CAN_FEC_4_5 = 0x10, - FE_CAN_FEC_5_6 = 0x20, - FE_CAN_FEC_6_7 = 0x40, - FE_CAN_FEC_7_8 = 0x80, - FE_CAN_FEC_8_9 = 0x100, - FE_CAN_FEC_AUTO = 0x200, - FE_CAN_QPSK = 0x400, - FE_CAN_QAM_16 = 0x800, - FE_CAN_QAM_32 = 0x1000, - FE_CAN_QAM_64 = 0x2000, - FE_CAN_QAM_128 = 0x4000, - FE_CAN_QAM_256 = 0x8000, - FE_CAN_QAM_AUTO = 0x10000, - FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000, - FE_CAN_BANDWIDTH_AUTO = 0x40000, - FE_CAN_GUARD_INTERVAL_AUTO = 0x80000, - FE_CAN_HIERARCHY_AUTO = 0x100000, - FE_CAN_8VSB = 0x200000, - FE_CAN_16VSB = 0x400000, - FE_HAS_EXTENDED_CAPS = 0x800000, - FE_CAN_MULTISTREAM = 0x4000000, - FE_CAN_TURBO_FEC = 0x8000000, - FE_CAN_2G_MODULATION = 0x10000000, - FE_NEEDS_BENDING = 0x20000000, - FE_CAN_RECOVER = 0x40000000, - FE_CAN_MUTE_TS = 0x80000000 - } fe_caps_t; - -
- -
-frontend information - -Information about the frontend ca be queried with - FE_GET_INFO. - - - struct dvb_frontend_info { - char name[128]; - fe_type_t type; - uint32_t frequency_min; - uint32_t frequency_max; - uint32_t frequency_stepsize; - uint32_t frequency_tolerance; - uint32_t symbol_rate_min; - uint32_t symbol_rate_max; - uint32_t symbol_rate_tolerance; /⋆ ppm ⋆/ - uint32_t notifier_delay; /⋆ ms ⋆/ - fe_caps_t caps; - }; - -
- -
-diseqc master command - -A message sent from the frontend to DiSEqC capable equipment. - - struct dvb_diseqc_master_cmd { - uint8_t msg [6]; /⋆ { framing, address, command, data[3] } ⋆/ - uint8_t msg_len; /⋆ valid values are 3...6 ⋆/ - }; - -
-
-diseqc slave reply - -A reply to the frontend from DiSEqC 2.0 capable equipment. - - struct dvb_diseqc_slave_reply { - uint8_t msg [4]; /⋆ { framing, data [3] } ⋆/ - uint8_t msg_len; /⋆ valid values are 0...4, 0 means no msg ⋆/ - int timeout; /⋆ return from ioctl after timeout ms with ⋆/ - }; /⋆ errorcode when no message was received ⋆/ - -
- -
-diseqc slave reply -The voltage is usually used with non-DiSEqC capable LNBs to switch the polarzation -(horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched -consistently to the DiSEqC commands as described in the DiSEqC spec. - - typedef enum fe_sec_voltage { - SEC_VOLTAGE_13, - SEC_VOLTAGE_18 - } fe_sec_voltage_t; - -
- -
-SEC continuous tone +
+Querying frontend information -The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the -high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to -be switched consistently to the DiSEqC commands as described in the DiSEqC -spec. - - typedef enum fe_sec_tone_mode { - SEC_TONE_ON, - SEC_TONE_OFF - } fe_sec_tone_mode_t; - +Usually, the first thing to do when the frontend is opened is to + check the frontend capabilities. This is done using FE_GET_INFO. This ioctl will enumerate + the DVB API version and other characteristics about the frontend, and + can be opened either in read only or read/write mode.
-
-SEC tone burst - -The 22KHz tone burst is usually used with non-DiSEqC capable switches to select -between two connected LNBs/satellites. When using DiSEqC epuipment this voltage has to -be switched consistently to the DiSEqC commands as described in the DiSEqC -spec. - - typedef enum fe_sec_mini_cmd { - SEC_MINI_A, - SEC_MINI_B - } fe_sec_mini_cmd_t; - - - -
- -
-frontend status -Several functions of the frontend device use the fe_status data type defined -by - -typedef enum fe_status { - FE_HAS_SIGNAL = 0x01, - FE_HAS_CARRIER = 0x02, - FE_HAS_VITERBI = 0x04, - FE_HAS_SYNC = 0x08, - FE_HAS_LOCK = 0x10, - FE_TIMEDOUT = 0x20, - FE_REINIT = 0x40, -} fe_status_t; - -to indicate the current state and/or state changes of the frontend hardware: - - - - -FE_HAS_SIGNAL -The frontend has found something above the noise level - -FE_HAS_CARRIER -The frontend has found a DVB signal - -FE_HAS_VITERBI -The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable - -FE_HAS_SYNC -Synchronization bytes was found - -FE_HAS_LOCK -The DVB were locked and everything is working - -FE_TIMEDOUT -no lock within the last about 2 seconds - -FE_REINIT -The frontend was reinitialized, application is -recommended to reset DiSEqC, tone and parameters - - +
+Querying frontend status and statistics +Once FE_SET_PROPERTY + is called, the frontend will run a kernel thread that will periodically + check for the tuner lock status and provide statistics about the quality + of the signal. +The information about the frontend tuner locking status can be queried + using FE_READ_STATUS. +Signal statistics are provided via FE_GET_PROPERTY. + Please note that several statistics require the demodulator to be fully + locked (e. g. with FE_HAS_LOCK bit set). See + Frontend statistics indicators + for more details.
-
-frontend parameters -The kind of parameters passed to the frontend device for tuning depend on -the kind of hardware you are using. -The struct dvb_frontend_parameters uses an -union with specific per-system parameters. However, as newer delivery systems -required more data, the structure size weren't enough to fit, and just -extending its size would break the existing applications. So, those parameters -were replaced by the usage of -FE_GET_PROPERTY/FE_SET_PROPERTY ioctl's. The -new API is flexible enough to add new parameters to existing delivery systems, -and to add newer delivery systems. -So, newer applications should use -FE_GET_PROPERTY/FE_SET_PROPERTY instead, in -order to be able to support the newer System Delivery like DVB-S2, DVB-T2, -DVB-C2, ISDB, etc. -All kinds of parameters are combined as an union in the FrontendParameters structure: - -struct dvb_frontend_parameters { - uint32_t frequency; /⋆ (absolute) frequency in Hz for QAM/OFDM ⋆/ - /⋆ intermediate frequency in kHz for QPSK ⋆/ - fe_spectral_inversion_t inversion; - union { - struct dvb_qpsk_parameters qpsk; - struct dvb_qam_parameters qam; - struct dvb_ofdm_parameters ofdm; - struct dvb_vsb_parameters vsb; - } u; -}; - -In the case of QPSK frontends the frequency field specifies the intermediate -frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of -the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and -OFDM frontends the frequency specifies the absolute frequency and is given in Hz. - - -
-QPSK parameters -For satellite QPSK frontends you have to use the dvb_qpsk_parameters structure: - - struct dvb_qpsk_parameters { - uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/ - fe_code_rate_t fec_inner; /⋆ forward error correction (see above) ⋆/ - }; - -
-
-QAM parameters -for cable QAM frontend you use the dvb_qam_parameters structure: - - struct dvb_qam_parameters { - uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/ - fe_code_rate_t fec_inner; /⋆ forward error correction (see above) ⋆/ - fe_modulation_t modulation; /⋆ modulation type (see above) ⋆/ - }; - -
-
-VSB parameters -ATSC frontends are supported by the dvb_vsb_parameters structure: - -struct dvb_vsb_parameters { - fe_modulation_t modulation; /⋆ modulation type (see above) ⋆/ -}; - -
-
-OFDM parameters -DVB-T frontends are supported by the dvb_ofdm_parameters structure: - - struct dvb_ofdm_parameters { - fe_bandwidth_t bandwidth; - fe_code_rate_t code_rate_HP; /⋆ high priority stream code rate ⋆/ - fe_code_rate_t code_rate_LP; /⋆ low priority stream code rate ⋆/ - fe_modulation_t constellation; /⋆ modulation type (see above) ⋆/ - fe_transmit_mode_t transmission_mode; - fe_guard_interval_t guard_interval; - fe_hierarchy_t hierarchy_information; - }; - -
-
-frontend spectral inversion -The Inversion field can take one of these values: - - -typedef enum fe_spectral_inversion { - INVERSION_OFF, - INVERSION_ON, - INVERSION_AUTO -} fe_spectral_inversion_t; - -It indicates if spectral inversion should be presumed or not. In the automatic setting -(INVERSION_AUTO) the hardware will try to figure out the correct setting by -itself. - -
-
-frontend code rate -The possible values for the fec_inner field used on -struct dvb_qpsk_parameters and -struct dvb_qam_parameters are: - - -typedef enum fe_code_rate { - FEC_NONE = 0, - FEC_1_2, - FEC_2_3, - FEC_3_4, - FEC_4_5, - FEC_5_6, - FEC_6_7, - FEC_7_8, - FEC_8_9, - FEC_AUTO, - FEC_3_5, - FEC_9_10, -} fe_code_rate_t; - -which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto -detection. - -
-
-frontend modulation type for QAM, OFDM and VSB -For cable and terrestrial frontends, e. g. for -struct dvb_qpsk_parameters, -struct dvb_qam_parameters and -struct dvb_qam_parameters, -it needs to specify the quadrature modulation mode which can be one of the following: - - - typedef enum fe_modulation { - QPSK, - QAM_16, - QAM_32, - QAM_64, - QAM_128, - QAM_256, - QAM_AUTO, - VSB_8, - VSB_16, - PSK_8, - APSK_16, - APSK_32, - DQPSK, - } fe_modulation_t; - -
-
-More OFDM parameters -
-Number of carriers per channel - -typedef enum fe_transmit_mode { - TRANSMISSION_MODE_2K, - TRANSMISSION_MODE_8K, - TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K, - TRANSMISSION_MODE_1K, - TRANSMISSION_MODE_16K, - TRANSMISSION_MODE_32K, - } fe_transmit_mode_t; - -
-
-frontend bandwidth - -typedef enum fe_bandwidth { - BANDWIDTH_8_MHZ, - BANDWIDTH_7_MHZ, - BANDWIDTH_6_MHZ, - BANDWIDTH_AUTO, - BANDWIDTH_5_MHZ, - BANDWIDTH_10_MHZ, - BANDWIDTH_1_712_MHZ, -} fe_bandwidth_t; - -
-
-frontend guard inverval - -typedef enum fe_guard_interval { - GUARD_INTERVAL_1_32, - GUARD_INTERVAL_1_16, - GUARD_INTERVAL_1_8, - GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO, - GUARD_INTERVAL_1_128, - GUARD_INTERVAL_19_128, - GUARD_INTERVAL_19_256, -} fe_guard_interval_t; - -
-
-frontend hierarchy - -typedef enum fe_hierarchy { - HIERARCHY_NONE, - HIERARCHY_1, - HIERARCHY_2, - HIERARCHY_4, - HIERARCHY_AUTO - } fe_hierarchy_t; - -
-
- -
- -
-frontend events - - struct dvb_frontend_event { - fe_status_t status; - struct dvb_frontend_parameters parameters; - }; - -
-
- +&sub-dvbproperty;
Frontend Function Calls -
-open() -DESCRIPTION - - -This system call opens a named frontend device (/dev/dvb/adapter0/frontend0) + + + DVB frontend open() + &manvol; + + + + fe-open + Open a frontend device + + + + + #include <fcntl.h> + + int open + const char *device_name + int flags + + + + + + Arguments + + + + device_name + + Device to be opened. + + + + flags + + Open flags. Access can either be + O_RDWR or O_RDONLY. + Multiple opens are allowed with O_RDONLY. In this mode, only query and read ioctls are allowed. + Only one open is allowed in O_RDWR. In this mode, all ioctls are allowed. + When the O_NONBLOCK flag is given, the system calls may return &EAGAIN; when no data is available or when the device driver is temporarily busy. + Other flags have no effect. + + + + + + Description + This system call opens a named frontend device (/dev/dvb/adapter?/frontend?) for subsequent use. Usually the first thing to do after a successful open is to find out the frontend type with FE_GET_INFO. The device can be opened in read-only mode, which only allows monitoring of @@ -497,1052 +124,146 @@ typedef enum fe_hierarchy { for use in the specified mode. This implies that the corresponding hardware is powered up, and that other front-ends may have been powered down to make that possible. - - - -SYNOPSIS - -int open(const char ⋆deviceName, int flags); - - -PARAMETERS - - -const char - *deviceName - -Name of specific video device. - - -int flags - -A bit-wise OR of the following flags: - - - -O_RDONLY read-only access - - - -O_RDWR read/write access - - - -O_NONBLOCK open in non-blocking mode - - - -(blocking mode is the default) - - -RETURN VALUE - -ENODEV - -Device driver not loaded/available. - - -EINTERNAL - -Internal error. - - -EBUSY - -Device or resource busy. - - -EINVAL - -Invalid argument. - - -
- -
-close() -DESCRIPTION - - + + + + Return Value + + On success open returns the new file +descriptor. On error -1 is returned, and the errno +variable is set appropriately. Possible error codes are: + + + + EACCES + + The caller has no permission to access the +device. + + + + EBUSY + + The the device driver is already in use. + + + + ENXIO + + No device corresponding to this device special file +exists. + + + + ENOMEM + + Not enough kernel memory was available to complete the +request. + + + + EMFILE + + The process already has the maximum number of +files open. + + + + ENFILE + + The limit on the total number of files open on the +system has been reached. + + + + ENODEV + + The device got removed. + + + + + + + + + DVB frontend close() + &manvol; + + + + fe-close + Close a frontend device + + + + + #include <unistd.h> + + int close + int fd + + + + + + Arguments + + + + fd + + &fd; + + + + + + + Description This system call closes a previously opened front-end device. After closing a front-end device, its corresponding hardware might be powered down automatically. - - -SYNOPSIS - - -int close(int fd); - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -RETURN VALUE - -EBADF - -fd is not a valid open file descriptor. - - -
- -
-FE_READ_STATUS -DESCRIPTION - - -This ioctl call returns status information about the front-end. This call only - requires read-only access to the device. - - -SYNOPSIS - - -int ioctl(int fd, int request = FE_READ_STATUS, - fe_status_t ⋆status); - - -PARAMETERS - - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_READ_STATUS for this command. - - -struct fe_status_t - *status - -Points to the location where the front-end status word is - to be stored. - - -RETURN VALUE - -EBADF - -fd is not a valid open file descriptor. - - -EFAULT - -status points to invalid address. - - -
- -
-FE_READ_BER -DESCRIPTION - - -This ioctl call returns the bit error rate for the signal currently - received/demodulated by the front-end. For this command, read-only access to - the device is sufficient. - - -SYNOPSIS - - -int ioctl(int fd, int request = FE_READ_BER, - uint32_t ⋆ber); - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_READ_BER for this command. - - -uint32_t *ber - -The bit error rate is stored into *ber. - - - -&return-value-dvb; -
- -
-FE_READ_SNR - -DESCRIPTION - - -This ioctl call returns the signal-to-noise ratio for the signal currently received - by the front-end. For this command, read-only access to the device is sufficient. - - -SYNOPSIS - - -int ioctl(int fd, int request = FE_READ_SNR, uint16_t - ⋆snr); - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_READ_SNR for this command. - - -uint16_t *snr - -The signal-to-noise ratio is stored into *snr. - - - -&return-value-dvb; -
- -
-FE_READ_SIGNAL_STRENGTH -DESCRIPTION - - -This ioctl call returns the signal strength value for the signal currently received - by the front-end. For this command, read-only access to the device is sufficient. - - -SYNOPSIS - - -int ioctl( int fd, int request = - FE_READ_SIGNAL_STRENGTH, uint16_t ⋆strength); - - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_READ_SIGNAL_STRENGTH for this - command. - - -uint16_t *strength - -The signal strength value is stored into *strength. - - - -&return-value-dvb; -
- -
-FE_READ_UNCORRECTED_BLOCKS -DESCRIPTION - - -This ioctl call returns the number of uncorrected blocks detected by the device - driver during its lifetime. For meaningful measurements, the increment in block - count during a specific time interval should be calculated. For this command, - read-only access to the device is sufficient. - - -Note that the counter will wrap to zero after its maximum count has been - reached. - - -SYNOPSIS - - -int ioctl( int fd, int request = - FE_READ_UNCORRECTED_BLOCKS, uint32_t ⋆ublocks); - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_READ_UNCORRECTED_BLOCKS for this - command. - - -uint32_t *ublocks - -The total number of uncorrected blocks seen by the driver - so far. - - - -&return-value-dvb; -
- -
-FE_SET_FRONTEND -DESCRIPTION - - -This ioctl call starts a tuning operation using specified parameters. The result - of this call will be successful if the parameters were valid and the tuning could - be initiated. The result of the tuning operation in itself, however, will arrive - asynchronously as an event (see documentation for FE_GET_EVENT and - FrontendEvent.) If a new FE_SET_FRONTEND operation is initiated before - the previous one was completed, the previous operation will be aborted in favor - of the new one. This command requires read/write access to the device. - - - -SYNOPSIS - - -int ioctl(int fd, int request = FE_SET_FRONTEND, - struct dvb_frontend_parameters ⋆p); - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_SET_FRONTEND for this command. - - -struct - dvb_frontend_parameters - *p - -Points to parameters for tuning operation. - - - -&return-value-dvb; - -EINVAL - -Maximum supported symbol rate reached. - - -
- -
-FE_GET_FRONTEND -DESCRIPTION - - -This ioctl call queries the currently effective frontend parameters. For this - command, read-only access to the device is sufficient. - - - -SYNOPSIS - - -int ioctl(int fd, int request = FE_GET_FRONTEND, - struct dvb_frontend_parameters ⋆p); - - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_SET_FRONTEND for this command. - - -struct - dvb_frontend_parameters - *p - -Points to parameters for tuning operation. - - - -&return-value-dvb; - -EINVAL - -Maximum supported symbol rate reached. - - - -
- -
-FE_GET_EVENT -DESCRIPTION - - -This ioctl call returns a frontend event if available. If an event is not - available, the behavior depends on whether the device is in blocking or - non-blocking mode. In the latter case, the call fails immediately with errno - set to EWOULDBLOCK. In the former case, the call blocks until an event - becomes available. - - -The standard Linux poll() and/or select() system calls can be used with the - device file descriptor to watch for new events. For select(), the file descriptor - should be included in the exceptfds argument, and for poll(), POLLPRI should - be specified as the wake-up condition. Since the event queue allocated is - rather small (room for 8 events), the queue must be serviced regularly to avoid - overflow. If an overflow happens, the oldest event is discarded from the queue, - and an error (EOVERFLOW) occurs the next time the queue is read. After - reporting the error condition in this fashion, subsequent - FE_GET_EVENT - calls will return events from the queue as usual. - - -For the sake of implementation simplicity, this command requires read/write - access to the device. - - - -SYNOPSIS - - -int ioctl(int fd, int request = QPSK_GET_EVENT, - struct dvb_frontend_event ⋆ev); - - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_GET_EVENT for this command. - - -struct - dvb_frontend_event - *ev - -Points to the location where the event, - - - -if any, is to be stored. - - - -&return-value-dvb; - -EWOULDBLOCK - -There is no event pending, and the device is in - non-blocking mode. - - -EOVERFLOW - -Overflow in event queue - one or more events were lost. - - -
- -
-FE_GET_INFO -DESCRIPTION - - -This ioctl call returns information about the front-end. This call only requires - read-only access to the device. - - -SYNOPSIS - - - - int ioctl(int fd, int request = FE_GET_INFO, struct - dvb_frontend_info ⋆info); - - -PARAMETERS - - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_GET_INFO for this command. - - -struct - dvb_frontend_info - *info - -Points to the location where the front-end information is - to be stored. - - -&return-value-dvb; -
- -
-FE_DISEQC_RESET_OVERLOAD -DESCRIPTION - - -If the bus has been automatically powered off due to power overload, this ioctl - call restores the power to the bus. The call requires read/write access to the - device. This call has no effect if the device is manually powered off. Not all - DVB adapters support this ioctl. - - - -SYNOPSIS - - -int ioctl(int fd, int request = - FE_DISEQC_RESET_OVERLOAD); - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_DISEQC_RESET_OVERLOAD for this - command. - - - -&return-value-dvb; -
- -
-FE_DISEQC_SEND_MASTER_CMD -DESCRIPTION - - -This ioctl call is used to send a a DiSEqC command. - - -SYNOPSIS - - -int ioctl(int fd, int request = - FE_DISEQC_SEND_MASTER_CMD, struct - dvb_diseqc_master_cmd ⋆cmd); - - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_DISEQC_SEND_MASTER_CMD for this - command. - - -struct - dvb_diseqc_master_cmd - *cmd - -Pointer to the command to be transmitted. - - - -&return-value-dvb; + + + Return Value + + The function returns 0 on +success, -1 on failure and the +errno is set appropriately. Possible error +codes: + + + + EBADF + + fd is not a valid open file +descriptor. + + + + + + +&sub-fe-get-info; +&sub-fe-read-status; +&sub-fe-get-property; +&sub-fe-diseqc-reset-overload; +&sub-fe-diseqc-send-master-cmd; +&sub-fe-diseqc-recv-slave-reply; +&sub-fe-diseqc-send-burst; +&sub-fe-set-tone; +&sub-fe-set-voltage; +&sub-fe-enable-high-lnb-voltage; +&sub-fe-set-frontend-tune-mode; + +
+ +
+DVB Frontend legacy API (a. k. a. DVBv3) +The usage of this API is deprecated, as it doesn't support all digital + TV standards, doesn't provide good statistics measurements and provides + incomplete information. This is kept only to support legacy applications. + +&sub-frontend_legacy_api;
- -
-FE_DISEQC_RECV_SLAVE_REPLY -DESCRIPTION - - -This ioctl call is used to receive reply to a DiSEqC 2.0 command. - - - -SYNOPSIS - - -int ioctl(int fd, int request = - FE_DISEQC_RECV_SLAVE_REPLY, struct - dvb_diseqc_slave_reply ⋆reply); - - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_DISEQC_RECV_SLAVE_REPLY for this - command. - - -struct - dvb_diseqc_slave_reply - *reply - -Pointer to the command to be received. - - -&return-value-dvb; -
- -
-FE_DISEQC_SEND_BURST -DESCRIPTION - - -This ioctl call is used to send a 22KHz tone burst. - - - -SYNOPSIS - - -int ioctl(int fd, int request = - FE_DISEQC_SEND_BURST, fe_sec_mini_cmd_t burst); - - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_DISEQC_SEND_BURST for this command. - - -fe_sec_mini_cmd_t - burst - -burst A or B. - - - -&return-value-dvb; -
- -
-FE_SET_TONE -DESCRIPTION - - -This call is used to set the generation of the continuous 22kHz tone. This call - requires read/write permissions. - - -SYNOPSIS - - -int ioctl(int fd, int request = FE_SET_TONE, - fe_sec_tone_mode_t tone); - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_SET_TONE for this command. - - -fe_sec_tone_mode_t - tone - -The requested tone generation mode (on/off). - - -&return-value-dvb; -
- -
-FE_SET_VOLTAGE -DESCRIPTION - - -This call is used to set the bus voltage. This call requires read/write - permissions. - - -SYNOPSIS - - -int ioctl(int fd, int request = FE_SET_VOLTAGE, - fe_sec_voltage_t voltage); - - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_SET_VOLTAGE for this command. - - -fe_sec_voltage_t - voltage - -The requested bus voltage. - - - -&return-value-dvb; -
- -
-FE_ENABLE_HIGH_LNB_VOLTAGE -DESCRIPTION - - -If high != 0 enables slightly higher voltages instead of 13/18V (to compensate - for long cables). This call requires read/write permissions. Not all DVB - adapters support this ioctl. - - - -SYNOPSIS - - -int ioctl(int fd, int request = - FE_ENABLE_HIGH_LNB_VOLTAGE, int high); - - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals FE_SET_VOLTAGE for this command. - - -int high - -The requested bus voltage. - - - -&return-value-dvb; -
- -
-FE_SET_FRONTEND_TUNE_MODE -DESCRIPTION - - -Allow setting tuner mode flags to the frontend. - - - -SYNOPSIS - - -int ioctl(int fd, int request = -FE_SET_FRONTEND_TUNE_MODE, unsigned int flags); - - - -PARAMETERS - - - unsigned int flags - - - -FE_TUNE_MODE_ONESHOT When set, this flag will disable any zigzagging or other "normal" tuning behaviour. Additionally, there will be no automatic monitoring of the lock status, and hence no frontend events will be generated. If a frontend device is closed, this flag will be automatically turned off when the device is reopened read-write. - - - - -&return-value-dvb; -
- -
- FE_DISHNETWORK_SEND_LEGACY_CMD -DESCRIPTION - - -WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers. -It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches. -As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004. - - - -SYNOPSIS - - -int ioctl(int fd, int request = - FE_DISHNETWORK_SEND_LEGACY_CMD, unsigned long cmd); - - - -PARAMETERS - - - unsigned long cmd - - - -sends the specified raw cmd to the dish via DISEqC. - - - - -&return-value-dvb; -
- -
- -&sub-dvbproperty; diff --git a/Documentation/DocBook/media/dvb/frontend_legacy_api.xml b/Documentation/DocBook/media/dvb/frontend_legacy_api.xml new file mode 100644 index 000000000..8fadf3a4b --- /dev/null +++ b/Documentation/DocBook/media/dvb/frontend_legacy_api.xml @@ -0,0 +1,654 @@ +
+Frontend Legacy Data Types + +
+Frontend type + +For historical reasons, frontend types are named by the type of modulation + used in transmission. The fontend types are given by fe_type_t type, defined as: + + +Frontend types + + &cs-def; + + + fe_type + Description + DTV_DELIVERY_SYSTEM equivalent type + + + + + FE_QPSK + For DVB-S standard + SYS_DVBS + + + FE_QAM + For DVB-C annex A standard + SYS_DVBC_ANNEX_A + + + FE_OFDM + For DVB-T standard + SYS_DVBT + + + FE_ATSC + For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used in US. + SYS_ATSC (terrestrial) or SYS_DVBC_ANNEX_B (cable) + +
+ +Newer formats like DVB-S2, ISDB-T, ISDB-S and DVB-T2 are not described at the above, as they're +supported via the new FE_GET_PROPERTY/FE_GET_SET_PROPERTY ioctl's, using the DTV_DELIVERY_SYSTEM parameter. + + +In the old days, &dvb-frontend-info; used to contain + fe_type_t field to indicate the delivery systems, + filled with either FE_QPSK, FE_QAM, FE_OFDM or FE_ATSC. While this is + still filled to keep backward compatibility, the usage of this + field is deprecated, as it can report just one delivery system, but some + devices support multiple delivery systems. Please use + DTV_ENUM_DELSYS instead. + +On devices that support multiple delivery systems, + &dvb-frontend-info;::fe_type_t is filled with the + currently standard, as selected by the last call to + FE_SET_PROPERTY + using the &DTV-DELIVERY-SYSTEM; property. +
+ +
+Frontend bandwidth + + + enum fe_bandwidth + + &cs-def; + + + ID + Description + + + + + BANDWIDTH_AUTO + Autodetect bandwidth (if supported) + + BANDWIDTH_1_712_MHZ + 1.712 MHz + + BANDWIDTH_5_MHZ + 5 MHz + + BANDWIDTH_6_MHZ + 6 MHz + + BANDWIDTH_7_MHZ + 7 MHz + + BANDWIDTH_8_MHZ + 8 MHz + + BANDWIDTH_10_MHZ + 10 MHz + + + +
+ +
+ +
+frontend parameters +The kind of parameters passed to the frontend device for tuning depend on +the kind of hardware you are using. +The struct dvb_frontend_parameters uses an +union with specific per-system parameters. However, as newer delivery systems +required more data, the structure size weren't enough to fit, and just +extending its size would break the existing applications. So, those parameters +were replaced by the usage of +FE_GET_PROPERTY/FE_SET_PROPERTY ioctl's. The +new API is flexible enough to add new parameters to existing delivery systems, +and to add newer delivery systems. +So, newer applications should use +FE_GET_PROPERTY/FE_SET_PROPERTY instead, in +order to be able to support the newer System Delivery like DVB-S2, DVB-T2, +DVB-C2, ISDB, etc. +All kinds of parameters are combined as an union in the FrontendParameters structure: + +struct dvb_frontend_parameters { + uint32_t frequency; /⋆ (absolute) frequency in Hz for QAM/OFDM ⋆/ + /⋆ intermediate frequency in kHz for QPSK ⋆/ + &fe-spectral-inversion-t; inversion; + union { + struct dvb_qpsk_parameters qpsk; + struct dvb_qam_parameters qam; + struct dvb_ofdm_parameters ofdm; + struct dvb_vsb_parameters vsb; + } u; +}; + +In the case of QPSK frontends the frequency field specifies the intermediate +frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of +the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and +OFDM frontends the frequency specifies the absolute frequency and is given in Hz. + + +
+QPSK parameters +For satellite QPSK frontends you have to use the dvb_qpsk_parameters structure: + + struct dvb_qpsk_parameters { + uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/ + &fe-code-rate-t; fec_inner; /⋆ forward error correction (see above) ⋆/ + }; + +
+ +
+QAM parameters +for cable QAM frontend you use the dvb_qam_parameters structure: + + struct dvb_qam_parameters { + uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/ + &fe-code-rate-t; fec_inner; /⋆ forward error correction (see above) ⋆/ + &fe-modulation-t; modulation; /⋆ modulation type (see above) ⋆/ + }; + +
+ +
+VSB parameters +ATSC frontends are supported by the dvb_vsb_parameters structure: + +struct dvb_vsb_parameters { + &fe-modulation-t; modulation; /⋆ modulation type (see above) ⋆/ +}; + +
+ +
+OFDM parameters +DVB-T frontends are supported by the dvb_ofdm_parameters structure: + + struct dvb_ofdm_parameters { + &fe-bandwidth-t; bandwidth; + &fe-code-rate-t; code_rate_HP; /⋆ high priority stream code rate ⋆/ + &fe-code-rate-t; code_rate_LP; /⋆ low priority stream code rate ⋆/ + &fe-modulation-t; constellation; /⋆ modulation type (see above) ⋆/ + &fe-transmit-mode-t; transmission_mode; + &fe-guard-interval-t; guard_interval; + &fe-hierarchy-t; hierarchy_information; + }; + +
+
+ +
+frontend events + + struct dvb_frontend_event { + fe_status_t status; + struct dvb_frontend_parameters parameters; + }; + +
+
+ +
+Frontend Legacy Function Calls + +Those functions are defined at DVB version 3. The support is kept in + the kernel due to compatibility issues only. Their usage is strongly + not recommended + +
+FE_READ_BER +DESCRIPTION + + +This ioctl call returns the bit error rate for the signal currently + received/demodulated by the front-end. For this command, read-only access to + the device is sufficient. + + +SYNOPSIS + + +int ioctl(int fd, int request = FE_READ_BER, + uint32_t ⋆ber); + + +PARAMETERS + + +int fd + +File descriptor returned by a previous call to open(). + + +int request + +Equals FE_READ_BER for this command. + + +uint32_t *ber + +The bit error rate is stored into *ber. + + + +&return-value-dvb; +
+ +
+FE_READ_SNR + +DESCRIPTION + + +This ioctl call returns the signal-to-noise ratio for the signal currently received + by the front-end. For this command, read-only access to the device is sufficient. + + +SYNOPSIS + + +int ioctl(int fd, int request = FE_READ_SNR, uint16_t + ⋆snr); + + +PARAMETERS + + +int fd + +File descriptor returned by a previous call to open(). + + +int request + +Equals FE_READ_SNR for this command. + + +uint16_t *snr + +The signal-to-noise ratio is stored into *snr. + + + +&return-value-dvb; +
+ +
+FE_READ_SIGNAL_STRENGTH +DESCRIPTION + + +This ioctl call returns the signal strength value for the signal currently received + by the front-end. For this command, read-only access to the device is sufficient. + + +SYNOPSIS + + +int ioctl( int fd, int request = + FE_READ_SIGNAL_STRENGTH, uint16_t ⋆strength); + + + +PARAMETERS + + +int fd + +File descriptor returned by a previous call to open(). + + +int request + +Equals FE_READ_SIGNAL_STRENGTH for this + command. + + +uint16_t *strength + +The signal strength value is stored into *strength. + + + +&return-value-dvb; +
+ +
+FE_READ_UNCORRECTED_BLOCKS +DESCRIPTION + + +This ioctl call returns the number of uncorrected blocks detected by the device + driver during its lifetime. For meaningful measurements, the increment in block + count during a specific time interval should be calculated. For this command, + read-only access to the device is sufficient. + + +Note that the counter will wrap to zero after its maximum count has been + reached. + + +SYNOPSIS + + +int ioctl( int fd, int request = + FE_READ_UNCORRECTED_BLOCKS, uint32_t ⋆ublocks); + + +PARAMETERS + + +int fd + +File descriptor returned by a previous call to open(). + + +int request + +Equals FE_READ_UNCORRECTED_BLOCKS for this + command. + + +uint32_t *ublocks + +The total number of uncorrected blocks seen by the driver + so far. + + + +&return-value-dvb; +
+ +
+FE_SET_FRONTEND +DESCRIPTION + + +This ioctl call starts a tuning operation using specified parameters. The result + of this call will be successful if the parameters were valid and the tuning could + be initiated. The result of the tuning operation in itself, however, will arrive + asynchronously as an event (see documentation for FE_GET_EVENT and + FrontendEvent.) If a new FE_SET_FRONTEND operation is initiated before + the previous one was completed, the previous operation will be aborted in favor + of the new one. This command requires read/write access to the device. + + + +SYNOPSIS + + +int ioctl(int fd, int request = FE_SET_FRONTEND, + struct dvb_frontend_parameters ⋆p); + + +PARAMETERS + + +int fd + +File descriptor returned by a previous call to open(). + + +int request + +Equals FE_SET_FRONTEND for this command. + + +struct + dvb_frontend_parameters + *p + +Points to parameters for tuning operation. + + + +&return-value-dvb; + +EINVAL + +Maximum supported symbol rate reached. + + +
+ +
+FE_GET_FRONTEND +DESCRIPTION + + +This ioctl call queries the currently effective frontend parameters. For this + command, read-only access to the device is sufficient. + + + +SYNOPSIS + + +int ioctl(int fd, int request = FE_GET_FRONTEND, + struct dvb_frontend_parameters ⋆p); + + + +PARAMETERS + + +int fd + +File descriptor returned by a previous call to open(). + + +int request + +Equals FE_SET_FRONTEND for this command. + + +struct + dvb_frontend_parameters + *p + +Points to parameters for tuning operation. + + + +&return-value-dvb; + +EINVAL + +Maximum supported symbol rate reached. + + + +
+ +
+FE_GET_EVENT +DESCRIPTION + + +This ioctl call returns a frontend event if available. If an event is not + available, the behavior depends on whether the device is in blocking or + non-blocking mode. In the latter case, the call fails immediately with errno + set to EWOULDBLOCK. In the former case, the call blocks until an event + becomes available. + + +The standard Linux poll() and/or select() system calls can be used with the + device file descriptor to watch for new events. For select(), the file descriptor + should be included in the exceptfds argument, and for poll(), POLLPRI should + be specified as the wake-up condition. Since the event queue allocated is + rather small (room for 8 events), the queue must be serviced regularly to avoid + overflow. If an overflow happens, the oldest event is discarded from the queue, + and an error (EOVERFLOW) occurs the next time the queue is read. After + reporting the error condition in this fashion, subsequent + FE_GET_EVENT + calls will return events from the queue as usual. + + +For the sake of implementation simplicity, this command requires read/write + access to the device. + + + +SYNOPSIS + + +int ioctl(int fd, int request = QPSK_GET_EVENT, + struct dvb_frontend_event ⋆ev); + + + +PARAMETERS + + +int fd + +File descriptor returned by a previous call to open(). + + +int request + +Equals FE_GET_EVENT for this command. + + +struct + dvb_frontend_event + *ev + +Points to the location where the event, + + + +if any, is to be stored. + + + +&return-value-dvb; + +EWOULDBLOCK + +There is no event pending, and the device is in + non-blocking mode. + + +EOVERFLOW + +Overflow in event queue - one or more events were lost. + + +
+ +
+ FE_DISHNETWORK_SEND_LEGACY_CMD +DESCRIPTION + + +WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers. +It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches. +As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004. + + + +SYNOPSIS + + +int ioctl(int fd, int request = + FE_DISHNETWORK_SEND_LEGACY_CMD, unsigned long cmd); + + + +PARAMETERS + + + unsigned long cmd + + + +sends the specified raw cmd to the dish via DISEqC. + + + + +&return-value-dvb; +
+ +
diff --git a/Documentation/DocBook/media/dvb/intro.xml b/Documentation/DocBook/media/dvb/intro.xml index 2048b53d1..bcc72c216 100644 --- a/Documentation/DocBook/media/dvb/intro.xml +++ b/Documentation/DocBook/media/dvb/intro.xml @@ -129,41 +129,41 @@ hardware. It can depend on the individual security requirements of the platform, if and how many of the CA functions are made available to the application through this device. -All devices can be found in the /dev -tree under /dev/dvb. The individual devices +All devices can be found in the /dev +tree under /dev/dvb. The individual devices are called: -/dev/dvb/adapterN/audioM, +/dev/dvb/adapterN/audioM, -/dev/dvb/adapterN/videoM, +/dev/dvb/adapterN/videoM, -/dev/dvb/adapterN/frontendM, +/dev/dvb/adapterN/frontendM, -/dev/dvb/adapterN/netM, +/dev/dvb/adapterN/netM, -/dev/dvb/adapterN/demuxM, +/dev/dvb/adapterN/demuxM, -/dev/dvb/adapterN/dvrM, +/dev/dvb/adapterN/dvrM, -/dev/dvb/adapterN/caM, +/dev/dvb/adapterN/caM, where N enumerates the DVB PCI cards in a system starting from 0, and M enumerates the devices of each type within each -adapter, starting from 0, too. We will omit the “/dev/dvb/adapterN/” in the further dicussion +adapter, starting from 0, too. We will omit the “ +/dev/dvb/adapterN/” in the further dicussion of these devices. The naming scheme for the devices is the same wheter devfs is used or not. @@ -202,10 +202,10 @@ a partial path like: To enable applications to support different API version, an -additional include file linux/dvb/version.h exists, which defines the -constant DVB_API_VERSION. This document -describes DVB_API_VERSION 5.8. +additional include file +linux/dvb/version.h exists, which defines the +constant DVB_API_VERSION. This document +describes DVB_API_VERSION 5.10.
diff --git a/Documentation/DocBook/media/dvb/kdapi.xml b/Documentation/DocBook/media/dvb/kdapi.xml index 6c11ec52c..68bcd33a8 100644 --- a/Documentation/DocBook/media/dvb/kdapi.xml +++ b/Documentation/DocBook/media/dvb/kdapi.xml @@ -1,8 +1,8 @@ Kernel Demux API The kernel demux API defines a driver-internal interface for registering low-level, hardware specific driver to a hardware independent demux layer. It is only of interest for -DVB device driver writers. The header file for this API is named demux.h and located in -drivers/media/dvb-core. +DVB device driver writers. The header file for this API is named demux.h and located in +">drivers/media/dvb-core. Maintainer note: This section must be reviewed. It is probably out of date. diff --git a/Documentation/DocBook/media/dvb/net.xml b/Documentation/DocBook/media/dvb/net.xml index a193e8694..d2e44b7e0 100644 --- a/Documentation/DocBook/media/dvb/net.xml +++ b/Documentation/DocBook/media/dvb/net.xml @@ -1,156 +1,238 @@ DVB Network API -The DVB net device enables feeding of MPE (multi protocol encapsulation) packets -received via DVB into the Linux network protocol stack, e.g. for internet via satellite -applications. It can be accessed through /dev/dvb/adapter0/net0. Data types and -and ioctl definitions can be accessed by including linux/dvb/net.h in your -application. - -
-DVB Net Data Types - -
-struct dvb_net_if - -struct dvb_net_if { - __u16 pid; - __u16 if_num; - __u8 feedtype; -#define DVB_NET_FEEDTYPE_MPE 0 /⋆ multi protocol encapsulation ⋆/ -#define DVB_NET_FEEDTYPE_ULE 1 /⋆ ultra lightweight encapsulation ⋆/ -}; - -
+The DVB net device controls the mapping of data packages that are + part of a transport stream to be mapped into a virtual network interface, + visible through the standard Linux network protocol stack. +Currently, two encapsulations are supported: + + + Multi Protocol Encapsulation (MPE) + + Ultra Lightweight Encapsulation (ULE) + + +In order to create the Linux virtual network interfaces, an application + needs to tell to the Kernel what are the PIDs and the encapsulation types + that are present on the transport stream. This is done through + /dev/dvb/adapter?/net? device node. + The data will be available via virtual dvb?_? + network interfaces, and will be controled/routed via the standard + ip tools (like ip, route, netstat, ifconfig, etc). + Data types and and ioctl definitions are defined via + linux/dvb/net.h header. -
DVB net Function Calls -To be written… - - -
NET_ADD_IF -DESCRIPTION - - -This ioctl is undocumented. Documentation is welcome. - - -SYNOPSIS - - -int ioctl(fd, int request = NET_ADD_IF, - struct dvb_net_if *if); - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals NET_ADD_IF for this command. - - -struct dvb_net_if *if - - -Undocumented. - - + + + + + ioctl NET_ADD_IF + &manvol; + + + + NET_ADD_IF + Creates a new network interface for a given Packet ID. + + + + + + int ioctl + int fd + int request + struct dvb_net_if *net_if + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_SET_TONE + + + + net_if + + pointer to &dvb-net-if; + + + + + + + Description + +The NET_ADD_IF ioctl system call selects the Packet ID (PID) that + contains a TCP/IP traffic, the type of encapsulation to be used (MPE or ULE) + and the interface number for the new interface to be created. When the + system call successfully returns, a new virtual network interface is created. +The &dvb-net-if;::ifnum field will be filled with the number of the + created interface. + &return-value-dvb; -
+ + + +struct <structname>dvb_net_if</structname> description + + + struct <structname>dvb_net_if</structname> + + &cs-def; + + + ID + Description + + + + + pid + Packet ID (PID) of the MPEG-TS that contains + data + + ifnum + number of the DVB interface. + + feedtype + Encapsulation type of the feed. It can be: + DVB_NET_FEEDTYPE_MPE for MPE encoding + or + DVB_NET_FEEDTYPE_ULE for ULE encoding. + + + + +
+
+ + + + + ioctl NET_REMOVE_IF + &manvol; + + + + NET_REMOVE_IF + Removes a network interface. + + + + + + int ioctl + int fd + int request + int ifnum + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_SET_TONE + + + + net_if + + number of the interface to be removed + + + + + + + Description + +The NET_REMOVE_IF ioctl deletes an interface previously created + via &NET-ADD-IF;. -
NET_REMOVE_IF -DESCRIPTION - - -This ioctl is undocumented. Documentation is welcome. - - -SYNOPSIS - - -int ioctl(fd, int request = NET_REMOVE_IF); - - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals NET_REMOVE_IF for this command. - - &return-value-dvb; -
+
+
+ + + + + ioctl NET_GET_IF + &manvol; + + + + NET_GET_IF + Read the configuration data of an interface created via + &NET-ADD-IF;. + + + + + + int ioctl + int fd + int request + struct dvb_net_if *net_if + + + + + + Arguments + + + fd + + &fe_fd; + + + + request + + FE_SET_TONE + + + + net_if + + pointer to &dvb-net-if; + + + + + + + Description + +The NET_GET_IF ioctl uses the interface number given by the + &dvb-net-if;::ifnum field and fills the content of &dvb-net-if; with + the packet ID and encapsulation type used on such interface. If the + interface was not created yet with &NET-ADD-IF;, it will return -1 and + fill the errno with EINVAL + error code. -
NET_GET_IF -DESCRIPTION - - -This ioctl is undocumented. Documentation is welcome. - - -SYNOPSIS - - -int ioctl(fd, int request = NET_GET_IF, - struct dvb_net_if *if); - - -PARAMETERS - - -int fd - -File descriptor returned by a previous call to open(). - - -int request - -Equals NET_GET_IF for this command. - - -struct dvb_net_if *if - - -Undocumented. - - &return-value-dvb; -
+
+
diff --git a/Documentation/DocBook/media/dvb/video.xml b/Documentation/DocBook/media/dvb/video.xml index 3ea1ca7e7..71547fcd7 100644 --- a/Documentation/DocBook/media/dvb/video.xml +++ b/Documentation/DocBook/media/dvb/video.xml @@ -1,12 +1,12 @@ DVB Video Device The DVB video device controls the MPEG2 video decoder of the DVB hardware. It -can be accessed through /dev/dvb/adapter0/video0. Data types and and -ioctl definitions can be accessed by including linux/dvb/video.h in your +can be accessed through /dev/dvb/adapter0/video0. Data types and and +ioctl definitions can be accessed by including linux/dvb/video.h in your application. Note that the DVB video device only controls decoding of the MPEG video stream, not its presentation on the TV or computer screen. On PCs this is typically handled by an -associated video4linux device, e.g. /dev/video, which allows scaling and defining output +associated video4linux device, e.g. /dev/video, which allows scaling and defining output windows. Some DVB cards don’t have their own MPEG decoder, which results in the omission of @@ -24,7 +24,7 @@ have been created to replace that functionality.
video_format_t -The video_format_t data type defined by +The video_format_t data type defined by typedef enum { @@ -74,7 +74,7 @@ typedef enum { VIDEO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the DVR device) as the source of the video stream. If VIDEO_SOURCE_MEMORY -is selected the stream comes from the application through the write() system +is selected the stream comes from the application through the write() system call.
-- cgit v1.2.3-54-g00ecf