About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / DocBook / dvb / frontend.xml


Based on kernel version 3.0.4. Page generated on 2011-10-03 22:07 EST.

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


About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog