Merge branch 'tip/perf/urgent-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / Documentation / DocBook / media / dvb / frontend.xml
1 <title>DVB Frontend API</title>
2
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>
8
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>
16
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>
19
20 <section id="frontend_types">
21 <title>Frontend Data Types</title>
22
23 <section id="fe-type-t">
24 <title>Frontend type</title>
25
26 <para>For historical reasons, frontend types are named by the type of modulation used in
27 transmission. The fontend types are given by fe_type_t type, defined as:</para>
28
29 <table pgwide="1" frame="none" id="fe-type">
30 <title>Frontend types</title>
31 <tgroup cols="3">
32    &cs-def;
33    <thead>
34      <row>
35        <entry>fe_type</entry>
36        <entry>Description</entry>
37        <entry><link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> equivalent type</entry>
38      </row>
39   </thead>
40   <tbody valign="top">
41   <row>
42      <entry id="FE_QPSK"><constant>FE_QPSK</constant></entry>
43      <entry>For DVB-S standard</entry>
44      <entry><constant>SYS_DVBS</constant></entry>
45   </row>
46   <row>
47      <entry id="FE_QAM"><constant>FE_QAM</constant></entry>
48      <entry>For DVB-C annex A standard</entry>
49      <entry><constant>SYS_DVBC_ANNEX_A</constant></entry>
50   </row>
51   <row>
52      <entry id="FE_OFDM"><constant>FE_OFDM</constant></entry>
53      <entry>For DVB-T standard</entry>
54      <entry><constant>SYS_DVBT</constant></entry>
55   </row>
56   <row>
57      <entry id="FE_ATSC"><constant>FE_ATSC</constant></entry>
58      <entry>For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used in US.</entry>
59      <entry><constant>SYS_ATSC</constant> (terrestrial) or <constant>SYS_DVBC_ANNEX_B</constant> (cable)</entry>
60   </row>
61 </tbody></tgroup></table>
62
63 <para>Newer formats like DVB-S2, ISDB-T, ISDB-S and DVB-T2 are not described at the above, as they're
64 supported via the new <link linkend="FE_GET_SET_PROPERTY">FE_GET_PROPERTY/FE_GET_SET_PROPERTY</link> ioctl's, using the <link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> parameter.
65 </para>
66
67 <para>The usage of this field is deprecated, as it doesn't report all supported standards, and
68 will provide an incomplete information for frontends that support multiple delivery systems.
69 Please use <link linkend="DTV-ENUM-DELSYS">DTV_ENUM_DELSYS</link> instead.</para>
70 </section>
71
72 <section id="fe-caps-t">
73 <title>frontend capabilities</title>
74
75 <para>Capabilities describe what a frontend can do. Some capabilities can only be supported for
76 a specific frontend type.</para>
77 <programlisting>
78         typedef enum fe_caps {
79         FE_IS_STUPID                  = 0,
80         FE_CAN_INVERSION_AUTO         = 0x1,
81         FE_CAN_FEC_1_2                = 0x2,
82         FE_CAN_FEC_2_3                = 0x4,
83         FE_CAN_FEC_3_4                = 0x8,
84         FE_CAN_FEC_4_5                = 0x10,
85         FE_CAN_FEC_5_6                = 0x20,
86         FE_CAN_FEC_6_7                = 0x40,
87         FE_CAN_FEC_7_8                = 0x80,
88         FE_CAN_FEC_8_9                = 0x100,
89         FE_CAN_FEC_AUTO               = 0x200,
90         FE_CAN_QPSK                   = 0x400,
91         FE_CAN_QAM_16                 = 0x800,
92         FE_CAN_QAM_32                 = 0x1000,
93         FE_CAN_QAM_64                 = 0x2000,
94         FE_CAN_QAM_128                = 0x4000,
95         FE_CAN_QAM_256                = 0x8000,
96         FE_CAN_QAM_AUTO               = 0x10000,
97         FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
98         FE_CAN_BANDWIDTH_AUTO         = 0x40000,
99         FE_CAN_GUARD_INTERVAL_AUTO    = 0x80000,
100         FE_CAN_HIERARCHY_AUTO         = 0x100000,
101         FE_CAN_8VSB                   = 0x200000,
102         FE_CAN_16VSB                  = 0x400000,
103         FE_HAS_EXTENDED_CAPS          = 0x800000,
104         FE_CAN_MULTISTREAM            = 0x4000000,
105         FE_CAN_TURBO_FEC              = 0x8000000,
106         FE_CAN_2G_MODULATION          = 0x10000000,
107         FE_NEEDS_BENDING              = 0x20000000,
108         FE_CAN_RECOVER                = 0x40000000,
109         FE_CAN_MUTE_TS                = 0x80000000
110         } fe_caps_t;
111 </programlisting>
112 </section>
113
114 <section id="dvb-frontend-info">
115 <title>frontend information</title>
116
117 <para>Information about the frontend ca be queried with
118         <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
119
120 <programlisting>
121         struct dvb_frontend_info {
122         char       name[128];
123         fe_type_t  type;
124         uint32_t   frequency_min;
125         uint32_t   frequency_max;
126         uint32_t   frequency_stepsize;
127         uint32_t   frequency_tolerance;
128         uint32_t   symbol_rate_min;
129         uint32_t   symbol_rate_max;
130         uint32_t   symbol_rate_tolerance;     /&#x22C6; ppm &#x22C6;/
131         uint32_t   notifier_delay;            /&#x22C6; ms &#x22C6;/
132         fe_caps_t  caps;
133         };
134 </programlisting>
135 </section>
136
137 <section id="dvb-diseqc-master-cmd">
138 <title>diseqc master command</title>
139
140 <para>A message sent from the frontend to DiSEqC capable equipment.</para>
141 <programlisting>
142         struct dvb_diseqc_master_cmd {
143         uint8_t msg [6]; /&#x22C6;  { framing, address, command, data[3] } &#x22C6;/
144         uint8_t msg_len; /&#x22C6;  valid values are 3...6  &#x22C6;/
145         };
146 </programlisting>
147 </section>
148 <section role="subsection" id="dvb-diseqc-slave-reply">
149 <title>diseqc slave reply</title>
150
151 <para>A reply to the frontend from DiSEqC 2.0 capable equipment.</para>
152 <programlisting>
153         struct dvb_diseqc_slave_reply {
154         uint8_t msg [4]; /&#x22C6;  { framing, data [3] } &#x22C6;/
155         uint8_t msg_len; /&#x22C6;  valid values are 0...4, 0 means no msg  &#x22C6;/
156         int     timeout; /&#x22C6;  return from ioctl after timeout ms with &#x22C6;/
157         };                       /&#x22C6;  errorcode when no message was received  &#x22C6;/
158 </programlisting>
159 </section>
160
161 <section id="fe-sec-voltage-t">
162 <title>diseqc slave reply</title>
163 <para>The voltage is usually used with non-DiSEqC capable LNBs to switch the polarzation
164 (horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched
165 consistently to the DiSEqC commands as described in the DiSEqC spec.</para>
166 <programlisting>
167         typedef enum fe_sec_voltage {
168         SEC_VOLTAGE_13,
169         SEC_VOLTAGE_18
170         } fe_sec_voltage_t;
171 </programlisting>
172 </section>
173
174 <section id="fe-sec-tone-mode-t">
175 <title>SEC continuous tone</title>
176
177 <para>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
178 high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to
179 be switched consistently to the DiSEqC commands as described in the DiSEqC
180 spec.</para>
181 <programlisting>
182         typedef enum fe_sec_tone_mode {
183         SEC_TONE_ON,
184         SEC_TONE_OFF
185         } fe_sec_tone_mode_t;
186 </programlisting>
187 </section>
188
189 <section id="fe-sec-mini-cmd-t">
190 <title>SEC tone burst</title>
191
192 <para>The 22KHz tone burst is usually used with non-DiSEqC capable switches to select
193 between two connected LNBs/satellites. When using DiSEqC epuipment this voltage has to
194 be switched consistently to the DiSEqC commands as described in the DiSEqC
195 spec.</para>
196 <programlisting>
197         typedef enum fe_sec_mini_cmd {
198         SEC_MINI_A,
199         SEC_MINI_B
200         } fe_sec_mini_cmd_t;
201 </programlisting>
202
203 <para></para>
204 </section>
205
206 <section id="fe-status-t">
207 <title>frontend status</title>
208 <para>Several functions of the frontend device use the fe_status data type defined
209 by</para>
210 <programlisting>
211 typedef enum fe_status {
212         FE_HAS_SIGNAL           = 0x01,
213         FE_HAS_CARRIER          = 0x02,
214         FE_HAS_VITERBI          = 0x04,
215         FE_HAS_SYNC             = 0x08,
216         FE_HAS_LOCK             = 0x10,
217         FE_TIMEDOUT             = 0x20,
218         FE_REINIT               = 0x40,
219 } fe_status_t;
220 </programlisting>
221 <para>to indicate the current state and/or state changes of the frontend hardware:
222 </para>
223
224 <informaltable><tgroup cols="2"><tbody>
225 <row>
226 <entry align="char">FE_HAS_SIGNAL</entry>
227 <entry align="char">The frontend has found something above the noise level</entry>
228 </row><row>
229 <entry align="char">FE_HAS_CARRIER</entry>
230 <entry align="char">The frontend has found a DVB signal</entry>
231 </row><row>
232 <entry align="char">FE_HAS_VITERBI</entry>
233 <entry align="char">The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable</entry>
234 </row><row>
235 <entry align="char">FE_HAS_SYNC</entry>
236 <entry align="char">Syncronization bytes was found</entry>
237 </row><row>
238 <entry align="char">FE_HAS_LOCK</entry>
239 <entry align="char">The DVB were locked and everything is working</entry>
240 </row><row>
241 <entry align="char">FE_TIMEDOUT</entry>
242 <entry align="char">no lock within the last about 2 seconds</entry>
243 </row><row>
244 <entry align="char">FE_REINIT</entry>
245 <entry align="char">The frontend was reinitialized, application is
246 recommended to reset DiSEqC, tone and parameters</entry>
247 </row>
248 </tbody></tgroup></informaltable>
249
250 </section>
251
252 <section id="dvb-frontend-parameters">
253 <title>frontend parameters</title>
254 <para>The kind of parameters passed to the frontend device for tuning depend on
255 the kind of hardware you are using.</para>
256 <para>The struct <constant>dvb_frontend_parameters</constant> uses an
257 union with specific per-system parameters. However, as newer delivery systems
258 required more data, the structure size weren't enough to fit, and just
259 extending its size would break the existing applications. So, those parameters
260 were replaced by the usage of <link linkend="FE_GET_SET_PROPERTY">
261 <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> ioctl's. The
262 new API is flexible enough to add new parameters to existing delivery systems,
263 and to add newer delivery systems.</para>
264 <para>So, newer applications should use <link linkend="FE_GET_SET_PROPERTY">
265 <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> instead, in
266 order to be able to support the newer System Delivery like  DVB-S2, DVB-T2,
267 DVB-C2, ISDB, etc.</para>
268 <para>All kinds of parameters are combined as an union in the FrontendParameters structure:
269 <programlisting>
270 struct dvb_frontend_parameters {
271         uint32_t frequency;     /&#x22C6; (absolute) frequency in Hz for QAM/OFDM &#x22C6;/
272                                 /&#x22C6; intermediate frequency in kHz for QPSK &#x22C6;/
273         fe_spectral_inversion_t inversion;
274         union {
275                 struct dvb_qpsk_parameters qpsk;
276                 struct dvb_qam_parameters  qam;
277                 struct dvb_ofdm_parameters ofdm;
278                 struct dvb_vsb_parameters  vsb;
279         } u;
280 };
281 </programlisting></para>
282 <para>In the case of QPSK frontends the <constant>frequency</constant> field specifies the intermediate
283 frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
284 the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
285 OFDM frontends the <constant>frequency</constant> specifies the absolute frequency and is given in Hz.
286 </para>
287
288 <section id="dvb-qpsk-parameters">
289 <title>QPSK parameters</title>
290 <para>For satellite QPSK frontends you have to use the <constant>dvb_qpsk_parameters</constant> structure:</para>
291 <programlisting>
292  struct dvb_qpsk_parameters {
293          uint32_t        symbol_rate;  /&#x22C6; symbol rate in Symbols per second &#x22C6;/
294          fe_code_rate_t  fec_inner;    /&#x22C6; forward error correction (see above) &#x22C6;/
295  };
296 </programlisting>
297 </section>
298 <section id="dvb-qam-parameters">
299 <title>QAM parameters</title>
300 <para>for cable QAM frontend you use the <constant>dvb_qam_parameters</constant> structure:</para>
301 <programlisting>
302  struct dvb_qam_parameters {
303          uint32_t         symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
304          fe_code_rate_t   fec_inner;   /&#x22C6; forward error correction (see above) &#x22C6;/
305          fe_modulation_t  modulation;  /&#x22C6; modulation type (see above) &#x22C6;/
306  };
307 </programlisting>
308 </section>
309 <section id="dvb-vsb-parameters">
310 <title>VSB parameters</title>
311 <para>ATSC frontends are supported by the <constant>dvb_vsb_parameters</constant> structure:</para>
312 <programlisting>
313 struct dvb_vsb_parameters {
314         fe_modulation_t modulation;     /&#x22C6; modulation type (see above) &#x22C6;/
315 };
316 </programlisting>
317 </section>
318 <section id="dvb-ofdm-parameters">
319 <title>OFDM parameters</title>
320 <para>DVB-T frontends are supported by the <constant>dvb_ofdm_parameters</constant> structure:</para>
321 <programlisting>
322  struct dvb_ofdm_parameters {
323          fe_bandwidth_t      bandwidth;
324          fe_code_rate_t      code_rate_HP;  /&#x22C6; high priority stream code rate &#x22C6;/
325          fe_code_rate_t      code_rate_LP;  /&#x22C6; low priority stream code rate &#x22C6;/
326          fe_modulation_t     constellation; /&#x22C6; modulation type (see above) &#x22C6;/
327          fe_transmit_mode_t  transmission_mode;
328          fe_guard_interval_t guard_interval;
329          fe_hierarchy_t      hierarchy_information;
330  };
331 </programlisting>
332 </section>
333 <section id="fe-spectral-inversion-t">
334 <title>frontend spectral inversion</title>
335 <para>The Inversion field can take one of these values:
336 </para>
337 <programlisting>
338 typedef enum fe_spectral_inversion {
339         INVERSION_OFF,
340         INVERSION_ON,
341         INVERSION_AUTO
342 } fe_spectral_inversion_t;
343 </programlisting>
344 <para>It indicates if spectral inversion should be presumed or not. In the automatic setting
345 (<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by
346 itself.
347 </para>
348 </section>
349 <section id="fe-code-rate-t">
350 <title>frontend code rate</title>
351 <para>The possible values for the <constant>fec_inner</constant> field used on
352 <link linkend="dvb-qpsk-parameters"><constant>struct dvb_qpsk_parameters</constant></link> and
353 <link linkend="dvb-qam-parameters"><constant>struct dvb_qam_parameters</constant></link> are:
354 </para>
355 <programlisting>
356 typedef enum fe_code_rate {
357         FEC_NONE = 0,
358         FEC_1_2,
359         FEC_2_3,
360         FEC_3_4,
361         FEC_4_5,
362         FEC_5_6,
363         FEC_6_7,
364         FEC_7_8,
365         FEC_8_9,
366         FEC_AUTO,
367         FEC_3_5,
368         FEC_9_10,
369 } fe_code_rate_t;
370 </programlisting>
371 <para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
372 detection.
373 </para>
374 </section>
375 <section id="fe-modulation-t">
376 <title>frontend modulation type for QAM, OFDM and VSB</title>
377 <para>For cable and terrestrial frontends, e. g. for
378 <link linkend="dvb-qam-parameters"><constant>struct dvb_qpsk_parameters</constant></link>,
379 <link linkend="dvb-ofdm-parameters"><constant>struct dvb_qam_parameters</constant></link> and
380 <link linkend="dvb-vsb-parameters"><constant>struct dvb_qam_parameters</constant></link>,
381 it needs to specify the quadrature modulation mode which can be one of the following:
382 </para>
383 <programlisting>
384  typedef enum fe_modulation {
385         QPSK,
386         QAM_16,
387         QAM_32,
388         QAM_64,
389         QAM_128,
390         QAM_256,
391         QAM_AUTO,
392         VSB_8,
393         VSB_16,
394         PSK_8,
395         APSK_16,
396         APSK_32,
397         DQPSK,
398  } fe_modulation_t;
399 </programlisting>
400 </section>
401 <section>
402 <title>More OFDM parameters</title>
403 <section id="fe-transmit-mode-t">
404 <title>Number of carriers per channel</title>
405 <programlisting>
406 typedef enum fe_transmit_mode {
407         TRANSMISSION_MODE_2K,
408         TRANSMISSION_MODE_8K,
409         TRANSMISSION_MODE_AUTO,
410         TRANSMISSION_MODE_4K,
411         TRANSMISSION_MODE_1K,
412         TRANSMISSION_MODE_16K,
413         TRANSMISSION_MODE_32K,
414  } fe_transmit_mode_t;
415 </programlisting>
416 </section>
417 <section id="fe-bandwidth-t">
418 <title>frontend bandwidth</title>
419 <programlisting>
420 typedef enum fe_bandwidth {
421         BANDWIDTH_8_MHZ,
422         BANDWIDTH_7_MHZ,
423         BANDWIDTH_6_MHZ,
424         BANDWIDTH_AUTO,
425         BANDWIDTH_5_MHZ,
426         BANDWIDTH_10_MHZ,
427         BANDWIDTH_1_712_MHZ,
428 } fe_bandwidth_t;
429 </programlisting>
430 </section>
431 <section id="fe-guard-interval-t">
432 <title>frontend guard inverval</title>
433 <programlisting>
434 typedef enum fe_guard_interval {
435         GUARD_INTERVAL_1_32,
436         GUARD_INTERVAL_1_16,
437         GUARD_INTERVAL_1_8,
438         GUARD_INTERVAL_1_4,
439         GUARD_INTERVAL_AUTO,
440         GUARD_INTERVAL_1_128,
441         GUARD_INTERVAL_19_128,
442         GUARD_INTERVAL_19_256,
443 } fe_guard_interval_t;
444 </programlisting>
445 </section>
446 <section id="fe-hierarchy-t">
447 <title>frontend hierarchy</title>
448 <programlisting>
449 typedef enum fe_hierarchy {
450          HIERARCHY_NONE,
451          HIERARCHY_1,
452          HIERARCHY_2,
453          HIERARCHY_4,
454          HIERARCHY_AUTO
455  } fe_hierarchy_t;
456 </programlisting>
457 </section>
458 </section>
459
460 </section>
461
462 <section id="dvb-frontend-event">
463 <title>frontend events</title>
464  <programlisting>
465  struct dvb_frontend_event {
466          fe_status_t status;
467          struct dvb_frontend_parameters parameters;
468  };
469 </programlisting>
470  </section>
471 </section>
472
473
474 <section id="frontend_fcalls">
475 <title>Frontend Function Calls</title>
476
477 <section id="frontend_f_open">
478 <title>open()</title>
479 <para>DESCRIPTION</para>
480 <informaltable><tgroup cols="1"><tbody><row>
481 <entry align="char">
482 <para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)
483  for subsequent use. Usually the first thing to do after a successful open is to
484  find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
485 <para>The device can be opened in read-only mode, which only allows monitoring of
486  device status and statistics, or read/write mode, which allows any kind of use
487  (e.g. performing tuning operations.)
488 </para>
489 <para>In a system with multiple front-ends, it is usually the case that multiple devices
490  cannot be open in read/write mode simultaneously. As long as a front-end
491  device is opened in read/write mode, other open() calls in read/write mode will
492  either fail or block, depending on whether non-blocking or blocking mode was
493  specified. A front-end device opened in blocking mode can later be put into
494  non-blocking mode (and vice versa) using the F_SETFL command of the fcntl
495  system call. This is a standard system call, documented in the Linux manual
496  page for fcntl. When an open() call has succeeded, the device will be ready
497  for use in the specified mode. This implies that the corresponding hardware is
498  powered up, and that other front-ends may have been powered down to make
499  that possible.</para>
500 </entry>
501  </row></tbody></tgroup></informaltable>
502
503 <para>SYNOPSIS</para>
504 <informaltable><tgroup cols="1"><tbody><row><entry
505  align="char">
506 <para>int open(const char &#x22C6;deviceName, int flags);</para>
507 </entry>
508  </row></tbody></tgroup></informaltable>
509 <para>PARAMETERS
510 </para>
511 <informaltable><tgroup cols="2"><tbody><row><entry
512  align="char">
513 <para>const char
514  *deviceName</para>
515 </entry><entry
516  align="char">
517 <para>Name of specific video device.</para>
518 </entry>
519  </row><row><entry
520  align="char">
521 <para>int flags</para>
522 </entry><entry
523  align="char">
524 <para>A bit-wise OR of the following flags:</para>
525 </entry>
526  </row><row><entry
527  align="char">
528 </entry><entry
529  align="char">
530 <para>O_RDONLY read-only access</para>
531 </entry>
532  </row><row><entry
533  align="char">
534 </entry><entry
535  align="char">
536 <para>O_RDWR read/write access</para>
537 </entry>
538  </row><row><entry
539  align="char">
540 </entry><entry
541  align="char">
542 <para>O_NONBLOCK open in non-blocking mode</para>
543 </entry>
544  </row><row><entry
545  align="char">
546 </entry><entry
547  align="char">
548 <para>(blocking mode is the default)</para>
549 </entry>
550  </row></tbody></tgroup></informaltable>
551 <para>RETURN VALUE</para>
552 <informaltable><tgroup cols="2"><tbody><row><entry
553  align="char">
554 <para>ENODEV</para>
555 </entry><entry
556  align="char">
557 <para>Device driver not loaded/available.</para>
558 </entry>
559  </row><row><entry
560  align="char">
561 <para>EINTERNAL</para>
562 </entry><entry
563  align="char">
564 <para>Internal error.</para>
565 </entry>
566  </row><row><entry
567  align="char">
568 <para>EBUSY</para>
569 </entry><entry
570  align="char">
571 <para>Device or resource busy.</para>
572 </entry>
573  </row><row><entry
574  align="char">
575 <para>EINVAL</para>
576 </entry><entry
577  align="char">
578 <para>Invalid argument.</para>
579 </entry>
580  </row></tbody></tgroup></informaltable>
581 </section>
582
583 <section id="frontend_f_close">
584 <title>close()</title>
585 <para>DESCRIPTION
586 </para>
587 <informaltable><tgroup cols="1"><tbody><row><entry
588  align="char">
589 <para>This system call closes a previously opened front-end device. After closing
590  a front-end device, its corresponding hardware might be powered down
591  automatically.</para>
592 </entry>
593  </row></tbody></tgroup></informaltable>
594 <para>SYNOPSIS
595 </para>
596 <informaltable><tgroup cols="1"><tbody><row><entry
597  align="char">
598 <para>int close(int fd);</para>
599 </entry>
600  </row></tbody></tgroup></informaltable>
601 <para>PARAMETERS
602 </para>
603 <informaltable><tgroup cols="2"><tbody><row><entry
604  align="char">
605 <para>int fd</para>
606 </entry><entry
607  align="char">
608 <para>File descriptor returned by a previous call to open().</para>
609 </entry>
610  </row></tbody></tgroup></informaltable>
611 <para>RETURN VALUE</para>
612 <informaltable><tgroup cols="2"><tbody><row><entry
613  align="char">
614 <para>EBADF</para>
615 </entry><entry
616  align="char">
617 <para>fd is not a valid open file descriptor.</para>
618 </entry>
619  </row></tbody></tgroup></informaltable>
620 </section>
621
622 <section id="FE_READ_STATUS">
623 <title>FE_READ_STATUS</title>
624 <para>DESCRIPTION
625 </para>
626 <informaltable><tgroup cols="1"><tbody><row><entry
627  align="char">
628 <para>This ioctl call returns status information about the front-end. This call only
629  requires read-only access to the device.</para>
630 </entry>
631  </row></tbody></tgroup></informaltable>
632 <para>SYNOPSIS
633 </para>
634 <informaltable><tgroup cols="1"><tbody><row><entry
635  align="char">
636 <para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,
637  fe_status_t &#x22C6;status);</para>
638 </entry>
639  </row></tbody></tgroup></informaltable>
640 <para>PARAMETERS
641 </para>
642
643 <informaltable><tgroup cols="2"><tbody><row><entry
644  align="char">
645 <para>int fd</para>
646 </entry><entry
647  align="char">
648 <para>File descriptor returned by a previous call to open().</para>
649 </entry>
650  </row><row><entry
651  align="char">
652 <para>int request</para>
653 </entry><entry
654  align="char">
655 <para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>
656 </entry>
657  </row><row><entry
658  align="char">
659 <para>struct fe_status_t
660  *status</para>
661 </entry><entry
662  align="char">
663 <para>Points to the location where the front-end status word is
664  to be stored.</para>
665 </entry>
666  </row></tbody></tgroup></informaltable>
667 <para>RETURN VALUE</para>
668 <informaltable><tgroup cols="2"><tbody><row><entry
669  align="char">
670 <para>EBADF</para>
671 </entry><entry
672  align="char">
673 <para>fd is not a valid open file descriptor.</para>
674 </entry>
675  </row><row><entry
676  align="char">
677 <para>EFAULT</para>
678 </entry><entry
679  align="char">
680 <para>status points to invalid address.</para>
681 </entry>
682  </row></tbody></tgroup></informaltable>
683 </section>
684
685 <section id="FE_READ_BER">
686 <title>FE_READ_BER</title>
687 <para>DESCRIPTION
688 </para>
689 <informaltable><tgroup cols="1"><tbody><row><entry
690  align="char">
691 <para>This ioctl call returns the bit error rate for the signal currently
692  received/demodulated by the front-end. For this command, read-only access to
693  the device is sufficient.</para>
694 </entry>
695  </row></tbody></tgroup></informaltable>
696 <para>SYNOPSIS
697 </para>
698 <informaltable><tgroup cols="1"><tbody><row><entry
699  align="char">
700 <para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
701  uint32_t &#x22C6;ber);</para>
702 </entry>
703  </row></tbody></tgroup></informaltable>
704 <para>PARAMETERS
705 </para>
706 <informaltable><tgroup cols="2"><tbody><row><entry
707  align="char">
708 <para>int fd</para>
709 </entry><entry
710  align="char">
711 <para>File descriptor returned by a previous call to open().</para>
712 </entry>
713  </row><row><entry
714  align="char">
715 <para>int request</para>
716 </entry><entry
717  align="char">
718 <para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
719 </entry>
720  </row><row><entry
721  align="char">
722 <para>uint32_t *ber</para>
723 </entry><entry
724  align="char">
725 <para>The bit error rate is stored into *ber.</para>
726 </entry>
727  </row></tbody></tgroup></informaltable>
728
729 &return-value-dvb;
730 </section>
731
732 <section id="FE_READ_SNR">
733 <title>FE_READ_SNR</title>
734
735 <para>DESCRIPTION
736 </para>
737 <informaltable><tgroup cols="1"><tbody><row><entry
738  align="char">
739 <para>This ioctl call returns the signal-to-noise ratio for the signal currently received
740  by the front-end. For this command, read-only access to the device is sufficient.</para>
741 </entry>
742  </row></tbody></tgroup></informaltable>
743 <para>SYNOPSIS
744 </para>
745 <informaltable><tgroup cols="1"><tbody><row><entry
746  align="char">
747 <para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t
748  &#x22C6;snr);</para>
749 </entry>
750  </row></tbody></tgroup></informaltable>
751 <para>PARAMETERS
752 </para>
753 <informaltable><tgroup cols="2"><tbody><row><entry
754  align="char">
755 <para>int fd</para>
756 </entry><entry
757  align="char">
758 <para>File descriptor returned by a previous call to open().</para>
759 </entry>
760  </row><row><entry
761  align="char">
762 <para>int request</para>
763 </entry><entry
764  align="char">
765 <para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>
766 </entry>
767  </row><row><entry
768  align="char">
769 <para>int16_t *snr</para>
770 </entry><entry
771  align="char">
772 <para>The signal-to-noise ratio is stored into *snr.</para>
773 </entry>
774  </row></tbody></tgroup></informaltable>
775
776 &return-value-dvb;
777 </section>
778
779 <section id="FE_READ_SIGNAL_STRENGTH">
780 <title>FE_READ_SIGNAL_STRENGTH</title>
781 <para>DESCRIPTION
782 </para>
783 <informaltable><tgroup cols="1"><tbody><row><entry
784  align="char">
785 <para>This ioctl call returns the signal strength value for the signal currently received
786  by the front-end. For this command, read-only access to the device is sufficient.</para>
787 </entry>
788  </row></tbody></tgroup></informaltable>
789 <para>SYNOPSIS
790 </para>
791 <informaltable><tgroup cols="1"><tbody><row><entry
792  align="char">
793 <para>int ioctl( int fd, int request =
794  <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t &#x22C6;strength);</para>
795 </entry>
796  </row></tbody></tgroup></informaltable>
797
798 <para>PARAMETERS
799 </para>
800 <informaltable><tgroup cols="2"><tbody><row><entry
801  align="char">
802 <para>int fd</para>
803 </entry><entry
804  align="char">
805 <para>File descriptor returned by a previous call to open().</para>
806 </entry>
807  </row><row><entry
808  align="char">
809 <para>int request</para>
810 </entry><entry
811  align="char">
812 <para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
813  command.</para>
814 </entry>
815  </row><row><entry
816  align="char">
817 <para>int16_t *strength</para>
818 </entry><entry
819  align="char">
820 <para>The signal strength value is stored into *strength.</para>
821 </entry>
822  </row></tbody></tgroup></informaltable>
823
824 &return-value-dvb;
825 </section>
826
827 <section id="FE_READ_UNCORRECTED_BLOCKS">
828 <title>FE_READ_UNCORRECTED_BLOCKS</title>
829 <para>DESCRIPTION
830 </para>
831 <informaltable><tgroup cols="1"><tbody><row><entry
832  align="char">
833 <para>This ioctl call returns the number of uncorrected blocks detected by the device
834  driver during its lifetime. For meaningful measurements, the increment in block
835  count during a specific time interval should be calculated. For this command,
836  read-only access to the device is sufficient.</para>
837 </entry>
838  </row><row><entry
839  align="char">
840 <para>Note that the counter will wrap to zero after its maximum count has been
841  reached.</para>
842 </entry>
843  </row></tbody></tgroup></informaltable>
844 <para>SYNOPSIS
845 </para>
846 <informaltable><tgroup cols="1"><tbody><row><entry
847  align="char">
848 <para>int ioctl( int fd, int request =
849  <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t &#x22C6;ublocks);</para>
850 </entry>
851  </row></tbody></tgroup></informaltable>
852 <para>PARAMETERS
853 </para>
854 <informaltable><tgroup cols="2"><tbody><row><entry
855  align="char">
856 <para>int fd</para>
857 </entry><entry
858  align="char">
859 <para>File descriptor returned by a previous call to open().</para>
860 </entry>
861  </row><row><entry
862  align="char">
863 <para>int request</para>
864 </entry><entry
865  align="char">
866 <para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
867  command.</para>
868 </entry>
869  </row><row><entry
870  align="char">
871 <para>uint32_t *ublocks</para>
872 </entry><entry
873  align="char">
874 <para>The total number of uncorrected blocks seen by the driver
875  so far.</para>
876 </entry>
877  </row></tbody></tgroup></informaltable>
878
879 &return-value-dvb;
880 </section>
881
882 <section id="FE_SET_FRONTEND">
883 <title>FE_SET_FRONTEND</title>
884 <para>DESCRIPTION
885 </para>
886 <informaltable><tgroup cols="1"><tbody><row><entry
887  align="char">
888 <para>This ioctl call starts a tuning operation using specified parameters. The result
889  of this call will be successful if the parameters were valid and the tuning could
890  be initiated. The result of the tuning operation in itself, however, will arrive
891  asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
892  FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before
893  the previous one was completed, the previous operation will be aborted in favor
894  of the new one. This command requires read/write access to the device.</para>
895 </entry>
896  </row></tbody></tgroup></informaltable>
897
898 <para>SYNOPSIS
899 </para>
900 <informaltable><tgroup cols="1"><tbody><row><entry
901  align="char">
902 <para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
903  struct dvb_frontend_parameters &#x22C6;p);</para>
904 </entry>
905  </row></tbody></tgroup></informaltable>
906 <para>PARAMETERS
907 </para>
908 <informaltable><tgroup cols="2"><tbody><row><entry
909  align="char">
910 <para>int fd</para>
911 </entry><entry
912  align="char">
913 <para>File descriptor returned by a previous call to open().</para>
914 </entry>
915  </row><row><entry
916  align="char">
917 <para>int request</para>
918 </entry><entry
919  align="char">
920 <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
921 </entry>
922  </row><row><entry
923  align="char">
924 <para>struct
925  dvb_frontend_parameters
926  *p</para>
927 </entry><entry
928  align="char">
929 <para>Points to parameters for tuning operation.</para>
930 </entry>
931  </row></tbody></tgroup></informaltable>
932
933 &return-value-dvb;
934 <informaltable><tgroup cols="2"><tbody><row><entry
935  align="char">
936 <para>EINVAL</para>
937 </entry><entry
938  align="char">
939 <para>Maximum supported symbol rate reached.</para>
940 </entry>
941 </row></tbody></tgroup></informaltable>
942 </section>
943
944 <section id="FE_GET_FRONTEND">
945 <title>FE_GET_FRONTEND</title>
946 <para>DESCRIPTION
947 </para>
948 <informaltable><tgroup cols="1"><tbody><row><entry
949  align="char">
950 <para>This ioctl call queries the currently effective frontend parameters. For this
951  command, read-only access to the device is sufficient.</para>
952 </entry>
953  </row></tbody></tgroup></informaltable>
954
955 <para>SYNOPSIS
956 </para>
957 <informaltable><tgroup cols="1"><tbody><row><entry
958  align="char">
959 <para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
960  struct dvb_frontend_parameters &#x22C6;p);</para>
961 </entry>
962  </row></tbody></tgroup></informaltable>
963
964 <para>PARAMETERS
965 </para>
966 <informaltable><tgroup cols="2"><tbody><row><entry
967  align="char">
968 <para>int fd</para>
969 </entry><entry
970  align="char">
971 <para>File descriptor returned by a previous call to open().</para>
972 </entry>
973  </row><row><entry
974  align="char">
975 <para>int request</para>
976 </entry><entry
977  align="char">
978 <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
979 </entry>
980  </row><row><entry
981  align="char">
982 <para>struct
983  dvb_frontend_parameters
984  *p</para>
985 </entry><entry
986  align="char">
987 <para>Points to parameters for tuning operation.</para>
988 </entry>
989  </row></tbody></tgroup></informaltable>
990
991 &return-value-dvb;
992 <informaltable><tgroup cols="2"><tbody><row><entry
993  align="char">
994 <para>EINVAL</para>
995 </entry><entry
996  align="char">
997 <para>Maximum supported symbol rate reached.</para>
998 </entry>
999  </row></tbody></tgroup></informaltable>
1000
1001 </section>
1002
1003 <section id="FE_GET_EVENT">
1004 <title>FE_GET_EVENT</title>
1005 <para>DESCRIPTION
1006 </para>
1007 <informaltable><tgroup cols="1"><tbody><row><entry
1008  align="char">
1009 <para>This ioctl call returns a frontend event if available. If an event is not
1010  available, the behavior depends on whether the device is in blocking or
1011  non-blocking mode. In the latter case, the call fails immediately with errno
1012  set to EWOULDBLOCK. In the former case, the call blocks until an event
1013  becomes available.</para>
1014 </entry>
1015  </row><row><entry
1016  align="char">
1017 <para>The standard Linux poll() and/or select() system calls can be used with the
1018  device file descriptor to watch for new events. For select(), the file descriptor
1019  should be included in the exceptfds argument, and for poll(), POLLPRI should
1020  be specified as the wake-up condition. Since the event queue allocated is
1021  rather small (room for 8 events), the queue must be serviced regularly to avoid
1022  overflow. If an overflow happens, the oldest event is discarded from the queue,
1023  and an error (EOVERFLOW) occurs the next time the queue is read. After
1024  reporting the error condition in this fashion, subsequent
1025  <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
1026  calls will return events from the queue as usual.</para>
1027 </entry>
1028  </row><row><entry
1029  align="char">
1030 <para>For the sake of implementation simplicity, this command requires read/write
1031  access to the device.</para>
1032 </entry>
1033  </row></tbody></tgroup></informaltable>
1034
1035 <para>SYNOPSIS
1036 </para>
1037 <informaltable><tgroup cols="1"><tbody><row><entry
1038  align="char">
1039 <para>int ioctl(int fd, int request = QPSK_GET_EVENT,
1040  struct dvb_frontend_event &#x22C6;ev);</para>
1041 </entry>
1042  </row></tbody></tgroup></informaltable>
1043
1044 <para>PARAMETERS
1045 </para>
1046 <informaltable><tgroup cols="2"><tbody><row><entry
1047  align="char">
1048 <para>int fd</para>
1049 </entry><entry
1050  align="char">
1051 <para>File descriptor returned by a previous call to open().</para>
1052 </entry>
1053  </row><row><entry
1054  align="char">
1055 <para>int request</para>
1056 </entry><entry
1057  align="char">
1058 <para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
1059 </entry>
1060  </row><row><entry
1061  align="char">
1062 <para>struct
1063  dvb_frontend_event
1064  *ev</para>
1065 </entry><entry
1066  align="char">
1067 <para>Points to the location where the event,</para>
1068 </entry>
1069  </row><row><entry
1070  align="char">
1071 </entry><entry
1072  align="char">
1073 <para>if any, is to be stored.</para>
1074 </entry>
1075  </row></tbody></tgroup></informaltable>
1076
1077 &return-value-dvb;
1078 <informaltable><tgroup cols="2"><tbody><row><entry
1079  align="char">
1080 <para>EWOULDBLOCK</para>
1081 </entry><entry
1082  align="char">
1083 <para>There is no event pending, and the device is in
1084  non-blocking mode.</para>
1085 </entry>
1086  </row><row><entry
1087  align="char">
1088 <para>EOVERFLOW</para>
1089 </entry><entry
1090  align="char">
1091 <para>Overflow in event queue - one or more events were lost.</para>
1092 </entry>
1093 </row></tbody></tgroup></informaltable>
1094 </section>
1095
1096 <section id="FE_GET_INFO">
1097 <title>FE_GET_INFO</title>
1098 <para>DESCRIPTION
1099 </para>
1100 <informaltable><tgroup cols="1"><tbody><row><entry
1101  align="char">
1102 <para>This ioctl call returns information about the front-end. This call only requires
1103  read-only access to the device.</para>
1104 </entry>
1105  </row></tbody></tgroup></informaltable>
1106 <para>SYNOPSIS
1107 </para>
1108
1109 <informaltable><tgroup cols="1"><tbody><row><entry
1110  align="char">
1111 <para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct
1112  dvb_frontend_info &#x22C6;info);</para>
1113 </entry>
1114  </row></tbody></tgroup></informaltable>
1115 <para>PARAMETERS
1116 </para>
1117
1118 <informaltable><tgroup cols="2"><tbody><row><entry
1119  align="char">
1120 <para>int fd</para>
1121 </entry><entry
1122  align="char">
1123 <para>File descriptor returned by a previous call to open().</para>
1124 </entry>
1125  </row><row><entry
1126  align="char">
1127 <para>int request</para>
1128 </entry><entry
1129  align="char">
1130 <para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>
1131 </entry>
1132  </row><row><entry
1133  align="char">
1134 <para>struct
1135  dvb_frontend_info
1136  *info</para>
1137 </entry><entry
1138  align="char">
1139 <para>Points to the location where the front-end information is
1140  to be stored.</para>
1141 </entry>
1142  </row></tbody></tgroup></informaltable>
1143 &return-value-dvb;
1144 </section>
1145
1146 <section id="FE_DISEQC_RESET_OVERLOAD">
1147 <title>FE_DISEQC_RESET_OVERLOAD</title>
1148 <para>DESCRIPTION
1149 </para>
1150 <informaltable><tgroup cols="1"><tbody><row><entry
1151  align="char">
1152 <para>If the bus has been automatically powered off due to power overload, this ioctl
1153  call restores the power to the bus. The call requires read/write access to the
1154  device. This call has no effect if the device is manually powered off. Not all
1155  DVB adapters support this ioctl.</para>
1156 </entry>
1157  </row></tbody></tgroup></informaltable>
1158
1159 <para>SYNOPSIS
1160 </para>
1161 <informaltable><tgroup cols="1"><tbody><row><entry
1162  align="char">
1163 <para>int ioctl(int fd, int request =
1164  <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>
1165 </entry>
1166  </row></tbody></tgroup></informaltable>
1167 <para>PARAMETERS
1168 </para>
1169 <informaltable><tgroup cols="2"><tbody><row><entry
1170  align="char">
1171 <para>int fd</para>
1172 </entry><entry
1173  align="char">
1174 <para>File descriptor returned by a previous call to open().</para>
1175 </entry>
1176  </row><row><entry
1177  align="char">
1178 <para>int request</para>
1179 </entry><entry
1180  align="char">
1181 <para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this
1182  command.</para>
1183 </entry>
1184  </row></tbody></tgroup></informaltable>
1185
1186 &return-value-dvb;
1187 </section>
1188
1189 <section id="FE_DISEQC_SEND_MASTER_CMD">
1190 <title>FE_DISEQC_SEND_MASTER_CMD</title>
1191 <para>DESCRIPTION
1192 </para>
1193 <informaltable><tgroup cols="1"><tbody><row><entry
1194  align="char">
1195 <para>This ioctl call is used to send a a DiSEqC command.</para>
1196 </entry>
1197  </row></tbody></tgroup></informaltable>
1198 <para>SYNOPSIS
1199 </para>
1200 <informaltable><tgroup cols="1"><tbody><row><entry
1201  align="char">
1202 <para>int ioctl(int fd, int request =
1203  <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct
1204  dvb_diseqc_master_cmd &#x22C6;cmd);</para>
1205 </entry>
1206  </row></tbody></tgroup></informaltable>
1207
1208 <para>PARAMETERS
1209 </para>
1210 <informaltable><tgroup cols="2"><tbody><row><entry
1211  align="char">
1212 <para>int fd</para>
1213 </entry><entry
1214  align="char">
1215 <para>File descriptor returned by a previous call to open().</para>
1216 </entry>
1217  </row><row><entry
1218  align="char">
1219 <para>int request</para>
1220 </entry><entry
1221  align="char">
1222 <para>Equals <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> for this
1223  command.</para>
1224 </entry>
1225  </row><row><entry
1226  align="char">
1227 <para>struct
1228  dvb_diseqc_master_cmd
1229  *cmd</para>
1230 </entry><entry
1231  align="char">
1232 <para>Pointer to the command to be transmitted.</para>
1233 </entry>
1234  </row></tbody></tgroup></informaltable>
1235
1236 &return-value-dvb;
1237 </section>
1238
1239 <section id="FE_DISEQC_RECV_SLAVE_REPLY">
1240 <title>FE_DISEQC_RECV_SLAVE_REPLY</title>
1241 <para>DESCRIPTION
1242 </para>
1243 <informaltable><tgroup cols="1"><tbody><row><entry
1244  align="char">
1245 <para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>
1246 </entry>
1247  </row></tbody></tgroup></informaltable>
1248
1249 <para>SYNOPSIS
1250 </para>
1251 <informaltable><tgroup cols="1"><tbody><row><entry
1252  align="char">
1253 <para>int ioctl(int fd, int request =
1254  <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct
1255  dvb_diseqc_slave_reply &#x22C6;reply);</para>
1256 </entry>
1257  </row></tbody></tgroup></informaltable>
1258
1259 <para>PARAMETERS
1260 </para>
1261 <informaltable><tgroup cols="2"><tbody><row><entry
1262  align="char">
1263 <para>int fd</para>
1264 </entry><entry
1265  align="char">
1266 <para>File descriptor returned by a previous call to open().</para>
1267 </entry>
1268  </row><row><entry
1269  align="char">
1270 <para>int request</para>
1271 </entry><entry
1272  align="char">
1273 <para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this
1274  command.</para>
1275 </entry>
1276  </row><row><entry
1277  align="char">
1278 <para>struct
1279  dvb_diseqc_slave_reply
1280  *reply</para>
1281 </entry><entry
1282  align="char">
1283 <para>Pointer to the command to be received.</para>
1284 </entry>
1285  </row></tbody></tgroup></informaltable>
1286 &return-value-dvb;
1287 </section>
1288
1289 <section id="FE_DISEQC_SEND_BURST">
1290 <title>FE_DISEQC_SEND_BURST</title>
1291 <para>DESCRIPTION
1292 </para>
1293 <informaltable><tgroup cols="1"><tbody><row><entry
1294  align="char">
1295 <para>This ioctl call is used to send a 22KHz tone burst.</para>
1296 </entry>
1297  </row></tbody></tgroup></informaltable>
1298
1299 <para>SYNOPSIS
1300 </para>
1301 <informaltable><tgroup cols="1"><tbody><row><entry
1302  align="char">
1303 <para>int ioctl(int fd, int request =
1304  <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para>
1305 </entry>
1306  </row></tbody></tgroup></informaltable>
1307
1308 <para>PARAMETERS
1309 </para>
1310 <informaltable><tgroup cols="2"><tbody><row><entry
1311  align="char">
1312 <para>int fd</para>
1313 </entry><entry
1314  align="char">
1315 <para>File descriptor returned by a previous call to open().</para>
1316 </entry>
1317  </row><row><entry
1318  align="char">
1319 <para>int request</para>
1320 </entry><entry
1321  align="char">
1322 <para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para>
1323 </entry>
1324  </row><row><entry
1325  align="char">
1326 <para>fe_sec_mini_cmd_t
1327  burst</para>
1328 </entry><entry
1329  align="char">
1330 <para>burst A or B.</para>
1331 </entry>
1332  </row></tbody></tgroup></informaltable>
1333
1334 &return-value-dvb;
1335 </section>
1336
1337 <section id="FE_SET_TONE">
1338 <title>FE_SET_TONE</title>
1339 <para>DESCRIPTION
1340 </para>
1341 <informaltable><tgroup cols="1"><tbody><row><entry
1342  align="char">
1343 <para>This call is used to set the generation of the continuous 22kHz tone. This call
1344  requires read/write permissions.</para>
1345 </entry>
1346  </row></tbody></tgroup></informaltable>
1347 <para>SYNOPSIS
1348 </para>
1349 <informaltable><tgroup cols="1"><tbody><row><entry
1350  align="char">
1351 <para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,
1352  fe_sec_tone_mode_t tone);</para>
1353 </entry>
1354  </row></tbody></tgroup></informaltable>
1355 <para>PARAMETERS
1356 </para>
1357 <informaltable><tgroup cols="2"><tbody><row><entry
1358  align="char">
1359 <para>int fd</para>
1360 </entry><entry
1361  align="char">
1362 <para>File descriptor returned by a previous call to open().</para>
1363 </entry>
1364  </row><row><entry
1365  align="char">
1366 <para>int request</para>
1367 </entry><entry
1368  align="char">
1369 <para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>
1370 </entry>
1371  </row><row><entry
1372  align="char">
1373 <para>fe_sec_tone_mode_t
1374  tone</para>
1375 </entry><entry
1376  align="char">
1377 <para>The requested tone generation mode (on/off).</para>
1378 </entry>
1379  </row></tbody></tgroup></informaltable>
1380 &return-value-dvb;
1381 </section>
1382
1383 <section id="FE_SET_VOLTAGE">
1384 <title>FE_SET_VOLTAGE</title>
1385 <para>DESCRIPTION
1386 </para>
1387 <informaltable><tgroup cols="1"><tbody><row><entry
1388  align="char">
1389 <para>This call is used to set the bus voltage. This call requires read/write
1390  permissions.</para>
1391 </entry>
1392  </row></tbody></tgroup></informaltable>
1393 <para>SYNOPSIS
1394 </para>
1395 <informaltable><tgroup cols="1"><tbody><row><entry
1396  align="char">
1397 <para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,
1398  fe_sec_voltage_t voltage);</para>
1399 </entry>
1400  </row></tbody></tgroup></informaltable>
1401
1402 <para>PARAMETERS
1403 </para>
1404 <informaltable><tgroup cols="2"><tbody><row><entry
1405  align="char">
1406 <para>int fd</para>
1407 </entry><entry
1408  align="char">
1409 <para>File descriptor returned by a previous call to open().</para>
1410 </entry>
1411  </row><row><entry
1412  align="char">
1413 <para>int request</para>
1414 </entry><entry
1415  align="char">
1416 <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
1417 </entry>
1418  </row><row><entry
1419  align="char">
1420 <para>fe_sec_voltage_t
1421  voltage</para>
1422 </entry><entry
1423  align="char">
1424 <para>The requested bus voltage.</para>
1425 </entry>
1426  </row></tbody></tgroup></informaltable>
1427
1428 &return-value-dvb;
1429 </section>
1430
1431 <section id="FE_ENABLE_HIGH_LNB_VOLTAGE">
1432 <title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>
1433 <para>DESCRIPTION
1434 </para>
1435 <informaltable><tgroup cols="1"><tbody><row><entry
1436  align="char">
1437 <para>If high != 0 enables slightly higher voltages instead of 13/18V (to compensate
1438  for long cables). This call requires read/write permissions. Not all DVB
1439  adapters support this ioctl.</para>
1440 </entry>
1441  </row></tbody></tgroup></informaltable>
1442
1443 <para>SYNOPSIS
1444 </para>
1445 <informaltable><tgroup cols="1"><tbody><row><entry
1446  align="char">
1447 <para>int ioctl(int fd, int request =
1448  <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para>
1449 </entry>
1450  </row></tbody></tgroup></informaltable>
1451
1452 <para>PARAMETERS
1453 </para>
1454 <informaltable><tgroup cols="2"><tbody><row><entry
1455  align="char">
1456 <para>int fd</para>
1457 </entry><entry
1458  align="char">
1459 <para>File descriptor returned by a previous call to open().</para>
1460 </entry>
1461  </row><row><entry
1462  align="char">
1463 <para>int request</para>
1464 </entry><entry
1465  align="char">
1466 <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
1467 </entry>
1468  </row><row><entry
1469  align="char">
1470 <para>int high</para>
1471 </entry><entry
1472  align="char">
1473 <para>The requested bus voltage.</para>
1474 </entry>
1475  </row></tbody></tgroup></informaltable>
1476
1477 &return-value-dvb;
1478 </section>
1479
1480 <section id="FE_SET_FRONTEND_TUNE_MODE">
1481 <title>FE_SET_FRONTEND_TUNE_MODE</title>
1482 <para>DESCRIPTION</para>
1483 <informaltable><tgroup cols="1"><tbody><row>
1484 <entry align="char">
1485 <para>Allow setting tuner mode flags to the frontend.</para>
1486 </entry>
1487 </row></tbody></tgroup></informaltable>
1488
1489 <para>SYNOPSIS</para>
1490 <informaltable><tgroup cols="1"><tbody><row>
1491 <entry align="char">
1492 <para>int ioctl(int fd, int request =
1493 <link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>
1494 </entry>
1495 </row></tbody></tgroup></informaltable>
1496
1497 <para>PARAMETERS</para>
1498 <informaltable><tgroup cols="2"><tbody><row>
1499 <entry align="char">
1500         <para>unsigned int flags</para>
1501 </entry>
1502 <entry align="char">
1503 <para>
1504 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.
1505 </para>
1506 </entry>
1507  </row></tbody></tgroup></informaltable>
1508
1509 &return-value-dvb;
1510 </section>
1511
1512 <section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
1513         <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
1514 <para>DESCRIPTION</para>
1515 <informaltable><tgroup cols="1"><tbody><row>
1516 <entry align="char">
1517 <para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
1518 <para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
1519 <para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
1520 </entry>
1521 </row></tbody></tgroup></informaltable>
1522
1523 <para>SYNOPSIS</para>
1524 <informaltable><tgroup cols="1"><tbody><row>
1525 <entry align="char">
1526 <para>int ioctl(int fd, int request =
1527         <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
1528 </entry>
1529 </row></tbody></tgroup></informaltable>
1530
1531 <para>PARAMETERS</para>
1532 <informaltable><tgroup cols="2"><tbody><row>
1533 <entry align="char">
1534         <para>unsigned long cmd</para>
1535 </entry>
1536 <entry align="char">
1537 <para>
1538 sends the specified raw cmd to the dish via DISEqC.
1539 </para>
1540 </entry>
1541  </row></tbody></tgroup></informaltable>
1542
1543 &return-value-dvb;
1544 </section>
1545
1546 </section>
1547
1548 &sub-dvbproperty;