[media] DocBook/dvbproperty.xml: Add ATSC standard
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / Documentation / DocBook / media / dvb / frontend.xml
blob304d54ed3cbf53a9f1486240b26b429ad69fea39
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="fe-type-t">
24 <title>Frontend type</title>
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>
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/C standard</entry>
49      <entry><constant>SYS_DVBC_ANNEX_AC</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>
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 </section>
68 <section id="fe-caps-t">
69 <title>frontend capabilities</title>
71 <para>Capabilities describe what a frontend can do. Some capabilities can only be supported for
72 a specific frontend type.</para>
73 <programlisting>
74         typedef enum fe_caps {
75         FE_IS_STUPID                  = 0,
76         FE_CAN_INVERSION_AUTO         = 0x1,
77         FE_CAN_FEC_1_2                = 0x2,
78         FE_CAN_FEC_2_3                = 0x4,
79         FE_CAN_FEC_3_4                = 0x8,
80         FE_CAN_FEC_4_5                = 0x10,
81         FE_CAN_FEC_5_6                = 0x20,
82         FE_CAN_FEC_6_7                = 0x40,
83         FE_CAN_FEC_7_8                = 0x80,
84         FE_CAN_FEC_8_9                = 0x100,
85         FE_CAN_FEC_AUTO               = 0x200,
86         FE_CAN_QPSK                   = 0x400,
87         FE_CAN_QAM_16                 = 0x800,
88         FE_CAN_QAM_32                 = 0x1000,
89         FE_CAN_QAM_64                 = 0x2000,
90         FE_CAN_QAM_128                = 0x4000,
91         FE_CAN_QAM_256                = 0x8000,
92         FE_CAN_QAM_AUTO               = 0x10000,
93         FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
94         FE_CAN_BANDWIDTH_AUTO         = 0x40000,
95         FE_CAN_GUARD_INTERVAL_AUTO    = 0x80000,
96         FE_CAN_HIERARCHY_AUTO         = 0x100000,
97         FE_CAN_8VSB                   = 0x200000,
98         FE_CAN_16VSB                  = 0x400000,
99         FE_HAS_EXTENDED_CAPS          = 0x800000,
100         FE_CAN_TURBO_FEC              = 0x8000000,
101         FE_CAN_2G_MODULATION          = 0x10000000,
102         FE_NEEDS_BENDING              = 0x20000000,
103         FE_CAN_RECOVER                = 0x40000000,
104         FE_CAN_MUTE_TS                = 0x80000000
105         } fe_caps_t;
106 </programlisting>
107 </section>
109 <section id="dvb-frontend-info">
110 <title>frontend information</title>
112 <para>Information about the frontend ca be queried with
113         <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
115 <programlisting>
116         struct dvb_frontend_info {
117         char       name[128];
118         fe_type_t  type;
119         uint32_t   frequency_min;
120         uint32_t   frequency_max;
121         uint32_t   frequency_stepsize;
122         uint32_t   frequency_tolerance;
123         uint32_t   symbol_rate_min;
124         uint32_t   symbol_rate_max;
125         uint32_t   symbol_rate_tolerance;     /&#x22C6; ppm &#x22C6;/
126         uint32_t   notifier_delay;            /&#x22C6; ms &#x22C6;/
127         fe_caps_t  caps;
128         };
129 </programlisting>
130 </section>
132 <section id="dvb-diseqc-master-cmd">
133 <title>diseqc master command</title>
135 <para>A message sent from the frontend to DiSEqC capable equipment.</para>
136 <programlisting>
137         struct dvb_diseqc_master_cmd {
138         uint8_t msg [6]; /&#x22C6;  { framing, address, command, data[3] } &#x22C6;/
139         uint8_t msg_len; /&#x22C6;  valid values are 3...6  &#x22C6;/
140         };
141 </programlisting>
142 </section>
143 <section role="subsection" id="dvb-diseqc-slave-reply">
144 <title>diseqc slave reply</title>
146 <para>A reply to the frontend from DiSEqC 2.0 capable equipment.</para>
147 <programlisting>
148         struct dvb_diseqc_slave_reply {
149         uint8_t msg [4]; /&#x22C6;  { framing, data [3] } &#x22C6;/
150         uint8_t msg_len; /&#x22C6;  valid values are 0...4, 0 means no msg  &#x22C6;/
151         int     timeout; /&#x22C6;  return from ioctl after timeout ms with &#x22C6;/
152         };                       /&#x22C6;  errorcode when no message was received  &#x22C6;/
153 </programlisting>
154 </section>
156 <section id="fe-sec-voltage-t">
157 <title>diseqc slave reply</title>
158 <para>The voltage is usually used with non-DiSEqC capable LNBs to switch the polarzation
159 (horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched
160 consistently to the DiSEqC commands as described in the DiSEqC spec.</para>
161 <programlisting>
162         typedef enum fe_sec_voltage {
163         SEC_VOLTAGE_13,
164         SEC_VOLTAGE_18
165         } fe_sec_voltage_t;
166 </programlisting>
167 </section>
169 <section id="fe-sec-tone-mode-t">
170 <title>SEC continuous tone</title>
172 <para>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
173 high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to
174 be switched consistently to the DiSEqC commands as described in the DiSEqC
175 spec.</para>
176 <programlisting>
177         typedef enum fe_sec_tone_mode {
178         SEC_TONE_ON,
179         SEC_TONE_OFF
180         } fe_sec_tone_mode_t;
181 </programlisting>
182 </section>
184 <section id="fe-sec-mini-cmd-t">
185 <title>SEC tone burst</title>
187 <para>The 22KHz tone burst is usually used with non-DiSEqC capable switches to select
188 between two connected LNBs/satellites. When using DiSEqC epuipment this voltage has to
189 be switched consistently to the DiSEqC commands as described in the DiSEqC
190 spec.</para>
191 <programlisting>
192         typedef enum fe_sec_mini_cmd {
193         SEC_MINI_A,
194         SEC_MINI_B
195         } fe_sec_mini_cmd_t;
196 </programlisting>
198 <para></para>
199 </section>
201 <section id="fe-status-t">
202 <title>frontend status</title>
203 <para>Several functions of the frontend device use the fe_status data type defined
204 by</para>
205 <programlisting>
206  typedef enum fe_status {
207          FE_HAS_SIGNAL     = 0x01,   /&#x22C6;  found something above the noise level &#x22C6;/
208          FE_HAS_CARRIER    = 0x02,   /&#x22C6;  found a DVB signal  &#x22C6;/
209          FE_HAS_VITERBI    = 0x04,   /&#x22C6;  FEC is stable  &#x22C6;/
210          FE_HAS_SYNC       = 0x08,   /&#x22C6;  found sync bytes  &#x22C6;/
211          FE_HAS_LOCK       = 0x10,   /&#x22C6;  everything's working... &#x22C6;/
212          FE_TIMEDOUT       = 0x20,   /&#x22C6;  no lock within the last ~2 seconds &#x22C6;/
213          FE_REINIT         = 0x40    /&#x22C6;  frontend was reinitialized,  &#x22C6;/
214  } fe_status_t;                      /&#x22C6;  application is recommned to reset &#x22C6;/
215 </programlisting>
216 <para>to indicate the current state and/or state changes of the frontend hardware.
217 </para>
219 </section>
221 <section id="dvb-frontend-parameters">
222 <title>frontend parameters</title>
223 <para>The kind of parameters passed to the frontend device for tuning depend on
224 the kind of hardware you are using.</para>
225 <para>The struct <constant>dvb_frontend_parameters</constant> uses an
226 union with specific per-system parameters. However, as newer delivery systems
227 required more data, the structure size weren't enough to fit, and just
228 extending its size would break the existing applications. So, those parameters
229 were replaced by the usage of <link linkend="FE_GET_SET_PROPERTY">
230 <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> ioctl's. The
231 new API is flexible enough to add new parameters to existing delivery systems,
232 and to add newer delivery systems.</para>
233 <para>So, newer applications should use <link linkend="FE_GET_SET_PROPERTY">
234 <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> instead, in
235 order to be able to support the newer System Delivery like  DVB-S2, DVB-T2,
236 DVB-C2, ISDB, etc.</para>
237 <para>All kinds of parameters are combined as an union in the FrontendParameters structure:</para>
238 <programlisting>
239 struct dvb_frontend_parameters {
240         uint32_t frequency;     /&#x22C6; (absolute) frequency in Hz for QAM/OFDM &#x22C6;/
241                                 /&#x22C6; intermediate frequency in kHz for QPSK &#x22C6;/
242         fe_spectral_inversion_t inversion;
243         union {
244                 struct dvb_qpsk_parameters qpsk;
245                 struct dvb_qam_parameters  qam;
246                 struct dvb_ofdm_parameters ofdm;
247                 struct dvb_vsb_parameters  vsb;
248         } u;
250 </programlisting>
251 <para>In the case of QPSK frontends the <constant>frequency</constant> field specifies the intermediate
252 frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
253 the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
254 OFDM frontends the <constant>frequency</constant> specifies the absolute frequency and is given in Hz.
255 </para>
256 <section id="dvb-qpsk-parameters">
257 <title>QPSK parameters</title>
258 <para>For satellite QPSK frontends you have to use the <constant>dvb_qpsk_parameters</constant> structure:</para>
259 <programlisting>
260  struct dvb_qpsk_parameters {
261          uint32_t        symbol_rate;  /&#x22C6; symbol rate in Symbols per second &#x22C6;/
262          fe_code_rate_t  fec_inner;    /&#x22C6; forward error correction (see above) &#x22C6;/
263  };
264 </programlisting>
265 </section>
266 <section id="dvb-qam-parameters">
267 <title>QAM parameters</title>
268 <para>for cable QAM frontend you use the <constant>dvb_qam_parameters</constant> structure:</para>
269 <programlisting>
270  struct dvb_qam_parameters {
271          uint32_t         symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
272          fe_code_rate_t   fec_inner;   /&#x22C6; forward error correction (see above) &#x22C6;/
273          fe_modulation_t  modulation;  /&#x22C6; modulation type (see above) &#x22C6;/
274  };
275 </programlisting>
276 </section>
277 <section id="dvb-vsb-parameters">
278 <title>VSB parameters</title>
279 <para>ATSC frontends are supported by the <constant>dvb_vsb_parameters</constant> structure:</para>
280 <programlisting>
281 struct dvb_vsb_parameters {
282         fe_modulation_t modulation;     /&#x22C6; modulation type (see above) &#x22C6;/
284 </programlisting>
285 </section>
286 <section id="dvb-ofdm-parameters">
287 <title>OFDM parameters</title>
288 <para>DVB-T frontends are supported by the <constant>dvb_ofdm_parameters</constant> structure:</para>
289 <programlisting>
290  struct dvb_ofdm_parameters {
291          fe_bandwidth_t      bandwidth;
292          fe_code_rate_t      code_rate_HP;  /&#x22C6; high priority stream code rate &#x22C6;/
293          fe_code_rate_t      code_rate_LP;  /&#x22C6; low priority stream code rate &#x22C6;/
294          fe_modulation_t     constellation; /&#x22C6; modulation type (see above) &#x22C6;/
295          fe_transmit_mode_t  transmission_mode;
296          fe_guard_interval_t guard_interval;
297          fe_hierarchy_t      hierarchy_information;
298  };
299 </programlisting>
300 </section>
301 <section id="fe-spectral-inversion-t">
302 <title>frontend spectral inversion</title>
303 <para>The Inversion field can take one of these values:
304 </para>
305 <programlisting>
306 typedef enum fe_spectral_inversion {
307         INVERSION_OFF,
308         INVERSION_ON,
309         INVERSION_AUTO
310 } fe_spectral_inversion_t;
311 </programlisting>
312 <para>It indicates if spectral inversion should be presumed or not. In the automatic setting
313 (<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by
314 itself.
315 </para>
316 </section>
317 <section id="fe-code-rate-t">
318 <title>frontend code rate</title>
319 <para>The possible values for the <constant>fec_inner</constant> field used on
320 <link refend="dvb-qpsk-parameters"><constant>struct dvb_qpsk_parameters</constant></link> and
321 <link refend="dvb-qam-parameters"><constant>struct dvb_qam_parameters</constant></link> are:
322 </para>
323 <programlisting>
324 typedef enum fe_code_rate {
325         FEC_NONE = 0,
326         FEC_1_2,
327         FEC_2_3,
328         FEC_3_4,
329         FEC_4_5,
330         FEC_5_6,
331         FEC_6_7,
332         FEC_7_8,
333         FEC_8_9,
334         FEC_AUTO,
335         FEC_3_5,
336         FEC_9_10,
337 } fe_code_rate_t;
338 </programlisting>
339 <para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
340 detection.
341 </para>
342 </section>
343 <section id="fe-modulation-t">
344 <title>frontend modulation type for QAM, OFDM and VSB</title>
345 <para>For cable and terrestrial frontends, e. g. for
346 <link refend="dvb-qam-parameters"><constant>struct dvb_qpsk_parameters</constant></link>,
347 <link refend="dvb-ofdm-parameters"><constant>struct dvb_qam_parameters</constant></link> and
348 <link refend="dvb-vsb-parameters"><constant>struct dvb_qam_parameters</constant></link>,
349 it needs to specify the quadrature modulation mode which can be one of the following:
350 </para>
351 <programlisting>
352  typedef enum fe_modulation {
353         QPSK,
354         QAM_16,
355         QAM_32,
356         QAM_64,
357         QAM_128,
358         QAM_256,
359         QAM_AUTO,
360         VSB_8,
361         VSB_16,
362         PSK_8,
363         APSK_16,
364         APSK_32,
365         DQPSK,
366  } fe_modulation_t;
367 </programlisting>
368 </section>
369 <para>Finally, there are several more parameters for OFDM:
370 </para>
371 <section id="fe-transmit-mode-t">
372 <title>Number of carriers per channel</title>
373 <programlisting>
374 typedef enum fe_transmit_mode {
375         TRANSMISSION_MODE_2K,
376         TRANSMISSION_MODE_8K,
377         TRANSMISSION_MODE_AUTO,
378         TRANSMISSION_MODE_4K,
379         TRANSMISSION_MODE_1K,
380         TRANSMISSION_MODE_16K,
381         TRANSMISSION_MODE_32K,
382  } fe_transmit_mode_t;
383 </programlisting>
384 </section>
385 <section id="fe-bandwidth-t">
386 <title>frontend bandwidth</title>
387 <programlisting>
388 typedef enum fe_bandwidth {
389         BANDWIDTH_8_MHZ,
390         BANDWIDTH_7_MHZ,
391         BANDWIDTH_6_MHZ,
392         BANDWIDTH_AUTO,
393         BANDWIDTH_5_MHZ,
394         BANDWIDTH_10_MHZ,
395         BANDWIDTH_1_712_MHZ,
396 } fe_bandwidth_t;
397 </programlisting>
398 </section>
399 <section id="fe-guard-interval-t">
400 <title>frontend guard inverval</title>
401 <programlisting>
402 typedef enum fe_guard_interval {
403         GUARD_INTERVAL_1_32,
404         GUARD_INTERVAL_1_16,
405         GUARD_INTERVAL_1_8,
406         GUARD_INTERVAL_1_4,
407         GUARD_INTERVAL_AUTO,
408         GUARD_INTERVAL_1_128,
409         GUARD_INTERVAL_19_128,
410         GUARD_INTERVAL_19_256,
411 } fe_guard_interval_t;
412 </programlisting>
413 </section>
414 <section id="fe-hierarchy-t">
415 <title>frontend hierarchy</title>
416 <programlisting>
417 typedef enum fe_hierarchy {
418          HIERARCHY_NONE,
419          HIERARCHY_1,
420          HIERARCHY_2,
421          HIERARCHY_4,
422          HIERARCHY_AUTO
423  } fe_hierarchy_t;
424 </programlisting>
425 </section>
427 </section>
429 <section id="dvb-frontend-event">
430 <title>frontend events</title>
431  <programlisting>
432  struct dvb_frontend_event {
433          fe_status_t status;
434          struct dvb_frontend_parameters parameters;
435  };
436 </programlisting>
437  </section>
438 </section>
441 <section id="frontend_fcalls">
442 <title>Frontend Function Calls</title>
444 <section id="frontend_f_open">
445 <title>open()</title>
446 <para>DESCRIPTION</para>
447 <informaltable><tgroup cols="1"><tbody><row>
448 <entry align="char">
449 <para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)
450  for subsequent use. Usually the first thing to do after a successful open is to
451  find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
452 <para>The device can be opened in read-only mode, which only allows monitoring of
453  device status and statistics, or read/write mode, which allows any kind of use
454  (e.g. performing tuning operations.)
455 </para>
456 <para>In a system with multiple front-ends, it is usually the case that multiple devices
457  cannot be open in read/write mode simultaneously. As long as a front-end
458  device is opened in read/write mode, other open() calls in read/write mode will
459  either fail or block, depending on whether non-blocking or blocking mode was
460  specified. A front-end device opened in blocking mode can later be put into
461  non-blocking mode (and vice versa) using the F_SETFL command of the fcntl
462  system call. This is a standard system call, documented in the Linux manual
463  page for fcntl. When an open() call has succeeded, the device will be ready
464  for use in the specified mode. This implies that the corresponding hardware is
465  powered up, and that other front-ends may have been powered down to make
466  that possible.</para>
467 </entry>
468  </row></tbody></tgroup></informaltable>
470 <para>SYNOPSIS</para>
471 <informaltable><tgroup cols="1"><tbody><row><entry
472  align="char">
473 <para>int open(const char &#x22C6;deviceName, int flags);</para>
474 </entry>
475  </row></tbody></tgroup></informaltable>
476 <para>PARAMETERS
477 </para>
478 <informaltable><tgroup cols="2"><tbody><row><entry
479  align="char">
480 <para>const char
481  *deviceName</para>
482 </entry><entry
483  align="char">
484 <para>Name of specific video device.</para>
485 </entry>
486  </row><row><entry
487  align="char">
488 <para>int flags</para>
489 </entry><entry
490  align="char">
491 <para>A bit-wise OR of the following flags:</para>
492 </entry>
493  </row><row><entry
494  align="char">
495 </entry><entry
496  align="char">
497 <para>O_RDONLY read-only access</para>
498 </entry>
499  </row><row><entry
500  align="char">
501 </entry><entry
502  align="char">
503 <para>O_RDWR read/write access</para>
504 </entry>
505  </row><row><entry
506  align="char">
507 </entry><entry
508  align="char">
509 <para>O_NONBLOCK open in non-blocking mode</para>
510 </entry>
511  </row><row><entry
512  align="char">
513 </entry><entry
514  align="char">
515 <para>(blocking mode is the default)</para>
516 </entry>
517  </row></tbody></tgroup></informaltable>
518 <para>ERRORS
519 </para>
520 <informaltable><tgroup cols="2"><tbody><row><entry
521  align="char">
522 <para>ENODEV</para>
523 </entry><entry
524  align="char">
525 <para>Device driver not loaded/available.</para>
526 </entry>
527  </row><row><entry
528  align="char">
529 <para>EINTERNAL</para>
530 </entry><entry
531  align="char">
532 <para>Internal error.</para>
533 </entry>
534  </row><row><entry
535  align="char">
536 <para>EBUSY</para>
537 </entry><entry
538  align="char">
539 <para>Device or resource busy.</para>
540 </entry>
541  </row><row><entry
542  align="char">
543 <para>EINVAL</para>
544 </entry><entry
545  align="char">
546 <para>Invalid argument.</para>
547 </entry>
548  </row></tbody></tgroup></informaltable>
549 </section>
551 <section id="frontend_f_close">
552 <title>close()</title>
553 <para>DESCRIPTION
554 </para>
555 <informaltable><tgroup cols="1"><tbody><row><entry
556  align="char">
557 <para>This system call closes a previously opened front-end device. After closing
558  a front-end device, its corresponding hardware might be powered down
559  automatically.</para>
560 </entry>
561  </row></tbody></tgroup></informaltable>
562 <para>SYNOPSIS
563 </para>
564 <informaltable><tgroup cols="1"><tbody><row><entry
565  align="char">
566 <para>int close(int fd);</para>
567 </entry>
568  </row></tbody></tgroup></informaltable>
569 <para>PARAMETERS
570 </para>
571 <informaltable><tgroup cols="2"><tbody><row><entry
572  align="char">
573 <para>int fd</para>
574 </entry><entry
575  align="char">
576 <para>File descriptor returned by a previous call to open().</para>
577 </entry>
578  </row></tbody></tgroup></informaltable>
579 <para>ERRORS
580 </para>
581 <informaltable><tgroup cols="2"><tbody><row><entry
582  align="char">
583 <para>EBADF</para>
584 </entry><entry
585  align="char">
586 <para>fd is not a valid open file descriptor.</para>
587 </entry>
588  </row></tbody></tgroup></informaltable>
589 </section>
591 <section id="FE_READ_STATUS">
592 <title>FE_READ_STATUS</title>
593 <para>DESCRIPTION
594 </para>
595 <informaltable><tgroup cols="1"><tbody><row><entry
596  align="char">
597 <para>This ioctl call returns status information about the front-end. This call only
598  requires read-only access to the device.</para>
599 </entry>
600  </row></tbody></tgroup></informaltable>
601 <para>SYNOPSIS
602 </para>
603 <informaltable><tgroup cols="1"><tbody><row><entry
604  align="char">
605 <para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,
606  fe_status_t &#x22C6;status);</para>
607 </entry>
608  </row></tbody></tgroup></informaltable>
609 <para>PARAMETERS
610 </para>
612 <informaltable><tgroup cols="2"><tbody><row><entry
613  align="char">
614 <para>int fd</para>
615 </entry><entry
616  align="char">
617 <para>File descriptor returned by a previous call to open().</para>
618 </entry>
619  </row><row><entry
620  align="char">
621 <para>int request</para>
622 </entry><entry
623  align="char">
624 <para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>
625 </entry>
626  </row><row><entry
627  align="char">
628 <para>struct fe_status_t
629  *status</para>
630 </entry><entry
631  align="char">
632 <para>Points to the location where the front-end status word is
633  to be stored.</para>
634 </entry>
635  </row></tbody></tgroup></informaltable>
636 <para>ERRORS
637 </para>
638 <informaltable><tgroup cols="2"><tbody><row><entry
639  align="char">
640 <para>EBADF</para>
641 </entry><entry
642  align="char">
643 <para>fd is not a valid open file descriptor.</para>
644 </entry>
645  </row><row><entry
646  align="char">
647 <para>EFAULT</para>
648 </entry><entry
649  align="char">
650 <para>status points to invalid address.</para>
651 </entry>
652  </row></tbody></tgroup></informaltable>
653 </section>
655 <section id="FE_READ_BER">
656 <title>FE_READ_BER</title>
657 <para>DESCRIPTION
658 </para>
659 <informaltable><tgroup cols="1"><tbody><row><entry
660  align="char">
661 <para>This ioctl call returns the bit error rate for the signal currently
662  received/demodulated by the front-end. For this command, read-only access to
663  the device is sufficient.</para>
664 </entry>
665  </row></tbody></tgroup></informaltable>
666 <para>SYNOPSIS
667 </para>
668 <informaltable><tgroup cols="1"><tbody><row><entry
669  align="char">
670 <para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
671  uint32_t &#x22C6;ber);</para>
672 </entry>
673  </row></tbody></tgroup></informaltable>
674 <para>PARAMETERS
675 </para>
676 <informaltable><tgroup cols="2"><tbody><row><entry
677  align="char">
678 <para>int fd</para>
679 </entry><entry
680  align="char">
681 <para>File descriptor returned by a previous call to open().</para>
682 </entry>
683  </row><row><entry
684  align="char">
685 <para>int request</para>
686 </entry><entry
687  align="char">
688 <para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
689 </entry>
690  </row><row><entry
691  align="char">
692 <para>uint32_t *ber</para>
693 </entry><entry
694  align="char">
695 <para>The bit error rate is stored into *ber.</para>
696 </entry>
697  </row></tbody></tgroup></informaltable>
698 <para>ERRORS
699 </para>
700 <informaltable><tgroup cols="2"><tbody><row><entry
701  align="char">
702 <para>EBADF</para>
703 </entry><entry
704  align="char">
705 <para>fd is not a valid open file descriptor.</para>
706 </entry>
707  </row><row><entry
708  align="char">
709 <para>EFAULT</para>
710 </entry><entry
711  align="char">
712 <para>ber points to invalid address.</para>
713 </entry>
714  </row><row><entry
715  align="char">
716 <para>ENOSIGNAL</para>
717 </entry><entry
718  align="char">
719 <para>There is no signal, thus no meaningful bit error rate. Also
720  returned if the front-end is not turned on.</para>
721 </entry>
722  </row><row><entry
723  align="char">
724 <para>ENOSYS</para>
725 </entry><entry
726  align="char">
727 <para>Function not available for this device.</para>
728 </entry>
729  </row></tbody></tgroup></informaltable>
730 </section>
732 <section id="FE_READ_SNR">
733 <title>FE_READ_SNR</title>
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>
776 <para>ERRORS
777 </para>
778 <informaltable><tgroup cols="2"><tbody><row><entry
779  align="char">
780 <para>EBADF</para>
781 </entry><entry
782  align="char">
783 <para>fd is not a valid open file descriptor.</para>
784 </entry>
785  </row><row><entry
786  align="char">
787 <para>EFAULT</para>
788 </entry><entry
789  align="char">
790 <para>snr points to invalid address.</para>
791 </entry>
792  </row><row><entry
793  align="char">
794 <para>ENOSIGNAL</para>
795 </entry><entry
796  align="char">
797 <para>There is no signal, thus no meaningful signal strength
798  value. Also returned if front-end is not turned on.</para>
799 </entry>
800  </row><row><entry
801  align="char">
802 <para>ENOSYS</para>
803 </entry><entry
804  align="char">
805 <para>Function not available for this device.</para>
806 </entry>
807  </row></tbody></tgroup></informaltable>
808 </section>
810 <section id="FE_READ_SIGNAL_STRENGTH">
811 <title>FE_READ_SIGNAL_STRENGTH</title>
812 <para>DESCRIPTION
813 </para>
814 <informaltable><tgroup cols="1"><tbody><row><entry
815  align="char">
816 <para>This ioctl call returns the signal strength value for the signal currently received
817  by the front-end. For this command, read-only access to the device is sufficient.</para>
818 </entry>
819  </row></tbody></tgroup></informaltable>
820 <para>SYNOPSIS
821 </para>
822 <informaltable><tgroup cols="1"><tbody><row><entry
823  align="char">
824 <para>int ioctl( int fd, int request =
825  <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t &#x22C6;strength);</para>
826 </entry>
827  </row></tbody></tgroup></informaltable>
829 <para>PARAMETERS
830 </para>
831 <informaltable><tgroup cols="2"><tbody><row><entry
832  align="char">
833 <para>int fd</para>
834 </entry><entry
835  align="char">
836 <para>File descriptor returned by a previous call to open().</para>
837 </entry>
838  </row><row><entry
839  align="char">
840 <para>int request</para>
841 </entry><entry
842  align="char">
843 <para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
844  command.</para>
845 </entry>
846  </row><row><entry
847  align="char">
848 <para>int16_t *strength</para>
849 </entry><entry
850  align="char">
851 <para>The signal strength value is stored into *strength.</para>
852 </entry>
853  </row></tbody></tgroup></informaltable>
854 <para>ERRORS
855 </para>
856 <informaltable><tgroup cols="2"><tbody><row><entry
857  align="char">
858 <para>EBADF</para>
859 </entry><entry
860  align="char">
861 <para>fd is not a valid open file descriptor.</para>
862 </entry>
863  </row><row><entry
864  align="char">
865 <para>EFAULT</para>
866 </entry><entry
867  align="char">
868 <para>status points to invalid address.</para>
869 </entry>
870  </row><row><entry
871  align="char">
872 <para>ENOSIGNAL</para>
873 </entry><entry
874  align="char">
875 <para>There is no signal, thus no meaningful signal strength
876  value. Also returned if front-end is not turned on.</para>
877 </entry>
878  </row><row><entry
879  align="char">
880 <para>ENOSYS</para>
881 </entry><entry
882  align="char">
883 <para>Function not available for this device.</para>
884 </entry>
885  </row></tbody></tgroup></informaltable>
886 </section>
888 <section id="FE_READ_UNCORRECTED_BLOCKS">
889 <title>FE_READ_UNCORRECTED_BLOCKS</title>
890 <para>DESCRIPTION
891 </para>
892 <informaltable><tgroup cols="1"><tbody><row><entry
893  align="char">
894 <para>This ioctl call returns the number of uncorrected blocks detected by the device
895  driver during its lifetime. For meaningful measurements, the increment in block
896  count during a specific time interval should be calculated. For this command,
897  read-only access to the device is sufficient.</para>
898 </entry>
899  </row><row><entry
900  align="char">
901 <para>Note that the counter will wrap to zero after its maximum count has been
902  reached.</para>
903 </entry>
904  </row></tbody></tgroup></informaltable>
905 <para>SYNOPSIS
906 </para>
907 <informaltable><tgroup cols="1"><tbody><row><entry
908  align="char">
909 <para>int ioctl( int fd, int request =
910  <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t &#x22C6;ublocks);</para>
911 </entry>
912  </row></tbody></tgroup></informaltable>
913 <para>PARAMETERS
914 </para>
915 <informaltable><tgroup cols="2"><tbody><row><entry
916  align="char">
917 <para>int fd</para>
918 </entry><entry
919  align="char">
920 <para>File descriptor returned by a previous call to open().</para>
921 </entry>
922  </row><row><entry
923  align="char">
924 <para>int request</para>
925 </entry><entry
926  align="char">
927 <para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
928  command.</para>
929 </entry>
930  </row><row><entry
931  align="char">
932 <para>uint32_t *ublocks</para>
933 </entry><entry
934  align="char">
935 <para>The total number of uncorrected blocks seen by the driver
936  so far.</para>
937 </entry>
938  </row></tbody></tgroup></informaltable>
939 <para>ERRORS
940 </para>
941 <informaltable><tgroup cols="2"><tbody><row><entry
942  align="char">
943 <para>EBADF</para>
944 </entry><entry
945  align="char">
946 <para>fd is not a valid open file descriptor.</para>
947 </entry>
948  </row><row><entry
949  align="char">
950 <para>EFAULT</para>
951 </entry><entry
952  align="char">
953 <para>ublocks points to invalid address.</para>
954 </entry>
955  </row><row><entry
956  align="char">
957 <para>ENOSYS</para>
958 </entry><entry
959  align="char">
960 <para>Function not available for this device.</para>
961 </entry>
962  </row></tbody></tgroup></informaltable>
963 </section>
965 <section id="FE_SET_FRONTEND">
966 <title>FE_SET_FRONTEND</title>
967 <para>DESCRIPTION
968 </para>
969 <informaltable><tgroup cols="1"><tbody><row><entry
970  align="char">
971 <para>This ioctl call starts a tuning operation using specified parameters. The result
972  of this call will be successful if the parameters were valid and the tuning could
973  be initiated. The result of the tuning operation in itself, however, will arrive
974  asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
975  FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before
976  the previous one was completed, the previous operation will be aborted in favor
977  of the new one. This command requires read/write access to the device.</para>
978 </entry>
979  </row></tbody></tgroup></informaltable>
981 <para>SYNOPSIS
982 </para>
983 <informaltable><tgroup cols="1"><tbody><row><entry
984  align="char">
985 <para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
986  struct dvb_frontend_parameters &#x22C6;p);</para>
987 </entry>
988  </row></tbody></tgroup></informaltable>
989 <para>PARAMETERS
990 </para>
991 <informaltable><tgroup cols="2"><tbody><row><entry
992  align="char">
993 <para>int fd</para>
994 </entry><entry
995  align="char">
996 <para>File descriptor returned by a previous call to open().</para>
997 </entry>
998  </row><row><entry
999  align="char">
1000 <para>int request</para>
1001 </entry><entry
1002  align="char">
1003 <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
1004 </entry>
1005  </row><row><entry
1006  align="char">
1007 <para>struct
1008  dvb_frontend_parameters
1009  *p</para>
1010 </entry><entry
1011  align="char">
1012 <para>Points to parameters for tuning operation.</para>
1013 </entry>
1014  </row></tbody></tgroup></informaltable>
1015 <para>ERRORS
1016 </para>
1017 <informaltable><tgroup cols="2"><tbody><row><entry
1018  align="char">
1019 <para>EBADF</para>
1020 </entry><entry
1021  align="char">
1022 <para>fd is not a valid open file descriptor.</para>
1023 </entry>
1024  </row><row><entry
1025  align="char">
1026 <para>EFAULT</para>
1027 </entry><entry
1028  align="char">
1029 <para>p points to invalid address.</para>
1030 </entry>
1031  </row><row><entry
1032  align="char">
1033 <para>EINVAL</para>
1034 </entry><entry
1035  align="char">
1036 <para>Maximum supported symbol rate reached.</para>
1037 </entry>
1038 </row></tbody></tgroup></informaltable>
1039 </section>
1041 <section id="FE_GET_FRONTEND">
1042 <title>FE_GET_FRONTEND</title>
1043 <para>DESCRIPTION
1044 </para>
1045 <informaltable><tgroup cols="1"><tbody><row><entry
1046  align="char">
1047 <para>This ioctl call queries the currently effective frontend parameters. For this
1048  command, read-only access to the device is sufficient.</para>
1049 </entry>
1050  </row></tbody></tgroup></informaltable>
1052 <para>SYNOPSIS
1053 </para>
1054 <informaltable><tgroup cols="1"><tbody><row><entry
1055  align="char">
1056 <para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
1057  struct dvb_frontend_parameters &#x22C6;p);</para>
1058 </entry>
1059  </row></tbody></tgroup></informaltable>
1061 <para>PARAMETERS
1062 </para>
1063 <informaltable><tgroup cols="2"><tbody><row><entry
1064  align="char">
1065 <para>int fd</para>
1066 </entry><entry
1067  align="char">
1068 <para>File descriptor returned by a previous call to open().</para>
1069 </entry>
1070  </row><row><entry
1071  align="char">
1072 <para>int request</para>
1073 </entry><entry
1074  align="char">
1075 <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
1076 </entry>
1077  </row><row><entry
1078  align="char">
1079 <para>struct
1080  dvb_frontend_parameters
1081  *p</para>
1082 </entry><entry
1083  align="char">
1084 <para>Points to parameters for tuning operation.</para>
1085 </entry>
1086  </row></tbody></tgroup></informaltable>
1088 <para>ERRORS
1089 </para>
1091 <informaltable><tgroup cols="2"><tbody><row><entry
1092  align="char">
1093 <para>EBADF</para>
1094 </entry><entry
1095  align="char">
1096 <para>fd is not a valid open file descriptor.</para>
1097 </entry>
1098  </row><row><entry
1099  align="char">
1100 <para>EFAULT</para>
1101 </entry><entry
1102  align="char">
1103 <para>p points to invalid address.</para>
1104 </entry>
1105  </row><row><entry
1106  align="char">
1107 <para>EINVAL</para>
1108 </entry><entry
1109  align="char">
1110 <para>Maximum supported symbol rate reached.</para>
1111 </entry>
1112  </row></tbody></tgroup></informaltable>
1114 </section>
1116 <section id="FE_GET_EVENT">
1117 <title>FE_GET_EVENT</title>
1118 <para>DESCRIPTION
1119 </para>
1120 <informaltable><tgroup cols="1"><tbody><row><entry
1121  align="char">
1122 <para>This ioctl call returns a frontend event if available. If an event is not
1123  available, the behavior depends on whether the device is in blocking or
1124  non-blocking mode. In the latter case, the call fails immediately with errno
1125  set to EWOULDBLOCK. In the former case, the call blocks until an event
1126  becomes available.</para>
1127 </entry>
1128  </row><row><entry
1129  align="char">
1130 <para>The standard Linux poll() and/or select() system calls can be used with the
1131  device file descriptor to watch for new events. For select(), the file descriptor
1132  should be included in the exceptfds argument, and for poll(), POLLPRI should
1133  be specified as the wake-up condition. Since the event queue allocated is
1134  rather small (room for 8 events), the queue must be serviced regularly to avoid
1135  overflow. If an overflow happens, the oldest event is discarded from the queue,
1136  and an error (EOVERFLOW) occurs the next time the queue is read. After
1137  reporting the error condition in this fashion, subsequent
1138  <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
1139  calls will return events from the queue as usual.</para>
1140 </entry>
1141  </row><row><entry
1142  align="char">
1143 <para>For the sake of implementation simplicity, this command requires read/write
1144  access to the device.</para>
1145 </entry>
1146  </row></tbody></tgroup></informaltable>
1148 <para>SYNOPSIS
1149 </para>
1150 <informaltable><tgroup cols="1"><tbody><row><entry
1151  align="char">
1152 <para>int ioctl(int fd, int request = QPSK_GET_EVENT,
1153  struct dvb_frontend_event &#x22C6;ev);</para>
1154 </entry>
1155  </row></tbody></tgroup></informaltable>
1157 <para>PARAMETERS
1158 </para>
1159 <informaltable><tgroup cols="2"><tbody><row><entry
1160  align="char">
1161 <para>int fd</para>
1162 </entry><entry
1163  align="char">
1164 <para>File descriptor returned by a previous call to open().</para>
1165 </entry>
1166  </row><row><entry
1167  align="char">
1168 <para>int request</para>
1169 </entry><entry
1170  align="char">
1171 <para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
1172 </entry>
1173  </row><row><entry
1174  align="char">
1175 <para>struct
1176  dvb_frontend_event
1177  *ev</para>
1178 </entry><entry
1179  align="char">
1180 <para>Points to the location where the event,</para>
1181 </entry>
1182  </row><row><entry
1183  align="char">
1184 </entry><entry
1185  align="char">
1186 <para>if any, is to be stored.</para>
1187 </entry>
1188  </row></tbody></tgroup></informaltable>
1190 <para>ERRORS
1191 </para>
1192 <informaltable><tgroup cols="2"><tbody><row><entry
1193  align="char">
1194 <para>EBADF</para>
1195 </entry><entry
1196  align="char">
1197 <para>fd is not a valid open file descriptor.</para>
1198 </entry>
1199  </row><row><entry
1200  align="char">
1201 <para>EFAULT</para>
1202 </entry><entry
1203  align="char">
1204 <para>ev points to invalid address.</para>
1205 </entry>
1206  </row><row><entry
1207  align="char">
1208 <para>EWOULDBLOCK</para>
1209 </entry><entry
1210  align="char">
1211 <para>There is no event pending, and the device is in
1212  non-blocking mode.</para>
1213 </entry>
1214  </row><row><entry
1215  align="char">
1216 <para>EOVERFLOW</para>
1217 </entry><entry
1218  align="char">
1219 </entry>
1220  </row><row><entry
1221  align="char">
1222 </entry><entry
1223  align="char">
1224 <para>Overflow in event queue - one or more events were lost.</para>
1225 </entry>
1226 </row></tbody></tgroup></informaltable>
1227 </section>
1229 <section id="FE_GET_INFO">
1230 <title>FE_GET_INFO</title>
1231 <para>DESCRIPTION
1232 </para>
1233 <informaltable><tgroup cols="1"><tbody><row><entry
1234  align="char">
1235 <para>This ioctl call returns information about the front-end. This call only requires
1236  read-only access to the device.</para>
1237 </entry>
1238  </row></tbody></tgroup></informaltable>
1239 <para>SYNOPSIS
1240 </para>
1242 <informaltable><tgroup cols="1"><tbody><row><entry
1243  align="char">
1244 <para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct
1245  dvb_frontend_info &#x22C6;info);</para>
1246 </entry>
1247  </row></tbody></tgroup></informaltable>
1248 <para>PARAMETERS
1249 </para>
1251 <informaltable><tgroup cols="2"><tbody><row><entry
1252  align="char">
1253 <para>int fd</para>
1254 </entry><entry
1255  align="char">
1256 <para>File descriptor returned by a previous call to open().</para>
1257 </entry>
1258  </row><row><entry
1259  align="char">
1260 <para>int request</para>
1261 </entry><entry
1262  align="char">
1263 <para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>
1264 </entry>
1265  </row><row><entry
1266  align="char">
1267 <para>struct
1268  dvb_frontend_info
1269  *info</para>
1270 </entry><entry
1271  align="char">
1272 <para>Points to the location where the front-end information is
1273  to be stored.</para>
1274 </entry>
1275  </row></tbody></tgroup></informaltable>
1276 <para>ERRORS
1277 </para>
1278 <informaltable><tgroup cols="2"><tbody><row><entry
1279  align="char">
1280 <para>EBADF</para>
1281 </entry><entry
1282  align="char">
1283 <para>fd is not a valid open file descriptor.</para>
1284 </entry>
1285  </row><row><entry
1286  align="char">
1287 <para>EFAULT</para>
1288 </entry><entry
1289  align="char">
1290 <para>info points to invalid address.</para>
1291 </entry>
1292 </row></tbody></tgroup></informaltable>
1293 </section>
1295 <section id="FE_DISEQC_RESET_OVERLOAD">
1296 <title>FE_DISEQC_RESET_OVERLOAD</title>
1297 <para>DESCRIPTION
1298 </para>
1299 <informaltable><tgroup cols="1"><tbody><row><entry
1300  align="char">
1301 <para>If the bus has been automatically powered off due to power overload, this ioctl
1302  call restores the power to the bus. The call requires read/write access to the
1303  device. This call has no effect if the device is manually powered off. Not all
1304  DVB adapters support this ioctl.</para>
1305 </entry>
1306  </row></tbody></tgroup></informaltable>
1308 <para>SYNOPSIS
1309 </para>
1310 <informaltable><tgroup cols="1"><tbody><row><entry
1311  align="char">
1312 <para>int ioctl(int fd, int request =
1313  <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>
1314 </entry>
1315  </row></tbody></tgroup></informaltable>
1316 <para>PARAMETERS
1317 </para>
1318 <informaltable><tgroup cols="2"><tbody><row><entry
1319  align="char">
1320 <para>int fd</para>
1321 </entry><entry
1322  align="char">
1323 <para>File descriptor returned by a previous call to open().</para>
1324 </entry>
1325  </row><row><entry
1326  align="char">
1327 <para>int request</para>
1328 </entry><entry
1329  align="char">
1330 <para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this
1331  command.</para>
1332 </entry>
1333  </row></tbody></tgroup></informaltable>
1335 <para>ERRORS
1336 </para>
1337 <informaltable><tgroup cols="2"><tbody><row><entry
1338  align="char">
1339 <para>EBADF</para>
1340 </entry><entry
1341  align="char">
1342 <para>fd is not a valid file descriptor.</para>
1343 </entry>
1344  </row><row><entry
1345  align="char">
1346 <para>EPERM</para>
1347 </entry><entry
1348  align="char">
1349 <para>Permission denied (needs read/write access).</para>
1350 </entry>
1351  </row><row><entry
1352  align="char">
1353 <para>EINTERNAL</para>
1354 </entry><entry
1355  align="char">
1356 <para>Internal error in the device driver.</para>
1357 </entry>
1358 </row></tbody></tgroup></informaltable>
1359 </section>
1361 <section id="FE_DISEQC_SEND_MASTER_CMD">
1362 <title>FE_DISEQC_SEND_MASTER_CMD</title>
1363 <para>DESCRIPTION
1364 </para>
1365 <informaltable><tgroup cols="1"><tbody><row><entry
1366  align="char">
1367 <para>This ioctl call is used to send a a DiSEqC command.</para>
1368 </entry>
1369  </row></tbody></tgroup></informaltable>
1370 <para>SYNOPSIS
1371 </para>
1372 <informaltable><tgroup cols="1"><tbody><row><entry
1373  align="char">
1374 <para>int ioctl(int fd, int request =
1375  <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct
1376  dvb_diseqc_master_cmd &#x22C6;cmd);</para>
1377 </entry>
1378  </row></tbody></tgroup></informaltable>
1380 <para>PARAMETERS
1381 </para>
1382 <informaltable><tgroup cols="2"><tbody><row><entry
1383  align="char">
1384 <para>int fd</para>
1385 </entry><entry
1386  align="char">
1387 <para>File descriptor returned by a previous call to open().</para>
1388 </entry>
1389  </row><row><entry
1390  align="char">
1391 <para>int request</para>
1392 </entry><entry
1393  align="char">
1394 <para>Equals <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> for this
1395  command.</para>
1396 </entry>
1397  </row><row><entry
1398  align="char">
1399 <para>struct
1400  dvb_diseqc_master_cmd
1401  *cmd</para>
1402 </entry><entry
1403  align="char">
1404 <para>Pointer to the command to be transmitted.</para>
1405 </entry>
1406  </row></tbody></tgroup></informaltable>
1408 <para>ERRORS
1409 </para>
1410 <informaltable><tgroup cols="2"><tbody><row><entry
1411  align="char">
1412 <para>EBADF</para>
1413 </entry><entry
1414  align="char">
1415 <para>fd is not a valid file descriptor.</para>
1416 </entry>
1417  </row><row><entry
1418  align="char">
1419 <para>EFAULT</para>
1420 </entry><entry
1421  align="char">
1422 <para>Seq points to an invalid address.</para>
1423 </entry>
1424  </row><row><entry
1425  align="char">
1426 <para>EINVAL</para>
1427 </entry><entry
1428  align="char">
1429 <para>The data structure referred to by seq is invalid in some
1430  way.</para>
1431 </entry>
1432  </row><row><entry
1433  align="char">
1434 <para>EPERM</para>
1435 </entry><entry
1436  align="char">
1437 <para>Permission denied (needs read/write access).</para>
1438 </entry>
1439  </row><row><entry
1440  align="char">
1441 <para>EINTERNAL</para>
1442 </entry><entry
1443  align="char">
1444 <para>Internal error in the device driver.</para>
1445 </entry>
1446 </row></tbody></tgroup></informaltable>
1447 </section>
1449 <section id="FE_DISEQC_RECV_SLAVE_REPLY">
1450 <title>FE_DISEQC_RECV_SLAVE_REPLY</title>
1451 <para>DESCRIPTION
1452 </para>
1453 <informaltable><tgroup cols="1"><tbody><row><entry
1454  align="char">
1455 <para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>
1456 </entry>
1457  </row></tbody></tgroup></informaltable>
1459 <para>SYNOPSIS
1460 </para>
1461 <informaltable><tgroup cols="1"><tbody><row><entry
1462  align="char">
1463 <para>int ioctl(int fd, int request =
1464  <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct
1465  dvb_diseqc_slave_reply &#x22C6;reply);</para>
1466 </entry>
1467  </row></tbody></tgroup></informaltable>
1469 <para>PARAMETERS
1470 </para>
1471 <informaltable><tgroup cols="2"><tbody><row><entry
1472  align="char">
1473 <para>int fd</para>
1474 </entry><entry
1475  align="char">
1476 <para>File descriptor returned by a previous call to open().</para>
1477 </entry>
1478  </row><row><entry
1479  align="char">
1480 <para>int request</para>
1481 </entry><entry
1482  align="char">
1483 <para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this
1484  command.</para>
1485 </entry>
1486  </row><row><entry
1487  align="char">
1488 <para>struct
1489  dvb_diseqc_slave_reply
1490  *reply</para>
1491 </entry><entry
1492  align="char">
1493 <para>Pointer to the command to be received.</para>
1494 </entry>
1495  </row></tbody></tgroup></informaltable>
1496 <para>ERRORS
1497 </para>
1498 <informaltable><tgroup cols="2"><tbody><row><entry
1499  align="char">
1500 <para>EBADF</para>
1501 </entry><entry
1502  align="char">
1503 <para>fd is not a valid file descriptor.</para>
1504 </entry>
1505  </row><row><entry
1506  align="char">
1507 <para>EFAULT</para>
1508 </entry><entry
1509  align="char">
1510 <para>Seq points to an invalid address.</para>
1511 </entry>
1512  </row><row><entry
1513  align="char">
1514 <para>EINVAL</para>
1515 </entry><entry
1516  align="char">
1517 <para>The data structure referred to by seq is invalid in some
1518  way.</para>
1519 </entry>
1520  </row><row><entry
1521  align="char">
1522 <para>EPERM</para>
1523 </entry><entry
1524  align="char">
1525 <para>Permission denied (needs read/write access).</para>
1526 </entry>
1527  </row><row><entry
1528  align="char">
1529 <para>EINTERNAL</para>
1530 </entry><entry
1531  align="char">
1532 <para>Internal error in the device driver.</para>
1533 </entry>
1534  </row></tbody></tgroup></informaltable>
1535 </section>
1537 <section id="FE_DISEQC_SEND_BURST">
1538 <title>FE_DISEQC_SEND_BURST</title>
1539 <para>DESCRIPTION
1540 </para>
1541 <informaltable><tgroup cols="1"><tbody><row><entry
1542  align="char">
1543 <para>This ioctl call is used to send a 22KHz tone burst.</para>
1544 </entry>
1545  </row></tbody></tgroup></informaltable>
1547 <para>SYNOPSIS
1548 </para>
1549 <informaltable><tgroup cols="1"><tbody><row><entry
1550  align="char">
1551 <para>int ioctl(int fd, int request =
1552  <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para>
1553 </entry>
1554  </row></tbody></tgroup></informaltable>
1556 <para>PARAMETERS
1557 </para>
1558 <informaltable><tgroup cols="2"><tbody><row><entry
1559  align="char">
1560 <para>int fd</para>
1561 </entry><entry
1562  align="char">
1563 <para>File descriptor returned by a previous call to open().</para>
1564 </entry>
1565  </row><row><entry
1566  align="char">
1567 <para>int request</para>
1568 </entry><entry
1569  align="char">
1570 <para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para>
1571 </entry>
1572  </row><row><entry
1573  align="char">
1574 <para>fe_sec_mini_cmd_t
1575  burst</para>
1576 </entry><entry
1577  align="char">
1578 <para>burst A or B.</para>
1579 </entry>
1580  </row></tbody></tgroup></informaltable>
1582 <para>ERRORS
1583 </para>
1584 <informaltable><tgroup cols="2"><tbody><row><entry
1585  align="char">
1586 <para>EBADF</para>
1587 </entry><entry
1588  align="char">
1589 <para>fd is not a valid file descriptor.</para>
1590 </entry>
1591  </row><row><entry
1592  align="char">
1593 <para>EFAULT</para>
1594 </entry><entry
1595  align="char">
1596 <para>Seq points to an invalid address.</para>
1597 </entry>
1598  </row><row><entry
1599  align="char">
1600 <para>EINVAL</para>
1601 </entry><entry
1602  align="char">
1603 <para>The data structure referred to by seq is invalid in some
1604  way.</para>
1605 </entry>
1606  </row><row><entry
1607  align="char">
1608 <para>EPERM</para>
1609 </entry><entry
1610  align="char">
1611 <para>Permission denied (needs read/write access).</para>
1612 </entry>
1613  </row><row><entry
1614  align="char">
1615 <para>EINTERNAL</para>
1616 </entry><entry
1617  align="char">
1618 <para>Internal error in the device driver.</para>
1619 </entry>
1620 </row></tbody></tgroup></informaltable>
1621 </section>
1623 <section id="FE_SET_TONE">
1624 <title>FE_SET_TONE</title>
1625 <para>DESCRIPTION
1626 </para>
1627 <informaltable><tgroup cols="1"><tbody><row><entry
1628  align="char">
1629 <para>This call is used to set the generation of the continuous 22kHz tone. This call
1630  requires read/write permissions.</para>
1631 </entry>
1632  </row></tbody></tgroup></informaltable>
1633 <para>SYNOPSIS
1634 </para>
1635 <informaltable><tgroup cols="1"><tbody><row><entry
1636  align="char">
1637 <para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,
1638  fe_sec_tone_mode_t tone);</para>
1639 </entry>
1640  </row></tbody></tgroup></informaltable>
1641 <para>PARAMETERS
1642 </para>
1643 <informaltable><tgroup cols="2"><tbody><row><entry
1644  align="char">
1645 <para>int fd</para>
1646 </entry><entry
1647  align="char">
1648 <para>File descriptor returned by a previous call to open().</para>
1649 </entry>
1650  </row><row><entry
1651  align="char">
1652 <para>int request</para>
1653 </entry><entry
1654  align="char">
1655 <para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>
1656 </entry>
1657  </row><row><entry
1658  align="char">
1659 <para>fe_sec_tone_mode_t
1660  tone</para>
1661 </entry><entry
1662  align="char">
1663 <para>The requested tone generation mode (on/off).</para>
1664 </entry>
1665  </row></tbody></tgroup></informaltable>
1666 <para>ERRORS
1667 </para>
1668 <informaltable><tgroup cols="2"><tbody><row><entry
1669  align="char">
1670 <para>ENODEV</para>
1671 </entry><entry
1672  align="char">
1673 <para>Device driver not loaded/available.</para>
1674 </entry>
1675  </row><row><entry
1676  align="char">
1677 <para>EBUSY</para>
1678 </entry><entry
1679  align="char">
1680 <para>Device or resource busy.</para>
1681 </entry>
1682  </row><row><entry
1683  align="char">
1684 <para>EINVAL</para>
1685 </entry><entry
1686  align="char">
1687 <para>Invalid argument.</para>
1688 </entry>
1689  </row><row><entry
1690  align="char">
1691 <para>EPERM</para>
1692 </entry><entry
1693  align="char">
1694 <para>File not opened with read permissions.</para>
1695 </entry>
1696  </row><row><entry
1697  align="char">
1698 <para>EINTERNAL</para>
1699 </entry><entry
1700  align="char">
1701 <para>Internal error in the device driver.</para>
1702 </entry>
1703 </row></tbody></tgroup></informaltable>
1704 </section>
1706 <section id="FE_SET_VOLTAGE">
1707 <title>FE_SET_VOLTAGE</title>
1708 <para>DESCRIPTION
1709 </para>
1710 <informaltable><tgroup cols="1"><tbody><row><entry
1711  align="char">
1712 <para>This call is used to set the bus voltage. This call requires read/write
1713  permissions.</para>
1714 </entry>
1715  </row></tbody></tgroup></informaltable>
1716 <para>SYNOPSIS
1717 </para>
1718 <informaltable><tgroup cols="1"><tbody><row><entry
1719  align="char">
1720 <para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,
1721  fe_sec_voltage_t voltage);</para>
1722 </entry>
1723  </row></tbody></tgroup></informaltable>
1725 <para>PARAMETERS
1726 </para>
1727 <informaltable><tgroup cols="2"><tbody><row><entry
1728  align="char">
1729 <para>int fd</para>
1730 </entry><entry
1731  align="char">
1732 <para>File descriptor returned by a previous call to open().</para>
1733 </entry>
1734  </row><row><entry
1735  align="char">
1736 <para>int request</para>
1737 </entry><entry
1738  align="char">
1739 <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
1740 </entry>
1741  </row><row><entry
1742  align="char">
1743 <para>fe_sec_voltage_t
1744  voltage</para>
1745 </entry><entry
1746  align="char">
1747 <para>The requested bus voltage.</para>
1748 </entry>
1749  </row></tbody></tgroup></informaltable>
1751 <para>ERRORS
1752 </para>
1753 <informaltable><tgroup cols="2"><tbody><row><entry
1754  align="char">
1755 <para>ENODEV</para>
1756 </entry><entry
1757  align="char">
1758 <para>Device driver not loaded/available.</para>
1759 </entry>
1760  </row><row><entry
1761  align="char">
1762 <para>EBUSY</para>
1763 </entry><entry
1764  align="char">
1765 <para>Device or resource busy.</para>
1766 </entry>
1767  </row><row><entry
1768  align="char">
1769 <para>EINVAL</para>
1770 </entry><entry
1771  align="char">
1772 <para>Invalid argument.</para>
1773 </entry>
1774  </row><row><entry
1775  align="char">
1776 <para>EPERM</para>
1777 </entry><entry
1778  align="char">
1779 <para>File not opened with read permissions.</para>
1780 </entry>
1781  </row><row><entry
1782  align="char">
1783 <para>EINTERNAL</para>
1784 </entry><entry
1785  align="char">
1786 <para>Internal error in the device driver.</para>
1787 </entry>
1788  </row></tbody></tgroup></informaltable>
1789 </section>
1791 <section id="FE_ENABLE_HIGH_LNB_VOLTAGE">
1792 <title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>
1793 <para>DESCRIPTION
1794 </para>
1795 <informaltable><tgroup cols="1"><tbody><row><entry
1796  align="char">
1797 <para>If high != 0 enables slightly higher voltages instead of 13/18V (to compensate
1798  for long cables). This call requires read/write permissions. Not all DVB
1799  adapters support this ioctl.</para>
1800 </entry>
1801  </row></tbody></tgroup></informaltable>
1803 <para>SYNOPSIS
1804 </para>
1805 <informaltable><tgroup cols="1"><tbody><row><entry
1806  align="char">
1807 <para>int ioctl(int fd, int request =
1808  <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para>
1809 </entry>
1810  </row></tbody></tgroup></informaltable>
1812 <para>PARAMETERS
1813 </para>
1814 <informaltable><tgroup cols="2"><tbody><row><entry
1815  align="char">
1816 <para>int fd</para>
1817 </entry><entry
1818  align="char">
1819 <para>File descriptor returned by a previous call to open().</para>
1820 </entry>
1821  </row><row><entry
1822  align="char">
1823 <para>int request</para>
1824 </entry><entry
1825  align="char">
1826 <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
1827 </entry>
1828  </row><row><entry
1829  align="char">
1830 <para>int high</para>
1831 </entry><entry
1832  align="char">
1833 <para>The requested bus voltage.</para>
1834 </entry>
1835  </row></tbody></tgroup></informaltable>
1837 <para>ERRORS
1838 </para>
1839 <informaltable><tgroup cols="2"><tbody><row><entry
1840  align="char">
1841 <para>ENODEV</para>
1842 </entry><entry
1843  align="char">
1844 <para>Device driver not loaded/available.</para>
1845 </entry>
1846  </row><row><entry
1847  align="char">
1848 <para>EBUSY</para>
1849 </entry><entry
1850  align="char">
1851 <para>Device or resource busy.</para>
1852 </entry>
1853  </row><row><entry
1854  align="char">
1855 <para>EINVAL</para>
1856 </entry><entry
1857  align="char">
1858 <para>Invalid argument.</para>
1859 </entry>
1860  </row><row><entry
1861  align="char">
1862 <para>EPERM</para>
1863 </entry><entry
1864  align="char">
1865 <para>File not opened with read permissions.</para>
1866 </entry>
1867  </row><row><entry
1868  align="char">
1869 <para>EINTERNAL</para>
1870 </entry><entry
1871  align="char">
1872 <para>Internal error in the device driver.</para>
1873 </entry>
1874  </row></tbody></tgroup></informaltable>
1875 </section>
1877 <section id="FE_SET_FRONTEND_TUNE_MODE">
1878 <title>FE_SET_FRONTEND_TUNE_MODE</title>
1879 <para>DESCRIPTION</para>
1880 <informaltable><tgroup cols="1"><tbody><row>
1881 <entry align="char">
1882 <para>Allow setting tuner mode flags to the frontend.</para>
1883 </entry>
1884 </row></tbody></tgroup></informaltable>
1886 <para>SYNOPSIS</para>
1887 <informaltable><tgroup cols="1"><tbody><row>
1888 <entry align="char">
1889 <para>int ioctl(int fd, int request =
1890 <link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>
1891 </entry>
1892 </row></tbody></tgroup></informaltable>
1894 <para>PARAMETERS</para>
1895 <informaltable><tgroup cols="2"><tbody><row>
1896 <entry align="char">
1897         <para>unsigned int flags</para>
1898 </entry>
1899 <entry align="char">
1900 <para>
1901 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.
1902 </para>
1903 </entry>
1904  </row></tbody></tgroup></informaltable>
1906 <para>ERRORS</para>
1907 <informaltable><tgroup cols="2"><tbody><row>
1908 <entry align="char"><para>EINVAL</para></entry>
1909 <entry align="char"><para>Invalid argument.</para></entry>
1910  </row></tbody></tgroup></informaltable>
1911 </section>
1913 <section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
1914         <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
1915 <para>DESCRIPTION</para>
1916 <informaltable><tgroup cols="1"><tbody><row>
1917 <entry align="char">
1918 <para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
1919 <para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
1920 <para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
1921 </entry>
1922 </row></tbody></tgroup></informaltable>
1924 <para>SYNOPSIS</para>
1925 <informaltable><tgroup cols="1"><tbody><row>
1926 <entry align="char">
1927 <para>int ioctl(int fd, int request =
1928         <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
1929 </entry>
1930 </row></tbody></tgroup></informaltable>
1932 <para>PARAMETERS</para>
1933 <informaltable><tgroup cols="2"><tbody><row>
1934 <entry align="char">
1935         <para>unsigned long cmd</para>
1936 </entry>
1937 <entry align="char">
1938 <para>
1939 sends the specified raw cmd to the dish via DISEqC.
1940 </para>
1941 </entry>
1942  </row></tbody></tgroup></informaltable>
1944 <para>ERRORS</para>
1945 <informaltable><tgroup cols="1"><tbody><row>
1946 <entry align="char">
1947         <para>There are no errors in use for this call</para>
1948 </entry>
1949 </row></tbody></tgroup></informaltable>
1950 </section>
1952 </section>
1954 &sub-dvbproperty;