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