1 <section id="frontend_legacy_types">
2 <title>Frontend Legacy Data Types</title>
4 <section id="fe-type-t">
5 <title>Frontend type</title>
7 <para>For historical reasons, frontend types are named by the type of modulation
8 used in transmission. The fontend types are given by fe_type_t type, defined as:</para>
10 <table pgwide="1" frame="none" id="fe-type">
11 <title>Frontend types</title>
16 <entry>fe_type</entry>
17 <entry>Description</entry>
18 <entry><link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> equivalent type</entry>
23 <entry id="FE-QPSK"><constant>FE_QPSK</constant></entry>
24 <entry>For DVB-S standard</entry>
25 <entry><constant>SYS_DVBS</constant></entry>
28 <entry id="FE-QAM"><constant>FE_QAM</constant></entry>
29 <entry>For DVB-C annex A standard</entry>
30 <entry><constant>SYS_DVBC_ANNEX_A</constant></entry>
33 <entry id="FE-OFDM"><constant>FE_OFDM</constant></entry>
34 <entry>For DVB-T standard</entry>
35 <entry><constant>SYS_DVBT</constant></entry>
38 <entry id="FE-ATSC"><constant>FE_ATSC</constant></entry>
39 <entry>For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used in US.</entry>
40 <entry><constant>SYS_ATSC</constant> (terrestrial) or <constant>SYS_DVBC_ANNEX_B</constant> (cable)</entry>
42 </tbody></tgroup></table>
44 <para>Newer formats like DVB-S2, ISDB-T, ISDB-S and DVB-T2 are not described at the above, as they're
45 supported via the new <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY/FE_GET_SET_PROPERTY</link> ioctl's, using the <link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> parameter.
48 <para>In the old days, &dvb-frontend-info; used to contain
49 <constant>fe_type_t</constant> field to indicate the delivery systems,
50 filled with either FE_QPSK, FE_QAM, FE_OFDM or FE_ATSC. While this is
51 still filled to keep backward compatibility, the usage of this
52 field is deprecated, as it can report just one delivery system, but some
53 devices support multiple delivery systems. Please use
54 <link linkend="DTV-ENUM-DELSYS">DTV_ENUM_DELSYS</link> instead.
56 <para>On devices that support multiple delivery systems,
57 &dvb-frontend-info;::<constant>fe_type_t</constant> is filled with the
58 currently standard, as selected by the last call to
59 <link linkend="FE_GET_PROPERTY">FE_SET_PROPERTY</link>
60 using the &DTV-DELIVERY-SYSTEM; property.</para>
63 <section id="fe-bandwidth-t">
64 <title>Frontend bandwidth</title>
66 <table pgwide="1" frame="none" id="fe-bandwidth">
67 <title>enum fe_bandwidth</title>
73 <entry>Description</entry>
78 <entry id="BANDWIDTH-AUTO"><constant>BANDWIDTH_AUTO</constant></entry>
79 <entry>Autodetect bandwidth (if supported)</entry>
81 <entry id="BANDWIDTH-1-712-MHZ"><constant>BANDWIDTH_1_712_MHZ</constant></entry>
82 <entry>1.712 MHz</entry>
84 <entry id="BANDWIDTH-5-MHZ"><constant>BANDWIDTH_5_MHZ</constant></entry>
87 <entry id="BANDWIDTH-6-MHZ"><constant>BANDWIDTH_6_MHZ</constant></entry>
90 <entry id="BANDWIDTH-7-MHZ"><constant>BANDWIDTH_7_MHZ</constant></entry>
93 <entry id="BANDWIDTH-8-MHZ"><constant>BANDWIDTH_8_MHZ</constant></entry>
96 <entry id="BANDWIDTH-10-MHZ"><constant>BANDWIDTH_10_MHZ</constant></entry>
105 <section id="dvb-frontend-parameters">
106 <title>frontend parameters</title>
107 <para>The kind of parameters passed to the frontend device for tuning depend on
108 the kind of hardware you are using.</para>
109 <para>The struct <constant>dvb_frontend_parameters</constant> uses an
110 union with specific per-system parameters. However, as newer delivery systems
111 required more data, the structure size weren't enough to fit, and just
112 extending its size would break the existing applications. So, those parameters
113 were replaced by the usage of <link linkend="FE_GET_PROPERTY">
114 <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> ioctl's. The
115 new API is flexible enough to add new parameters to existing delivery systems,
116 and to add newer delivery systems.</para>
117 <para>So, newer applications should use <link linkend="FE_GET_PROPERTY">
118 <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> instead, in
119 order to be able to support the newer System Delivery like DVB-S2, DVB-T2,
120 DVB-C2, ISDB, etc.</para>
121 <para>All kinds of parameters are combined as an union in the FrontendParameters structure:
123 struct dvb_frontend_parameters {
124 uint32_t frequency; /⋆ (absolute) frequency in Hz for QAM/OFDM ⋆/
125 /⋆ intermediate frequency in kHz for QPSK ⋆/
126 &fe-spectral-inversion-t; inversion;
128 struct dvb_qpsk_parameters qpsk;
129 struct dvb_qam_parameters qam;
130 struct dvb_ofdm_parameters ofdm;
131 struct dvb_vsb_parameters vsb;
134 </programlisting></para>
135 <para>In the case of QPSK frontends the <constant>frequency</constant> field specifies the intermediate
136 frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
137 the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
138 OFDM frontends the <constant>frequency</constant> specifies the absolute frequency and is given in Hz.
141 <section id="dvb-qpsk-parameters">
142 <title>QPSK parameters</title>
143 <para>For satellite QPSK frontends you have to use the <constant>dvb_qpsk_parameters</constant> structure:</para>
145 struct dvb_qpsk_parameters {
146 uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/
147 &fe-code-rate-t; fec_inner; /⋆ forward error correction (see above) ⋆/
152 <section id="dvb-qam-parameters">
153 <title>QAM parameters</title>
154 <para>for cable QAM frontend you use the <constant>dvb_qam_parameters</constant> structure:</para>
156 struct dvb_qam_parameters {
157 uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/
158 &fe-code-rate-t; fec_inner; /⋆ forward error correction (see above) ⋆/
159 &fe-modulation-t; modulation; /⋆ modulation type (see above) ⋆/
164 <section id="dvb-vsb-parameters">
165 <title>VSB parameters</title>
166 <para>ATSC frontends are supported by the <constant>dvb_vsb_parameters</constant> structure:</para>
168 struct dvb_vsb_parameters {
169 &fe-modulation-t; modulation; /⋆ modulation type (see above) ⋆/
174 <section id="dvb-ofdm-parameters">
175 <title>OFDM parameters</title>
176 <para>DVB-T frontends are supported by the <constant>dvb_ofdm_parameters</constant> structure:</para>
178 struct dvb_ofdm_parameters {
179 &fe-bandwidth-t; bandwidth;
180 &fe-code-rate-t; code_rate_HP; /⋆ high priority stream code rate ⋆/
181 &fe-code-rate-t; code_rate_LP; /⋆ low priority stream code rate ⋆/
182 &fe-modulation-t; constellation; /⋆ modulation type (see above) ⋆/
183 &fe-transmit-mode-t; transmission_mode;
184 &fe-guard-interval-t; guard_interval;
185 &fe-hierarchy-t; hierarchy_information;
191 <section id="dvb-frontend-event">
192 <title>frontend events</title>
194 struct dvb_frontend_event {
196 struct dvb_frontend_parameters parameters;
202 <section id="frontend_legacy_fcalls">
203 <title>Frontend Legacy Function Calls</title>
205 <para>Those functions are defined at DVB version 3. The support is kept in
206 the kernel due to compatibility issues only. Their usage is strongly
207 not recommended</para>
209 <section id="FE_READ_BER">
210 <title>FE_READ_BER</title>
213 <informaltable><tgroup cols="1"><tbody><row><entry
215 <para>This ioctl call returns the bit error rate for the signal currently
216 received/demodulated by the front-end. For this command, read-only access to
217 the device is sufficient.</para>
219 </row></tbody></tgroup></informaltable>
222 <informaltable><tgroup cols="1"><tbody><row><entry
224 <para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
225 uint32_t ⋆ber);</para>
227 </row></tbody></tgroup></informaltable>
230 <informaltable><tgroup cols="2"><tbody><row><entry
235 <para>File descriptor returned by a previous call to open().</para>
239 <para>int request</para>
242 <para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
246 <para>uint32_t *ber</para>
249 <para>The bit error rate is stored into *ber.</para>
251 </row></tbody></tgroup></informaltable>
256 <section id="FE_READ_SNR">
257 <title>FE_READ_SNR</title>
261 <informaltable><tgroup cols="1"><tbody><row><entry
263 <para>This ioctl call returns the signal-to-noise ratio for the signal currently received
264 by the front-end. For this command, read-only access to the device is sufficient.</para>
266 </row></tbody></tgroup></informaltable>
269 <informaltable><tgroup cols="1"><tbody><row><entry
271 <para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, uint16_t
274 </row></tbody></tgroup></informaltable>
277 <informaltable><tgroup cols="2"><tbody><row><entry
282 <para>File descriptor returned by a previous call to open().</para>
286 <para>int request</para>
289 <para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>
293 <para>uint16_t *snr</para>
296 <para>The signal-to-noise ratio is stored into *snr.</para>
298 </row></tbody></tgroup></informaltable>
303 <section id="FE_READ_SIGNAL_STRENGTH">
304 <title>FE_READ_SIGNAL_STRENGTH</title>
307 <informaltable><tgroup cols="1"><tbody><row><entry
309 <para>This ioctl call returns the signal strength value for the signal currently received
310 by the front-end. For this command, read-only access to the device is sufficient.</para>
312 </row></tbody></tgroup></informaltable>
315 <informaltable><tgroup cols="1"><tbody><row><entry
317 <para>int ioctl( int fd, int request =
318 <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, uint16_t ⋆strength);</para>
320 </row></tbody></tgroup></informaltable>
324 <informaltable><tgroup cols="2"><tbody><row><entry
329 <para>File descriptor returned by a previous call to open().</para>
333 <para>int request</para>
336 <para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
341 <para>uint16_t *strength</para>
344 <para>The signal strength value is stored into *strength.</para>
346 </row></tbody></tgroup></informaltable>
351 <section id="FE_READ_UNCORRECTED_BLOCKS">
352 <title>FE_READ_UNCORRECTED_BLOCKS</title>
355 <informaltable><tgroup cols="1"><tbody><row><entry
357 <para>This ioctl call returns the number of uncorrected blocks detected by the device
358 driver during its lifetime. For meaningful measurements, the increment in block
359 count during a specific time interval should be calculated. For this command,
360 read-only access to the device is sufficient.</para>
364 <para>Note that the counter will wrap to zero after its maximum count has been
367 </row></tbody></tgroup></informaltable>
370 <informaltable><tgroup cols="1"><tbody><row><entry
372 <para>int ioctl( int fd, int request =
373 <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t ⋆ublocks);</para>
375 </row></tbody></tgroup></informaltable>
378 <informaltable><tgroup cols="2"><tbody><row><entry
383 <para>File descriptor returned by a previous call to open().</para>
387 <para>int request</para>
390 <para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
395 <para>uint32_t *ublocks</para>
398 <para>The total number of uncorrected blocks seen by the driver
401 </row></tbody></tgroup></informaltable>
406 <section id="FE_SET_FRONTEND">
407 <title>FE_SET_FRONTEND</title>
410 <informaltable><tgroup cols="1"><tbody><row><entry
412 <para>This ioctl call starts a tuning operation using specified parameters. The result
413 of this call will be successful if the parameters were valid and the tuning could
414 be initiated. The result of the tuning operation in itself, however, will arrive
415 asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
416 FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before
417 the previous one was completed, the previous operation will be aborted in favor
418 of the new one. This command requires read/write access to the device.</para>
420 </row></tbody></tgroup></informaltable>
424 <informaltable><tgroup cols="1"><tbody><row><entry
426 <para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
427 struct dvb_frontend_parameters ⋆p);</para>
429 </row></tbody></tgroup></informaltable>
432 <informaltable><tgroup cols="2"><tbody><row><entry
437 <para>File descriptor returned by a previous call to open().</para>
441 <para>int request</para>
444 <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
449 dvb_frontend_parameters
453 <para>Points to parameters for tuning operation.</para>
455 </row></tbody></tgroup></informaltable>
458 <informaltable><tgroup cols="2"><tbody><row><entry
463 <para>Maximum supported symbol rate reached.</para>
465 </row></tbody></tgroup></informaltable>
468 <section id="FE_GET_FRONTEND">
469 <title>FE_GET_FRONTEND</title>
472 <informaltable><tgroup cols="1"><tbody><row><entry
474 <para>This ioctl call queries the currently effective frontend parameters. For this
475 command, read-only access to the device is sufficient.</para>
477 </row></tbody></tgroup></informaltable>
481 <informaltable><tgroup cols="1"><tbody><row><entry
483 <para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
484 struct dvb_frontend_parameters ⋆p);</para>
486 </row></tbody></tgroup></informaltable>
490 <informaltable><tgroup cols="2"><tbody><row><entry
495 <para>File descriptor returned by a previous call to open().</para>
499 <para>int request</para>
502 <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
507 dvb_frontend_parameters
511 <para>Points to parameters for tuning operation.</para>
513 </row></tbody></tgroup></informaltable>
516 <informaltable><tgroup cols="2"><tbody><row><entry
521 <para>Maximum supported symbol rate reached.</para>
523 </row></tbody></tgroup></informaltable>
527 <section id="FE_GET_EVENT">
528 <title>FE_GET_EVENT</title>
531 <informaltable><tgroup cols="1"><tbody><row><entry
533 <para>This ioctl call returns a frontend event if available. If an event is not
534 available, the behavior depends on whether the device is in blocking or
535 non-blocking mode. In the latter case, the call fails immediately with errno
536 set to EWOULDBLOCK. In the former case, the call blocks until an event
537 becomes available.</para>
541 <para>The standard Linux poll() and/or select() system calls can be used with the
542 device file descriptor to watch for new events. For select(), the file descriptor
543 should be included in the exceptfds argument, and for poll(), POLLPRI should
544 be specified as the wake-up condition. Since the event queue allocated is
545 rather small (room for 8 events), the queue must be serviced regularly to avoid
546 overflow. If an overflow happens, the oldest event is discarded from the queue,
547 and an error (EOVERFLOW) occurs the next time the queue is read. After
548 reporting the error condition in this fashion, subsequent
549 <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
550 calls will return events from the queue as usual.</para>
554 <para>For the sake of implementation simplicity, this command requires read/write
555 access to the device.</para>
557 </row></tbody></tgroup></informaltable>
561 <informaltable><tgroup cols="1"><tbody><row><entry
563 <para>int ioctl(int fd, int request = QPSK_GET_EVENT,
564 struct dvb_frontend_event ⋆ev);</para>
566 </row></tbody></tgroup></informaltable>
570 <informaltable><tgroup cols="2"><tbody><row><entry
575 <para>File descriptor returned by a previous call to open().</para>
579 <para>int request</para>
582 <para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
591 <para>Points to the location where the event,</para>
597 <para>if any, is to be stored.</para>
599 </row></tbody></tgroup></informaltable>
602 <informaltable><tgroup cols="2"><tbody><row><entry
604 <para>EWOULDBLOCK</para>
607 <para>There is no event pending, and the device is in
608 non-blocking mode.</para>
612 <para>EOVERFLOW</para>
615 <para>Overflow in event queue - one or more events were lost.</para>
617 </row></tbody></tgroup></informaltable>
620 <section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
621 <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
622 <para>DESCRIPTION</para>
623 <informaltable><tgroup cols="1"><tbody><row>
625 <para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
626 <para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
627 <para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
629 </row></tbody></tgroup></informaltable>
631 <para>SYNOPSIS</para>
632 <informaltable><tgroup cols="1"><tbody><row>
634 <para>int ioctl(int fd, int request =
635 <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
637 </row></tbody></tgroup></informaltable>
639 <para>PARAMETERS</para>
640 <informaltable><tgroup cols="2"><tbody><row>
642 <para>unsigned long cmd</para>
646 sends the specified raw cmd to the dish via DISEqC.
649 </row></tbody></tgroup></informaltable>