1.. Permission is granted to copy, distribute and/or modify this
2.. document under the terms of the GNU Free Documentation License,
3.. Version 1.1 or any later version published by the Free Software
4.. Foundation, with no Invariant Sections, no Front-Cover Texts
5.. and no Back-Cover Texts. A copy of the license is included at
6.. Documentation/userspace-api/media/fdl-appendix.rst.
7..
8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10.. c:type:: dvb_frontend_parameters
11
12*******************
13frontend parameters
14*******************
15
16The kind of parameters passed to the frontend device for tuning depend
17on the kind of hardware you are using.
18
19The struct ``dvb_frontend_parameters`` uses a union with specific
20per-system parameters. However, as newer delivery systems required more
21data, the structure size weren't enough to fit, and just extending its
22size would break the existing applications. So, those parameters were
23replaced by the usage of
24:ref:`FE_GET_PROPERTY/FE_SET_PROPERTY <FE_GET_PROPERTY>`
25ioctl's. The new API is flexible enough to add new parameters to
26existing delivery systems, and to add newer delivery systems.
27
28So, newer applications should use
29:ref:`FE_GET_PROPERTY/FE_SET_PROPERTY <FE_GET_PROPERTY>`
30instead, in order to be able to support the newer System Delivery like
31DVB-S2, DVB-T2, DVB-C2, ISDB, etc.
32
33All kinds of parameters are combined as a union in the
34``dvb_frontend_parameters`` structure:
35
36
37.. code-block:: c
38
39    struct dvb_frontend_parameters {
40	uint32_t frequency;     /* (absolute) frequency in Hz for QAM/OFDM */
41		    /* intermediate frequency in kHz for QPSK */
42	fe_spectral_inversion_t inversion;
43	union {
44	    struct dvb_qpsk_parameters qpsk;
45	    struct dvb_qam_parameters  qam;
46	    struct dvb_ofdm_parameters ofdm;
47	    struct dvb_vsb_parameters  vsb;
48	} u;
49    };
50
51In the case of QPSK frontends the ``frequency`` field specifies the
52intermediate frequency, i.e. the offset which is effectively added to
53the local oscillator frequency (LOF) of the LNB. The intermediate
54frequency has to be specified in units of kHz. For QAM and OFDM
55frontends the ``frequency`` specifies the absolute frequency and is
56given in Hz.
57
58
59.. c:type:: dvb_qpsk_parameters
60
61QPSK parameters
62===============
63
64For satellite QPSK frontends you have to use the ``dvb_qpsk_parameters``
65structure:
66
67
68.. code-block:: c
69
70     struct dvb_qpsk_parameters {
71	 uint32_t        symbol_rate;  /* symbol rate in Symbols per second */
72	 fe_code_rate_t  fec_inner;    /* forward error correction (see above) */
73     };
74
75
76.. c:type:: dvb_qam_parameters
77
78QAM parameters
79==============
80
81for cable QAM frontend you use the ``dvb_qam_parameters`` structure:
82
83
84.. code-block:: c
85
86     struct dvb_qam_parameters {
87	 uint32_t         symbol_rate; /* symbol rate in Symbols per second */
88	 fe_code_rate_t   fec_inner;   /* forward error correction (see above) */
89	 fe_modulation_t  modulation;  /* modulation type (see above) */
90     };
91
92
93.. c:type:: dvb_vsb_parameters
94
95VSB parameters
96==============
97
98ATSC frontends are supported by the ``dvb_vsb_parameters`` structure:
99
100
101.. code-block:: c
102
103    struct dvb_vsb_parameters {
104	fe_modulation_t modulation; /* modulation type (see above) */
105    };
106
107
108.. c:type:: dvb_ofdm_parameters
109
110OFDM parameters
111===============
112
113DVB-T frontends are supported by the ``dvb_ofdm_parameters`` structure:
114
115
116.. code-block:: c
117
118     struct dvb_ofdm_parameters {
119	 fe_bandwidth_t      bandwidth;
120	 fe_code_rate_t      code_rate_HP;  /* high priority stream code rate */
121	 fe_code_rate_t      code_rate_LP;  /* low priority stream code rate */
122	 fe_modulation_t     constellation; /* modulation type (see above) */
123	 fe_transmit_mode_t  transmission_mode;
124	 fe_guard_interval_t guard_interval;
125	 fe_hierarchy_t      hierarchy_information;
126     };
127