Merge branch 'for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu
[sfrench/cifs-2.6.git] / Documentation / media / uapi / dvb / dvb-frontend-parameters.rst
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/media/uapi/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 *******************
13 frontend parameters
14 *******************
15
16 The kind of parameters passed to the frontend device for tuning depend
17 on the kind of hardware you are using.
18
19 The struct ``dvb_frontend_parameters`` uses a union with specific
20 per-system parameters. However, as newer delivery systems required more
21 data, the structure size weren't enough to fit, and just extending its
22 size would break the existing applications. So, those parameters were
23 replaced by the usage of
24 :ref:`FE_GET_PROPERTY/FE_SET_PROPERTY <FE_GET_PROPERTY>`
25 ioctl's. The new API is flexible enough to add new parameters to
26 existing delivery systems, and to add newer delivery systems.
27
28 So, newer applications should use
29 :ref:`FE_GET_PROPERTY/FE_SET_PROPERTY <FE_GET_PROPERTY>`
30 instead, in order to be able to support the newer System Delivery like
31 DVB-S2, DVB-T2, DVB-C2, ISDB, etc.
32
33 All 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
51 In the case of QPSK frontends the ``frequency`` field specifies the
52 intermediate frequency, i.e. the offset which is effectively added to
53 the local oscillator frequency (LOF) of the LNB. The intermediate
54 frequency has to be specified in units of kHz. For QAM and OFDM
55 frontends the ``frequency`` specifies the absolute frequency and is
56 given in Hz.
57
58
59 .. c:type:: dvb_qpsk_parameters
60
61 QPSK parameters
62 ===============
63
64 For satellite QPSK frontends you have to use the ``dvb_qpsk_parameters``
65 structure:
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
78 QAM parameters
79 ==============
80
81 for 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
95 VSB parameters
96 ==============
97
98 ATSC 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
110 OFDM parameters
111 ===============
112
113 DVB-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      };