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
77 <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
80 struct dvb_frontend_info {
83 uint32_t frequency_min;
84 uint32_t frequency_max;
85 uint32_t frequency_stepsize;
86 uint32_t frequency_tolerance;
87 uint32_t symbol_rate_min;
88 uint32_t symbol_rate_max;
89 uint32_t symbol_rate_tolerance; /⋆ ppm ⋆/
90 uint32_t notifier_delay; /⋆ ms ⋆/
96 <section id="frontend_diseqc">
97 <title>diseqc master command</title>
99 <para>A message sent from the frontend to DiSEqC capable equipment.</para>
101 struct dvb_diseqc_master_cmd {
102 uint8_t msg [6]; /⋆ { framing, address, command, data[3] } ⋆/
103 uint8_t msg_len; /⋆ valid values are 3...6 ⋆/
107 <section role="subsection">
108 <title>diseqc slave reply</title>
110 <para>A reply to the frontend from DiSEqC 2.0 capable equipment.</para>
112 struct dvb_diseqc_slave_reply {
113 uint8_t msg [4]; /⋆ { framing, data [3] } ⋆/
114 uint8_t msg_len; /⋆ valid values are 0...4, 0 means no msg ⋆/
115 int timeout; /⋆ return from ioctl after timeout ms with ⋆/
116 }; /⋆ errorcode when no message was received ⋆/
120 <section id="frontend_diseqc_slave_reply">
121 <title>diseqc slave reply</title>
122 <para>The voltage is usually used with non-DiSEqC capable LNBs to switch the polarzation
123 (horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched
124 consistently to the DiSEqC commands as described in the DiSEqC spec.</para>
126 typedef enum fe_sec_voltage {
133 <section id="frontend_sec_tone">
134 <title>SEC continuous tone</title>
136 <para>The continous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
137 high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to
138 be switched consistently to the DiSEqC commands as described in the DiSEqC
141 typedef enum fe_sec_tone_mode {
144 } fe_sec_tone_mode_t;
148 <section id="frontend_sec_burst">
149 <title>SEC tone burst</title>
151 <para>The 22KHz tone burst is usually used with non-DiSEqC capable switches to select
152 between two connected LNBs/satellites. When using DiSEqC epuipment this voltage has to
153 be switched consistently to the DiSEqC commands as described in the DiSEqC
156 typedef enum fe_sec_mini_cmd {
165 <section id="frontend_status">
166 <title>frontend status</title>
167 <para>Several functions of the frontend device use the fe_status data type defined
170 typedef enum fe_status {
171 FE_HAS_SIGNAL = 0x01, /⋆ found something above the noise level ⋆/
172 FE_HAS_CARRIER = 0x02, /⋆ found a DVB signal ⋆/
173 FE_HAS_VITERBI = 0x04, /⋆ FEC is stable ⋆/
174 FE_HAS_SYNC = 0x08, /⋆ found sync bytes ⋆/
175 FE_HAS_LOCK = 0x10, /⋆ everything's working... ⋆/
176 FE_TIMEDOUT = 0x20, /⋆ no lock within the last ~2 seconds ⋆/
177 FE_REINIT = 0x40 /⋆ frontend was reinitialized, ⋆/
178 } fe_status_t; /⋆ application is recommned to reset ⋆/
180 <para>to indicate the current state and/or state changes of the frontend hardware.
185 <section id="frontend_params">
186 <title>frontend parameters</title>
187 <para>The kind of parameters passed to the frontend device for tuning depend on
188 the kind of hardware you are using. All kinds of parameters are combined as an
189 union in the FrontendParameters structure:</para>
191 struct dvb_frontend_parameters {
192 uint32_t frequency; /⋆ (absolute) frequency in Hz for QAM/OFDM ⋆/
193 /⋆ intermediate frequency in kHz for QPSK ⋆/
194 fe_spectral_inversion_t inversion;
196 struct dvb_qpsk_parameters qpsk;
197 struct dvb_qam_parameters qam;
198 struct dvb_ofdm_parameters ofdm;
202 <para>For satellite QPSK frontends you have to use the <constant>QPSKParameters</constant> member defined by</para>
204 struct dvb_qpsk_parameters {
205 uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/
206 fe_code_rate_t fec_inner; /⋆ forward error correction (see above) ⋆/
209 <para>for cable QAM frontend you use the <constant>QAMParameters</constant> structure</para>
211 struct dvb_qam_parameters {
212 uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/
213 fe_code_rate_t fec_inner; /⋆ forward error correction (see above) ⋆/
214 fe_modulation_t modulation; /⋆ modulation type (see above) ⋆/
217 <para>DVB-T frontends are supported by the <constant>OFDMParamters</constant> structure
220 struct dvb_ofdm_parameters {
221 fe_bandwidth_t bandwidth;
222 fe_code_rate_t code_rate_HP; /⋆ high priority stream code rate ⋆/
223 fe_code_rate_t code_rate_LP; /⋆ low priority stream code rate ⋆/
224 fe_modulation_t constellation; /⋆ modulation type (see above) ⋆/
225 fe_transmit_mode_t transmission_mode;
226 fe_guard_interval_t guard_interval;
227 fe_hierarchy_t hierarchy_information;
230 <para>In the case of QPSK frontends the <constant>Frequency</constant> field specifies the intermediate
231 frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
232 the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
233 OFDM frontends the Frequency specifies the absolute frequency and is given in
236 <para>The Inversion field can take one of these values:
239 typedef enum fe_spectral_inversion {
243 } fe_spectral_inversion_t;
245 <para>It indicates if spectral inversion should be presumed or not. In the automatic setting
246 (<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by
249 <para>The possible values for the <constant>FEC_inner</constant> field are
252 typedef enum fe_code_rate {
265 <para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
268 <para>For cable and terrestrial frontends (QAM and OFDM) one also has to specify the quadrature
269 modulation mode which can be one of the following:
272 typedef enum fe_modulation {
282 <para>Finally, there are several more parameters for OFDM:
285 typedef enum fe_transmit_mode {
286 TRANSMISSION_MODE_2K,
287 TRANSMISSION_MODE_8K,
288 TRANSMISSION_MODE_AUTO
289 } fe_transmit_mode_t;
292 typedef enum fe_bandwidth {
300 typedef enum fe_guard_interval {
306 } fe_guard_interval_t;
309 typedef enum fe_hierarchy {
320 <section id="frontend_events">
321 <title>frontend events</title>
323 struct dvb_frontend_event {
325 struct dvb_frontend_parameters parameters;
332 <section id="frontend_fcalls">
333 <title>Frontend Function Calls</title>
335 <section id="frontend_f_open">
336 <title>open()</title>
337 <para>DESCRIPTION</para>
338 <informaltable><tgroup cols="1"><tbody><row>
340 <para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)
341 for subsequent use. Usually the first thing to do after a successful open is to
342 find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
343 <para>The device can be opened in read-only mode, which only allows monitoring of
344 device status and statistics, or read/write mode, which allows any kind of use
345 (e.g. performing tuning operations.)
347 <para>In a system with multiple front-ends, it is usually the case that multiple devices
348 cannot be open in read/write mode simultaneously. As long as a front-end
349 device is opened in read/write mode, other open() calls in read/write mode will
350 either fail or block, depending on whether non-blocking or blocking mode was
351 specified. A front-end device opened in blocking mode can later be put into
352 non-blocking mode (and vice versa) using the F_SETFL command of the fcntl
353 system call. This is a standard system call, documented in the Linux manual
354 page for fcntl. When an open() call has succeeded, the device will be ready
355 for use in the specified mode. This implies that the corresponding hardware is
356 powered up, and that other front-ends may have been powered down to make
357 that possible.</para>
359 </row></tbody></tgroup></informaltable>
361 <para>SYNOPSIS</para>
362 <informaltable><tgroup cols="1"><tbody><row><entry
364 <para>int open(const char ⋆deviceName, int flags);</para>
366 </row></tbody></tgroup></informaltable>
369 <informaltable><tgroup cols="2"><tbody><row><entry
375 <para>Name of specific video device.</para>
379 <para>int flags</para>
382 <para>A bit-wise OR of the following flags:</para>
388 <para>O_RDONLY read-only access</para>
394 <para>O_RDWR read/write access</para>
400 <para>O_NONBLOCK open in non-blocking mode</para>
406 <para>(blocking mode is the default)</para>
408 </row></tbody></tgroup></informaltable>
411 <informaltable><tgroup cols="2"><tbody><row><entry
416 <para>Device driver not loaded/available.</para>
420 <para>EINTERNAL</para>
423 <para>Internal error.</para>
430 <para>Device or resource busy.</para>
437 <para>Invalid argument.</para>
439 </row></tbody></tgroup></informaltable>
442 <section id="frontend_f_close">
443 <title>close()</title>
446 <informaltable><tgroup cols="1"><tbody><row><entry
448 <para>This system call closes a previously opened front-end device. After closing
449 a front-end device, its corresponding hardware might be powered down
450 automatically.</para>
452 </row></tbody></tgroup></informaltable>
455 <informaltable><tgroup cols="1"><tbody><row><entry
457 <para>int close(int fd);</para>
459 </row></tbody></tgroup></informaltable>
462 <informaltable><tgroup cols="2"><tbody><row><entry
467 <para>File descriptor returned by a previous call to open().</para>
469 </row></tbody></tgroup></informaltable>
472 <informaltable><tgroup cols="2"><tbody><row><entry
477 <para>fd is not a valid open file descriptor.</para>
479 </row></tbody></tgroup></informaltable>
482 <section id="FE_READ_STATUS">
483 <title>FE_READ_STATUS</title>
486 <informaltable><tgroup cols="1"><tbody><row><entry
488 <para>This ioctl call returns status information about the front-end. This call only
489 requires read-only access to the device.</para>
491 </row></tbody></tgroup></informaltable>
494 <informaltable><tgroup cols="1"><tbody><row><entry
496 <para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,
497 fe_status_t ⋆status);</para>
499 </row></tbody></tgroup></informaltable>
503 <informaltable><tgroup cols="2"><tbody><row><entry
508 <para>File descriptor returned by a previous call to open().</para>
512 <para>int request</para>
515 <para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>
519 <para>struct fe_status_t
523 <para>Points to the location where the front-end status word is
526 </row></tbody></tgroup></informaltable>
529 <informaltable><tgroup cols="2"><tbody><row><entry
534 <para>fd is not a valid open file descriptor.</para>
541 <para>status points to invalid address.</para>
543 </row></tbody></tgroup></informaltable>
546 <section id="FE_READ_BER">
547 <title>FE_READ_BER</title>
550 <informaltable><tgroup cols="1"><tbody><row><entry
552 <para>This ioctl call returns the bit error rate for the signal currently
553 received/demodulated by the front-end. For this command, read-only access to
554 the device is sufficient.</para>
556 </row></tbody></tgroup></informaltable>
559 <informaltable><tgroup cols="1"><tbody><row><entry
561 <para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
562 uint32_t ⋆ber);</para>
564 </row></tbody></tgroup></informaltable>
567 <informaltable><tgroup cols="2"><tbody><row><entry
572 <para>File descriptor returned by a previous call to open().</para>
576 <para>int request</para>
579 <para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
583 <para>uint32_t *ber</para>
586 <para>The bit error rate is stored into *ber.</para>
588 </row></tbody></tgroup></informaltable>
591 <informaltable><tgroup cols="2"><tbody><row><entry
596 <para>fd is not a valid open file descriptor.</para>
603 <para>ber points to invalid address.</para>
607 <para>ENOSIGNAL</para>
610 <para>There is no signal, thus no meaningful bit error rate. Also
611 returned if the front-end is not turned on.</para>
618 <para>Function not available for this device.</para>
620 </row></tbody></tgroup></informaltable>
623 <section id="FE_READ_SNR">
624 <title>FE_READ_SNR</title>
628 <informaltable><tgroup cols="1"><tbody><row><entry
630 <para>This ioctl call returns the signal-to-noise ratio for the signal currently received
631 by the front-end. For this command, read-only access to the device is sufficient.</para>
633 </row></tbody></tgroup></informaltable>
636 <informaltable><tgroup cols="1"><tbody><row><entry
638 <para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t
641 </row></tbody></tgroup></informaltable>
644 <informaltable><tgroup cols="2"><tbody><row><entry
649 <para>File descriptor returned by a previous call to open().</para>
653 <para>int request</para>
656 <para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>
660 <para>int16_t *snr</para>
663 <para>The signal-to-noise ratio is stored into *snr.</para>
665 </row></tbody></tgroup></informaltable>
669 <informaltable><tgroup cols="2"><tbody><row><entry
674 <para>fd is not a valid open file descriptor.</para>
681 <para>snr points to invalid address.</para>
685 <para>ENOSIGNAL</para>
688 <para>There is no signal, thus no meaningful signal strength
689 value. Also returned if front-end is not turned on.</para>
696 <para>Function not available for this device.</para>
698 </row></tbody></tgroup></informaltable>
701 <section id="FE_READ_SIGNAL_STRENGTH">
702 <title>FE_READ_SIGNAL_STRENGTH</title>
705 <informaltable><tgroup cols="1"><tbody><row><entry
707 <para>This ioctl call returns the signal strength value for the signal currently received
708 by the front-end. For this command, read-only access to the device is sufficient.</para>
710 </row></tbody></tgroup></informaltable>
713 <informaltable><tgroup cols="1"><tbody><row><entry
715 <para>int ioctl( int fd, int request =
716 <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t ⋆strength);</para>
718 </row></tbody></tgroup></informaltable>
722 <informaltable><tgroup cols="2"><tbody><row><entry
727 <para>File descriptor returned by a previous call to open().</para>
731 <para>int request</para>
734 <para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
739 <para>int16_t *strength</para>
742 <para>The signal strength value is stored into *strength.</para>
744 </row></tbody></tgroup></informaltable>
747 <informaltable><tgroup cols="2"><tbody><row><entry
752 <para>fd is not a valid open file descriptor.</para>
759 <para>status points to invalid address.</para>
763 <para>ENOSIGNAL</para>
766 <para>There is no signal, thus no meaningful signal strength
767 value. Also returned if front-end is not turned on.</para>
774 <para>Function not available for this device.</para>
776 </row></tbody></tgroup></informaltable>
779 <section id="FE_READ_UNCORRECTED_BLOCKS">
780 <title>FE_READ_UNCORRECTED_BLOCKS</title>
783 <informaltable><tgroup cols="1"><tbody><row><entry
785 <para>This ioctl call returns the number of uncorrected blocks detected by the device
786 driver during its lifetime. For meaningful measurements, the increment in block
787 count during a specific time interval should be calculated. For this command,
788 read-only access to the device is sufficient.</para>
792 <para>Note that the counter will wrap to zero after its maximum count has been
795 </row></tbody></tgroup></informaltable>
798 <informaltable><tgroup cols="1"><tbody><row><entry
800 <para>int ioctl( int fd, int request =
801 <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t ⋆ublocks);</para>
803 </row></tbody></tgroup></informaltable>
806 <informaltable><tgroup cols="2"><tbody><row><entry
811 <para>File descriptor returned by a previous call to open().</para>
815 <para>int request</para>
818 <para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
823 <para>uint32_t *ublocks</para>
826 <para>The total number of uncorrected blocks seen by the driver
829 </row></tbody></tgroup></informaltable>
832 <informaltable><tgroup cols="2"><tbody><row><entry
837 <para>fd is not a valid open file descriptor.</para>
844 <para>ublocks points to invalid address.</para>
851 <para>Function not available for this device.</para>
853 </row></tbody></tgroup></informaltable>
856 <section id="FE_SET_FRONTEND">
857 <title>FE_SET_FRONTEND</title>
860 <informaltable><tgroup cols="1"><tbody><row><entry
862 <para>This ioctl call starts a tuning operation using specified parameters. The result
863 of this call will be successful if the parameters were valid and the tuning could
864 be initiated. The result of the tuning operation in itself, however, will arrive
865 asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
866 FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before
867 the previous one was completed, the previous operation will be aborted in favor
868 of the new one. This command requires read/write access to the device.</para>
870 </row></tbody></tgroup></informaltable>
874 <informaltable><tgroup cols="1"><tbody><row><entry
876 <para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
877 struct dvb_frontend_parameters ⋆p);</para>
879 </row></tbody></tgroup></informaltable>
882 <informaltable><tgroup cols="2"><tbody><row><entry
887 <para>File descriptor returned by a previous call to open().</para>
891 <para>int request</para>
894 <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
899 dvb_frontend_parameters
903 <para>Points to parameters for tuning operation.</para>
905 </row></tbody></tgroup></informaltable>
908 <informaltable><tgroup cols="2"><tbody><row><entry
913 <para>fd is not a valid open file descriptor.</para>
920 <para>p points to invalid address.</para>
927 <para>Maximum supported symbol rate reached.</para>
929 </row></tbody></tgroup></informaltable>
932 <section id="FE_GET_FRONTEND">
933 <title>FE_GET_FRONTEND</title>
936 <informaltable><tgroup cols="1"><tbody><row><entry
938 <para>This ioctl call queries the currently effective frontend parameters. For this
939 command, read-only access to the device is sufficient.</para>
941 </row></tbody></tgroup></informaltable>
945 <informaltable><tgroup cols="1"><tbody><row><entry
947 <para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
948 struct dvb_frontend_parameters ⋆p);</para>
950 </row></tbody></tgroup></informaltable>
954 <informaltable><tgroup cols="2"><tbody><row><entry
959 <para>File descriptor returned by a previous call to open().</para>
963 <para>int request</para>
966 <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
971 dvb_frontend_parameters
975 <para>Points to parameters for tuning operation.</para>
977 </row></tbody></tgroup></informaltable>
982 <informaltable><tgroup cols="2"><tbody><row><entry
987 <para>fd is not a valid open file descriptor.</para>
994 <para>p points to invalid address.</para>
1001 <para>Maximum supported symbol rate reached.</para>
1003 </row></tbody></tgroup></informaltable>
1007 <section id="FE_GET_EVENT">
1008 <title>FE_GET_EVENT</title>
1011 <informaltable><tgroup cols="1"><tbody><row><entry
1013 <para>This ioctl call returns a frontend event if available. If an event is not
1014 available, the behavior depends on whether the device is in blocking or
1015 non-blocking mode. In the latter case, the call fails immediately with errno
1016 set to EWOULDBLOCK. In the former case, the call blocks until an event
1017 becomes available.</para>
1021 <para>The standard Linux poll() and/or select() system calls can be used with the
1022 device file descriptor to watch for new events. For select(), the file descriptor
1023 should be included in the exceptfds argument, and for poll(), POLLPRI should
1024 be specified as the wake-up condition. Since the event queue allocated is
1025 rather small (room for 8 events), the queue must be serviced regularly to avoid
1026 overflow. If an overflow happens, the oldest event is discarded from the queue,
1027 and an error (EOVERFLOW) occurs the next time the queue is read. After
1028 reporting the error condition in this fashion, subsequent
1029 <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
1030 calls will return events from the queue as usual.</para>
1034 <para>For the sake of implementation simplicity, this command requires read/write
1035 access to the device.</para>
1037 </row></tbody></tgroup></informaltable>
1041 <informaltable><tgroup cols="1"><tbody><row><entry
1043 <para>int ioctl(int fd, int request = QPSK_GET_EVENT,
1044 struct dvb_frontend_event ⋆ev);</para>
1046 </row></tbody></tgroup></informaltable>
1050 <informaltable><tgroup cols="2"><tbody><row><entry
1055 <para>File descriptor returned by a previous call to open().</para>
1059 <para>int request</para>
1062 <para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
1071 <para>Points to the location where the event,</para>
1077 <para>if any, is to be stored.</para>
1079 </row></tbody></tgroup></informaltable>
1083 <informaltable><tgroup cols="2"><tbody><row><entry
1088 <para>fd is not a valid open file descriptor.</para>
1095 <para>ev points to invalid address.</para>
1099 <para>EWOULDBLOCK</para>
1102 <para>There is no event pending, and the device is in
1103 non-blocking mode.</para>
1107 <para>EOVERFLOW</para>
1115 <para>Overflow in event queue - one or more events were lost.</para>
1117 </row></tbody></tgroup></informaltable>
1120 <section id="FE_GET_INFO">
1121 <title>FE_GET_INFO</title>
1124 <informaltable><tgroup cols="1"><tbody><row><entry
1126 <para>This ioctl call returns information about the front-end. This call only requires
1127 read-only access to the device.</para>
1129 </row></tbody></tgroup></informaltable>
1133 <informaltable><tgroup cols="1"><tbody><row><entry
1135 <para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct
1136 dvb_frontend_info ⋆info);</para>
1138 </row></tbody></tgroup></informaltable>
1142 <informaltable><tgroup cols="2"><tbody><row><entry
1147 <para>File descriptor returned by a previous call to open().</para>
1151 <para>int request</para>
1154 <para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>
1163 <para>Points to the location where the front-end information is
1164 to be stored.</para>
1166 </row></tbody></tgroup></informaltable>
1169 <informaltable><tgroup cols="2"><tbody><row><entry
1174 <para>fd is not a valid open file descriptor.</para>
1181 <para>info points to invalid address.</para>
1183 </row></tbody></tgroup></informaltable>
1186 <section id="FE_DISEQC_RESET_OVERLOAD">
1187 <title>FE_DISEQC_RESET_OVERLOAD</title>
1190 <informaltable><tgroup cols="1"><tbody><row><entry
1192 <para>If the bus has been automatically powered off due to power overload, this ioctl
1193 call restores the power to the bus. The call requires read/write access to the
1194 device. This call has no effect if the device is manually powered off. Not all
1195 DVB adapters support this ioctl.</para>
1197 </row></tbody></tgroup></informaltable>
1201 <informaltable><tgroup cols="1"><tbody><row><entry
1203 <para>int ioctl(int fd, int request =
1204 <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>
1206 </row></tbody></tgroup></informaltable>
1209 <informaltable><tgroup cols="2"><tbody><row><entry
1214 <para>File descriptor returned by a previous call to open().</para>
1218 <para>int request</para>
1221 <para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this
1224 </row></tbody></tgroup></informaltable>
1228 <informaltable><tgroup cols="2"><tbody><row><entry
1233 <para>fd is not a valid file descriptor.</para>
1240 <para>Permission denied (needs read/write access).</para>
1244 <para>EINTERNAL</para>
1247 <para>Internal error in the device driver.</para>
1249 </row></tbody></tgroup></informaltable>
1252 <section id="FE_DISEQC_SEND_MASTER_CMD">
1253 <title>FE_DISEQC_SEND_MASTER_CMD</title>
1256 <informaltable><tgroup cols="1"><tbody><row><entry
1258 <para>This ioctl call is used to send a a DiSEqC command.</para>
1260 </row></tbody></tgroup></informaltable>
1263 <informaltable><tgroup cols="1"><tbody><row><entry
1265 <para>int ioctl(int fd, int request =
1266 <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct
1267 dvb_diseqc_master_cmd ⋆cmd);</para>
1269 </row></tbody></tgroup></informaltable>
1273 <informaltable><tgroup cols="2"><tbody><row><entry
1278 <para>File descriptor returned by a previous call to open().</para>
1282 <para>int request</para>
1285 <para>Equals <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> for this
1291 dvb_diseqc_master_cmd
1295 <para>Pointer to the command to be transmitted.</para>
1297 </row></tbody></tgroup></informaltable>
1301 <informaltable><tgroup cols="2"><tbody><row><entry
1306 <para>fd is not a valid file descriptor.</para>
1313 <para>Seq points to an invalid address.</para>
1320 <para>The data structure referred to by seq is invalid in some
1328 <para>Permission denied (needs read/write access).</para>
1332 <para>EINTERNAL</para>
1335 <para>Internal error in the device driver.</para>
1337 </row></tbody></tgroup></informaltable>
1340 <section id="FE_DISEQC_RECV_SLAVE_REPLY">
1341 <title>FE_DISEQC_RECV_SLAVE_REPLY</title>
1344 <informaltable><tgroup cols="1"><tbody><row><entry
1346 <para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>
1348 </row></tbody></tgroup></informaltable>
1352 <informaltable><tgroup cols="1"><tbody><row><entry
1354 <para>int ioctl(int fd, int request =
1355 <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct
1356 dvb_diseqc_slave_reply ⋆reply);</para>
1358 </row></tbody></tgroup></informaltable>
1362 <informaltable><tgroup cols="2"><tbody><row><entry
1367 <para>File descriptor returned by a previous call to open().</para>
1371 <para>int request</para>
1374 <para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this
1380 dvb_diseqc_slave_reply
1384 <para>Pointer to the command to be received.</para>
1386 </row></tbody></tgroup></informaltable>
1389 <informaltable><tgroup cols="2"><tbody><row><entry
1394 <para>fd is not a valid file descriptor.</para>
1401 <para>Seq points to an invalid address.</para>
1408 <para>The data structure referred to by seq is invalid in some
1416 <para>Permission denied (needs read/write access).</para>
1420 <para>EINTERNAL</para>
1423 <para>Internal error in the device driver.</para>
1425 </row></tbody></tgroup></informaltable>
1428 <section id="FE_DISEQC_SEND_BURST">
1429 <title>FE_DISEQC_SEND_BURST</title>
1432 <informaltable><tgroup cols="1"><tbody><row><entry
1434 <para>This ioctl call is used to send a 22KHz tone burst.</para>
1436 </row></tbody></tgroup></informaltable>
1440 <informaltable><tgroup cols="1"><tbody><row><entry
1442 <para>int ioctl(int fd, int request =
1443 <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para>
1445 </row></tbody></tgroup></informaltable>
1449 <informaltable><tgroup cols="2"><tbody><row><entry
1454 <para>File descriptor returned by a previous call to open().</para>
1458 <para>int request</para>
1461 <para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para>
1465 <para>fe_sec_mini_cmd_t
1469 <para>burst A or B.</para>
1471 </row></tbody></tgroup></informaltable>
1475 <informaltable><tgroup cols="2"><tbody><row><entry
1480 <para>fd is not a valid file descriptor.</para>
1487 <para>Seq points to an invalid address.</para>
1494 <para>The data structure referred to by seq is invalid in some
1502 <para>Permission denied (needs read/write access).</para>
1506 <para>EINTERNAL</para>
1509 <para>Internal error in the device driver.</para>
1511 </row></tbody></tgroup></informaltable>
1514 <section id="FE_SET_TONE">
1515 <title>FE_SET_TONE</title>
1518 <informaltable><tgroup cols="1"><tbody><row><entry
1520 <para>This call is used to set the generation of the continuous 22kHz tone. This call
1521 requires read/write permissions.</para>
1523 </row></tbody></tgroup></informaltable>
1526 <informaltable><tgroup cols="1"><tbody><row><entry
1528 <para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,
1529 fe_sec_tone_mode_t tone);</para>
1531 </row></tbody></tgroup></informaltable>
1534 <informaltable><tgroup cols="2"><tbody><row><entry
1539 <para>File descriptor returned by a previous call to open().</para>
1543 <para>int request</para>
1546 <para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>
1550 <para>fe_sec_tone_mode_t
1554 <para>The requested tone generation mode (on/off).</para>
1556 </row></tbody></tgroup></informaltable>
1559 <informaltable><tgroup cols="2"><tbody><row><entry
1564 <para>Device driver not loaded/available.</para>
1571 <para>Device or resource busy.</para>
1578 <para>Invalid argument.</para>
1585 <para>File not opened with read permissions.</para>
1589 <para>EINTERNAL</para>
1592 <para>Internal error in the device driver.</para>
1594 </row></tbody></tgroup></informaltable>
1597 <section id="FE_SET_VOLTAGE">
1598 <title>FE_SET_VOLTAGE</title>
1601 <informaltable><tgroup cols="1"><tbody><row><entry
1603 <para>This call is used to set the bus voltage. This call requires read/write
1606 </row></tbody></tgroup></informaltable>
1609 <informaltable><tgroup cols="1"><tbody><row><entry
1611 <para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,
1612 fe_sec_voltage_t voltage);</para>
1614 </row></tbody></tgroup></informaltable>
1618 <informaltable><tgroup cols="2"><tbody><row><entry
1623 <para>File descriptor returned by a previous call to open().</para>
1627 <para>int request</para>
1630 <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
1634 <para>fe_sec_voltage_t
1638 <para>The requested bus voltage.</para>
1640 </row></tbody></tgroup></informaltable>
1644 <informaltable><tgroup cols="2"><tbody><row><entry
1649 <para>Device driver not loaded/available.</para>
1656 <para>Device or resource busy.</para>
1663 <para>Invalid argument.</para>
1670 <para>File not opened with read permissions.</para>
1674 <para>EINTERNAL</para>
1677 <para>Internal error in the device driver.</para>
1679 </row></tbody></tgroup></informaltable>
1682 <section id="FE_ENABLE_HIGH_LNB_VOLTAGE">
1683 <title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>
1686 <informaltable><tgroup cols="1"><tbody><row><entry
1688 <para>If high != 0 enables slightly higher voltages instead of 13/18V (to compensate
1689 for long cables). This call requires read/write permissions. Not all DVB
1690 adapters support this ioctl.</para>
1692 </row></tbody></tgroup></informaltable>
1696 <informaltable><tgroup cols="1"><tbody><row><entry
1698 <para>int ioctl(int fd, int request =
1699 <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para>
1701 </row></tbody></tgroup></informaltable>
1705 <informaltable><tgroup cols="2"><tbody><row><entry
1710 <para>File descriptor returned by a previous call to open().</para>
1714 <para>int request</para>
1717 <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
1721 <para>int high</para>
1724 <para>The requested bus voltage.</para>
1726 </row></tbody></tgroup></informaltable>
1730 <informaltable><tgroup cols="2"><tbody><row><entry
1735 <para>Device driver not loaded/available.</para>
1742 <para>Device or resource busy.</para>
1749 <para>Invalid argument.</para>
1756 <para>File not opened with read permissions.</para>
1760 <para>EINTERNAL</para>
1763 <para>Internal error in the device driver.</para>
1765 </row></tbody></tgroup></informaltable>
1768 <section id="FE_SET_FRONTEND_TUNE_MODE">
1769 <title>FE_SET_FRONTEND_TUNE_MODE</title>
1770 <para>DESCRIPTION</para>
1771 <informaltable><tgroup cols="1"><tbody><row>
1772 <entry align="char">
1773 <para>Allow setting tuner mode flags to the frontend.</para>
1775 </row></tbody></tgroup></informaltable>
1777 <para>SYNOPSIS</para>
1778 <informaltable><tgroup cols="1"><tbody><row>
1779 <entry align="char">
1780 <para>int ioctl(int fd, int request =
1781 <link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>
1783 </row></tbody></tgroup></informaltable>
1785 <para>PARAMETERS</para>
1786 <informaltable><tgroup cols="2"><tbody><row>
1787 <entry align="char">
1788 <para>unsigned int flags</para>
1790 <entry align="char">
1792 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.
1795 </row></tbody></tgroup></informaltable>
1798 <informaltable><tgroup cols="2"><tbody><row>
1799 <entry align="char"><para>EINVAL</para></entry>
1800 <entry align="char"><para>Invalid argument.</para></entry>
1801 </row></tbody></tgroup></informaltable>
1804 <section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
1805 <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
1806 <para>DESCRIPTION</para>
1807 <informaltable><tgroup cols="1"><tbody><row>
1808 <entry align="char">
1809 <para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
1810 <para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
1811 <para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
1813 </row></tbody></tgroup></informaltable>
1815 <para>SYNOPSIS</para>
1816 <informaltable><tgroup cols="1"><tbody><row>
1817 <entry align="char">
1818 <para>int ioctl(int fd, int request =
1819 <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
1821 </row></tbody></tgroup></informaltable>
1823 <para>PARAMETERS</para>
1824 <informaltable><tgroup cols="2"><tbody><row>
1825 <entry align="char">
1826 <para>unsigned long cmd</para>
1828 <entry align="char">
1830 sends the specified raw cmd to the dish via DISEqC.
1833 </row></tbody></tgroup></informaltable>
1836 <informaltable><tgroup cols="1"><tbody><row>
1837 <entry align="char">
1838 <para>There are no errors in use for this call</para>
1840 </row></tbody></tgroup></informaltable>