1 <title>DVB Frontend API</title>
3 <para>The DVB frontend device controls the tuner and DVB demodulator
4 hardware. It can be accessed through <emphasis
5 role="tt">/dev/dvb/adapter0/frontend0</emphasis>. Data types and and
6 ioctl definitions can be accessed by including <emphasis
7 role="tt">linux/dvb/frontend.h</emphasis> in your application.</para>
9 <para>DVB frontends come in three varieties: DVB-S (satellite), DVB-C
10 (cable) and DVB-T (terrestrial). Transmission via the internet (DVB-IP)
11 is not yet handled by this API but a future extension is possible. For
12 DVB-S the frontend device also supports satellite equipment control
13 (SEC) via DiSEqC and V-SEC protocols. The DiSEqC (digital SEC)
14 specification is available from
15 <ulink url="http://www.eutelsat.com/satellites/4_5_5.html">Eutelsat</ulink>.</para>
17 <para>Note that the DVB API may also be used for MPEG decoder-only PCI
18 cards, in which case there exists no frontend device.</para>
20 <section id="frontend_types">
21 <title>Frontend Data Types</title>
23 <section id="frontend_type">
24 <title>frontend type</title>
26 <para>For historical reasons frontend types are named after the type of modulation used in
29 typedef enum fe_type {
30 FE_QPSK, /⋆ DVB-S ⋆/
31 FE_QAM, /⋆ DVB-C ⋆/
32 FE_OFDM /⋆ DVB-T ⋆/
38 <section id="frontend_caps">
39 <title>frontend capabilities</title>
41 <para>Capabilities describe what a frontend can do. Some capabilities can only be supported for
42 a specific frontend type.</para>
44 typedef enum fe_caps {
46 FE_CAN_INVERSION_AUTO = 0x1,
50 FE_CAN_FEC_4_5 = 0x10,
51 FE_CAN_FEC_5_6 = 0x20,
52 FE_CAN_FEC_6_7 = 0x40,
53 FE_CAN_FEC_7_8 = 0x80,
54 FE_CAN_FEC_8_9 = 0x100,
55 FE_CAN_FEC_AUTO = 0x200,
57 FE_CAN_QAM_16 = 0x800,
58 FE_CAN_QAM_32 = 0x1000,
59 FE_CAN_QAM_64 = 0x2000,
60 FE_CAN_QAM_128 = 0x4000,
61 FE_CAN_QAM_256 = 0x8000,
62 FE_CAN_QAM_AUTO = 0x10000,
63 FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
64 FE_CAN_BANDWIDTH_AUTO = 0x40000,
65 FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
66 FE_CAN_HIERARCHY_AUTO = 0x100000,
67 FE_CAN_MUTE_TS = 0x80000000,
68 FE_CAN_CLEAN_SETUP = 0x40000000
73 <section id="frontend_info">
74 <title>frontend information</title>
76 <para>Information about the frontend ca be queried with FE_GET_INFO.</para>
79 struct dvb_frontend_info {
82 uint32_t frequency_min;
83 uint32_t frequency_max;
84 uint32_t frequency_stepsize;
85 uint32_t frequency_tolerance;
86 uint32_t symbol_rate_min;
87 uint32_t symbol_rate_max;
88 uint32_t symbol_rate_tolerance; /⋆ ppm ⋆/
89 uint32_t notifier_delay; /⋆ ms ⋆/
95 <section id="frontend_diseqc">
96 <title>diseqc master command</title>
98 <para>A message sent from the frontend to DiSEqC capable equipment.</para>
100 struct dvb_diseqc_master_cmd {
101 uint8_t msg [6]; /⋆ { framing, address, command, data[3] } ⋆/
102 uint8_t msg_len; /⋆ valid values are 3...6 ⋆/
106 <section role="subsection">
107 <title>diseqc slave reply</title>
109 <para>A reply to the frontend from DiSEqC 2.0 capable equipment.</para>
111 struct dvb_diseqc_slave_reply {
112 uint8_t msg [4]; /⋆ { framing, data [3] } ⋆/
113 uint8_t msg_len; /⋆ valid values are 0...4, 0 means no msg ⋆/
114 int timeout; /⋆ return from ioctl after timeout ms with ⋆/
115 }; /⋆ errorcode when no message was received ⋆/
119 <section id="frontend_diseqc_slave_reply">
120 <title>diseqc slave reply</title>
121 <para>The voltage is usually used with non-DiSEqC capable LNBs to switch the polarzation
122 (horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched
123 consistently to the DiSEqC commands as described in the DiSEqC spec.</para>
125 typedef enum fe_sec_voltage {
132 <section id="frontend_sec_tone">
133 <title>SEC continuous tone</title>
135 <para>The continous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
136 high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to
137 be switched consistently to the DiSEqC commands as described in the DiSEqC
140 typedef enum fe_sec_tone_mode {
143 } fe_sec_tone_mode_t;
147 <section id="frontend_sec_burst">
148 <title>SEC tone burst</title>
150 <para>The 22KHz tone burst is usually used with non-DiSEqC capable switches to select
151 between two connected LNBs/satellites. When using DiSEqC epuipment this voltage has to
152 be switched consistently to the DiSEqC commands as described in the DiSEqC
155 typedef enum fe_sec_mini_cmd {
164 <section id="frontend_status">
165 <title>frontend status</title>
166 <para>Several functions of the frontend device use the fe_status data type defined
169 typedef enum fe_status {
170 FE_HAS_SIGNAL = 0x01, /⋆ found something above the noise level ⋆/
171 FE_HAS_CARRIER = 0x02, /⋆ found a DVB signal ⋆/
172 FE_HAS_VITERBI = 0x04, /⋆ FEC is stable ⋆/
173 FE_HAS_SYNC = 0x08, /⋆ found sync bytes ⋆/
174 FE_HAS_LOCK = 0x10, /⋆ everything's working... ⋆/
175 FE_TIMEDOUT = 0x20, /⋆ no lock within the last ~2 seconds ⋆/
176 FE_REINIT = 0x40 /⋆ frontend was reinitialized, ⋆/
177 } fe_status_t; /⋆ application is recommned to reset ⋆/
179 <para>to indicate the current state and/or state changes of the frontend hardware.
184 <section id="frontend_params">
185 <title>frontend parameters</title>
186 <para>The kind of parameters passed to the frontend device for tuning depend on
187 the kind of hardware you are using. All kinds of parameters are combined as an
188 union in the FrontendParameters structure:</para>
190 struct dvb_frontend_parameters {
191 uint32_t frequency; /⋆ (absolute) frequency in Hz for QAM/OFDM ⋆/
192 /⋆ intermediate frequency in kHz for QPSK ⋆/
193 fe_spectral_inversion_t inversion;
195 struct dvb_qpsk_parameters qpsk;
196 struct dvb_qam_parameters qam;
197 struct dvb_ofdm_parameters ofdm;
201 <para>For satellite QPSK frontends you have to use the <constant>QPSKParameters</constant> member defined by</para>
203 struct dvb_qpsk_parameters {
204 uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/
205 fe_code_rate_t fec_inner; /⋆ forward error correction (see above) ⋆/
208 <para>for cable QAM frontend you use the <constant>QAMParameters</constant> structure</para>
210 struct dvb_qam_parameters {
211 uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/
212 fe_code_rate_t fec_inner; /⋆ forward error correction (see above) ⋆/
213 fe_modulation_t modulation; /⋆ modulation type (see above) ⋆/
216 <para>DVB-T frontends are supported by the <constant>OFDMParamters</constant> structure
219 struct dvb_ofdm_parameters {
220 fe_bandwidth_t bandwidth;
221 fe_code_rate_t code_rate_HP; /⋆ high priority stream code rate ⋆/
222 fe_code_rate_t code_rate_LP; /⋆ low priority stream code rate ⋆/
223 fe_modulation_t constellation; /⋆ modulation type (see above) ⋆/
224 fe_transmit_mode_t transmission_mode;
225 fe_guard_interval_t guard_interval;
226 fe_hierarchy_t hierarchy_information;
229 <para>In the case of QPSK frontends the <constant>Frequency</constant> field specifies the intermediate
230 frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
231 the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
232 OFDM frontends the Frequency specifies the absolute frequency and is given in
235 <para>The Inversion field can take one of these values:
238 typedef enum fe_spectral_inversion {
242 } fe_spectral_inversion_t;
244 <para>It indicates if spectral inversion should be presumed or not. In the automatic setting
245 (<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by
248 <para>The possible values for the <constant>FEC_inner</constant> field are
251 typedef enum fe_code_rate {
264 <para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
267 <para>For cable and terrestrial frontends (QAM and OFDM) one also has to specify the quadrature
268 modulation mode which can be one of the following:
271 typedef enum fe_modulation {
281 <para>Finally, there are several more parameters for OFDM:
284 typedef enum fe_transmit_mode {
285 TRANSMISSION_MODE_2K,
286 TRANSMISSION_MODE_8K,
287 TRANSMISSION_MODE_AUTO
288 } fe_transmit_mode_t;
291 typedef enum fe_bandwidth {
299 typedef enum fe_guard_interval {
305 } fe_guard_interval_t;
308 typedef enum fe_hierarchy {
319 <section id="frontend_events">
320 <title>frontend events</title>
322 struct dvb_frontend_event {
324 struct dvb_frontend_parameters parameters;
331 <section id="frontend_fcalls">
332 <title>Frontend Function Calls</title>
334 <section id="frontend_f_open">
335 <title>open()</title>
336 <para>DESCRIPTION</para>
337 <informaltable><tgroup cols="1"><tbody><row>
339 <para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)
340 for subsequent use. Usually the first thing to do after a successful open is to
341 find out the frontend type with FE_GET_INFO.</para>
342 <para>The device can be opened in read-only mode, which only allows monitoring of
343 device status and statistics, or read/write mode, which allows any kind of use
344 (e.g. performing tuning operations.)
346 <para>In a system with multiple front-ends, it is usually the case that multiple devices
347 cannot be open in read/write mode simultaneously. As long as a front-end
348 device is opened in read/write mode, other open() calls in read/write mode will
349 either fail or block, depending on whether non-blocking or blocking mode was
350 specified. A front-end device opened in blocking mode can later be put into
351 non-blocking mode (and vice versa) using the F_SETFL command of the fcntl
352 system call. This is a standard system call, documented in the Linux manual
353 page for fcntl. When an open() call has succeeded, the device will be ready
354 for use in the specified mode. This implies that the corresponding hardware is
355 powered up, and that other front-ends may have been powered down to make
356 that possible.</para>
358 </row></tbody></tgroup></informaltable>
360 <para>SYNOPSIS</para>
361 <informaltable><tgroup cols="1"><tbody><row><entry
363 <para>int open(const char ⋆deviceName, int flags);</para>
365 </row></tbody></tgroup></informaltable>
368 <informaltable><tgroup cols="2"><tbody><row><entry
374 <para>Name of specific video device.</para>
378 <para>int flags</para>
381 <para>A bit-wise OR of the following flags:</para>
387 <para>O_RDONLY read-only access</para>
393 <para>O_RDWR read/write access</para>
399 <para>O_NONBLOCK open in non-blocking mode</para>
405 <para>(blocking mode is the default)</para>
407 </row></tbody></tgroup></informaltable>
410 <informaltable><tgroup cols="2"><tbody><row><entry
415 <para>Device driver not loaded/available.</para>
419 <para>EINTERNAL</para>
422 <para>Internal error.</para>
429 <para>Device or resource busy.</para>
436 <para>Invalid argument.</para>
438 </row></tbody></tgroup></informaltable>
441 <section id="frontend_f_close">
442 <title>close()</title>
445 <informaltable><tgroup cols="1"><tbody><row><entry
447 <para>This system call closes a previously opened front-end device. After closing
448 a front-end device, its corresponding hardware might be powered down
449 automatically.</para>
451 </row></tbody></tgroup></informaltable>
454 <informaltable><tgroup cols="1"><tbody><row><entry
456 <para>int close(int fd);</para>
458 </row></tbody></tgroup></informaltable>
461 <informaltable><tgroup cols="2"><tbody><row><entry
466 <para>File descriptor returned by a previous call to open().</para>
468 </row></tbody></tgroup></informaltable>
471 <informaltable><tgroup cols="2"><tbody><row><entry
476 <para>fd is not a valid open file descriptor.</para>
478 </row></tbody></tgroup></informaltable>
481 <section id="frontend_read_status">
482 <title>FE_READ_STATUS</title>
485 <informaltable><tgroup cols="1"><tbody><row><entry
487 <para>This ioctl call returns status information about the front-end. This call only
488 requires read-only access to the device.</para>
490 </row></tbody></tgroup></informaltable>
493 <informaltable><tgroup cols="1"><tbody><row><entry
495 <para>int ioctl(int fd, int request = FE_READ_STATUS,
496 fe_status_t ⋆status);</para>
498 </row></tbody></tgroup></informaltable>
502 <informaltable><tgroup cols="2"><tbody><row><entry
507 <para>File descriptor returned by a previous call to open().</para>
511 <para>int request</para>
514 <para>Equals FE_READ_STATUS for this command.</para>
518 <para>struct fe_status_t
522 <para>Points to the location where the front-end status word is
525 </row></tbody></tgroup></informaltable>
528 <informaltable><tgroup cols="2"><tbody><row><entry
533 <para>fd is not a valid open file descriptor.</para>
540 <para>status points to invalid address.</para>
542 </row></tbody></tgroup></informaltable>
545 <section id="frontend_read_ber">
546 <title>FE_READ_BER</title>
549 <informaltable><tgroup cols="1"><tbody><row><entry
551 <para>This ioctl call returns the bit error rate for the signal currently
552 received/demodulated by the front-end. For this command, read-only access to
553 the device is sufficient.</para>
555 </row></tbody></tgroup></informaltable>
558 <informaltable><tgroup cols="1"><tbody><row><entry
560 <para>int ioctl(int fd, int request = FE_READ_BER,
561 uint32_t ⋆ber);</para>
563 </row></tbody></tgroup></informaltable>
566 <informaltable><tgroup cols="2"><tbody><row><entry
571 <para>File descriptor returned by a previous call to open().</para>
575 <para>int request</para>
578 <para>Equals FE_READ_BER for this command.</para>
582 <para>uint32_t *ber</para>
585 <para>The bit error rate is stored into *ber.</para>
587 </row></tbody></tgroup></informaltable>
590 <informaltable><tgroup cols="2"><tbody><row><entry
595 <para>fd is not a valid open file descriptor.</para>
602 <para>ber points to invalid address.</para>
606 <para>ENOSIGNAL</para>
609 <para>There is no signal, thus no meaningful bit error rate. Also
610 returned if the front-end is not turned on.</para>
617 <para>Function not available for this device.</para>
619 </row></tbody></tgroup></informaltable>
622 <section id="frontend_read_snr">
623 <title>FE_READ_SNR</title>
627 <informaltable><tgroup cols="1"><tbody><row><entry
629 <para>This ioctl call returns the signal-to-noise ratio for the signal currently received
630 by the front-end. For this command, read-only access to the device is sufficient.</para>
632 </row></tbody></tgroup></informaltable>
635 <informaltable><tgroup cols="1"><tbody><row><entry
637 <para>int ioctl(int fd, int request = FE_READ_SNR, int16_t
640 </row></tbody></tgroup></informaltable>
643 <informaltable><tgroup cols="2"><tbody><row><entry
648 <para>File descriptor returned by a previous call to open().</para>
652 <para>int request</para>
655 <para>Equals FE_READ_SNR for this command.</para>
659 <para>int16_t *snr</para>
662 <para>The signal-to-noise ratio is stored into *snr.</para>
664 </row></tbody></tgroup></informaltable>
668 <informaltable><tgroup cols="2"><tbody><row><entry
673 <para>fd is not a valid open file descriptor.</para>
680 <para>snr points to invalid address.</para>
684 <para>ENOSIGNAL</para>
687 <para>There is no signal, thus no meaningful signal strength
688 value. Also returned if front-end is not turned on.</para>
695 <para>Function not available for this device.</para>
697 </row></tbody></tgroup></informaltable>
700 <section id="frontend_read_signal_strength">
701 <title>FE_READ_SIGNAL_STRENGTH</title>
704 <informaltable><tgroup cols="1"><tbody><row><entry
706 <para>This ioctl call returns the signal strength value for the signal currently received
707 by the front-end. For this command, read-only access to the device is sufficient.</para>
709 </row></tbody></tgroup></informaltable>
712 <informaltable><tgroup cols="1"><tbody><row><entry
714 <para>int ioctl( int fd, int request =
715 FE_READ_SIGNAL_STRENGTH, int16_t ⋆strength);</para>
717 </row></tbody></tgroup></informaltable>
721 <informaltable><tgroup cols="2"><tbody><row><entry
726 <para>File descriptor returned by a previous call to open().</para>
730 <para>int request</para>
733 <para>Equals FE_READ_SIGNAL_STRENGTH for this
738 <para>int16_t *strength</para>
741 <para>The signal strength value is stored into *strength.</para>
743 </row></tbody></tgroup></informaltable>
746 <informaltable><tgroup cols="2"><tbody><row><entry
751 <para>fd is not a valid open file descriptor.</para>
758 <para>status points to invalid address.</para>
762 <para>ENOSIGNAL</para>
765 <para>There is no signal, thus no meaningful signal strength
766 value. Also returned if front-end is not turned on.</para>
773 <para>Function not available for this device.</para>
775 </row></tbody></tgroup></informaltable>
778 <section id="frontend_read_ub">
779 <title>FE_READ_UNCORRECTED_BLOCKS</title>
782 <informaltable><tgroup cols="1"><tbody><row><entry
784 <para>This ioctl call returns the number of uncorrected blocks detected by the device
785 driver during its lifetime. For meaningful measurements, the increment in block
786 count during a specific time interval should be calculated. For this command,
787 read-only access to the device is sufficient.</para>
791 <para>Note that the counter will wrap to zero after its maximum count has been
794 </row></tbody></tgroup></informaltable>
797 <informaltable><tgroup cols="1"><tbody><row><entry
799 <para>int ioctl( int fd, int request =
800 FE_READ_UNCORRECTED_BLOCKS, uint32_t ⋆ublocks);</para>
802 </row></tbody></tgroup></informaltable>
805 <informaltable><tgroup cols="2"><tbody><row><entry
810 <para>File descriptor returned by a previous call to open().</para>
814 <para>int request</para>
817 <para>Equals FE_READ_UNCORRECTED_BLOCKS for this
822 <para>uint32_t *ublocks</para>
825 <para>The total number of uncorrected blocks seen by the driver
828 </row></tbody></tgroup></informaltable>
831 <informaltable><tgroup cols="2"><tbody><row><entry
836 <para>fd is not a valid open file descriptor.</para>
843 <para>ublocks points to invalid address.</para>
850 <para>Function not available for this device.</para>
852 </row></tbody></tgroup></informaltable>
855 <section id="frontend_set_fe">
856 <title>FE_SET_FRONTEND</title>
859 <informaltable><tgroup cols="1"><tbody><row><entry
861 <para>This ioctl call starts a tuning operation using specified parameters. The result
862 of this call will be successful if the parameters were valid and the tuning could
863 be initiated. The result of the tuning operation in itself, however, will arrive
864 asynchronously as an event (see documentation for FE_GET_EVENT and
865 FrontendEvent.) If a new FE_SET_FRONTEND operation is initiated before
866 the previous one was completed, the previous operation will be aborted in favor
867 of the new one. This command requires read/write access to the device.</para>
869 </row></tbody></tgroup></informaltable>
873 <informaltable><tgroup cols="1"><tbody><row><entry
875 <para>int ioctl(int fd, int request = FE_SET_FRONTEND,
876 struct dvb_frontend_parameters ⋆p);</para>
878 </row></tbody></tgroup></informaltable>
881 <informaltable><tgroup cols="2"><tbody><row><entry
886 <para>File descriptor returned by a previous call to open().</para>
890 <para>int request</para>
893 <para>Equals FE_SET_FRONTEND for this command.</para>
898 dvb_frontend_parameters
902 <para>Points to parameters for tuning operation.</para>
904 </row></tbody></tgroup></informaltable>
907 <informaltable><tgroup cols="2"><tbody><row><entry
912 <para>fd is not a valid open file descriptor.</para>
919 <para>p points to invalid address.</para>
926 <para>Maximum supported symbol rate reached.</para>
928 </row></tbody></tgroup></informaltable>
931 <section id="frontend_get_fe">
932 <title>FE_GET_FRONTEND</title>
935 <informaltable><tgroup cols="1"><tbody><row><entry
937 <para>This ioctl call queries the currently effective frontend parameters. For this
938 command, read-only access to the device is sufficient.</para>
940 </row></tbody></tgroup></informaltable>
944 <informaltable><tgroup cols="1"><tbody><row><entry
946 <para>int ioctl(int fd, int request = FE_GET_FRONTEND,
947 struct dvb_frontend_parameters ⋆p);</para>
949 </row></tbody></tgroup></informaltable>
953 <informaltable><tgroup cols="2"><tbody><row><entry
958 <para>File descriptor returned by a previous call to open().</para>
962 <para>int request</para>
965 <para>Equals FE_SET_FRONTEND for this command.</para>
970 dvb_frontend_parameters
974 <para>Points to parameters for tuning operation.</para>
976 </row></tbody></tgroup></informaltable>
981 <informaltable><tgroup cols="2"><tbody><row><entry
986 <para>fd is not a valid open file descriptor.</para>
993 <para>p points to invalid address.</para>
1000 <para>Maximum supported symbol rate reached.</para>
1002 </row></tbody></tgroup></informaltable>
1006 <section id="frontend_get_event">
1007 <title>FE_GET_EVENT</title>
1010 <informaltable><tgroup cols="1"><tbody><row><entry
1012 <para>This ioctl call returns a frontend event if available. If an event is not
1013 available, the behavior depends on whether the device is in blocking or
1014 non-blocking mode. In the latter case, the call fails immediately with errno
1015 set to EWOULDBLOCK. In the former case, the call blocks until an event
1016 becomes available.</para>
1020 <para>The standard Linux poll() and/or select() system calls can be used with the
1021 device file descriptor to watch for new events. For select(), the file descriptor
1022 should be included in the exceptfds argument, and for poll(), POLLPRI should
1023 be specified as the wake-up condition. Since the event queue allocated is
1024 rather small (room for 8 events), the queue must be serviced regularly to avoid
1025 overflow. If an overflow happens, the oldest event is discarded from the queue,
1026 and an error (EOVERFLOW) occurs the next time the queue is read. After
1027 reporting the error condition in this fashion, subsequent FE_GET_EVENT
1028 calls will return events from the queue as usual.</para>
1032 <para>For the sake of implementation simplicity, this command requires read/write
1033 access to the device.</para>
1035 </row></tbody></tgroup></informaltable>
1039 <informaltable><tgroup cols="1"><tbody><row><entry
1041 <para>int ioctl(int fd, int request = QPSK_GET_EVENT,
1042 struct dvb_frontend_event ⋆ev);</para>
1044 </row></tbody></tgroup></informaltable>
1048 <informaltable><tgroup cols="2"><tbody><row><entry
1053 <para>File descriptor returned by a previous call to open().</para>
1057 <para>int request</para>
1060 <para>Equals FE_GET_EVENT for this command.</para>
1069 <para>Points to the location where the event,</para>
1075 <para>if any, is to be stored.</para>
1077 </row></tbody></tgroup></informaltable>
1081 <informaltable><tgroup cols="2"><tbody><row><entry
1086 <para>fd is not a valid open file descriptor.</para>
1093 <para>ev points to invalid address.</para>
1097 <para>EWOULDBLOCK</para>
1100 <para>There is no event pending, and the device is in
1101 non-blocking mode.</para>
1105 <para>EOVERFLOW</para>
1113 <para>Overflow in event queue - one or more events were lost.</para>
1115 </row></tbody></tgroup></informaltable>
1118 <section id="frontend_get_info">
1119 <title>FE_GET_INFO</title>
1122 <informaltable><tgroup cols="1"><tbody><row><entry
1124 <para>This ioctl call returns information about the front-end. This call only requires
1125 read-only access to the device.</para>
1127 </row></tbody></tgroup></informaltable>
1131 <informaltable><tgroup cols="1"><tbody><row><entry
1133 <para> int ioctl(int fd, int request = FE_GET_INFO, struct
1134 dvb_frontend_info ⋆info);</para>
1136 </row></tbody></tgroup></informaltable>
1140 <informaltable><tgroup cols="2"><tbody><row><entry
1145 <para>File descriptor returned by a previous call to open().</para>
1149 <para>int request</para>
1152 <para>Equals FE_GET_INFO for this command.</para>
1161 <para>Points to the location where the front-end information is
1162 to be stored.</para>
1164 </row></tbody></tgroup></informaltable>
1167 <informaltable><tgroup cols="2"><tbody><row><entry
1172 <para>fd is not a valid open file descriptor.</para>
1179 <para>info points to invalid address.</para>
1181 </row></tbody></tgroup></informaltable>
1184 <section id="frontend_diseqc_reset_overload">
1185 <title>FE_DISEQC_RESET_OVERLOAD</title>
1188 <informaltable><tgroup cols="1"><tbody><row><entry
1190 <para>If the bus has been automatically powered off due to power overload, this ioctl
1191 call restores the power to the bus. The call requires read/write access to the
1192 device. This call has no effect if the device is manually powered off. Not all
1193 DVB adapters support this ioctl.</para>
1195 </row></tbody></tgroup></informaltable>
1199 <informaltable><tgroup cols="1"><tbody><row><entry
1201 <para>int ioctl(int fd, int request =
1202 FE_DISEQC_RESET_OVERLOAD);</para>
1204 </row></tbody></tgroup></informaltable>
1207 <informaltable><tgroup cols="2"><tbody><row><entry
1212 <para>File descriptor returned by a previous call to open().</para>
1216 <para>int request</para>
1219 <para>Equals FE_DISEQC_RESET_OVERLOAD for this
1222 </row></tbody></tgroup></informaltable>
1226 <informaltable><tgroup cols="2"><tbody><row><entry
1231 <para>fd is not a valid file descriptor.</para>
1238 <para>Permission denied (needs read/write access).</para>
1242 <para>EINTERNAL</para>
1245 <para>Internal error in the device driver.</para>
1247 </row></tbody></tgroup></informaltable>
1250 <section id="frontend_diseqc_send_master_cmd">
1251 <title>FE_DISEQC_SEND_MASTER_CMD</title>
1254 <informaltable><tgroup cols="1"><tbody><row><entry
1256 <para>This ioctl call is used to send a a DiSEqC command.</para>
1258 </row></tbody></tgroup></informaltable>
1261 <informaltable><tgroup cols="1"><tbody><row><entry
1263 <para>int ioctl(int fd, int request =
1264 FE_DISEQC_SEND_MASTER_CMD, struct
1265 dvb_diseqc_master_cmd ⋆cmd);</para>
1267 </row></tbody></tgroup></informaltable>
1271 <informaltable><tgroup cols="2"><tbody><row><entry
1276 <para>File descriptor returned by a previous call to open().</para>
1280 <para>int request</para>
1283 <para>Equals FE_DISEQC_SEND_MASTER_CMD for this
1289 dvb_diseqc_master_cmd
1293 <para>Pointer to the command to be transmitted.</para>
1295 </row></tbody></tgroup></informaltable>
1299 <informaltable><tgroup cols="2"><tbody><row><entry
1304 <para>fd is not a valid file descriptor.</para>
1311 <para>Seq points to an invalid address.</para>
1318 <para>The data structure referred to by seq is invalid in some
1326 <para>Permission denied (needs read/write access).</para>
1330 <para>EINTERNAL</para>
1333 <para>Internal error in the device driver.</para>
1335 </row></tbody></tgroup></informaltable>
1338 <section id="frontend_diseqc_recv_slave_reply">
1339 <title>FE_DISEQC_RECV_SLAVE_REPLY</title>
1342 <informaltable><tgroup cols="1"><tbody><row><entry
1344 <para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>
1346 </row></tbody></tgroup></informaltable>
1350 <informaltable><tgroup cols="1"><tbody><row><entry
1352 <para>int ioctl(int fd, int request =
1353 FE_DISEQC_RECV_SLAVE_REPLY, struct
1354 dvb_diseqc_slave_reply ⋆reply);</para>
1356 </row></tbody></tgroup></informaltable>
1360 <informaltable><tgroup cols="2"><tbody><row><entry
1365 <para>File descriptor returned by a previous call to open().</para>
1369 <para>int request</para>
1372 <para>Equals FE_DISEQC_RECV_SLAVE_REPLY for this
1378 dvb_diseqc_slave_reply
1382 <para>Pointer to the command to be received.</para>
1384 </row></tbody></tgroup></informaltable>
1387 <informaltable><tgroup cols="2"><tbody><row><entry
1392 <para>fd is not a valid file descriptor.</para>
1399 <para>Seq points to an invalid address.</para>
1406 <para>The data structure referred to by seq is invalid in some
1414 <para>Permission denied (needs read/write access).</para>
1418 <para>EINTERNAL</para>
1421 <para>Internal error in the device driver.</para>
1423 </row></tbody></tgroup></informaltable>
1426 <section id="frontend_diseqc_send_burst">
1427 <title>FE_DISEQC_SEND_BURST</title>
1430 <informaltable><tgroup cols="1"><tbody><row><entry
1432 <para>This ioctl call is used to send a 22KHz tone burst.</para>
1434 </row></tbody></tgroup></informaltable>
1438 <informaltable><tgroup cols="1"><tbody><row><entry
1440 <para>int ioctl(int fd, int request =
1441 FE_DISEQC_SEND_BURST, fe_sec_mini_cmd_t burst);</para>
1443 </row></tbody></tgroup></informaltable>
1447 <informaltable><tgroup cols="2"><tbody><row><entry
1452 <para>File descriptor returned by a previous call to open().</para>
1456 <para>int request</para>
1459 <para>Equals FE_DISEQC_SEND_BURST for this command.</para>
1463 <para>fe_sec_mini_cmd_t
1467 <para>burst A or B.</para>
1469 </row></tbody></tgroup></informaltable>
1473 <informaltable><tgroup cols="2"><tbody><row><entry
1478 <para>fd is not a valid file descriptor.</para>
1485 <para>Seq points to an invalid address.</para>
1492 <para>The data structure referred to by seq is invalid in some
1500 <para>Permission denied (needs read/write access).</para>
1504 <para>EINTERNAL</para>
1507 <para>Internal error in the device driver.</para>
1509 </row></tbody></tgroup></informaltable>
1512 <section id="frontend_set_tone">
1513 <title>FE_SET_TONE</title>
1516 <informaltable><tgroup cols="1"><tbody><row><entry
1518 <para>This call is used to set the generation of the continuous 22kHz tone. This call
1519 requires read/write permissions.</para>
1521 </row></tbody></tgroup></informaltable>
1524 <informaltable><tgroup cols="1"><tbody><row><entry
1526 <para>int ioctl(int fd, int request = FE_SET_TONE,
1527 fe_sec_tone_mode_t tone);</para>
1529 </row></tbody></tgroup></informaltable>
1532 <informaltable><tgroup cols="2"><tbody><row><entry
1537 <para>File descriptor returned by a previous call to open().</para>
1541 <para>int request</para>
1544 <para>Equals FE_SET_TONE for this command.</para>
1548 <para>fe_sec_tone_mode_t
1552 <para>The requested tone generation mode (on/off).</para>
1554 </row></tbody></tgroup></informaltable>
1557 <informaltable><tgroup cols="2"><tbody><row><entry
1562 <para>Device driver not loaded/available.</para>
1569 <para>Device or resource busy.</para>
1576 <para>Invalid argument.</para>
1583 <para>File not opened with read permissions.</para>
1587 <para>EINTERNAL</para>
1590 <para>Internal error in the device driver.</para>
1592 </row></tbody></tgroup></informaltable>
1595 <section id="fe_set_voltage">
1596 <title>FE_SET_VOLTAGE</title>
1599 <informaltable><tgroup cols="1"><tbody><row><entry
1601 <para>This call is used to set the bus voltage. This call requires read/write
1604 </row></tbody></tgroup></informaltable>
1607 <informaltable><tgroup cols="1"><tbody><row><entry
1609 <para>int ioctl(int fd, int request = FE_SET_VOLTAGE,
1610 fe_sec_voltage_t voltage);</para>
1612 </row></tbody></tgroup></informaltable>
1616 <informaltable><tgroup cols="2"><tbody><row><entry
1621 <para>File descriptor returned by a previous call to open().</para>
1625 <para>int request</para>
1628 <para>Equals FE_SET_VOLTAGE for this command.</para>
1632 <para>fe_sec_voltage_t
1636 <para>The requested bus voltage.</para>
1638 </row></tbody></tgroup></informaltable>
1642 <informaltable><tgroup cols="2"><tbody><row><entry
1647 <para>Device driver not loaded/available.</para>
1654 <para>Device or resource busy.</para>
1661 <para>Invalid argument.</para>
1668 <para>File not opened with read permissions.</para>
1672 <para>EINTERNAL</para>
1675 <para>Internal error in the device driver.</para>
1677 </row></tbody></tgroup></informaltable>
1680 <section id="frontend_enable_high_lnb_volt">
1681 <title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>
1684 <informaltable><tgroup cols="1"><tbody><row><entry
1686 <para>If high != 0 enables slightly higher voltages instead of 13/18V (to compensate
1687 for long cables). This call requires read/write permissions. Not all DVB
1688 adapters support this ioctl.</para>
1690 </row></tbody></tgroup></informaltable>
1694 <informaltable><tgroup cols="1"><tbody><row><entry
1696 <para>int ioctl(int fd, int request =
1697 FE_ENABLE_HIGH_LNB_VOLTAGE, int high);</para>
1699 </row></tbody></tgroup></informaltable>
1703 <informaltable><tgroup cols="2"><tbody><row><entry
1708 <para>File descriptor returned by a previous call to open().</para>
1712 <para>int request</para>
1715 <para>Equals FE_SET_VOLTAGE for this command.</para>
1719 <para>int high</para>
1722 <para>The requested bus voltage.</para>
1724 </row></tbody></tgroup></informaltable>
1728 <informaltable><tgroup cols="2"><tbody><row><entry
1733 <para>Device driver not loaded/available.</para>
1740 <para>Device or resource busy.</para>
1747 <para>Invalid argument.</para>
1754 <para>File not opened with read permissions.</para>
1758 <para>EINTERNAL</para>
1761 <para>Internal error in the device driver.</para>
1763 </row></tbody></tgroup></informaltable>