blob: a925b4507cef105a08b07dd169b9f92b40c25503 [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>
265<section id="dvb-ofdm-parameters">
266<title>OFDM parameters</title>
267<para>DVB-T frontends are supported by the <constant>dvb_ofdm_parameters</constant> structure:</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300268<programlisting>
269 struct dvb_ofdm_parameters {
270 fe_bandwidth_t bandwidth;
271 fe_code_rate_t code_rate_HP; /&#x22C6; high priority stream code rate &#x22C6;/
272 fe_code_rate_t code_rate_LP; /&#x22C6; low priority stream code rate &#x22C6;/
273 fe_modulation_t constellation; /&#x22C6; modulation type (see above) &#x22C6;/
274 fe_transmit_mode_t transmission_mode;
275 fe_guard_interval_t guard_interval;
276 fe_hierarchy_t hierarchy_information;
277 };
278</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300279</section>
280<section id="dvb-vsb-parameters">
281<title>VSB parameters</title>
282<para>DVB-T frontends are supported by the <constant>dvb_vsb_parameters</constant> structure:</para>
283<programlisting>
284struct dvb_vsb_parameters {
285 fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
286};
287</programlisting>
288</section>
289<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 Chehab8e080c22009-09-13 22:16:04 -0300307<para>The possible values for the <constant>FEC_inner</constant> field are
308</para>
309<programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300310typedef enum fe_code_rate {
311 FEC_NONE = 0,
312 FEC_1_2,
313 FEC_2_3,
314 FEC_3_4,
315 FEC_4_5,
316 FEC_5_6,
317 FEC_6_7,
318 FEC_7_8,
319 FEC_8_9,
320 FEC_AUTO,
321 FEC_3_5,
322 FEC_9_10,
323} fe_code_rate_t;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300324</programlisting>
325<para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
326detection.
327</para>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300328</section>
329<section id="fe-modulation-t">
330<title>frontend modulation type for QAM and OFDM</title>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300331<para>For cable and terrestrial frontends (QAM and OFDM) one also has to specify the quadrature
332modulation mode which can be one of the following:
333</para>
334<programlisting>
335 typedef enum fe_modulation {
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300336 QPSK,
337 QAM_16,
338 QAM_32,
339 QAM_64,
340 QAM_128,
341 QAM_256,
342 QAM_AUTO,
343 VSB_8,
344 VSB_16,
345 PSK_8,
346 APSK_16,
347 APSK_32,
348 DQPSK,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300349 } fe_modulation_t;
350</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300351</section>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300352<para>Finally, there are several more parameters for OFDM:
353</para>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300354<section id="fe-transmit-mode-t">
355<title>Number of carriers per channel, on OFTM modulation</title>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300356<programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300357typedef enum fe_transmit_mode {
358 TRANSMISSION_MODE_2K,
359 TRANSMISSION_MODE_8K,
360 TRANSMISSION_MODE_AUTO,
361 TRANSMISSION_MODE_4K,
362 TRANSMISSION_MODE_1K,
363 TRANSMISSION_MODE_16K,
364 TRANSMISSION_MODE_32K,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300365 } fe_transmit_mode_t;
366</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300367</section>
368<section id="fe-bandwidth-t">
369<title>frontend bandwidth</title>
370<programlisting>
371typedef enum fe_bandwidth {
372 BANDWIDTH_8_MHZ,
373 BANDWIDTH_7_MHZ,
374 BANDWIDTH_6_MHZ,
375 BANDWIDTH_AUTO,
376 BANDWIDTH_5_MHZ,
377 BANDWIDTH_10_MHZ,
378 BANDWIDTH_1_712_MHZ,
379} fe_bandwidth_t;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300380</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300381</section>
382<section id="fe-guard-interval-t">
383<title>frontend guard inverval</title>
384<programlisting>
385typedef enum fe_guard_interval {
386 GUARD_INTERVAL_1_32,
387 GUARD_INTERVAL_1_16,
388 GUARD_INTERVAL_1_8,
389 GUARD_INTERVAL_1_4,
390 GUARD_INTERVAL_AUTO,
391 GUARD_INTERVAL_1_128,
392 GUARD_INTERVAL_19_128,
393 GUARD_INTERVAL_19_256,
394} fe_guard_interval_t;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300395</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300396</section>
397<section id="fe-hierarchy-t">
398<title>frontend hierarchy</title>
399<programlisting>
400typedef enum fe_hierarchy {
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300401 HIERARCHY_NONE,
402 HIERARCHY_1,
403 HIERARCHY_2,
404 HIERARCHY_4,
405 HIERARCHY_AUTO
406 } fe_hierarchy_t;
407</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300408</section>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300409
410</section>
411
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300412<section id="dvb-frontend-event">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300413<title>frontend events</title>
414 <programlisting>
415 struct dvb_frontend_event {
416 fe_status_t status;
417 struct dvb_frontend_parameters parameters;
418 };
419</programlisting>
420 </section>
421</section>
422
423
424<section id="frontend_fcalls">
425<title>Frontend Function Calls</title>
426
427<section id="frontend_f_open">
428<title>open()</title>
429<para>DESCRIPTION</para>
430<informaltable><tgroup cols="1"><tbody><row>
431<entry align="char">
432<para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)
433 for subsequent use. Usually the first thing to do after a successful open is to
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300434 find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300435<para>The device can be opened in read-only mode, which only allows monitoring of
436 device status and statistics, or read/write mode, which allows any kind of use
437 (e.g. performing tuning operations.)
438</para>
439<para>In a system with multiple front-ends, it is usually the case that multiple devices
440 cannot be open in read/write mode simultaneously. As long as a front-end
441 device is opened in read/write mode, other open() calls in read/write mode will
442 either fail or block, depending on whether non-blocking or blocking mode was
443 specified. A front-end device opened in blocking mode can later be put into
444 non-blocking mode (and vice versa) using the F_SETFL command of the fcntl
445 system call. This is a standard system call, documented in the Linux manual
446 page for fcntl. When an open() call has succeeded, the device will be ready
447 for use in the specified mode. This implies that the corresponding hardware is
448 powered up, and that other front-ends may have been powered down to make
449 that possible.</para>
450</entry>
451 </row></tbody></tgroup></informaltable>
452
453<para>SYNOPSIS</para>
454<informaltable><tgroup cols="1"><tbody><row><entry
455 align="char">
456<para>int open(const char &#x22C6;deviceName, int flags);</para>
457</entry>
458 </row></tbody></tgroup></informaltable>
459<para>PARAMETERS
460</para>
461<informaltable><tgroup cols="2"><tbody><row><entry
462 align="char">
463<para>const char
464 *deviceName</para>
465</entry><entry
466 align="char">
467<para>Name of specific video device.</para>
468</entry>
469 </row><row><entry
470 align="char">
471<para>int flags</para>
472</entry><entry
473 align="char">
474<para>A bit-wise OR of the following flags:</para>
475</entry>
476 </row><row><entry
477 align="char">
478</entry><entry
479 align="char">
480<para>O_RDONLY read-only access</para>
481</entry>
482 </row><row><entry
483 align="char">
484</entry><entry
485 align="char">
486<para>O_RDWR read/write access</para>
487</entry>
488 </row><row><entry
489 align="char">
490</entry><entry
491 align="char">
492<para>O_NONBLOCK open in non-blocking mode</para>
493</entry>
494 </row><row><entry
495 align="char">
496</entry><entry
497 align="char">
498<para>(blocking mode is the default)</para>
499</entry>
500 </row></tbody></tgroup></informaltable>
501<para>ERRORS
502</para>
503<informaltable><tgroup cols="2"><tbody><row><entry
504 align="char">
505<para>ENODEV</para>
506</entry><entry
507 align="char">
508<para>Device driver not loaded/available.</para>
509</entry>
510 </row><row><entry
511 align="char">
512<para>EINTERNAL</para>
513</entry><entry
514 align="char">
515<para>Internal error.</para>
516</entry>
517 </row><row><entry
518 align="char">
519<para>EBUSY</para>
520</entry><entry
521 align="char">
522<para>Device or resource busy.</para>
523</entry>
524 </row><row><entry
525 align="char">
526<para>EINVAL</para>
527</entry><entry
528 align="char">
529<para>Invalid argument.</para>
530</entry>
531 </row></tbody></tgroup></informaltable>
532</section>
533
534<section id="frontend_f_close">
535<title>close()</title>
536<para>DESCRIPTION
537</para>
538<informaltable><tgroup cols="1"><tbody><row><entry
539 align="char">
540<para>This system call closes a previously opened front-end device. After closing
541 a front-end device, its corresponding hardware might be powered down
542 automatically.</para>
543</entry>
544 </row></tbody></tgroup></informaltable>
545<para>SYNOPSIS
546</para>
547<informaltable><tgroup cols="1"><tbody><row><entry
548 align="char">
549<para>int close(int fd);</para>
550</entry>
551 </row></tbody></tgroup></informaltable>
552<para>PARAMETERS
553</para>
554<informaltable><tgroup cols="2"><tbody><row><entry
555 align="char">
556<para>int fd</para>
557</entry><entry
558 align="char">
559<para>File descriptor returned by a previous call to open().</para>
560</entry>
561 </row></tbody></tgroup></informaltable>
562<para>ERRORS
563</para>
564<informaltable><tgroup cols="2"><tbody><row><entry
565 align="char">
566<para>EBADF</para>
567</entry><entry
568 align="char">
569<para>fd is not a valid open file descriptor.</para>
570</entry>
571 </row></tbody></tgroup></informaltable>
572</section>
573
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300574<section id="FE_READ_STATUS">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300575<title>FE_READ_STATUS</title>
576<para>DESCRIPTION
577</para>
578<informaltable><tgroup cols="1"><tbody><row><entry
579 align="char">
580<para>This ioctl call returns status information about the front-end. This call only
581 requires read-only access to the device.</para>
582</entry>
583 </row></tbody></tgroup></informaltable>
584<para>SYNOPSIS
585</para>
586<informaltable><tgroup cols="1"><tbody><row><entry
587 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300588<para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300589 fe_status_t &#x22C6;status);</para>
590</entry>
591 </row></tbody></tgroup></informaltable>
592<para>PARAMETERS
593</para>
594
595<informaltable><tgroup cols="2"><tbody><row><entry
596 align="char">
597<para>int fd</para>
598</entry><entry
599 align="char">
600<para>File descriptor returned by a previous call to open().</para>
601</entry>
602 </row><row><entry
603 align="char">
604<para>int request</para>
605</entry><entry
606 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300607<para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300608</entry>
609 </row><row><entry
610 align="char">
611<para>struct fe_status_t
612 *status</para>
613</entry><entry
614 align="char">
615<para>Points to the location where the front-end status word is
616 to be stored.</para>
617</entry>
618 </row></tbody></tgroup></informaltable>
619<para>ERRORS
620</para>
621<informaltable><tgroup cols="2"><tbody><row><entry
622 align="char">
623<para>EBADF</para>
624</entry><entry
625 align="char">
626<para>fd is not a valid open file descriptor.</para>
627</entry>
628 </row><row><entry
629 align="char">
630<para>EFAULT</para>
631</entry><entry
632 align="char">
633<para>status points to invalid address.</para>
634</entry>
635 </row></tbody></tgroup></informaltable>
636</section>
637
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300638<section id="FE_READ_BER">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300639<title>FE_READ_BER</title>
640<para>DESCRIPTION
641</para>
642<informaltable><tgroup cols="1"><tbody><row><entry
643 align="char">
644<para>This ioctl call returns the bit error rate for the signal currently
645 received/demodulated by the front-end. For this command, read-only access to
646 the device is sufficient.</para>
647</entry>
648 </row></tbody></tgroup></informaltable>
649<para>SYNOPSIS
650</para>
651<informaltable><tgroup cols="1"><tbody><row><entry
652 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300653<para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300654 uint32_t &#x22C6;ber);</para>
655</entry>
656 </row></tbody></tgroup></informaltable>
657<para>PARAMETERS
658</para>
659<informaltable><tgroup cols="2"><tbody><row><entry
660 align="char">
661<para>int fd</para>
662</entry><entry
663 align="char">
664<para>File descriptor returned by a previous call to open().</para>
665</entry>
666 </row><row><entry
667 align="char">
668<para>int request</para>
669</entry><entry
670 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300671<para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300672</entry>
673 </row><row><entry
674 align="char">
675<para>uint32_t *ber</para>
676</entry><entry
677 align="char">
678<para>The bit error rate is stored into *ber.</para>
679</entry>
680 </row></tbody></tgroup></informaltable>
681<para>ERRORS
682</para>
683<informaltable><tgroup cols="2"><tbody><row><entry
684 align="char">
685<para>EBADF</para>
686</entry><entry
687 align="char">
688<para>fd is not a valid open file descriptor.</para>
689</entry>
690 </row><row><entry
691 align="char">
692<para>EFAULT</para>
693</entry><entry
694 align="char">
695<para>ber points to invalid address.</para>
696</entry>
697 </row><row><entry
698 align="char">
699<para>ENOSIGNAL</para>
700</entry><entry
701 align="char">
702<para>There is no signal, thus no meaningful bit error rate. Also
703 returned if the front-end is not turned on.</para>
704</entry>
705 </row><row><entry
706 align="char">
707<para>ENOSYS</para>
708</entry><entry
709 align="char">
710<para>Function not available for this device.</para>
711</entry>
712 </row></tbody></tgroup></informaltable>
713</section>
714
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300715<section id="FE_READ_SNR">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300716<title>FE_READ_SNR</title>
717
718<para>DESCRIPTION
719</para>
720<informaltable><tgroup cols="1"><tbody><row><entry
721 align="char">
722<para>This ioctl call returns the signal-to-noise ratio for the signal currently received
723 by the front-end. For this command, read-only access to the device is sufficient.</para>
724</entry>
725 </row></tbody></tgroup></informaltable>
726<para>SYNOPSIS
727</para>
728<informaltable><tgroup cols="1"><tbody><row><entry
729 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300730<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 -0300731 &#x22C6;snr);</para>
732</entry>
733 </row></tbody></tgroup></informaltable>
734<para>PARAMETERS
735</para>
736<informaltable><tgroup cols="2"><tbody><row><entry
737 align="char">
738<para>int fd</para>
739</entry><entry
740 align="char">
741<para>File descriptor returned by a previous call to open().</para>
742</entry>
743 </row><row><entry
744 align="char">
745<para>int request</para>
746</entry><entry
747 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300748<para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300749</entry>
750 </row><row><entry
751 align="char">
752<para>int16_t *snr</para>
753</entry><entry
754 align="char">
755<para>The signal-to-noise ratio is stored into *snr.</para>
756</entry>
757 </row></tbody></tgroup></informaltable>
758
759<para>ERRORS
760</para>
761<informaltable><tgroup cols="2"><tbody><row><entry
762 align="char">
763<para>EBADF</para>
764</entry><entry
765 align="char">
766<para>fd is not a valid open file descriptor.</para>
767</entry>
768 </row><row><entry
769 align="char">
770<para>EFAULT</para>
771</entry><entry
772 align="char">
773<para>snr points to invalid address.</para>
774</entry>
775 </row><row><entry
776 align="char">
777<para>ENOSIGNAL</para>
778</entry><entry
779 align="char">
780<para>There is no signal, thus no meaningful signal strength
781 value. Also returned if front-end is not turned on.</para>
782</entry>
783 </row><row><entry
784 align="char">
785<para>ENOSYS</para>
786</entry><entry
787 align="char">
788<para>Function not available for this device.</para>
789</entry>
790 </row></tbody></tgroup></informaltable>
791</section>
792
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300793<section id="FE_READ_SIGNAL_STRENGTH">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300794<title>FE_READ_SIGNAL_STRENGTH</title>
795<para>DESCRIPTION
796</para>
797<informaltable><tgroup cols="1"><tbody><row><entry
798 align="char">
799<para>This ioctl call returns the signal strength value for the signal currently received
800 by the front-end. For this command, read-only access to the device is sufficient.</para>
801</entry>
802 </row></tbody></tgroup></informaltable>
803<para>SYNOPSIS
804</para>
805<informaltable><tgroup cols="1"><tbody><row><entry
806 align="char">
807<para>int ioctl( int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300808 <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t &#x22C6;strength);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300809</entry>
810 </row></tbody></tgroup></informaltable>
811
812<para>PARAMETERS
813</para>
814<informaltable><tgroup cols="2"><tbody><row><entry
815 align="char">
816<para>int fd</para>
817</entry><entry
818 align="char">
819<para>File descriptor returned by a previous call to open().</para>
820</entry>
821 </row><row><entry
822 align="char">
823<para>int request</para>
824</entry><entry
825 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300826<para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300827 command.</para>
828</entry>
829 </row><row><entry
830 align="char">
831<para>int16_t *strength</para>
832</entry><entry
833 align="char">
834<para>The signal strength value is stored into *strength.</para>
835</entry>
836 </row></tbody></tgroup></informaltable>
837<para>ERRORS
838</para>
839<informaltable><tgroup cols="2"><tbody><row><entry
840 align="char">
841<para>EBADF</para>
842</entry><entry
843 align="char">
844<para>fd is not a valid open file descriptor.</para>
845</entry>
846 </row><row><entry
847 align="char">
848<para>EFAULT</para>
849</entry><entry
850 align="char">
851<para>status points to invalid address.</para>
852</entry>
853 </row><row><entry
854 align="char">
855<para>ENOSIGNAL</para>
856</entry><entry
857 align="char">
858<para>There is no signal, thus no meaningful signal strength
859 value. Also returned if front-end is not turned on.</para>
860</entry>
861 </row><row><entry
862 align="char">
863<para>ENOSYS</para>
864</entry><entry
865 align="char">
866<para>Function not available for this device.</para>
867</entry>
868 </row></tbody></tgroup></informaltable>
869</section>
870
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300871<section id="FE_READ_UNCORRECTED_BLOCKS">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300872<title>FE_READ_UNCORRECTED_BLOCKS</title>
873<para>DESCRIPTION
874</para>
875<informaltable><tgroup cols="1"><tbody><row><entry
876 align="char">
877<para>This ioctl call returns the number of uncorrected blocks detected by the device
878 driver during its lifetime. For meaningful measurements, the increment in block
879 count during a specific time interval should be calculated. For this command,
880 read-only access to the device is sufficient.</para>
881</entry>
882 </row><row><entry
883 align="char">
884<para>Note that the counter will wrap to zero after its maximum count has been
885 reached.</para>
886</entry>
887 </row></tbody></tgroup></informaltable>
888<para>SYNOPSIS
889</para>
890<informaltable><tgroup cols="1"><tbody><row><entry
891 align="char">
892<para>int ioctl( int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300893 <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t &#x22C6;ublocks);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300894</entry>
895 </row></tbody></tgroup></informaltable>
896<para>PARAMETERS
897</para>
898<informaltable><tgroup cols="2"><tbody><row><entry
899 align="char">
900<para>int fd</para>
901</entry><entry
902 align="char">
903<para>File descriptor returned by a previous call to open().</para>
904</entry>
905 </row><row><entry
906 align="char">
907<para>int request</para>
908</entry><entry
909 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300910<para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300911 command.</para>
912</entry>
913 </row><row><entry
914 align="char">
915<para>uint32_t *ublocks</para>
916</entry><entry
917 align="char">
918<para>The total number of uncorrected blocks seen by the driver
919 so far.</para>
920</entry>
921 </row></tbody></tgroup></informaltable>
922<para>ERRORS
923</para>
924<informaltable><tgroup cols="2"><tbody><row><entry
925 align="char">
926<para>EBADF</para>
927</entry><entry
928 align="char">
929<para>fd is not a valid open file descriptor.</para>
930</entry>
931 </row><row><entry
932 align="char">
933<para>EFAULT</para>
934</entry><entry
935 align="char">
936<para>ublocks points to invalid address.</para>
937</entry>
938 </row><row><entry
939 align="char">
940<para>ENOSYS</para>
941</entry><entry
942 align="char">
943<para>Function not available for this device.</para>
944</entry>
945 </row></tbody></tgroup></informaltable>
946</section>
947
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300948<section id="FE_SET_FRONTEND">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300949<title>FE_SET_FRONTEND</title>
950<para>DESCRIPTION
951</para>
952<informaltable><tgroup cols="1"><tbody><row><entry
953 align="char">
954<para>This ioctl call starts a tuning operation using specified parameters. The result
955 of this call will be successful if the parameters were valid and the tuning could
956 be initiated. The result of the tuning operation in itself, however, will arrive
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300957 asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
958 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 -0300959 the previous one was completed, the previous operation will be aborted in favor
960 of the new one. This command requires read/write access to the device.</para>
961</entry>
962 </row></tbody></tgroup></informaltable>
963
964<para>SYNOPSIS
965</para>
966<informaltable><tgroup cols="1"><tbody><row><entry
967 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300968<para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300969 struct dvb_frontend_parameters &#x22C6;p);</para>
970</entry>
971 </row></tbody></tgroup></informaltable>
972<para>PARAMETERS
973</para>
974<informaltable><tgroup cols="2"><tbody><row><entry
975 align="char">
976<para>int fd</para>
977</entry><entry
978 align="char">
979<para>File descriptor returned by a previous call to open().</para>
980</entry>
981 </row><row><entry
982 align="char">
983<para>int request</para>
984</entry><entry
985 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300986<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300987</entry>
988 </row><row><entry
989 align="char">
990<para>struct
991 dvb_frontend_parameters
992 *p</para>
993</entry><entry
994 align="char">
995<para>Points to parameters for tuning operation.</para>
996</entry>
997 </row></tbody></tgroup></informaltable>
998<para>ERRORS
999</para>
1000<informaltable><tgroup cols="2"><tbody><row><entry
1001 align="char">
1002<para>EBADF</para>
1003</entry><entry
1004 align="char">
1005<para>fd is not a valid open file descriptor.</para>
1006</entry>
1007 </row><row><entry
1008 align="char">
1009<para>EFAULT</para>
1010</entry><entry
1011 align="char">
1012<para>p points to invalid address.</para>
1013</entry>
1014 </row><row><entry
1015 align="char">
1016<para>EINVAL</para>
1017</entry><entry
1018 align="char">
1019<para>Maximum supported symbol rate reached.</para>
1020</entry>
1021</row></tbody></tgroup></informaltable>
1022</section>
1023
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001024<section id="FE_GET_FRONTEND">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001025<title>FE_GET_FRONTEND</title>
1026<para>DESCRIPTION
1027</para>
1028<informaltable><tgroup cols="1"><tbody><row><entry
1029 align="char">
1030<para>This ioctl call queries the currently effective frontend parameters. For this
1031 command, read-only access to the device is sufficient.</para>
1032</entry>
1033 </row></tbody></tgroup></informaltable>
1034
1035<para>SYNOPSIS
1036</para>
1037<informaltable><tgroup cols="1"><tbody><row><entry
1038 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001039<para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001040 struct dvb_frontend_parameters &#x22C6;p);</para>
1041</entry>
1042 </row></tbody></tgroup></informaltable>
1043
1044<para>PARAMETERS
1045</para>
1046<informaltable><tgroup cols="2"><tbody><row><entry
1047 align="char">
1048<para>int fd</para>
1049</entry><entry
1050 align="char">
1051<para>File descriptor returned by a previous call to open().</para>
1052</entry>
1053 </row><row><entry
1054 align="char">
1055<para>int request</para>
1056</entry><entry
1057 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001058<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001059</entry>
1060 </row><row><entry
1061 align="char">
1062<para>struct
1063 dvb_frontend_parameters
1064 *p</para>
1065</entry><entry
1066 align="char">
1067<para>Points to parameters for tuning operation.</para>
1068</entry>
1069 </row></tbody></tgroup></informaltable>
1070
1071<para>ERRORS
1072</para>
1073
1074<informaltable><tgroup cols="2"><tbody><row><entry
1075 align="char">
1076<para>EBADF</para>
1077</entry><entry
1078 align="char">
1079<para>fd is not a valid open file descriptor.</para>
1080</entry>
1081 </row><row><entry
1082 align="char">
1083<para>EFAULT</para>
1084</entry><entry
1085 align="char">
1086<para>p points to invalid address.</para>
1087</entry>
1088 </row><row><entry
1089 align="char">
1090<para>EINVAL</para>
1091</entry><entry
1092 align="char">
1093<para>Maximum supported symbol rate reached.</para>
1094</entry>
1095 </row></tbody></tgroup></informaltable>
1096
1097</section>
1098
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001099<section id="FE_GET_EVENT">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001100<title>FE_GET_EVENT</title>
1101<para>DESCRIPTION
1102</para>
1103<informaltable><tgroup cols="1"><tbody><row><entry
1104 align="char">
1105<para>This ioctl call returns a frontend event if available. If an event is not
1106 available, the behavior depends on whether the device is in blocking or
1107 non-blocking mode. In the latter case, the call fails immediately with errno
1108 set to EWOULDBLOCK. In the former case, the call blocks until an event
1109 becomes available.</para>
1110</entry>
1111 </row><row><entry
1112 align="char">
1113<para>The standard Linux poll() and/or select() system calls can be used with the
1114 device file descriptor to watch for new events. For select(), the file descriptor
1115 should be included in the exceptfds argument, and for poll(), POLLPRI should
1116 be specified as the wake-up condition. Since the event queue allocated is
1117 rather small (room for 8 events), the queue must be serviced regularly to avoid
1118 overflow. If an overflow happens, the oldest event is discarded from the queue,
1119 and an error (EOVERFLOW) occurs the next time the queue is read. After
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001120 reporting the error condition in this fashion, subsequent
1121 <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001122 calls will return events from the queue as usual.</para>
1123</entry>
1124 </row><row><entry
1125 align="char">
1126<para>For the sake of implementation simplicity, this command requires read/write
1127 access to the device.</para>
1128</entry>
1129 </row></tbody></tgroup></informaltable>
1130
1131<para>SYNOPSIS
1132</para>
1133<informaltable><tgroup cols="1"><tbody><row><entry
1134 align="char">
1135<para>int ioctl(int fd, int request = QPSK_GET_EVENT,
1136 struct dvb_frontend_event &#x22C6;ev);</para>
1137</entry>
1138 </row></tbody></tgroup></informaltable>
1139
1140<para>PARAMETERS
1141</para>
1142<informaltable><tgroup cols="2"><tbody><row><entry
1143 align="char">
1144<para>int fd</para>
1145</entry><entry
1146 align="char">
1147<para>File descriptor returned by a previous call to open().</para>
1148</entry>
1149 </row><row><entry
1150 align="char">
1151<para>int request</para>
1152</entry><entry
1153 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001154<para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001155</entry>
1156 </row><row><entry
1157 align="char">
1158<para>struct
1159 dvb_frontend_event
1160 *ev</para>
1161</entry><entry
1162 align="char">
1163<para>Points to the location where the event,</para>
1164</entry>
1165 </row><row><entry
1166 align="char">
1167</entry><entry
1168 align="char">
1169<para>if any, is to be stored.</para>
1170</entry>
1171 </row></tbody></tgroup></informaltable>
1172
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>ev points to invalid address.</para>
1188</entry>
1189 </row><row><entry
1190 align="char">
1191<para>EWOULDBLOCK</para>
1192</entry><entry
1193 align="char">
1194<para>There is no event pending, and the device is in
1195 non-blocking mode.</para>
1196</entry>
1197 </row><row><entry
1198 align="char">
1199<para>EOVERFLOW</para>
1200</entry><entry
1201 align="char">
1202</entry>
1203 </row><row><entry
1204 align="char">
1205</entry><entry
1206 align="char">
1207<para>Overflow in event queue - one or more events were lost.</para>
1208</entry>
1209</row></tbody></tgroup></informaltable>
1210</section>
1211
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001212<section id="FE_GET_INFO">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001213<title>FE_GET_INFO</title>
1214<para>DESCRIPTION
1215</para>
1216<informaltable><tgroup cols="1"><tbody><row><entry
1217 align="char">
1218<para>This ioctl call returns information about the front-end. This call only requires
1219 read-only access to the device.</para>
1220</entry>
1221 </row></tbody></tgroup></informaltable>
1222<para>SYNOPSIS
1223</para>
1224
1225<informaltable><tgroup cols="1"><tbody><row><entry
1226 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001227<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 -03001228 dvb_frontend_info &#x22C6;info);</para>
1229</entry>
1230 </row></tbody></tgroup></informaltable>
1231<para>PARAMETERS
1232</para>
1233
1234<informaltable><tgroup cols="2"><tbody><row><entry
1235 align="char">
1236<para>int fd</para>
1237</entry><entry
1238 align="char">
1239<para>File descriptor returned by a previous call to open().</para>
1240</entry>
1241 </row><row><entry
1242 align="char">
1243<para>int request</para>
1244</entry><entry
1245 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001246<para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001247</entry>
1248 </row><row><entry
1249 align="char">
1250<para>struct
1251 dvb_frontend_info
1252 *info</para>
1253</entry><entry
1254 align="char">
1255<para>Points to the location where the front-end information is
1256 to be stored.</para>
1257</entry>
1258 </row></tbody></tgroup></informaltable>
1259<para>ERRORS
1260</para>
1261<informaltable><tgroup cols="2"><tbody><row><entry
1262 align="char">
1263<para>EBADF</para>
1264</entry><entry
1265 align="char">
1266<para>fd is not a valid open file descriptor.</para>
1267</entry>
1268 </row><row><entry
1269 align="char">
1270<para>EFAULT</para>
1271</entry><entry
1272 align="char">
1273<para>info points to invalid address.</para>
1274</entry>
1275</row></tbody></tgroup></informaltable>
1276</section>
1277
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001278<section id="FE_DISEQC_RESET_OVERLOAD">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001279<title>FE_DISEQC_RESET_OVERLOAD</title>
1280<para>DESCRIPTION
1281</para>
1282<informaltable><tgroup cols="1"><tbody><row><entry
1283 align="char">
1284<para>If the bus has been automatically powered off due to power overload, this ioctl
1285 call restores the power to the bus. The call requires read/write access to the
1286 device. This call has no effect if the device is manually powered off. Not all
1287 DVB adapters support this ioctl.</para>
1288</entry>
1289 </row></tbody></tgroup></informaltable>
1290
1291<para>SYNOPSIS
1292</para>
1293<informaltable><tgroup cols="1"><tbody><row><entry
1294 align="char">
1295<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001296 <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001297</entry>
1298 </row></tbody></tgroup></informaltable>
1299<para>PARAMETERS
1300</para>
1301<informaltable><tgroup cols="2"><tbody><row><entry
1302 align="char">
1303<para>int fd</para>
1304</entry><entry
1305 align="char">
1306<para>File descriptor returned by a previous call to open().</para>
1307</entry>
1308 </row><row><entry
1309 align="char">
1310<para>int request</para>
1311</entry><entry
1312 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001313<para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001314 command.</para>
1315</entry>
1316 </row></tbody></tgroup></informaltable>
1317
1318<para>ERRORS
1319</para>
1320<informaltable><tgroup cols="2"><tbody><row><entry
1321 align="char">
1322<para>EBADF</para>
1323</entry><entry
1324 align="char">
1325<para>fd is not a valid file descriptor.</para>
1326</entry>
1327 </row><row><entry
1328 align="char">
1329<para>EPERM</para>
1330</entry><entry
1331 align="char">
1332<para>Permission denied (needs read/write access).</para>
1333</entry>
1334 </row><row><entry
1335 align="char">
1336<para>EINTERNAL</para>
1337</entry><entry
1338 align="char">
1339<para>Internal error in the device driver.</para>
1340</entry>
1341</row></tbody></tgroup></informaltable>
1342</section>
1343
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001344<section id="FE_DISEQC_SEND_MASTER_CMD">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001345<title>FE_DISEQC_SEND_MASTER_CMD</title>
1346<para>DESCRIPTION
1347</para>
1348<informaltable><tgroup cols="1"><tbody><row><entry
1349 align="char">
1350<para>This ioctl call is used to send a a DiSEqC command.</para>
1351</entry>
1352 </row></tbody></tgroup></informaltable>
1353<para>SYNOPSIS
1354</para>
1355<informaltable><tgroup cols="1"><tbody><row><entry
1356 align="char">
1357<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001358 <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001359 dvb_diseqc_master_cmd &#x22C6;cmd);</para>
1360</entry>
1361 </row></tbody></tgroup></informaltable>
1362
1363<para>PARAMETERS
1364</para>
1365<informaltable><tgroup cols="2"><tbody><row><entry
1366 align="char">
1367<para>int fd</para>
1368</entry><entry
1369 align="char">
1370<para>File descriptor returned by a previous call to open().</para>
1371</entry>
1372 </row><row><entry
1373 align="char">
1374<para>int request</para>
1375</entry><entry
1376 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001377<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 -03001378 command.</para>
1379</entry>
1380 </row><row><entry
1381 align="char">
1382<para>struct
1383 dvb_diseqc_master_cmd
1384 *cmd</para>
1385</entry><entry
1386 align="char">
1387<para>Pointer to the command to be transmitted.</para>
1388</entry>
1389 </row></tbody></tgroup></informaltable>
1390
1391<para>ERRORS
1392</para>
1393<informaltable><tgroup cols="2"><tbody><row><entry
1394 align="char">
1395<para>EBADF</para>
1396</entry><entry
1397 align="char">
1398<para>fd is not a valid file descriptor.</para>
1399</entry>
1400 </row><row><entry
1401 align="char">
1402<para>EFAULT</para>
1403</entry><entry
1404 align="char">
1405<para>Seq points to an invalid address.</para>
1406</entry>
1407 </row><row><entry
1408 align="char">
1409<para>EINVAL</para>
1410</entry><entry
1411 align="char">
1412<para>The data structure referred to by seq is invalid in some
1413 way.</para>
1414</entry>
1415 </row><row><entry
1416 align="char">
1417<para>EPERM</para>
1418</entry><entry
1419 align="char">
1420<para>Permission denied (needs read/write access).</para>
1421</entry>
1422 </row><row><entry
1423 align="char">
1424<para>EINTERNAL</para>
1425</entry><entry
1426 align="char">
1427<para>Internal error in the device driver.</para>
1428</entry>
1429</row></tbody></tgroup></informaltable>
1430</section>
1431
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001432<section id="FE_DISEQC_RECV_SLAVE_REPLY">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001433<title>FE_DISEQC_RECV_SLAVE_REPLY</title>
1434<para>DESCRIPTION
1435</para>
1436<informaltable><tgroup cols="1"><tbody><row><entry
1437 align="char">
1438<para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>
1439</entry>
1440 </row></tbody></tgroup></informaltable>
1441
1442<para>SYNOPSIS
1443</para>
1444<informaltable><tgroup cols="1"><tbody><row><entry
1445 align="char">
1446<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001447 <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001448 dvb_diseqc_slave_reply &#x22C6;reply);</para>
1449</entry>
1450 </row></tbody></tgroup></informaltable>
1451
1452<para>PARAMETERS
1453</para>
1454<informaltable><tgroup cols="2"><tbody><row><entry
1455 align="char">
1456<para>int fd</para>
1457</entry><entry
1458 align="char">
1459<para>File descriptor returned by a previous call to open().</para>
1460</entry>
1461 </row><row><entry
1462 align="char">
1463<para>int request</para>
1464</entry><entry
1465 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001466<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 -03001467 command.</para>
1468</entry>
1469 </row><row><entry
1470 align="char">
1471<para>struct
1472 dvb_diseqc_slave_reply
1473 *reply</para>
1474</entry><entry
1475 align="char">
1476<para>Pointer to the command to be received.</para>
1477</entry>
1478 </row></tbody></tgroup></informaltable>
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
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001520<section id="FE_DISEQC_SEND_BURST">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001521<title>FE_DISEQC_SEND_BURST</title>
1522<para>DESCRIPTION
1523</para>
1524<informaltable><tgroup cols="1"><tbody><row><entry
1525 align="char">
1526<para>This ioctl call is used to send a 22KHz tone burst.</para>
1527</entry>
1528 </row></tbody></tgroup></informaltable>
1529
1530<para>SYNOPSIS
1531</para>
1532<informaltable><tgroup cols="1"><tbody><row><entry
1533 align="char">
1534<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001535 <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 -03001536</entry>
1537 </row></tbody></tgroup></informaltable>
1538
1539<para>PARAMETERS
1540</para>
1541<informaltable><tgroup cols="2"><tbody><row><entry
1542 align="char">
1543<para>int fd</para>
1544</entry><entry
1545 align="char">
1546<para>File descriptor returned by a previous call to open().</para>
1547</entry>
1548 </row><row><entry
1549 align="char">
1550<para>int request</para>
1551</entry><entry
1552 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001553<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 -03001554</entry>
1555 </row><row><entry
1556 align="char">
1557<para>fe_sec_mini_cmd_t
1558 burst</para>
1559</entry><entry
1560 align="char">
1561<para>burst A or B.</para>
1562</entry>
1563 </row></tbody></tgroup></informaltable>
1564
1565<para>ERRORS
1566</para>
1567<informaltable><tgroup cols="2"><tbody><row><entry
1568 align="char">
1569<para>EBADF</para>
1570</entry><entry
1571 align="char">
1572<para>fd is not a valid file descriptor.</para>
1573</entry>
1574 </row><row><entry
1575 align="char">
1576<para>EFAULT</para>
1577</entry><entry
1578 align="char">
1579<para>Seq points to an invalid address.</para>
1580</entry>
1581 </row><row><entry
1582 align="char">
1583<para>EINVAL</para>
1584</entry><entry
1585 align="char">
1586<para>The data structure referred to by seq is invalid in some
1587 way.</para>
1588</entry>
1589 </row><row><entry
1590 align="char">
1591<para>EPERM</para>
1592</entry><entry
1593 align="char">
1594<para>Permission denied (needs read/write access).</para>
1595</entry>
1596 </row><row><entry
1597 align="char">
1598<para>EINTERNAL</para>
1599</entry><entry
1600 align="char">
1601<para>Internal error in the device driver.</para>
1602</entry>
1603</row></tbody></tgroup></informaltable>
1604</section>
1605
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001606<section id="FE_SET_TONE">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001607<title>FE_SET_TONE</title>
1608<para>DESCRIPTION
1609</para>
1610<informaltable><tgroup cols="1"><tbody><row><entry
1611 align="char">
1612<para>This call is used to set the generation of the continuous 22kHz tone. This call
1613 requires read/write permissions.</para>
1614</entry>
1615 </row></tbody></tgroup></informaltable>
1616<para>SYNOPSIS
1617</para>
1618<informaltable><tgroup cols="1"><tbody><row><entry
1619 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001620<para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001621 fe_sec_tone_mode_t tone);</para>
1622</entry>
1623 </row></tbody></tgroup></informaltable>
1624<para>PARAMETERS
1625</para>
1626<informaltable><tgroup cols="2"><tbody><row><entry
1627 align="char">
1628<para>int fd</para>
1629</entry><entry
1630 align="char">
1631<para>File descriptor returned by a previous call to open().</para>
1632</entry>
1633 </row><row><entry
1634 align="char">
1635<para>int request</para>
1636</entry><entry
1637 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001638<para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001639</entry>
1640 </row><row><entry
1641 align="char">
1642<para>fe_sec_tone_mode_t
1643 tone</para>
1644</entry><entry
1645 align="char">
1646<para>The requested tone generation mode (on/off).</para>
1647</entry>
1648 </row></tbody></tgroup></informaltable>
1649<para>ERRORS
1650</para>
1651<informaltable><tgroup cols="2"><tbody><row><entry
1652 align="char">
1653<para>ENODEV</para>
1654</entry><entry
1655 align="char">
1656<para>Device driver not loaded/available.</para>
1657</entry>
1658 </row><row><entry
1659 align="char">
1660<para>EBUSY</para>
1661</entry><entry
1662 align="char">
1663<para>Device or resource busy.</para>
1664</entry>
1665 </row><row><entry
1666 align="char">
1667<para>EINVAL</para>
1668</entry><entry
1669 align="char">
1670<para>Invalid argument.</para>
1671</entry>
1672 </row><row><entry
1673 align="char">
1674<para>EPERM</para>
1675</entry><entry
1676 align="char">
1677<para>File not opened with read permissions.</para>
1678</entry>
1679 </row><row><entry
1680 align="char">
1681<para>EINTERNAL</para>
1682</entry><entry
1683 align="char">
1684<para>Internal error in the device driver.</para>
1685</entry>
1686</row></tbody></tgroup></informaltable>
1687</section>
1688
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001689<section id="FE_SET_VOLTAGE">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001690<title>FE_SET_VOLTAGE</title>
1691<para>DESCRIPTION
1692</para>
1693<informaltable><tgroup cols="1"><tbody><row><entry
1694 align="char">
1695<para>This call is used to set the bus voltage. This call requires read/write
1696 permissions.</para>
1697</entry>
1698 </row></tbody></tgroup></informaltable>
1699<para>SYNOPSIS
1700</para>
1701<informaltable><tgroup cols="1"><tbody><row><entry
1702 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001703<para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001704 fe_sec_voltage_t voltage);</para>
1705</entry>
1706 </row></tbody></tgroup></informaltable>
1707
1708<para>PARAMETERS
1709</para>
1710<informaltable><tgroup cols="2"><tbody><row><entry
1711 align="char">
1712<para>int fd</para>
1713</entry><entry
1714 align="char">
1715<para>File descriptor returned by a previous call to open().</para>
1716</entry>
1717 </row><row><entry
1718 align="char">
1719<para>int request</para>
1720</entry><entry
1721 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001722<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001723</entry>
1724 </row><row><entry
1725 align="char">
1726<para>fe_sec_voltage_t
1727 voltage</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
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001774<section id="FE_ENABLE_HIGH_LNB_VOLTAGE">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001775<title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>
1776<para>DESCRIPTION
1777</para>
1778<informaltable><tgroup cols="1"><tbody><row><entry
1779 align="char">
1780<para>If high != 0 enables slightly higher voltages instead of 13/18V (to compensate
1781 for long cables). This call requires read/write permissions. Not all DVB
1782 adapters support this ioctl.</para>
1783</entry>
1784 </row></tbody></tgroup></informaltable>
1785
1786<para>SYNOPSIS
1787</para>
1788<informaltable><tgroup cols="1"><tbody><row><entry
1789 align="char">
1790<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001791 <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001792</entry>
1793 </row></tbody></tgroup></informaltable>
1794
1795<para>PARAMETERS
1796</para>
1797<informaltable><tgroup cols="2"><tbody><row><entry
1798 align="char">
1799<para>int fd</para>
1800</entry><entry
1801 align="char">
1802<para>File descriptor returned by a previous call to open().</para>
1803</entry>
1804 </row><row><entry
1805 align="char">
1806<para>int request</para>
1807</entry><entry
1808 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001809<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001810</entry>
1811 </row><row><entry
1812 align="char">
1813<para>int high</para>
1814</entry><entry
1815 align="char">
1816<para>The requested bus voltage.</para>
1817</entry>
1818 </row></tbody></tgroup></informaltable>
1819
1820<para>ERRORS
1821</para>
1822<informaltable><tgroup cols="2"><tbody><row><entry
1823 align="char">
1824<para>ENODEV</para>
1825</entry><entry
1826 align="char">
1827<para>Device driver not loaded/available.</para>
1828</entry>
1829 </row><row><entry
1830 align="char">
1831<para>EBUSY</para>
1832</entry><entry
1833 align="char">
1834<para>Device or resource busy.</para>
1835</entry>
1836 </row><row><entry
1837 align="char">
1838<para>EINVAL</para>
1839</entry><entry
1840 align="char">
1841<para>Invalid argument.</para>
1842</entry>
1843 </row><row><entry
1844 align="char">
1845<para>EPERM</para>
1846</entry><entry
1847 align="char">
1848<para>File not opened with read permissions.</para>
1849</entry>
1850 </row><row><entry
1851 align="char">
1852<para>EINTERNAL</para>
1853</entry><entry
1854 align="char">
1855<para>Internal error in the device driver.</para>
1856</entry>
1857 </row></tbody></tgroup></informaltable>
1858</section>
Mauro Carvalho Chehabf0964a72009-10-24 19:55:24 -03001859
1860<section id="FE_SET_FRONTEND_TUNE_MODE">
1861<title>FE_SET_FRONTEND_TUNE_MODE</title>
1862<para>DESCRIPTION</para>
1863<informaltable><tgroup cols="1"><tbody><row>
1864<entry align="char">
1865<para>Allow setting tuner mode flags to the frontend.</para>
1866</entry>
1867</row></tbody></tgroup></informaltable>
1868
1869<para>SYNOPSIS</para>
1870<informaltable><tgroup cols="1"><tbody><row>
1871<entry align="char">
1872<para>int ioctl(int fd, int request =
1873<link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>
1874</entry>
1875</row></tbody></tgroup></informaltable>
1876
1877<para>PARAMETERS</para>
1878<informaltable><tgroup cols="2"><tbody><row>
1879<entry align="char">
1880 <para>unsigned int flags</para>
1881</entry>
1882<entry align="char">
1883<para>
1884FE_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.
1885</para>
1886</entry>
1887 </row></tbody></tgroup></informaltable>
1888
1889<para>ERRORS</para>
1890<informaltable><tgroup cols="2"><tbody><row>
1891<entry align="char"><para>EINVAL</para></entry>
1892<entry align="char"><para>Invalid argument.</para></entry>
1893 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab603c0d802009-10-24 20:19:20 -03001894</section>
1895
1896<section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
1897 <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
1898<para>DESCRIPTION</para>
1899<informaltable><tgroup cols="1"><tbody><row>
1900<entry align="char">
1901<para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
1902<para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
1903<para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
1904</entry>
1905</row></tbody></tgroup></informaltable>
1906
1907<para>SYNOPSIS</para>
1908<informaltable><tgroup cols="1"><tbody><row>
1909<entry align="char">
1910<para>int ioctl(int fd, int request =
1911 <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
1912</entry>
1913</row></tbody></tgroup></informaltable>
1914
1915<para>PARAMETERS</para>
1916<informaltable><tgroup cols="2"><tbody><row>
1917<entry align="char">
1918 <para>unsigned long cmd</para>
1919</entry>
1920<entry align="char">
1921<para>
1922sends the specified raw cmd to the dish via DISEqC.
1923</para>
1924</entry>
1925 </row></tbody></tgroup></informaltable>
1926
1927<para>ERRORS</para>
1928<informaltable><tgroup cols="1"><tbody><row>
1929<entry align="char">
1930 <para>There are no errors in use for this call</para>
1931</entry>
1932</row></tbody></tgroup></informaltable>
Mauro Carvalho Chehabb8321042009-10-24 21:01:22 -03001933</section>
Mauro Carvalho Chehabf0964a72009-10-24 19:55:24 -03001934
1935</section>
Mauro Carvalho Chehab603c0d802009-10-24 20:19:20 -03001936
Mauro Carvalho Chehabb8321042009-10-24 21:01:22 -03001937&sub-dvbproperty;