blob: b1f01239d4dab65648f74f34aeb8793f17090038 [file] [log] [blame]
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001<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)
Mauro Carvalho Chehab62b122a2009-09-15 21:03:45 -030014specification is available from
15<ulink url="http://www.eutelsat.com/satellites/4_5_5.html">Eutelsat</ulink>.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -030016
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
Mauro Carvalho Chehabd5dc2de2011-06-07 16:17:00 -030023<section id="fe-type-t">
24<title>Frontend type</title>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -030025
Mauro Carvalho Chehab0969ec12011-06-07 17:02:37 -030026<para>For historical reasons, frontend types are named by the type of modulation used in
Mauro Carvalho Chehabd5dc2de2011-06-07 16:17:00 -030027transmission. The fontend types are given by fe_type_t type, defined as:</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -030028
Mauro Carvalho Chehabd5dc2de2011-06-07 16:17:00 -030029<table pgwide="1" frame="none" id="fe-type">
30<title>Frontend types</title>
Mauro Carvalho Chehab0969ec12011-06-07 17:02:37 -030031<tgroup cols="3">
Mauro Carvalho Chehabd5dc2de2011-06-07 16:17:00 -030032 &cs-def;
33 <thead>
34 <row>
35 <entry>fe_type</entry>
36 <entry>Description</entry>
Mauro Carvalho Chehab0969ec12011-06-07 17:02:37 -030037 <entry><link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> equivalent type</entry>
Mauro Carvalho Chehabd5dc2de2011-06-07 16:17:00 -030038 </row>
39 </thead>
40 <tbody valign="top">
41 <row>
42 <entry id="FE_QPSK"><constant>FE_QPSK</constant></entry>
43 <entry>For DVB-S standard</entry>
Mauro Carvalho Chehab0969ec12011-06-07 17:02:37 -030044 <entry><constant>SYS_DVBS</constant></entry>
Mauro Carvalho Chehabd5dc2de2011-06-07 16:17:00 -030045 </row>
46 <row>
47 <entry id="FE_QAM"><constant>FE_QAM</constant></entry>
Mauro Carvalho Chehab0969ec12011-06-07 17:02:37 -030048 <entry>For DVB-C annex A/C standard</entry>
49 <entry><constant>SYS_DVBC_ANNEX_AC</constant></entry>
Mauro Carvalho Chehabd5dc2de2011-06-07 16:17:00 -030050 </row>
51 <row>
52 <entry id="FE_OFDM"><constant>FE_OFDM</constant></entry>
Mauro Carvalho Chehab0969ec12011-06-07 17:02:37 -030053 <entry>For DVB-T standard</entry>
54 <entry><constant>SYS_DVBT</constant></entry>
Mauro Carvalho Chehabd5dc2de2011-06-07 16:17:00 -030055 </row>
56 <row>
57 <entry id="FE_ATSC"><constant>FE_ATSC</constant></entry>
Mauro Carvalho Chehab0969ec12011-06-07 17:02:37 -030058 <entry>For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used in US.</entry>
59 <entry><constant>SYS_ATSC</constant> (terrestrial) or <constant>SYS_DVBC_ANNEX_B</constant> (cable)</entry>
Mauro Carvalho Chehabd5dc2de2011-06-07 16:17:00 -030060 </row>
61</tbody></tgroup></table>
62
63<para>Newer formats like DVB-S2, ISDB-T, ISDB-S and DVB-T2 are not described at the above, as they're
Mauro Carvalho Chehab0969ec12011-06-07 17:02:37 -030064supported via the new <link linkend="FE_GET_SET_PROPERTY">FE_GET_PROPERTY/FE_GET_SET_PROPERTY</link> ioctl's, using the <link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> parameter.
Mauro Carvalho Chehabd5dc2de2011-06-07 16:17:00 -030065</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -030066</section>
67
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -030068<section id="fe-caps-t">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -030069<title>frontend capabilities</title>
70
71<para>Capabilities describe what a frontend can do. Some capabilities can only be supported for
72a specific frontend type.</para>
73<programlisting>
74 typedef enum fe_caps {
75 FE_IS_STUPID = 0,
76 FE_CAN_INVERSION_AUTO = 0x1,
77 FE_CAN_FEC_1_2 = 0x2,
78 FE_CAN_FEC_2_3 = 0x4,
79 FE_CAN_FEC_3_4 = 0x8,
80 FE_CAN_FEC_4_5 = 0x10,
81 FE_CAN_FEC_5_6 = 0x20,
82 FE_CAN_FEC_6_7 = 0x40,
83 FE_CAN_FEC_7_8 = 0x80,
84 FE_CAN_FEC_8_9 = 0x100,
85 FE_CAN_FEC_AUTO = 0x200,
86 FE_CAN_QPSK = 0x400,
87 FE_CAN_QAM_16 = 0x800,
88 FE_CAN_QAM_32 = 0x1000,
89 FE_CAN_QAM_64 = 0x2000,
90 FE_CAN_QAM_128 = 0x4000,
91 FE_CAN_QAM_256 = 0x8000,
92 FE_CAN_QAM_AUTO = 0x10000,
93 FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
94 FE_CAN_BANDWIDTH_AUTO = 0x40000,
95 FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
96 FE_CAN_HIERARCHY_AUTO = 0x100000,
Mauro Carvalho Chehab8d3557e2010-07-03 17:39:17 -030097 FE_CAN_8VSB = 0x200000,
98 FE_CAN_16VSB = 0x400000,
99 FE_HAS_EXTENDED_CAPS = 0x800000,
100 FE_CAN_TURBO_FEC = 0x8000000,
101 FE_CAN_2G_MODULATION = 0x10000000,
102 FE_NEEDS_BENDING = 0x20000000,
103 FE_CAN_RECOVER = 0x40000000,
104 FE_CAN_MUTE_TS = 0x80000000
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300105 } fe_caps_t;
106</programlisting>
107</section>
108
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300109<section id="dvb-frontend-info">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300110<title>frontend information</title>
111
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300112<para>Information about the frontend ca be queried with
113 <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300114
115<programlisting>
116 struct dvb_frontend_info {
117 char name[128];
118 fe_type_t type;
119 uint32_t frequency_min;
120 uint32_t frequency_max;
121 uint32_t frequency_stepsize;
122 uint32_t frequency_tolerance;
123 uint32_t symbol_rate_min;
124 uint32_t symbol_rate_max;
125 uint32_t symbol_rate_tolerance; /&#x22C6; ppm &#x22C6;/
126 uint32_t notifier_delay; /&#x22C6; ms &#x22C6;/
127 fe_caps_t caps;
128 };
129</programlisting>
130</section>
131
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300132<section id="dvb-diseqc-master-cmd">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300133<title>diseqc master command</title>
134
135<para>A message sent from the frontend to DiSEqC capable equipment.</para>
136<programlisting>
137 struct dvb_diseqc_master_cmd {
138 uint8_t msg [6]; /&#x22C6; { framing, address, command, data[3] } &#x22C6;/
139 uint8_t msg_len; /&#x22C6; valid values are 3...6 &#x22C6;/
140 };
141</programlisting>
142</section>
143<section role="subsection">
144<title>diseqc slave reply</title>
145
146<para>A reply to the frontend from DiSEqC 2.0 capable equipment.</para>
147<programlisting>
148 struct dvb_diseqc_slave_reply {
149 uint8_t msg [4]; /&#x22C6; { framing, data [3] } &#x22C6;/
150 uint8_t msg_len; /&#x22C6; valid values are 0...4, 0 means no msg &#x22C6;/
151 int timeout; /&#x22C6; return from ioctl after timeout ms with &#x22C6;/
152 }; /&#x22C6; errorcode when no message was received &#x22C6;/
153</programlisting>
154</section>
155
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300156<section id="fe-sec-voltage-t">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300157<title>diseqc slave reply</title>
158<para>The voltage is usually used with non-DiSEqC capable LNBs to switch the polarzation
159(horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched
160consistently to the DiSEqC commands as described in the DiSEqC spec.</para>
161<programlisting>
162 typedef enum fe_sec_voltage {
163 SEC_VOLTAGE_13,
164 SEC_VOLTAGE_18
165 } fe_sec_voltage_t;
166</programlisting>
167</section>
168
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300169<section id="fe-sec-tone-mode-t">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300170<title>SEC continuous tone</title>
171
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300172<para>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300173high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to
174be switched consistently to the DiSEqC commands as described in the DiSEqC
175spec.</para>
176<programlisting>
177 typedef enum fe_sec_tone_mode {
178 SEC_TONE_ON,
179 SEC_TONE_OFF
180 } fe_sec_tone_mode_t;
181</programlisting>
182</section>
183
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300184<section id="fe-sec-mini-cmd-t">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300185<title>SEC tone burst</title>
186
187<para>The 22KHz tone burst is usually used with non-DiSEqC capable switches to select
188between two connected LNBs/satellites. When using DiSEqC epuipment this voltage has to
189be switched consistently to the DiSEqC commands as described in the DiSEqC
190spec.</para>
191<programlisting>
192 typedef enum fe_sec_mini_cmd {
193 SEC_MINI_A,
194 SEC_MINI_B
195 } fe_sec_mini_cmd_t;
196</programlisting>
197
198<para></para>
199</section>
200
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300201<section id="fe-status-t">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300202<title>frontend status</title>
203<para>Several functions of the frontend device use the fe_status data type defined
204by</para>
205<programlisting>
206 typedef enum fe_status {
207 FE_HAS_SIGNAL = 0x01, /&#x22C6; found something above the noise level &#x22C6;/
208 FE_HAS_CARRIER = 0x02, /&#x22C6; found a DVB signal &#x22C6;/
209 FE_HAS_VITERBI = 0x04, /&#x22C6; FEC is stable &#x22C6;/
210 FE_HAS_SYNC = 0x08, /&#x22C6; found sync bytes &#x22C6;/
211 FE_HAS_LOCK = 0x10, /&#x22C6; everything's working... &#x22C6;/
212 FE_TIMEDOUT = 0x20, /&#x22C6; no lock within the last ~2 seconds &#x22C6;/
213 FE_REINIT = 0x40 /&#x22C6; frontend was reinitialized, &#x22C6;/
214 } fe_status_t; /&#x22C6; application is recommned to reset &#x22C6;/
215</programlisting>
216<para>to indicate the current state and/or state changes of the frontend hardware.
217</para>
218
219</section>
220
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300221<section id="dvb-frontend-parameters">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300222<title>frontend parameters</title>
223<para>The kind of parameters passed to the frontend device for tuning depend on
224the kind of hardware you are using. All kinds of parameters are combined as an
225union in the FrontendParameters structure:</para>
226<programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300227struct dvb_frontend_parameters {
228 uint32_t frequency; /&#x22C6; (absolute) frequency in Hz for QAM/OFDM &#x22C6;/
229 /&#x22C6; intermediate frequency in kHz for QPSK &#x22C6;/
230 fe_spectral_inversion_t inversion;
231 union {
232 struct dvb_qpsk_parameters qpsk;
233 struct dvb_qam_parameters qam;
234 struct dvb_ofdm_parameters ofdm;
235 struct dvb_vsb_parameters vsb;
236 } u;
237};
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300238</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300239<para>In the case of QPSK frontends the <constant>frequency</constant> field specifies the intermediate
240frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
241the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
242OFDM frontends the <constant>frequency</constant> specifies the absolute frequency and is given in Hz.
243</para>
244<section id="dvb-qpsk-parameters">
245<title>QPSK parameters</title>
246<para>For satellite QPSK frontends you have to use the <constant>dvb_qpsk_parameters</constant> structure:</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300247<programlisting>
248 struct dvb_qpsk_parameters {
249 uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
250 fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
251 };
252</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300253</section>
254<section id="dvb-qam-parameters">
255<title>QAM parameters</title>
256<para>for cable QAM frontend you use the <constant>dvb_qam_parameters</constant> structure:</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300257<programlisting>
258 struct dvb_qam_parameters {
259 uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
260 fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
261 fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
262 };
263</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300264</section>
Mauro Carvalho Chehab0be153e2011-06-07 18:15:19 -0300265<section id="dvb-vsb-parameters">
266<title>VSB parameters</title>
267<para>DVB-T frontends are supported by the <constant>dvb_vsb_parameters</constant> structure:</para>
268<programlisting>
269struct dvb_vsb_parameters {
270 fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
271};
272</programlisting>
273</section>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300274<section id="dvb-ofdm-parameters">
275<title>OFDM parameters</title>
276<para>DVB-T frontends are supported by the <constant>dvb_ofdm_parameters</constant> structure:</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300277<programlisting>
278 struct dvb_ofdm_parameters {
279 fe_bandwidth_t bandwidth;
280 fe_code_rate_t code_rate_HP; /&#x22C6; high priority stream code rate &#x22C6;/
281 fe_code_rate_t code_rate_LP; /&#x22C6; low priority stream code rate &#x22C6;/
282 fe_modulation_t constellation; /&#x22C6; modulation type (see above) &#x22C6;/
283 fe_transmit_mode_t transmission_mode;
284 fe_guard_interval_t guard_interval;
285 fe_hierarchy_t hierarchy_information;
286 };
287</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300288</section>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300289<section id="fe-spectral-inversion-t">
290<title>frontend spectral inversion</title>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300291<para>The Inversion field can take one of these values:
292</para>
293<programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300294typedef enum fe_spectral_inversion {
295 INVERSION_OFF,
296 INVERSION_ON,
297 INVERSION_AUTO
298} fe_spectral_inversion_t;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300299</programlisting>
300<para>It indicates if spectral inversion should be presumed or not. In the automatic setting
301(<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by
302itself.
303</para>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300304</section>
305<section id="fe-code-rate-t">
306<title>frontend code rate</title>
Mauro Carvalho Chehab0be153e2011-06-07 18:15:19 -0300307<para>The possible values for the <constant>fec_inner</constant> field used on
308<link refend="dvb-qpsk-parameters"><constant>struct dvb_qpsk_parameters</constant></link> and
309<link refend="dvb-qam-parameters"><constant>struct dvb_qam_parameters</constant></link> are:
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300310</para>
311<programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300312typedef enum fe_code_rate {
313 FEC_NONE = 0,
314 FEC_1_2,
315 FEC_2_3,
316 FEC_3_4,
317 FEC_4_5,
318 FEC_5_6,
319 FEC_6_7,
320 FEC_7_8,
321 FEC_8_9,
322 FEC_AUTO,
323 FEC_3_5,
324 FEC_9_10,
325} fe_code_rate_t;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300326</programlisting>
327<para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
328detection.
329</para>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300330</section>
331<section id="fe-modulation-t">
Mauro Carvalho Chehab0be153e2011-06-07 18:15:19 -0300332<title>frontend modulation type for QAM, OFDM and VSB</title>
333<para>For cable and terrestrial frontends, e. g. for
334<link refend="dvb-qam-parameters"><constant>struct dvb_qpsk_parameters</constant></link>,
335<link refend="dvb-ofdm-parameters"><constant>struct dvb_qam_parameters</constant></link> and
336<link refend="dvb-vsb-parameters"><constant>struct dvb_qam_parameters</constant></link>,
337it needs to specify the quadrature modulation mode which can be one of the following:
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300338</para>
339<programlisting>
340 typedef enum fe_modulation {
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300341 QPSK,
342 QAM_16,
343 QAM_32,
344 QAM_64,
345 QAM_128,
346 QAM_256,
347 QAM_AUTO,
348 VSB_8,
349 VSB_16,
350 PSK_8,
351 APSK_16,
352 APSK_32,
353 DQPSK,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300354 } fe_modulation_t;
355</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300356</section>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300357<para>Finally, there are several more parameters for OFDM:
358</para>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300359<section id="fe-transmit-mode-t">
Mauro Carvalho Chehab0be153e2011-06-07 18:15:19 -0300360<title>Number of carriers per channel</title>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300361<programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300362typedef enum fe_transmit_mode {
363 TRANSMISSION_MODE_2K,
364 TRANSMISSION_MODE_8K,
365 TRANSMISSION_MODE_AUTO,
366 TRANSMISSION_MODE_4K,
367 TRANSMISSION_MODE_1K,
368 TRANSMISSION_MODE_16K,
369 TRANSMISSION_MODE_32K,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300370 } fe_transmit_mode_t;
371</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300372</section>
373<section id="fe-bandwidth-t">
374<title>frontend bandwidth</title>
375<programlisting>
376typedef enum fe_bandwidth {
377 BANDWIDTH_8_MHZ,
378 BANDWIDTH_7_MHZ,
379 BANDWIDTH_6_MHZ,
380 BANDWIDTH_AUTO,
381 BANDWIDTH_5_MHZ,
382 BANDWIDTH_10_MHZ,
383 BANDWIDTH_1_712_MHZ,
384} fe_bandwidth_t;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300385</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300386</section>
387<section id="fe-guard-interval-t">
388<title>frontend guard inverval</title>
389<programlisting>
390typedef enum fe_guard_interval {
391 GUARD_INTERVAL_1_32,
392 GUARD_INTERVAL_1_16,
393 GUARD_INTERVAL_1_8,
394 GUARD_INTERVAL_1_4,
395 GUARD_INTERVAL_AUTO,
396 GUARD_INTERVAL_1_128,
397 GUARD_INTERVAL_19_128,
398 GUARD_INTERVAL_19_256,
399} fe_guard_interval_t;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300400</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300401</section>
402<section id="fe-hierarchy-t">
403<title>frontend hierarchy</title>
404<programlisting>
405typedef enum fe_hierarchy {
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300406 HIERARCHY_NONE,
407 HIERARCHY_1,
408 HIERARCHY_2,
409 HIERARCHY_4,
410 HIERARCHY_AUTO
411 } fe_hierarchy_t;
412</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300413</section>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300414
415</section>
416
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300417<section id="dvb-frontend-event">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300418<title>frontend events</title>
419 <programlisting>
420 struct dvb_frontend_event {
421 fe_status_t status;
422 struct dvb_frontend_parameters parameters;
423 };
424</programlisting>
425 </section>
426</section>
427
428
429<section id="frontend_fcalls">
430<title>Frontend Function Calls</title>
431
432<section id="frontend_f_open">
433<title>open()</title>
434<para>DESCRIPTION</para>
435<informaltable><tgroup cols="1"><tbody><row>
436<entry align="char">
437<para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)
438 for subsequent use. Usually the first thing to do after a successful open is to
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300439 find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300440<para>The device can be opened in read-only mode, which only allows monitoring of
441 device status and statistics, or read/write mode, which allows any kind of use
442 (e.g. performing tuning operations.)
443</para>
444<para>In a system with multiple front-ends, it is usually the case that multiple devices
445 cannot be open in read/write mode simultaneously. As long as a front-end
446 device is opened in read/write mode, other open() calls in read/write mode will
447 either fail or block, depending on whether non-blocking or blocking mode was
448 specified. A front-end device opened in blocking mode can later be put into
449 non-blocking mode (and vice versa) using the F_SETFL command of the fcntl
450 system call. This is a standard system call, documented in the Linux manual
451 page for fcntl. When an open() call has succeeded, the device will be ready
452 for use in the specified mode. This implies that the corresponding hardware is
453 powered up, and that other front-ends may have been powered down to make
454 that possible.</para>
455</entry>
456 </row></tbody></tgroup></informaltable>
457
458<para>SYNOPSIS</para>
459<informaltable><tgroup cols="1"><tbody><row><entry
460 align="char">
461<para>int open(const char &#x22C6;deviceName, int flags);</para>
462</entry>
463 </row></tbody></tgroup></informaltable>
464<para>PARAMETERS
465</para>
466<informaltable><tgroup cols="2"><tbody><row><entry
467 align="char">
468<para>const char
469 *deviceName</para>
470</entry><entry
471 align="char">
472<para>Name of specific video device.</para>
473</entry>
474 </row><row><entry
475 align="char">
476<para>int flags</para>
477</entry><entry
478 align="char">
479<para>A bit-wise OR of the following flags:</para>
480</entry>
481 </row><row><entry
482 align="char">
483</entry><entry
484 align="char">
485<para>O_RDONLY read-only access</para>
486</entry>
487 </row><row><entry
488 align="char">
489</entry><entry
490 align="char">
491<para>O_RDWR read/write access</para>
492</entry>
493 </row><row><entry
494 align="char">
495</entry><entry
496 align="char">
497<para>O_NONBLOCK open in non-blocking mode</para>
498</entry>
499 </row><row><entry
500 align="char">
501</entry><entry
502 align="char">
503<para>(blocking mode is the default)</para>
504</entry>
505 </row></tbody></tgroup></informaltable>
506<para>ERRORS
507</para>
508<informaltable><tgroup cols="2"><tbody><row><entry
509 align="char">
510<para>ENODEV</para>
511</entry><entry
512 align="char">
513<para>Device driver not loaded/available.</para>
514</entry>
515 </row><row><entry
516 align="char">
517<para>EINTERNAL</para>
518</entry><entry
519 align="char">
520<para>Internal error.</para>
521</entry>
522 </row><row><entry
523 align="char">
524<para>EBUSY</para>
525</entry><entry
526 align="char">
527<para>Device or resource busy.</para>
528</entry>
529 </row><row><entry
530 align="char">
531<para>EINVAL</para>
532</entry><entry
533 align="char">
534<para>Invalid argument.</para>
535</entry>
536 </row></tbody></tgroup></informaltable>
537</section>
538
539<section id="frontend_f_close">
540<title>close()</title>
541<para>DESCRIPTION
542</para>
543<informaltable><tgroup cols="1"><tbody><row><entry
544 align="char">
545<para>This system call closes a previously opened front-end device. After closing
546 a front-end device, its corresponding hardware might be powered down
547 automatically.</para>
548</entry>
549 </row></tbody></tgroup></informaltable>
550<para>SYNOPSIS
551</para>
552<informaltable><tgroup cols="1"><tbody><row><entry
553 align="char">
554<para>int close(int fd);</para>
555</entry>
556 </row></tbody></tgroup></informaltable>
557<para>PARAMETERS
558</para>
559<informaltable><tgroup cols="2"><tbody><row><entry
560 align="char">
561<para>int fd</para>
562</entry><entry
563 align="char">
564<para>File descriptor returned by a previous call to open().</para>
565</entry>
566 </row></tbody></tgroup></informaltable>
567<para>ERRORS
568</para>
569<informaltable><tgroup cols="2"><tbody><row><entry
570 align="char">
571<para>EBADF</para>
572</entry><entry
573 align="char">
574<para>fd is not a valid open file descriptor.</para>
575</entry>
576 </row></tbody></tgroup></informaltable>
577</section>
578
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300579<section id="FE_READ_STATUS">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300580<title>FE_READ_STATUS</title>
581<para>DESCRIPTION
582</para>
583<informaltable><tgroup cols="1"><tbody><row><entry
584 align="char">
585<para>This ioctl call returns status information about the front-end. This call only
586 requires read-only access to the device.</para>
587</entry>
588 </row></tbody></tgroup></informaltable>
589<para>SYNOPSIS
590</para>
591<informaltable><tgroup cols="1"><tbody><row><entry
592 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300593<para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300594 fe_status_t &#x22C6;status);</para>
595</entry>
596 </row></tbody></tgroup></informaltable>
597<para>PARAMETERS
598</para>
599
600<informaltable><tgroup cols="2"><tbody><row><entry
601 align="char">
602<para>int fd</para>
603</entry><entry
604 align="char">
605<para>File descriptor returned by a previous call to open().</para>
606</entry>
607 </row><row><entry
608 align="char">
609<para>int request</para>
610</entry><entry
611 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300612<para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300613</entry>
614 </row><row><entry
615 align="char">
616<para>struct fe_status_t
617 *status</para>
618</entry><entry
619 align="char">
620<para>Points to the location where the front-end status word is
621 to be stored.</para>
622</entry>
623 </row></tbody></tgroup></informaltable>
624<para>ERRORS
625</para>
626<informaltable><tgroup cols="2"><tbody><row><entry
627 align="char">
628<para>EBADF</para>
629</entry><entry
630 align="char">
631<para>fd is not a valid open file descriptor.</para>
632</entry>
633 </row><row><entry
634 align="char">
635<para>EFAULT</para>
636</entry><entry
637 align="char">
638<para>status points to invalid address.</para>
639</entry>
640 </row></tbody></tgroup></informaltable>
641</section>
642
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300643<section id="FE_READ_BER">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300644<title>FE_READ_BER</title>
645<para>DESCRIPTION
646</para>
647<informaltable><tgroup cols="1"><tbody><row><entry
648 align="char">
649<para>This ioctl call returns the bit error rate for the signal currently
650 received/demodulated by the front-end. For this command, read-only access to
651 the device is sufficient.</para>
652</entry>
653 </row></tbody></tgroup></informaltable>
654<para>SYNOPSIS
655</para>
656<informaltable><tgroup cols="1"><tbody><row><entry
657 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300658<para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300659 uint32_t &#x22C6;ber);</para>
660</entry>
661 </row></tbody></tgroup></informaltable>
662<para>PARAMETERS
663</para>
664<informaltable><tgroup cols="2"><tbody><row><entry
665 align="char">
666<para>int fd</para>
667</entry><entry
668 align="char">
669<para>File descriptor returned by a previous call to open().</para>
670</entry>
671 </row><row><entry
672 align="char">
673<para>int request</para>
674</entry><entry
675 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300676<para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300677</entry>
678 </row><row><entry
679 align="char">
680<para>uint32_t *ber</para>
681</entry><entry
682 align="char">
683<para>The bit error rate is stored into *ber.</para>
684</entry>
685 </row></tbody></tgroup></informaltable>
686<para>ERRORS
687</para>
688<informaltable><tgroup cols="2"><tbody><row><entry
689 align="char">
690<para>EBADF</para>
691</entry><entry
692 align="char">
693<para>fd is not a valid open file descriptor.</para>
694</entry>
695 </row><row><entry
696 align="char">
697<para>EFAULT</para>
698</entry><entry
699 align="char">
700<para>ber points to invalid address.</para>
701</entry>
702 </row><row><entry
703 align="char">
704<para>ENOSIGNAL</para>
705</entry><entry
706 align="char">
707<para>There is no signal, thus no meaningful bit error rate. Also
708 returned if the front-end is not turned on.</para>
709</entry>
710 </row><row><entry
711 align="char">
712<para>ENOSYS</para>
713</entry><entry
714 align="char">
715<para>Function not available for this device.</para>
716</entry>
717 </row></tbody></tgroup></informaltable>
718</section>
719
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300720<section id="FE_READ_SNR">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300721<title>FE_READ_SNR</title>
722
723<para>DESCRIPTION
724</para>
725<informaltable><tgroup cols="1"><tbody><row><entry
726 align="char">
727<para>This ioctl call returns the signal-to-noise ratio for the signal currently received
728 by the front-end. For this command, read-only access to the device is sufficient.</para>
729</entry>
730 </row></tbody></tgroup></informaltable>
731<para>SYNOPSIS
732</para>
733<informaltable><tgroup cols="1"><tbody><row><entry
734 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300735<para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300736 &#x22C6;snr);</para>
737</entry>
738 </row></tbody></tgroup></informaltable>
739<para>PARAMETERS
740</para>
741<informaltable><tgroup cols="2"><tbody><row><entry
742 align="char">
743<para>int fd</para>
744</entry><entry
745 align="char">
746<para>File descriptor returned by a previous call to open().</para>
747</entry>
748 </row><row><entry
749 align="char">
750<para>int request</para>
751</entry><entry
752 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300753<para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300754</entry>
755 </row><row><entry
756 align="char">
757<para>int16_t *snr</para>
758</entry><entry
759 align="char">
760<para>The signal-to-noise ratio is stored into *snr.</para>
761</entry>
762 </row></tbody></tgroup></informaltable>
763
764<para>ERRORS
765</para>
766<informaltable><tgroup cols="2"><tbody><row><entry
767 align="char">
768<para>EBADF</para>
769</entry><entry
770 align="char">
771<para>fd is not a valid open file descriptor.</para>
772</entry>
773 </row><row><entry
774 align="char">
775<para>EFAULT</para>
776</entry><entry
777 align="char">
778<para>snr points to invalid address.</para>
779</entry>
780 </row><row><entry
781 align="char">
782<para>ENOSIGNAL</para>
783</entry><entry
784 align="char">
785<para>There is no signal, thus no meaningful signal strength
786 value. Also returned if front-end is not turned on.</para>
787</entry>
788 </row><row><entry
789 align="char">
790<para>ENOSYS</para>
791</entry><entry
792 align="char">
793<para>Function not available for this device.</para>
794</entry>
795 </row></tbody></tgroup></informaltable>
796</section>
797
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300798<section id="FE_READ_SIGNAL_STRENGTH">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300799<title>FE_READ_SIGNAL_STRENGTH</title>
800<para>DESCRIPTION
801</para>
802<informaltable><tgroup cols="1"><tbody><row><entry
803 align="char">
804<para>This ioctl call returns the signal strength value for the signal currently received
805 by the front-end. For this command, read-only access to the device is sufficient.</para>
806</entry>
807 </row></tbody></tgroup></informaltable>
808<para>SYNOPSIS
809</para>
810<informaltable><tgroup cols="1"><tbody><row><entry
811 align="char">
812<para>int ioctl( int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300813 <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t &#x22C6;strength);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300814</entry>
815 </row></tbody></tgroup></informaltable>
816
817<para>PARAMETERS
818</para>
819<informaltable><tgroup cols="2"><tbody><row><entry
820 align="char">
821<para>int fd</para>
822</entry><entry
823 align="char">
824<para>File descriptor returned by a previous call to open().</para>
825</entry>
826 </row><row><entry
827 align="char">
828<para>int request</para>
829</entry><entry
830 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300831<para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300832 command.</para>
833</entry>
834 </row><row><entry
835 align="char">
836<para>int16_t *strength</para>
837</entry><entry
838 align="char">
839<para>The signal strength value is stored into *strength.</para>
840</entry>
841 </row></tbody></tgroup></informaltable>
842<para>ERRORS
843</para>
844<informaltable><tgroup cols="2"><tbody><row><entry
845 align="char">
846<para>EBADF</para>
847</entry><entry
848 align="char">
849<para>fd is not a valid open file descriptor.</para>
850</entry>
851 </row><row><entry
852 align="char">
853<para>EFAULT</para>
854</entry><entry
855 align="char">
856<para>status points to invalid address.</para>
857</entry>
858 </row><row><entry
859 align="char">
860<para>ENOSIGNAL</para>
861</entry><entry
862 align="char">
863<para>There is no signal, thus no meaningful signal strength
864 value. Also returned if front-end is not turned on.</para>
865</entry>
866 </row><row><entry
867 align="char">
868<para>ENOSYS</para>
869</entry><entry
870 align="char">
871<para>Function not available for this device.</para>
872</entry>
873 </row></tbody></tgroup></informaltable>
874</section>
875
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300876<section id="FE_READ_UNCORRECTED_BLOCKS">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300877<title>FE_READ_UNCORRECTED_BLOCKS</title>
878<para>DESCRIPTION
879</para>
880<informaltable><tgroup cols="1"><tbody><row><entry
881 align="char">
882<para>This ioctl call returns the number of uncorrected blocks detected by the device
883 driver during its lifetime. For meaningful measurements, the increment in block
884 count during a specific time interval should be calculated. For this command,
885 read-only access to the device is sufficient.</para>
886</entry>
887 </row><row><entry
888 align="char">
889<para>Note that the counter will wrap to zero after its maximum count has been
890 reached.</para>
891</entry>
892 </row></tbody></tgroup></informaltable>
893<para>SYNOPSIS
894</para>
895<informaltable><tgroup cols="1"><tbody><row><entry
896 align="char">
897<para>int ioctl( int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300898 <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t &#x22C6;ublocks);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300899</entry>
900 </row></tbody></tgroup></informaltable>
901<para>PARAMETERS
902</para>
903<informaltable><tgroup cols="2"><tbody><row><entry
904 align="char">
905<para>int fd</para>
906</entry><entry
907 align="char">
908<para>File descriptor returned by a previous call to open().</para>
909</entry>
910 </row><row><entry
911 align="char">
912<para>int request</para>
913</entry><entry
914 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300915<para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300916 command.</para>
917</entry>
918 </row><row><entry
919 align="char">
920<para>uint32_t *ublocks</para>
921</entry><entry
922 align="char">
923<para>The total number of uncorrected blocks seen by the driver
924 so far.</para>
925</entry>
926 </row></tbody></tgroup></informaltable>
927<para>ERRORS
928</para>
929<informaltable><tgroup cols="2"><tbody><row><entry
930 align="char">
931<para>EBADF</para>
932</entry><entry
933 align="char">
934<para>fd is not a valid open file descriptor.</para>
935</entry>
936 </row><row><entry
937 align="char">
938<para>EFAULT</para>
939</entry><entry
940 align="char">
941<para>ublocks points to invalid address.</para>
942</entry>
943 </row><row><entry
944 align="char">
945<para>ENOSYS</para>
946</entry><entry
947 align="char">
948<para>Function not available for this device.</para>
949</entry>
950 </row></tbody></tgroup></informaltable>
951</section>
952
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300953<section id="FE_SET_FRONTEND">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300954<title>FE_SET_FRONTEND</title>
955<para>DESCRIPTION
956</para>
957<informaltable><tgroup cols="1"><tbody><row><entry
958 align="char">
959<para>This ioctl call starts a tuning operation using specified parameters. The result
960 of this call will be successful if the parameters were valid and the tuning could
961 be initiated. The result of the tuning operation in itself, however, will arrive
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300962 asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
963 FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300964 the previous one was completed, the previous operation will be aborted in favor
965 of the new one. This command requires read/write access to the device.</para>
966</entry>
967 </row></tbody></tgroup></informaltable>
968
969<para>SYNOPSIS
970</para>
971<informaltable><tgroup cols="1"><tbody><row><entry
972 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300973<para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300974 struct dvb_frontend_parameters &#x22C6;p);</para>
975</entry>
976 </row></tbody></tgroup></informaltable>
977<para>PARAMETERS
978</para>
979<informaltable><tgroup cols="2"><tbody><row><entry
980 align="char">
981<para>int fd</para>
982</entry><entry
983 align="char">
984<para>File descriptor returned by a previous call to open().</para>
985</entry>
986 </row><row><entry
987 align="char">
988<para>int request</para>
989</entry><entry
990 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300991<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300992</entry>
993 </row><row><entry
994 align="char">
995<para>struct
996 dvb_frontend_parameters
997 *p</para>
998</entry><entry
999 align="char">
1000<para>Points to parameters for tuning operation.</para>
1001</entry>
1002 </row></tbody></tgroup></informaltable>
1003<para>ERRORS
1004</para>
1005<informaltable><tgroup cols="2"><tbody><row><entry
1006 align="char">
1007<para>EBADF</para>
1008</entry><entry
1009 align="char">
1010<para>fd is not a valid open file descriptor.</para>
1011</entry>
1012 </row><row><entry
1013 align="char">
1014<para>EFAULT</para>
1015</entry><entry
1016 align="char">
1017<para>p points to invalid address.</para>
1018</entry>
1019 </row><row><entry
1020 align="char">
1021<para>EINVAL</para>
1022</entry><entry
1023 align="char">
1024<para>Maximum supported symbol rate reached.</para>
1025</entry>
1026</row></tbody></tgroup></informaltable>
1027</section>
1028
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001029<section id="FE_GET_FRONTEND">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001030<title>FE_GET_FRONTEND</title>
1031<para>DESCRIPTION
1032</para>
1033<informaltable><tgroup cols="1"><tbody><row><entry
1034 align="char">
1035<para>This ioctl call queries the currently effective frontend parameters. For this
1036 command, read-only access to the device is sufficient.</para>
1037</entry>
1038 </row></tbody></tgroup></informaltable>
1039
1040<para>SYNOPSIS
1041</para>
1042<informaltable><tgroup cols="1"><tbody><row><entry
1043 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001044<para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001045 struct dvb_frontend_parameters &#x22C6;p);</para>
1046</entry>
1047 </row></tbody></tgroup></informaltable>
1048
1049<para>PARAMETERS
1050</para>
1051<informaltable><tgroup cols="2"><tbody><row><entry
1052 align="char">
1053<para>int fd</para>
1054</entry><entry
1055 align="char">
1056<para>File descriptor returned by a previous call to open().</para>
1057</entry>
1058 </row><row><entry
1059 align="char">
1060<para>int request</para>
1061</entry><entry
1062 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001063<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001064</entry>
1065 </row><row><entry
1066 align="char">
1067<para>struct
1068 dvb_frontend_parameters
1069 *p</para>
1070</entry><entry
1071 align="char">
1072<para>Points to parameters for tuning operation.</para>
1073</entry>
1074 </row></tbody></tgroup></informaltable>
1075
1076<para>ERRORS
1077</para>
1078
1079<informaltable><tgroup cols="2"><tbody><row><entry
1080 align="char">
1081<para>EBADF</para>
1082</entry><entry
1083 align="char">
1084<para>fd is not a valid open file descriptor.</para>
1085</entry>
1086 </row><row><entry
1087 align="char">
1088<para>EFAULT</para>
1089</entry><entry
1090 align="char">
1091<para>p points to invalid address.</para>
1092</entry>
1093 </row><row><entry
1094 align="char">
1095<para>EINVAL</para>
1096</entry><entry
1097 align="char">
1098<para>Maximum supported symbol rate reached.</para>
1099</entry>
1100 </row></tbody></tgroup></informaltable>
1101
1102</section>
1103
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001104<section id="FE_GET_EVENT">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001105<title>FE_GET_EVENT</title>
1106<para>DESCRIPTION
1107</para>
1108<informaltable><tgroup cols="1"><tbody><row><entry
1109 align="char">
1110<para>This ioctl call returns a frontend event if available. If an event is not
1111 available, the behavior depends on whether the device is in blocking or
1112 non-blocking mode. In the latter case, the call fails immediately with errno
1113 set to EWOULDBLOCK. In the former case, the call blocks until an event
1114 becomes available.</para>
1115</entry>
1116 </row><row><entry
1117 align="char">
1118<para>The standard Linux poll() and/or select() system calls can be used with the
1119 device file descriptor to watch for new events. For select(), the file descriptor
1120 should be included in the exceptfds argument, and for poll(), POLLPRI should
1121 be specified as the wake-up condition. Since the event queue allocated is
1122 rather small (room for 8 events), the queue must be serviced regularly to avoid
1123 overflow. If an overflow happens, the oldest event is discarded from the queue,
1124 and an error (EOVERFLOW) occurs the next time the queue is read. After
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001125 reporting the error condition in this fashion, subsequent
1126 <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001127 calls will return events from the queue as usual.</para>
1128</entry>
1129 </row><row><entry
1130 align="char">
1131<para>For the sake of implementation simplicity, this command requires read/write
1132 access to the device.</para>
1133</entry>
1134 </row></tbody></tgroup></informaltable>
1135
1136<para>SYNOPSIS
1137</para>
1138<informaltable><tgroup cols="1"><tbody><row><entry
1139 align="char">
1140<para>int ioctl(int fd, int request = QPSK_GET_EVENT,
1141 struct dvb_frontend_event &#x22C6;ev);</para>
1142</entry>
1143 </row></tbody></tgroup></informaltable>
1144
1145<para>PARAMETERS
1146</para>
1147<informaltable><tgroup cols="2"><tbody><row><entry
1148 align="char">
1149<para>int fd</para>
1150</entry><entry
1151 align="char">
1152<para>File descriptor returned by a previous call to open().</para>
1153</entry>
1154 </row><row><entry
1155 align="char">
1156<para>int request</para>
1157</entry><entry
1158 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001159<para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001160</entry>
1161 </row><row><entry
1162 align="char">
1163<para>struct
1164 dvb_frontend_event
1165 *ev</para>
1166</entry><entry
1167 align="char">
1168<para>Points to the location where the event,</para>
1169</entry>
1170 </row><row><entry
1171 align="char">
1172</entry><entry
1173 align="char">
1174<para>if any, is to be stored.</para>
1175</entry>
1176 </row></tbody></tgroup></informaltable>
1177
1178<para>ERRORS
1179</para>
1180<informaltable><tgroup cols="2"><tbody><row><entry
1181 align="char">
1182<para>EBADF</para>
1183</entry><entry
1184 align="char">
1185<para>fd is not a valid open file descriptor.</para>
1186</entry>
1187 </row><row><entry
1188 align="char">
1189<para>EFAULT</para>
1190</entry><entry
1191 align="char">
1192<para>ev points to invalid address.</para>
1193</entry>
1194 </row><row><entry
1195 align="char">
1196<para>EWOULDBLOCK</para>
1197</entry><entry
1198 align="char">
1199<para>There is no event pending, and the device is in
1200 non-blocking mode.</para>
1201</entry>
1202 </row><row><entry
1203 align="char">
1204<para>EOVERFLOW</para>
1205</entry><entry
1206 align="char">
1207</entry>
1208 </row><row><entry
1209 align="char">
1210</entry><entry
1211 align="char">
1212<para>Overflow in event queue - one or more events were lost.</para>
1213</entry>
1214</row></tbody></tgroup></informaltable>
1215</section>
1216
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001217<section id="FE_GET_INFO">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001218<title>FE_GET_INFO</title>
1219<para>DESCRIPTION
1220</para>
1221<informaltable><tgroup cols="1"><tbody><row><entry
1222 align="char">
1223<para>This ioctl call returns information about the front-end. This call only requires
1224 read-only access to the device.</para>
1225</entry>
1226 </row></tbody></tgroup></informaltable>
1227<para>SYNOPSIS
1228</para>
1229
1230<informaltable><tgroup cols="1"><tbody><row><entry
1231 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001232<para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001233 dvb_frontend_info &#x22C6;info);</para>
1234</entry>
1235 </row></tbody></tgroup></informaltable>
1236<para>PARAMETERS
1237</para>
1238
1239<informaltable><tgroup cols="2"><tbody><row><entry
1240 align="char">
1241<para>int fd</para>
1242</entry><entry
1243 align="char">
1244<para>File descriptor returned by a previous call to open().</para>
1245</entry>
1246 </row><row><entry
1247 align="char">
1248<para>int request</para>
1249</entry><entry
1250 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001251<para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001252</entry>
1253 </row><row><entry
1254 align="char">
1255<para>struct
1256 dvb_frontend_info
1257 *info</para>
1258</entry><entry
1259 align="char">
1260<para>Points to the location where the front-end information is
1261 to be stored.</para>
1262</entry>
1263 </row></tbody></tgroup></informaltable>
1264<para>ERRORS
1265</para>
1266<informaltable><tgroup cols="2"><tbody><row><entry
1267 align="char">
1268<para>EBADF</para>
1269</entry><entry
1270 align="char">
1271<para>fd is not a valid open file descriptor.</para>
1272</entry>
1273 </row><row><entry
1274 align="char">
1275<para>EFAULT</para>
1276</entry><entry
1277 align="char">
1278<para>info points to invalid address.</para>
1279</entry>
1280</row></tbody></tgroup></informaltable>
1281</section>
1282
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001283<section id="FE_DISEQC_RESET_OVERLOAD">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001284<title>FE_DISEQC_RESET_OVERLOAD</title>
1285<para>DESCRIPTION
1286</para>
1287<informaltable><tgroup cols="1"><tbody><row><entry
1288 align="char">
1289<para>If the bus has been automatically powered off due to power overload, this ioctl
1290 call restores the power to the bus. The call requires read/write access to the
1291 device. This call has no effect if the device is manually powered off. Not all
1292 DVB adapters support this ioctl.</para>
1293</entry>
1294 </row></tbody></tgroup></informaltable>
1295
1296<para>SYNOPSIS
1297</para>
1298<informaltable><tgroup cols="1"><tbody><row><entry
1299 align="char">
1300<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001301 <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001302</entry>
1303 </row></tbody></tgroup></informaltable>
1304<para>PARAMETERS
1305</para>
1306<informaltable><tgroup cols="2"><tbody><row><entry
1307 align="char">
1308<para>int fd</para>
1309</entry><entry
1310 align="char">
1311<para>File descriptor returned by a previous call to open().</para>
1312</entry>
1313 </row><row><entry
1314 align="char">
1315<para>int request</para>
1316</entry><entry
1317 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001318<para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001319 command.</para>
1320</entry>
1321 </row></tbody></tgroup></informaltable>
1322
1323<para>ERRORS
1324</para>
1325<informaltable><tgroup cols="2"><tbody><row><entry
1326 align="char">
1327<para>EBADF</para>
1328</entry><entry
1329 align="char">
1330<para>fd is not a valid file descriptor.</para>
1331</entry>
1332 </row><row><entry
1333 align="char">
1334<para>EPERM</para>
1335</entry><entry
1336 align="char">
1337<para>Permission denied (needs read/write access).</para>
1338</entry>
1339 </row><row><entry
1340 align="char">
1341<para>EINTERNAL</para>
1342</entry><entry
1343 align="char">
1344<para>Internal error in the device driver.</para>
1345</entry>
1346</row></tbody></tgroup></informaltable>
1347</section>
1348
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001349<section id="FE_DISEQC_SEND_MASTER_CMD">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001350<title>FE_DISEQC_SEND_MASTER_CMD</title>
1351<para>DESCRIPTION
1352</para>
1353<informaltable><tgroup cols="1"><tbody><row><entry
1354 align="char">
1355<para>This ioctl call is used to send a a DiSEqC command.</para>
1356</entry>
1357 </row></tbody></tgroup></informaltable>
1358<para>SYNOPSIS
1359</para>
1360<informaltable><tgroup cols="1"><tbody><row><entry
1361 align="char">
1362<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001363 <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001364 dvb_diseqc_master_cmd &#x22C6;cmd);</para>
1365</entry>
1366 </row></tbody></tgroup></informaltable>
1367
1368<para>PARAMETERS
1369</para>
1370<informaltable><tgroup cols="2"><tbody><row><entry
1371 align="char">
1372<para>int fd</para>
1373</entry><entry
1374 align="char">
1375<para>File descriptor returned by a previous call to open().</para>
1376</entry>
1377 </row><row><entry
1378 align="char">
1379<para>int request</para>
1380</entry><entry
1381 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001382<para>Equals <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> for this
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001383 command.</para>
1384</entry>
1385 </row><row><entry
1386 align="char">
1387<para>struct
1388 dvb_diseqc_master_cmd
1389 *cmd</para>
1390</entry><entry
1391 align="char">
1392<para>Pointer to the command to be transmitted.</para>
1393</entry>
1394 </row></tbody></tgroup></informaltable>
1395
1396<para>ERRORS
1397</para>
1398<informaltable><tgroup cols="2"><tbody><row><entry
1399 align="char">
1400<para>EBADF</para>
1401</entry><entry
1402 align="char">
1403<para>fd is not a valid file descriptor.</para>
1404</entry>
1405 </row><row><entry
1406 align="char">
1407<para>EFAULT</para>
1408</entry><entry
1409 align="char">
1410<para>Seq points to an invalid address.</para>
1411</entry>
1412 </row><row><entry
1413 align="char">
1414<para>EINVAL</para>
1415</entry><entry
1416 align="char">
1417<para>The data structure referred to by seq is invalid in some
1418 way.</para>
1419</entry>
1420 </row><row><entry
1421 align="char">
1422<para>EPERM</para>
1423</entry><entry
1424 align="char">
1425<para>Permission denied (needs read/write access).</para>
1426</entry>
1427 </row><row><entry
1428 align="char">
1429<para>EINTERNAL</para>
1430</entry><entry
1431 align="char">
1432<para>Internal error in the device driver.</para>
1433</entry>
1434</row></tbody></tgroup></informaltable>
1435</section>
1436
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001437<section id="FE_DISEQC_RECV_SLAVE_REPLY">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001438<title>FE_DISEQC_RECV_SLAVE_REPLY</title>
1439<para>DESCRIPTION
1440</para>
1441<informaltable><tgroup cols="1"><tbody><row><entry
1442 align="char">
1443<para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>
1444</entry>
1445 </row></tbody></tgroup></informaltable>
1446
1447<para>SYNOPSIS
1448</para>
1449<informaltable><tgroup cols="1"><tbody><row><entry
1450 align="char">
1451<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001452 <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001453 dvb_diseqc_slave_reply &#x22C6;reply);</para>
1454</entry>
1455 </row></tbody></tgroup></informaltable>
1456
1457<para>PARAMETERS
1458</para>
1459<informaltable><tgroup cols="2"><tbody><row><entry
1460 align="char">
1461<para>int fd</para>
1462</entry><entry
1463 align="char">
1464<para>File descriptor returned by a previous call to open().</para>
1465</entry>
1466 </row><row><entry
1467 align="char">
1468<para>int request</para>
1469</entry><entry
1470 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001471<para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001472 command.</para>
1473</entry>
1474 </row><row><entry
1475 align="char">
1476<para>struct
1477 dvb_diseqc_slave_reply
1478 *reply</para>
1479</entry><entry
1480 align="char">
1481<para>Pointer to the command to be received.</para>
1482</entry>
1483 </row></tbody></tgroup></informaltable>
1484<para>ERRORS
1485</para>
1486<informaltable><tgroup cols="2"><tbody><row><entry
1487 align="char">
1488<para>EBADF</para>
1489</entry><entry
1490 align="char">
1491<para>fd is not a valid file descriptor.</para>
1492</entry>
1493 </row><row><entry
1494 align="char">
1495<para>EFAULT</para>
1496</entry><entry
1497 align="char">
1498<para>Seq points to an invalid address.</para>
1499</entry>
1500 </row><row><entry
1501 align="char">
1502<para>EINVAL</para>
1503</entry><entry
1504 align="char">
1505<para>The data structure referred to by seq is invalid in some
1506 way.</para>
1507</entry>
1508 </row><row><entry
1509 align="char">
1510<para>EPERM</para>
1511</entry><entry
1512 align="char">
1513<para>Permission denied (needs read/write access).</para>
1514</entry>
1515 </row><row><entry
1516 align="char">
1517<para>EINTERNAL</para>
1518</entry><entry
1519 align="char">
1520<para>Internal error in the device driver.</para>
1521</entry>
1522 </row></tbody></tgroup></informaltable>
1523</section>
1524
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001525<section id="FE_DISEQC_SEND_BURST">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001526<title>FE_DISEQC_SEND_BURST</title>
1527<para>DESCRIPTION
1528</para>
1529<informaltable><tgroup cols="1"><tbody><row><entry
1530 align="char">
1531<para>This ioctl call is used to send a 22KHz tone burst.</para>
1532</entry>
1533 </row></tbody></tgroup></informaltable>
1534
1535<para>SYNOPSIS
1536</para>
1537<informaltable><tgroup cols="1"><tbody><row><entry
1538 align="char">
1539<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001540 <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001541</entry>
1542 </row></tbody></tgroup></informaltable>
1543
1544<para>PARAMETERS
1545</para>
1546<informaltable><tgroup cols="2"><tbody><row><entry
1547 align="char">
1548<para>int fd</para>
1549</entry><entry
1550 align="char">
1551<para>File descriptor returned by a previous call to open().</para>
1552</entry>
1553 </row><row><entry
1554 align="char">
1555<para>int request</para>
1556</entry><entry
1557 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001558<para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001559</entry>
1560 </row><row><entry
1561 align="char">
1562<para>fe_sec_mini_cmd_t
1563 burst</para>
1564</entry><entry
1565 align="char">
1566<para>burst A or B.</para>
1567</entry>
1568 </row></tbody></tgroup></informaltable>
1569
1570<para>ERRORS
1571</para>
1572<informaltable><tgroup cols="2"><tbody><row><entry
1573 align="char">
1574<para>EBADF</para>
1575</entry><entry
1576 align="char">
1577<para>fd is not a valid file descriptor.</para>
1578</entry>
1579 </row><row><entry
1580 align="char">
1581<para>EFAULT</para>
1582</entry><entry
1583 align="char">
1584<para>Seq points to an invalid address.</para>
1585</entry>
1586 </row><row><entry
1587 align="char">
1588<para>EINVAL</para>
1589</entry><entry
1590 align="char">
1591<para>The data structure referred to by seq is invalid in some
1592 way.</para>
1593</entry>
1594 </row><row><entry
1595 align="char">
1596<para>EPERM</para>
1597</entry><entry
1598 align="char">
1599<para>Permission denied (needs read/write access).</para>
1600</entry>
1601 </row><row><entry
1602 align="char">
1603<para>EINTERNAL</para>
1604</entry><entry
1605 align="char">
1606<para>Internal error in the device driver.</para>
1607</entry>
1608</row></tbody></tgroup></informaltable>
1609</section>
1610
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001611<section id="FE_SET_TONE">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001612<title>FE_SET_TONE</title>
1613<para>DESCRIPTION
1614</para>
1615<informaltable><tgroup cols="1"><tbody><row><entry
1616 align="char">
1617<para>This call is used to set the generation of the continuous 22kHz tone. This call
1618 requires read/write permissions.</para>
1619</entry>
1620 </row></tbody></tgroup></informaltable>
1621<para>SYNOPSIS
1622</para>
1623<informaltable><tgroup cols="1"><tbody><row><entry
1624 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001625<para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001626 fe_sec_tone_mode_t tone);</para>
1627</entry>
1628 </row></tbody></tgroup></informaltable>
1629<para>PARAMETERS
1630</para>
1631<informaltable><tgroup cols="2"><tbody><row><entry
1632 align="char">
1633<para>int fd</para>
1634</entry><entry
1635 align="char">
1636<para>File descriptor returned by a previous call to open().</para>
1637</entry>
1638 </row><row><entry
1639 align="char">
1640<para>int request</para>
1641</entry><entry
1642 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001643<para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001644</entry>
1645 </row><row><entry
1646 align="char">
1647<para>fe_sec_tone_mode_t
1648 tone</para>
1649</entry><entry
1650 align="char">
1651<para>The requested tone generation mode (on/off).</para>
1652</entry>
1653 </row></tbody></tgroup></informaltable>
1654<para>ERRORS
1655</para>
1656<informaltable><tgroup cols="2"><tbody><row><entry
1657 align="char">
1658<para>ENODEV</para>
1659</entry><entry
1660 align="char">
1661<para>Device driver not loaded/available.</para>
1662</entry>
1663 </row><row><entry
1664 align="char">
1665<para>EBUSY</para>
1666</entry><entry
1667 align="char">
1668<para>Device or resource busy.</para>
1669</entry>
1670 </row><row><entry
1671 align="char">
1672<para>EINVAL</para>
1673</entry><entry
1674 align="char">
1675<para>Invalid argument.</para>
1676</entry>
1677 </row><row><entry
1678 align="char">
1679<para>EPERM</para>
1680</entry><entry
1681 align="char">
1682<para>File not opened with read permissions.</para>
1683</entry>
1684 </row><row><entry
1685 align="char">
1686<para>EINTERNAL</para>
1687</entry><entry
1688 align="char">
1689<para>Internal error in the device driver.</para>
1690</entry>
1691</row></tbody></tgroup></informaltable>
1692</section>
1693
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001694<section id="FE_SET_VOLTAGE">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001695<title>FE_SET_VOLTAGE</title>
1696<para>DESCRIPTION
1697</para>
1698<informaltable><tgroup cols="1"><tbody><row><entry
1699 align="char">
1700<para>This call is used to set the bus voltage. This call requires read/write
1701 permissions.</para>
1702</entry>
1703 </row></tbody></tgroup></informaltable>
1704<para>SYNOPSIS
1705</para>
1706<informaltable><tgroup cols="1"><tbody><row><entry
1707 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001708<para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001709 fe_sec_voltage_t voltage);</para>
1710</entry>
1711 </row></tbody></tgroup></informaltable>
1712
1713<para>PARAMETERS
1714</para>
1715<informaltable><tgroup cols="2"><tbody><row><entry
1716 align="char">
1717<para>int fd</para>
1718</entry><entry
1719 align="char">
1720<para>File descriptor returned by a previous call to open().</para>
1721</entry>
1722 </row><row><entry
1723 align="char">
1724<para>int request</para>
1725</entry><entry
1726 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001727<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001728</entry>
1729 </row><row><entry
1730 align="char">
1731<para>fe_sec_voltage_t
1732 voltage</para>
1733</entry><entry
1734 align="char">
1735<para>The requested bus voltage.</para>
1736</entry>
1737 </row></tbody></tgroup></informaltable>
1738
1739<para>ERRORS
1740</para>
1741<informaltable><tgroup cols="2"><tbody><row><entry
1742 align="char">
1743<para>ENODEV</para>
1744</entry><entry
1745 align="char">
1746<para>Device driver not loaded/available.</para>
1747</entry>
1748 </row><row><entry
1749 align="char">
1750<para>EBUSY</para>
1751</entry><entry
1752 align="char">
1753<para>Device or resource busy.</para>
1754</entry>
1755 </row><row><entry
1756 align="char">
1757<para>EINVAL</para>
1758</entry><entry
1759 align="char">
1760<para>Invalid argument.</para>
1761</entry>
1762 </row><row><entry
1763 align="char">
1764<para>EPERM</para>
1765</entry><entry
1766 align="char">
1767<para>File not opened with read permissions.</para>
1768</entry>
1769 </row><row><entry
1770 align="char">
1771<para>EINTERNAL</para>
1772</entry><entry
1773 align="char">
1774<para>Internal error in the device driver.</para>
1775</entry>
1776 </row></tbody></tgroup></informaltable>
1777</section>
1778
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001779<section id="FE_ENABLE_HIGH_LNB_VOLTAGE">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001780<title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>
1781<para>DESCRIPTION
1782</para>
1783<informaltable><tgroup cols="1"><tbody><row><entry
1784 align="char">
1785<para>If high != 0 enables slightly higher voltages instead of 13/18V (to compensate
1786 for long cables). This call requires read/write permissions. Not all DVB
1787 adapters support this ioctl.</para>
1788</entry>
1789 </row></tbody></tgroup></informaltable>
1790
1791<para>SYNOPSIS
1792</para>
1793<informaltable><tgroup cols="1"><tbody><row><entry
1794 align="char">
1795<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001796 <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001797</entry>
1798 </row></tbody></tgroup></informaltable>
1799
1800<para>PARAMETERS
1801</para>
1802<informaltable><tgroup cols="2"><tbody><row><entry
1803 align="char">
1804<para>int fd</para>
1805</entry><entry
1806 align="char">
1807<para>File descriptor returned by a previous call to open().</para>
1808</entry>
1809 </row><row><entry
1810 align="char">
1811<para>int request</para>
1812</entry><entry
1813 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001814<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001815</entry>
1816 </row><row><entry
1817 align="char">
1818<para>int high</para>
1819</entry><entry
1820 align="char">
1821<para>The requested bus voltage.</para>
1822</entry>
1823 </row></tbody></tgroup></informaltable>
1824
1825<para>ERRORS
1826</para>
1827<informaltable><tgroup cols="2"><tbody><row><entry
1828 align="char">
1829<para>ENODEV</para>
1830</entry><entry
1831 align="char">
1832<para>Device driver not loaded/available.</para>
1833</entry>
1834 </row><row><entry
1835 align="char">
1836<para>EBUSY</para>
1837</entry><entry
1838 align="char">
1839<para>Device or resource busy.</para>
1840</entry>
1841 </row><row><entry
1842 align="char">
1843<para>EINVAL</para>
1844</entry><entry
1845 align="char">
1846<para>Invalid argument.</para>
1847</entry>
1848 </row><row><entry
1849 align="char">
1850<para>EPERM</para>
1851</entry><entry
1852 align="char">
1853<para>File not opened with read permissions.</para>
1854</entry>
1855 </row><row><entry
1856 align="char">
1857<para>EINTERNAL</para>
1858</entry><entry
1859 align="char">
1860<para>Internal error in the device driver.</para>
1861</entry>
1862 </row></tbody></tgroup></informaltable>
1863</section>
Mauro Carvalho Chehabf0964a72009-10-24 19:55:24 -03001864
1865<section id="FE_SET_FRONTEND_TUNE_MODE">
1866<title>FE_SET_FRONTEND_TUNE_MODE</title>
1867<para>DESCRIPTION</para>
1868<informaltable><tgroup cols="1"><tbody><row>
1869<entry align="char">
1870<para>Allow setting tuner mode flags to the frontend.</para>
1871</entry>
1872</row></tbody></tgroup></informaltable>
1873
1874<para>SYNOPSIS</para>
1875<informaltable><tgroup cols="1"><tbody><row>
1876<entry align="char">
1877<para>int ioctl(int fd, int request =
1878<link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>
1879</entry>
1880</row></tbody></tgroup></informaltable>
1881
1882<para>PARAMETERS</para>
1883<informaltable><tgroup cols="2"><tbody><row>
1884<entry align="char">
1885 <para>unsigned int flags</para>
1886</entry>
1887<entry align="char">
1888<para>
1889FE_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.
1890</para>
1891</entry>
1892 </row></tbody></tgroup></informaltable>
1893
1894<para>ERRORS</para>
1895<informaltable><tgroup cols="2"><tbody><row>
1896<entry align="char"><para>EINVAL</para></entry>
1897<entry align="char"><para>Invalid argument.</para></entry>
1898 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab603c0d802009-10-24 20:19:20 -03001899</section>
1900
1901<section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
1902 <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
1903<para>DESCRIPTION</para>
1904<informaltable><tgroup cols="1"><tbody><row>
1905<entry align="char">
1906<para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
1907<para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
1908<para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
1909</entry>
1910</row></tbody></tgroup></informaltable>
1911
1912<para>SYNOPSIS</para>
1913<informaltable><tgroup cols="1"><tbody><row>
1914<entry align="char">
1915<para>int ioctl(int fd, int request =
1916 <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
1917</entry>
1918</row></tbody></tgroup></informaltable>
1919
1920<para>PARAMETERS</para>
1921<informaltable><tgroup cols="2"><tbody><row>
1922<entry align="char">
1923 <para>unsigned long cmd</para>
1924</entry>
1925<entry align="char">
1926<para>
1927sends the specified raw cmd to the dish via DISEqC.
1928</para>
1929</entry>
1930 </row></tbody></tgroup></informaltable>
1931
1932<para>ERRORS</para>
1933<informaltable><tgroup cols="1"><tbody><row>
1934<entry align="char">
1935 <para>There are no errors in use for this call</para>
1936</entry>
1937</row></tbody></tgroup></informaltable>
Mauro Carvalho Chehabb8321042009-10-24 21:01:22 -03001938</section>
Mauro Carvalho Chehabf0964a72009-10-24 19:55:24 -03001939
1940</section>
Mauro Carvalho Chehab603c0d802009-10-24 20:19:20 -03001941
Mauro Carvalho Chehabb8321042009-10-24 21:01:22 -03001942&sub-dvbproperty;