blob: c5a5cb4051be3cc44197be43eefc18bba6c38d9f [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>
Mauro Carvalho Chehab3272c3e2011-06-07 21:40:22 -0300143<section role="subsection" id="dvb-diseqc-slave-reply">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300144<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
Mauro Carvalho Chehabdf2692a2011-06-07 20:43:25 -0300224the kind of hardware you are using.</para>
225<para>The struct <constant>dvb_frontend_parameters</constant> uses an
226union with specific per-system parameters. However, as newer delivery systems
227required more data, the structure size weren't enough to fit, and just
228extending its size would break the existing applications. So, those parameters
229were replaced by the usage of <link linkend="FE_GET_SET_PROPERTY">
230<constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> ioctl's. The
231new API is flexible enough to add new parameters to existing delivery systems,
232and to add newer delivery systems.</para>
233<para>So, newer applications should use <link linkend="FE_GET_SET_PROPERTY">
234<constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> instead, in
235order to be able to support the newer System Delivery like DVB-S2, DVB-T2,
236DVB-C2, ISDB, etc.</para>
237<para>All kinds of parameters are combined as an union in the FrontendParameters structure:</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300238<programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300239struct dvb_frontend_parameters {
240 uint32_t frequency; /&#x22C6; (absolute) frequency in Hz for QAM/OFDM &#x22C6;/
241 /&#x22C6; intermediate frequency in kHz for QPSK &#x22C6;/
242 fe_spectral_inversion_t inversion;
243 union {
244 struct dvb_qpsk_parameters qpsk;
245 struct dvb_qam_parameters qam;
246 struct dvb_ofdm_parameters ofdm;
247 struct dvb_vsb_parameters vsb;
248 } u;
249};
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300250</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300251<para>In the case of QPSK frontends the <constant>frequency</constant> field specifies the intermediate
252frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
253the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
254OFDM frontends the <constant>frequency</constant> specifies the absolute frequency and is given in Hz.
255</para>
256<section id="dvb-qpsk-parameters">
257<title>QPSK parameters</title>
258<para>For satellite QPSK frontends you have to use the <constant>dvb_qpsk_parameters</constant> structure:</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300259<programlisting>
260 struct dvb_qpsk_parameters {
261 uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
262 fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
263 };
264</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300265</section>
266<section id="dvb-qam-parameters">
267<title>QAM parameters</title>
268<para>for cable QAM frontend you use the <constant>dvb_qam_parameters</constant> structure:</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300269<programlisting>
270 struct dvb_qam_parameters {
271 uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
272 fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
273 fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
274 };
275</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300276</section>
Mauro Carvalho Chehab0be153e2011-06-07 18:15:19 -0300277<section id="dvb-vsb-parameters">
278<title>VSB parameters</title>
Mauro Carvalho Chehab76f9a692011-06-07 22:08:13 -0300279<para>ATSC frontends are supported by the <constant>dvb_vsb_parameters</constant> structure:</para>
Mauro Carvalho Chehab0be153e2011-06-07 18:15:19 -0300280<programlisting>
281struct dvb_vsb_parameters {
282 fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
283};
284</programlisting>
285</section>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300286<section id="dvb-ofdm-parameters">
287<title>OFDM parameters</title>
288<para>DVB-T frontends are supported by the <constant>dvb_ofdm_parameters</constant> structure:</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300289<programlisting>
290 struct dvb_ofdm_parameters {
291 fe_bandwidth_t bandwidth;
292 fe_code_rate_t code_rate_HP; /&#x22C6; high priority stream code rate &#x22C6;/
293 fe_code_rate_t code_rate_LP; /&#x22C6; low priority stream code rate &#x22C6;/
294 fe_modulation_t constellation; /&#x22C6; modulation type (see above) &#x22C6;/
295 fe_transmit_mode_t transmission_mode;
296 fe_guard_interval_t guard_interval;
297 fe_hierarchy_t hierarchy_information;
298 };
299</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300300</section>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300301<section id="fe-spectral-inversion-t">
302<title>frontend spectral inversion</title>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300303<para>The Inversion field can take one of these values:
304</para>
305<programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300306typedef enum fe_spectral_inversion {
307 INVERSION_OFF,
308 INVERSION_ON,
309 INVERSION_AUTO
310} fe_spectral_inversion_t;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300311</programlisting>
312<para>It indicates if spectral inversion should be presumed or not. In the automatic setting
313(<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by
314itself.
315</para>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300316</section>
317<section id="fe-code-rate-t">
318<title>frontend code rate</title>
Mauro Carvalho Chehab0be153e2011-06-07 18:15:19 -0300319<para>The possible values for the <constant>fec_inner</constant> field used on
320<link refend="dvb-qpsk-parameters"><constant>struct dvb_qpsk_parameters</constant></link> and
321<link refend="dvb-qam-parameters"><constant>struct dvb_qam_parameters</constant></link> are:
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300322</para>
323<programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300324typedef enum fe_code_rate {
325 FEC_NONE = 0,
326 FEC_1_2,
327 FEC_2_3,
328 FEC_3_4,
329 FEC_4_5,
330 FEC_5_6,
331 FEC_6_7,
332 FEC_7_8,
333 FEC_8_9,
334 FEC_AUTO,
335 FEC_3_5,
336 FEC_9_10,
337} fe_code_rate_t;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300338</programlisting>
339<para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
340detection.
341</para>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300342</section>
343<section id="fe-modulation-t">
Mauro Carvalho Chehab0be153e2011-06-07 18:15:19 -0300344<title>frontend modulation type for QAM, OFDM and VSB</title>
345<para>For cable and terrestrial frontends, e. g. for
346<link refend="dvb-qam-parameters"><constant>struct dvb_qpsk_parameters</constant></link>,
347<link refend="dvb-ofdm-parameters"><constant>struct dvb_qam_parameters</constant></link> and
348<link refend="dvb-vsb-parameters"><constant>struct dvb_qam_parameters</constant></link>,
349it needs to specify the quadrature modulation mode which can be one of the following:
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300350</para>
351<programlisting>
352 typedef enum fe_modulation {
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300353 QPSK,
354 QAM_16,
355 QAM_32,
356 QAM_64,
357 QAM_128,
358 QAM_256,
359 QAM_AUTO,
360 VSB_8,
361 VSB_16,
362 PSK_8,
363 APSK_16,
364 APSK_32,
365 DQPSK,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300366 } fe_modulation_t;
367</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300368</section>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300369<para>Finally, there are several more parameters for OFDM:
370</para>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300371<section id="fe-transmit-mode-t">
Mauro Carvalho Chehab0be153e2011-06-07 18:15:19 -0300372<title>Number of carriers per channel</title>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300373<programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300374typedef enum fe_transmit_mode {
375 TRANSMISSION_MODE_2K,
376 TRANSMISSION_MODE_8K,
377 TRANSMISSION_MODE_AUTO,
378 TRANSMISSION_MODE_4K,
379 TRANSMISSION_MODE_1K,
380 TRANSMISSION_MODE_16K,
381 TRANSMISSION_MODE_32K,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300382 } fe_transmit_mode_t;
383</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300384</section>
385<section id="fe-bandwidth-t">
386<title>frontend bandwidth</title>
387<programlisting>
388typedef enum fe_bandwidth {
389 BANDWIDTH_8_MHZ,
390 BANDWIDTH_7_MHZ,
391 BANDWIDTH_6_MHZ,
392 BANDWIDTH_AUTO,
393 BANDWIDTH_5_MHZ,
394 BANDWIDTH_10_MHZ,
395 BANDWIDTH_1_712_MHZ,
396} fe_bandwidth_t;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300397</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300398</section>
399<section id="fe-guard-interval-t">
400<title>frontend guard inverval</title>
401<programlisting>
402typedef enum fe_guard_interval {
403 GUARD_INTERVAL_1_32,
404 GUARD_INTERVAL_1_16,
405 GUARD_INTERVAL_1_8,
406 GUARD_INTERVAL_1_4,
407 GUARD_INTERVAL_AUTO,
408 GUARD_INTERVAL_1_128,
409 GUARD_INTERVAL_19_128,
410 GUARD_INTERVAL_19_256,
411} fe_guard_interval_t;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300412</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300413</section>
414<section id="fe-hierarchy-t">
415<title>frontend hierarchy</title>
416<programlisting>
417typedef enum fe_hierarchy {
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300418 HIERARCHY_NONE,
419 HIERARCHY_1,
420 HIERARCHY_2,
421 HIERARCHY_4,
422 HIERARCHY_AUTO
423 } fe_hierarchy_t;
424</programlisting>
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300425</section>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300426
427</section>
428
Mauro Carvalho Chehab6cb77a82011-06-07 17:58:59 -0300429<section id="dvb-frontend-event">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300430<title>frontend events</title>
431 <programlisting>
432 struct dvb_frontend_event {
433 fe_status_t status;
434 struct dvb_frontend_parameters parameters;
435 };
436</programlisting>
437 </section>
438</section>
439
440
441<section id="frontend_fcalls">
442<title>Frontend Function Calls</title>
443
444<section id="frontend_f_open">
445<title>open()</title>
446<para>DESCRIPTION</para>
447<informaltable><tgroup cols="1"><tbody><row>
448<entry align="char">
449<para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)
450 for subsequent use. Usually the first thing to do after a successful open is to
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300451 find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300452<para>The device can be opened in read-only mode, which only allows monitoring of
453 device status and statistics, or read/write mode, which allows any kind of use
454 (e.g. performing tuning operations.)
455</para>
456<para>In a system with multiple front-ends, it is usually the case that multiple devices
457 cannot be open in read/write mode simultaneously. As long as a front-end
458 device is opened in read/write mode, other open() calls in read/write mode will
459 either fail or block, depending on whether non-blocking or blocking mode was
460 specified. A front-end device opened in blocking mode can later be put into
461 non-blocking mode (and vice versa) using the F_SETFL command of the fcntl
462 system call. This is a standard system call, documented in the Linux manual
463 page for fcntl. When an open() call has succeeded, the device will be ready
464 for use in the specified mode. This implies that the corresponding hardware is
465 powered up, and that other front-ends may have been powered down to make
466 that possible.</para>
467</entry>
468 </row></tbody></tgroup></informaltable>
469
470<para>SYNOPSIS</para>
471<informaltable><tgroup cols="1"><tbody><row><entry
472 align="char">
473<para>int open(const char &#x22C6;deviceName, int flags);</para>
474</entry>
475 </row></tbody></tgroup></informaltable>
476<para>PARAMETERS
477</para>
478<informaltable><tgroup cols="2"><tbody><row><entry
479 align="char">
480<para>const char
481 *deviceName</para>
482</entry><entry
483 align="char">
484<para>Name of specific video device.</para>
485</entry>
486 </row><row><entry
487 align="char">
488<para>int flags</para>
489</entry><entry
490 align="char">
491<para>A bit-wise OR of the following flags:</para>
492</entry>
493 </row><row><entry
494 align="char">
495</entry><entry
496 align="char">
497<para>O_RDONLY read-only access</para>
498</entry>
499 </row><row><entry
500 align="char">
501</entry><entry
502 align="char">
503<para>O_RDWR read/write access</para>
504</entry>
505 </row><row><entry
506 align="char">
507</entry><entry
508 align="char">
509<para>O_NONBLOCK open in non-blocking mode</para>
510</entry>
511 </row><row><entry
512 align="char">
513</entry><entry
514 align="char">
515<para>(blocking mode is the default)</para>
516</entry>
517 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -0300518<para>RETURN VALUE</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300519<informaltable><tgroup cols="2"><tbody><row><entry
520 align="char">
521<para>ENODEV</para>
522</entry><entry
523 align="char">
524<para>Device driver not loaded/available.</para>
525</entry>
526 </row><row><entry
527 align="char">
528<para>EINTERNAL</para>
529</entry><entry
530 align="char">
531<para>Internal error.</para>
532</entry>
533 </row><row><entry
534 align="char">
535<para>EBUSY</para>
536</entry><entry
537 align="char">
538<para>Device or resource busy.</para>
539</entry>
540 </row><row><entry
541 align="char">
542<para>EINVAL</para>
543</entry><entry
544 align="char">
545<para>Invalid argument.</para>
546</entry>
547 </row></tbody></tgroup></informaltable>
548</section>
549
550<section id="frontend_f_close">
551<title>close()</title>
552<para>DESCRIPTION
553</para>
554<informaltable><tgroup cols="1"><tbody><row><entry
555 align="char">
556<para>This system call closes a previously opened front-end device. After closing
557 a front-end device, its corresponding hardware might be powered down
558 automatically.</para>
559</entry>
560 </row></tbody></tgroup></informaltable>
561<para>SYNOPSIS
562</para>
563<informaltable><tgroup cols="1"><tbody><row><entry
564 align="char">
565<para>int close(int fd);</para>
566</entry>
567 </row></tbody></tgroup></informaltable>
568<para>PARAMETERS
569</para>
570<informaltable><tgroup cols="2"><tbody><row><entry
571 align="char">
572<para>int fd</para>
573</entry><entry
574 align="char">
575<para>File descriptor returned by a previous call to open().</para>
576</entry>
577 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -0300578&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300579<informaltable><tgroup cols="2"><tbody><row><entry
580 align="char">
581<para>EBADF</para>
582</entry><entry
583 align="char">
584<para>fd is not a valid open file descriptor.</para>
585</entry>
586 </row></tbody></tgroup></informaltable>
587</section>
588
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300589<section id="FE_READ_STATUS">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300590<title>FE_READ_STATUS</title>
591<para>DESCRIPTION
592</para>
593<informaltable><tgroup cols="1"><tbody><row><entry
594 align="char">
595<para>This ioctl call returns status information about the front-end. This call only
596 requires read-only access to the device.</para>
597</entry>
598 </row></tbody></tgroup></informaltable>
599<para>SYNOPSIS
600</para>
601<informaltable><tgroup cols="1"><tbody><row><entry
602 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300603<para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300604 fe_status_t &#x22C6;status);</para>
605</entry>
606 </row></tbody></tgroup></informaltable>
607<para>PARAMETERS
608</para>
609
610<informaltable><tgroup cols="2"><tbody><row><entry
611 align="char">
612<para>int fd</para>
613</entry><entry
614 align="char">
615<para>File descriptor returned by a previous call to open().</para>
616</entry>
617 </row><row><entry
618 align="char">
619<para>int request</para>
620</entry><entry
621 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300622<para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300623</entry>
624 </row><row><entry
625 align="char">
626<para>struct fe_status_t
627 *status</para>
628</entry><entry
629 align="char">
630<para>Points to the location where the front-end status word is
631 to be stored.</para>
632</entry>
633 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -0300634<para>RETURN VALUE</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300635<informaltable><tgroup cols="2"><tbody><row><entry
636 align="char">
637<para>EBADF</para>
638</entry><entry
639 align="char">
640<para>fd is not a valid open file descriptor.</para>
641</entry>
642 </row><row><entry
643 align="char">
644<para>EFAULT</para>
645</entry><entry
646 align="char">
647<para>status points to invalid address.</para>
648</entry>
649 </row></tbody></tgroup></informaltable>
650</section>
651
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300652<section id="FE_READ_BER">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300653<title>FE_READ_BER</title>
654<para>DESCRIPTION
655</para>
656<informaltable><tgroup cols="1"><tbody><row><entry
657 align="char">
658<para>This ioctl call returns the bit error rate for the signal currently
659 received/demodulated by the front-end. For this command, read-only access to
660 the device is sufficient.</para>
661</entry>
662 </row></tbody></tgroup></informaltable>
663<para>SYNOPSIS
664</para>
665<informaltable><tgroup cols="1"><tbody><row><entry
666 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300667<para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300668 uint32_t &#x22C6;ber);</para>
669</entry>
670 </row></tbody></tgroup></informaltable>
671<para>PARAMETERS
672</para>
673<informaltable><tgroup cols="2"><tbody><row><entry
674 align="char">
675<para>int fd</para>
676</entry><entry
677 align="char">
678<para>File descriptor returned by a previous call to open().</para>
679</entry>
680 </row><row><entry
681 align="char">
682<para>int request</para>
683</entry><entry
684 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300685<para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300686</entry>
687 </row><row><entry
688 align="char">
689<para>uint32_t *ber</para>
690</entry><entry
691 align="char">
692<para>The bit error rate is stored into *ber.</para>
693</entry>
694 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -0300695&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300696<informaltable><tgroup cols="2"><tbody><row><entry
697 align="char">
698<para>EBADF</para>
699</entry><entry
700 align="char">
701<para>fd is not a valid open file descriptor.</para>
702</entry>
703 </row><row><entry
704 align="char">
705<para>EFAULT</para>
706</entry><entry
707 align="char">
708<para>ber points to invalid address.</para>
709</entry>
710 </row><row><entry
711 align="char">
712<para>ENOSIGNAL</para>
713</entry><entry
714 align="char">
715<para>There is no signal, thus no meaningful bit error rate. Also
716 returned if the front-end is not turned on.</para>
717</entry>
718 </row><row><entry
719 align="char">
720<para>ENOSYS</para>
721</entry><entry
722 align="char">
723<para>Function not available for this device.</para>
724</entry>
725 </row></tbody></tgroup></informaltable>
726</section>
727
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300728<section id="FE_READ_SNR">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300729<title>FE_READ_SNR</title>
730
731<para>DESCRIPTION
732</para>
733<informaltable><tgroup cols="1"><tbody><row><entry
734 align="char">
735<para>This ioctl call returns the signal-to-noise ratio for the signal currently received
736 by the front-end. For this command, read-only access to the device is sufficient.</para>
737</entry>
738 </row></tbody></tgroup></informaltable>
739<para>SYNOPSIS
740</para>
741<informaltable><tgroup cols="1"><tbody><row><entry
742 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300743<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 -0300744 &#x22C6;snr);</para>
745</entry>
746 </row></tbody></tgroup></informaltable>
747<para>PARAMETERS
748</para>
749<informaltable><tgroup cols="2"><tbody><row><entry
750 align="char">
751<para>int fd</para>
752</entry><entry
753 align="char">
754<para>File descriptor returned by a previous call to open().</para>
755</entry>
756 </row><row><entry
757 align="char">
758<para>int request</para>
759</entry><entry
760 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300761<para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300762</entry>
763 </row><row><entry
764 align="char">
765<para>int16_t *snr</para>
766</entry><entry
767 align="char">
768<para>The signal-to-noise ratio is stored into *snr.</para>
769</entry>
770 </row></tbody></tgroup></informaltable>
771
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -0300772&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300773<informaltable><tgroup cols="2"><tbody><row><entry
774 align="char">
775<para>EBADF</para>
776</entry><entry
777 align="char">
778<para>fd is not a valid open file descriptor.</para>
779</entry>
780 </row><row><entry
781 align="char">
782<para>EFAULT</para>
783</entry><entry
784 align="char">
785<para>snr points to invalid address.</para>
786</entry>
787 </row><row><entry
788 align="char">
789<para>ENOSIGNAL</para>
790</entry><entry
791 align="char">
792<para>There is no signal, thus no meaningful signal strength
793 value. Also returned if front-end is not turned on.</para>
794</entry>
795 </row><row><entry
796 align="char">
797<para>ENOSYS</para>
798</entry><entry
799 align="char">
800<para>Function not available for this device.</para>
801</entry>
802 </row></tbody></tgroup></informaltable>
803</section>
804
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300805<section id="FE_READ_SIGNAL_STRENGTH">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300806<title>FE_READ_SIGNAL_STRENGTH</title>
807<para>DESCRIPTION
808</para>
809<informaltable><tgroup cols="1"><tbody><row><entry
810 align="char">
811<para>This ioctl call returns the signal strength value for the signal currently received
812 by the front-end. For this command, read-only access to the device is sufficient.</para>
813</entry>
814 </row></tbody></tgroup></informaltable>
815<para>SYNOPSIS
816</para>
817<informaltable><tgroup cols="1"><tbody><row><entry
818 align="char">
819<para>int ioctl( int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300820 <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t &#x22C6;strength);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300821</entry>
822 </row></tbody></tgroup></informaltable>
823
824<para>PARAMETERS
825</para>
826<informaltable><tgroup cols="2"><tbody><row><entry
827 align="char">
828<para>int fd</para>
829</entry><entry
830 align="char">
831<para>File descriptor returned by a previous call to open().</para>
832</entry>
833 </row><row><entry
834 align="char">
835<para>int request</para>
836</entry><entry
837 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300838<para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300839 command.</para>
840</entry>
841 </row><row><entry
842 align="char">
843<para>int16_t *strength</para>
844</entry><entry
845 align="char">
846<para>The signal strength value is stored into *strength.</para>
847</entry>
848 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -0300849&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300850<informaltable><tgroup cols="2"><tbody><row><entry
851 align="char">
852<para>EBADF</para>
853</entry><entry
854 align="char">
855<para>fd is not a valid open file descriptor.</para>
856</entry>
857 </row><row><entry
858 align="char">
859<para>EFAULT</para>
860</entry><entry
861 align="char">
862<para>status points to invalid address.</para>
863</entry>
864 </row><row><entry
865 align="char">
866<para>ENOSIGNAL</para>
867</entry><entry
868 align="char">
869<para>There is no signal, thus no meaningful signal strength
870 value. Also returned if front-end is not turned on.</para>
871</entry>
872 </row><row><entry
873 align="char">
874<para>ENOSYS</para>
875</entry><entry
876 align="char">
877<para>Function not available for this device.</para>
878</entry>
879 </row></tbody></tgroup></informaltable>
880</section>
881
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300882<section id="FE_READ_UNCORRECTED_BLOCKS">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300883<title>FE_READ_UNCORRECTED_BLOCKS</title>
884<para>DESCRIPTION
885</para>
886<informaltable><tgroup cols="1"><tbody><row><entry
887 align="char">
888<para>This ioctl call returns the number of uncorrected blocks detected by the device
889 driver during its lifetime. For meaningful measurements, the increment in block
890 count during a specific time interval should be calculated. For this command,
891 read-only access to the device is sufficient.</para>
892</entry>
893 </row><row><entry
894 align="char">
895<para>Note that the counter will wrap to zero after its maximum count has been
896 reached.</para>
897</entry>
898 </row></tbody></tgroup></informaltable>
899<para>SYNOPSIS
900</para>
901<informaltable><tgroup cols="1"><tbody><row><entry
902 align="char">
903<para>int ioctl( int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300904 <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t &#x22C6;ublocks);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300905</entry>
906 </row></tbody></tgroup></informaltable>
907<para>PARAMETERS
908</para>
909<informaltable><tgroup cols="2"><tbody><row><entry
910 align="char">
911<para>int fd</para>
912</entry><entry
913 align="char">
914<para>File descriptor returned by a previous call to open().</para>
915</entry>
916 </row><row><entry
917 align="char">
918<para>int request</para>
919</entry><entry
920 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300921<para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300922 command.</para>
923</entry>
924 </row><row><entry
925 align="char">
926<para>uint32_t *ublocks</para>
927</entry><entry
928 align="char">
929<para>The total number of uncorrected blocks seen by the driver
930 so far.</para>
931</entry>
932 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -0300933&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300934<informaltable><tgroup cols="2"><tbody><row><entry
935 align="char">
936<para>EBADF</para>
937</entry><entry
938 align="char">
939<para>fd is not a valid open file descriptor.</para>
940</entry>
941 </row><row><entry
942 align="char">
943<para>EFAULT</para>
944</entry><entry
945 align="char">
946<para>ublocks points to invalid address.</para>
947</entry>
948 </row><row><entry
949 align="char">
950<para>ENOSYS</para>
951</entry><entry
952 align="char">
953<para>Function not available for this device.</para>
954</entry>
955 </row></tbody></tgroup></informaltable>
956</section>
957
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300958<section id="FE_SET_FRONTEND">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300959<title>FE_SET_FRONTEND</title>
960<para>DESCRIPTION
961</para>
962<informaltable><tgroup cols="1"><tbody><row><entry
963 align="char">
964<para>This ioctl call starts a tuning operation using specified parameters. The result
965 of this call will be successful if the parameters were valid and the tuning could
966 be initiated. The result of the tuning operation in itself, however, will arrive
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300967 asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
968 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 -0300969 the previous one was completed, the previous operation will be aborted in favor
970 of the new one. This command requires read/write access to the device.</para>
971</entry>
972 </row></tbody></tgroup></informaltable>
973
974<para>SYNOPSIS
975</para>
976<informaltable><tgroup cols="1"><tbody><row><entry
977 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300978<para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300979 struct dvb_frontend_parameters &#x22C6;p);</para>
980</entry>
981 </row></tbody></tgroup></informaltable>
982<para>PARAMETERS
983</para>
984<informaltable><tgroup cols="2"><tbody><row><entry
985 align="char">
986<para>int fd</para>
987</entry><entry
988 align="char">
989<para>File descriptor returned by a previous call to open().</para>
990</entry>
991 </row><row><entry
992 align="char">
993<para>int request</para>
994</entry><entry
995 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -0300996<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -0300997</entry>
998 </row><row><entry
999 align="char">
1000<para>struct
1001 dvb_frontend_parameters
1002 *p</para>
1003</entry><entry
1004 align="char">
1005<para>Points to parameters for tuning operation.</para>
1006</entry>
1007 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001008&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001009<informaltable><tgroup cols="2"><tbody><row><entry
1010 align="char">
1011<para>EBADF</para>
1012</entry><entry
1013 align="char">
1014<para>fd is not a valid open file descriptor.</para>
1015</entry>
1016 </row><row><entry
1017 align="char">
1018<para>EFAULT</para>
1019</entry><entry
1020 align="char">
1021<para>p points to invalid address.</para>
1022</entry>
1023 </row><row><entry
1024 align="char">
1025<para>EINVAL</para>
1026</entry><entry
1027 align="char">
1028<para>Maximum supported symbol rate reached.</para>
1029</entry>
1030</row></tbody></tgroup></informaltable>
1031</section>
1032
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001033<section id="FE_GET_FRONTEND">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001034<title>FE_GET_FRONTEND</title>
1035<para>DESCRIPTION
1036</para>
1037<informaltable><tgroup cols="1"><tbody><row><entry
1038 align="char">
1039<para>This ioctl call queries the currently effective frontend parameters. For this
1040 command, read-only access to the device is sufficient.</para>
1041</entry>
1042 </row></tbody></tgroup></informaltable>
1043
1044<para>SYNOPSIS
1045</para>
1046<informaltable><tgroup cols="1"><tbody><row><entry
1047 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001048<para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001049 struct dvb_frontend_parameters &#x22C6;p);</para>
1050</entry>
1051 </row></tbody></tgroup></informaltable>
1052
1053<para>PARAMETERS
1054</para>
1055<informaltable><tgroup cols="2"><tbody><row><entry
1056 align="char">
1057<para>int fd</para>
1058</entry><entry
1059 align="char">
1060<para>File descriptor returned by a previous call to open().</para>
1061</entry>
1062 </row><row><entry
1063 align="char">
1064<para>int request</para>
1065</entry><entry
1066 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001067<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001068</entry>
1069 </row><row><entry
1070 align="char">
1071<para>struct
1072 dvb_frontend_parameters
1073 *p</para>
1074</entry><entry
1075 align="char">
1076<para>Points to parameters for tuning operation.</para>
1077</entry>
1078 </row></tbody></tgroup></informaltable>
1079
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001080&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001081
1082<informaltable><tgroup cols="2"><tbody><row><entry
1083 align="char">
1084<para>EBADF</para>
1085</entry><entry
1086 align="char">
1087<para>fd is not a valid open file descriptor.</para>
1088</entry>
1089 </row><row><entry
1090 align="char">
1091<para>EFAULT</para>
1092</entry><entry
1093 align="char">
1094<para>p points to invalid address.</para>
1095</entry>
1096 </row><row><entry
1097 align="char">
1098<para>EINVAL</para>
1099</entry><entry
1100 align="char">
1101<para>Maximum supported symbol rate reached.</para>
1102</entry>
1103 </row></tbody></tgroup></informaltable>
1104
1105</section>
1106
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001107<section id="FE_GET_EVENT">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001108<title>FE_GET_EVENT</title>
1109<para>DESCRIPTION
1110</para>
1111<informaltable><tgroup cols="1"><tbody><row><entry
1112 align="char">
1113<para>This ioctl call returns a frontend event if available. If an event is not
1114 available, the behavior depends on whether the device is in blocking or
1115 non-blocking mode. In the latter case, the call fails immediately with errno
1116 set to EWOULDBLOCK. In the former case, the call blocks until an event
1117 becomes available.</para>
1118</entry>
1119 </row><row><entry
1120 align="char">
1121<para>The standard Linux poll() and/or select() system calls can be used with the
1122 device file descriptor to watch for new events. For select(), the file descriptor
1123 should be included in the exceptfds argument, and for poll(), POLLPRI should
1124 be specified as the wake-up condition. Since the event queue allocated is
1125 rather small (room for 8 events), the queue must be serviced regularly to avoid
1126 overflow. If an overflow happens, the oldest event is discarded from the queue,
1127 and an error (EOVERFLOW) occurs the next time the queue is read. After
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001128 reporting the error condition in this fashion, subsequent
1129 <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001130 calls will return events from the queue as usual.</para>
1131</entry>
1132 </row><row><entry
1133 align="char">
1134<para>For the sake of implementation simplicity, this command requires read/write
1135 access to the device.</para>
1136</entry>
1137 </row></tbody></tgroup></informaltable>
1138
1139<para>SYNOPSIS
1140</para>
1141<informaltable><tgroup cols="1"><tbody><row><entry
1142 align="char">
1143<para>int ioctl(int fd, int request = QPSK_GET_EVENT,
1144 struct dvb_frontend_event &#x22C6;ev);</para>
1145</entry>
1146 </row></tbody></tgroup></informaltable>
1147
1148<para>PARAMETERS
1149</para>
1150<informaltable><tgroup cols="2"><tbody><row><entry
1151 align="char">
1152<para>int fd</para>
1153</entry><entry
1154 align="char">
1155<para>File descriptor returned by a previous call to open().</para>
1156</entry>
1157 </row><row><entry
1158 align="char">
1159<para>int request</para>
1160</entry><entry
1161 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001162<para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001163</entry>
1164 </row><row><entry
1165 align="char">
1166<para>struct
1167 dvb_frontend_event
1168 *ev</para>
1169</entry><entry
1170 align="char">
1171<para>Points to the location where the event,</para>
1172</entry>
1173 </row><row><entry
1174 align="char">
1175</entry><entry
1176 align="char">
1177<para>if any, is to be stored.</para>
1178</entry>
1179 </row></tbody></tgroup></informaltable>
1180
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001181&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001182<informaltable><tgroup cols="2"><tbody><row><entry
1183 align="char">
1184<para>EBADF</para>
1185</entry><entry
1186 align="char">
1187<para>fd is not a valid open file descriptor.</para>
1188</entry>
1189 </row><row><entry
1190 align="char">
1191<para>EFAULT</para>
1192</entry><entry
1193 align="char">
1194<para>ev points to invalid address.</para>
1195</entry>
1196 </row><row><entry
1197 align="char">
1198<para>EWOULDBLOCK</para>
1199</entry><entry
1200 align="char">
1201<para>There is no event pending, and the device is in
1202 non-blocking mode.</para>
1203</entry>
1204 </row><row><entry
1205 align="char">
1206<para>EOVERFLOW</para>
1207</entry><entry
1208 align="char">
1209</entry>
1210 </row><row><entry
1211 align="char">
1212</entry><entry
1213 align="char">
1214<para>Overflow in event queue - one or more events were lost.</para>
1215</entry>
1216</row></tbody></tgroup></informaltable>
1217</section>
1218
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001219<section id="FE_GET_INFO">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001220<title>FE_GET_INFO</title>
1221<para>DESCRIPTION
1222</para>
1223<informaltable><tgroup cols="1"><tbody><row><entry
1224 align="char">
1225<para>This ioctl call returns information about the front-end. This call only requires
1226 read-only access to the device.</para>
1227</entry>
1228 </row></tbody></tgroup></informaltable>
1229<para>SYNOPSIS
1230</para>
1231
1232<informaltable><tgroup cols="1"><tbody><row><entry
1233 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001234<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 -03001235 dvb_frontend_info &#x22C6;info);</para>
1236</entry>
1237 </row></tbody></tgroup></informaltable>
1238<para>PARAMETERS
1239</para>
1240
1241<informaltable><tgroup cols="2"><tbody><row><entry
1242 align="char">
1243<para>int fd</para>
1244</entry><entry
1245 align="char">
1246<para>File descriptor returned by a previous call to open().</para>
1247</entry>
1248 </row><row><entry
1249 align="char">
1250<para>int request</para>
1251</entry><entry
1252 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001253<para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001254</entry>
1255 </row><row><entry
1256 align="char">
1257<para>struct
1258 dvb_frontend_info
1259 *info</para>
1260</entry><entry
1261 align="char">
1262<para>Points to the location where the front-end information is
1263 to be stored.</para>
1264</entry>
1265 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001266&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001267<informaltable><tgroup cols="2"><tbody><row><entry
1268 align="char">
1269<para>EBADF</para>
1270</entry><entry
1271 align="char">
1272<para>fd is not a valid open file descriptor.</para>
1273</entry>
1274 </row><row><entry
1275 align="char">
1276<para>EFAULT</para>
1277</entry><entry
1278 align="char">
1279<para>info points to invalid address.</para>
1280</entry>
1281</row></tbody></tgroup></informaltable>
1282</section>
1283
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001284<section id="FE_DISEQC_RESET_OVERLOAD">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001285<title>FE_DISEQC_RESET_OVERLOAD</title>
1286<para>DESCRIPTION
1287</para>
1288<informaltable><tgroup cols="1"><tbody><row><entry
1289 align="char">
1290<para>If the bus has been automatically powered off due to power overload, this ioctl
1291 call restores the power to the bus. The call requires read/write access to the
1292 device. This call has no effect if the device is manually powered off. Not all
1293 DVB adapters support this ioctl.</para>
1294</entry>
1295 </row></tbody></tgroup></informaltable>
1296
1297<para>SYNOPSIS
1298</para>
1299<informaltable><tgroup cols="1"><tbody><row><entry
1300 align="char">
1301<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001302 <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001303</entry>
1304 </row></tbody></tgroup></informaltable>
1305<para>PARAMETERS
1306</para>
1307<informaltable><tgroup cols="2"><tbody><row><entry
1308 align="char">
1309<para>int fd</para>
1310</entry><entry
1311 align="char">
1312<para>File descriptor returned by a previous call to open().</para>
1313</entry>
1314 </row><row><entry
1315 align="char">
1316<para>int request</para>
1317</entry><entry
1318 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001319<para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001320 command.</para>
1321</entry>
1322 </row></tbody></tgroup></informaltable>
1323
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001324&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001325<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
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001396&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001397<informaltable><tgroup cols="2"><tbody><row><entry
1398 align="char">
1399<para>EBADF</para>
1400</entry><entry
1401 align="char">
1402<para>fd is not a valid file descriptor.</para>
1403</entry>
1404 </row><row><entry
1405 align="char">
1406<para>EFAULT</para>
1407</entry><entry
1408 align="char">
1409<para>Seq points to an invalid address.</para>
1410</entry>
1411 </row><row><entry
1412 align="char">
1413<para>EINVAL</para>
1414</entry><entry
1415 align="char">
1416<para>The data structure referred to by seq is invalid in some
1417 way.</para>
1418</entry>
1419 </row><row><entry
1420 align="char">
1421<para>EPERM</para>
1422</entry><entry
1423 align="char">
1424<para>Permission denied (needs read/write access).</para>
1425</entry>
1426 </row><row><entry
1427 align="char">
1428<para>EINTERNAL</para>
1429</entry><entry
1430 align="char">
1431<para>Internal error in the device driver.</para>
1432</entry>
1433</row></tbody></tgroup></informaltable>
1434</section>
1435
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001436<section id="FE_DISEQC_RECV_SLAVE_REPLY">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001437<title>FE_DISEQC_RECV_SLAVE_REPLY</title>
1438<para>DESCRIPTION
1439</para>
1440<informaltable><tgroup cols="1"><tbody><row><entry
1441 align="char">
1442<para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>
1443</entry>
1444 </row></tbody></tgroup></informaltable>
1445
1446<para>SYNOPSIS
1447</para>
1448<informaltable><tgroup cols="1"><tbody><row><entry
1449 align="char">
1450<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001451 <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001452 dvb_diseqc_slave_reply &#x22C6;reply);</para>
1453</entry>
1454 </row></tbody></tgroup></informaltable>
1455
1456<para>PARAMETERS
1457</para>
1458<informaltable><tgroup cols="2"><tbody><row><entry
1459 align="char">
1460<para>int fd</para>
1461</entry><entry
1462 align="char">
1463<para>File descriptor returned by a previous call to open().</para>
1464</entry>
1465 </row><row><entry
1466 align="char">
1467<para>int request</para>
1468</entry><entry
1469 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001470<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 -03001471 command.</para>
1472</entry>
1473 </row><row><entry
1474 align="char">
1475<para>struct
1476 dvb_diseqc_slave_reply
1477 *reply</para>
1478</entry><entry
1479 align="char">
1480<para>Pointer to the command to be received.</para>
1481</entry>
1482 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001483&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001484<informaltable><tgroup cols="2"><tbody><row><entry
1485 align="char">
1486<para>EBADF</para>
1487</entry><entry
1488 align="char">
1489<para>fd is not a valid file descriptor.</para>
1490</entry>
1491 </row><row><entry
1492 align="char">
1493<para>EFAULT</para>
1494</entry><entry
1495 align="char">
1496<para>Seq points to an invalid address.</para>
1497</entry>
1498 </row><row><entry
1499 align="char">
1500<para>EINVAL</para>
1501</entry><entry
1502 align="char">
1503<para>The data structure referred to by seq is invalid in some
1504 way.</para>
1505</entry>
1506 </row><row><entry
1507 align="char">
1508<para>EPERM</para>
1509</entry><entry
1510 align="char">
1511<para>Permission denied (needs read/write access).</para>
1512</entry>
1513 </row><row><entry
1514 align="char">
1515<para>EINTERNAL</para>
1516</entry><entry
1517 align="char">
1518<para>Internal error in the device driver.</para>
1519</entry>
1520 </row></tbody></tgroup></informaltable>
1521</section>
1522
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001523<section id="FE_DISEQC_SEND_BURST">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001524<title>FE_DISEQC_SEND_BURST</title>
1525<para>DESCRIPTION
1526</para>
1527<informaltable><tgroup cols="1"><tbody><row><entry
1528 align="char">
1529<para>This ioctl call is used to send a 22KHz tone burst.</para>
1530</entry>
1531 </row></tbody></tgroup></informaltable>
1532
1533<para>SYNOPSIS
1534</para>
1535<informaltable><tgroup cols="1"><tbody><row><entry
1536 align="char">
1537<para>int ioctl(int fd, int request =
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001538 <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 -03001539</entry>
1540 </row></tbody></tgroup></informaltable>
1541
1542<para>PARAMETERS
1543</para>
1544<informaltable><tgroup cols="2"><tbody><row><entry
1545 align="char">
1546<para>int fd</para>
1547</entry><entry
1548 align="char">
1549<para>File descriptor returned by a previous call to open().</para>
1550</entry>
1551 </row><row><entry
1552 align="char">
1553<para>int request</para>
1554</entry><entry
1555 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001556<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 -03001557</entry>
1558 </row><row><entry
1559 align="char">
1560<para>fe_sec_mini_cmd_t
1561 burst</para>
1562</entry><entry
1563 align="char">
1564<para>burst A or B.</para>
1565</entry>
1566 </row></tbody></tgroup></informaltable>
1567
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001568&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001569<informaltable><tgroup cols="2"><tbody><row><entry
1570 align="char">
1571<para>EBADF</para>
1572</entry><entry
1573 align="char">
1574<para>fd is not a valid file descriptor.</para>
1575</entry>
1576 </row><row><entry
1577 align="char">
1578<para>EFAULT</para>
1579</entry><entry
1580 align="char">
1581<para>Seq points to an invalid address.</para>
1582</entry>
1583 </row><row><entry
1584 align="char">
1585<para>EINVAL</para>
1586</entry><entry
1587 align="char">
1588<para>The data structure referred to by seq is invalid in some
1589 way.</para>
1590</entry>
1591 </row><row><entry
1592 align="char">
1593<para>EPERM</para>
1594</entry><entry
1595 align="char">
1596<para>Permission denied (needs read/write access).</para>
1597</entry>
1598 </row><row><entry
1599 align="char">
1600<para>EINTERNAL</para>
1601</entry><entry
1602 align="char">
1603<para>Internal error in the device driver.</para>
1604</entry>
1605</row></tbody></tgroup></informaltable>
1606</section>
1607
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001608<section id="FE_SET_TONE">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001609<title>FE_SET_TONE</title>
1610<para>DESCRIPTION
1611</para>
1612<informaltable><tgroup cols="1"><tbody><row><entry
1613 align="char">
1614<para>This call is used to set the generation of the continuous 22kHz tone. This call
1615 requires read/write permissions.</para>
1616</entry>
1617 </row></tbody></tgroup></informaltable>
1618<para>SYNOPSIS
1619</para>
1620<informaltable><tgroup cols="1"><tbody><row><entry
1621 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001622<para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001623 fe_sec_tone_mode_t tone);</para>
1624</entry>
1625 </row></tbody></tgroup></informaltable>
1626<para>PARAMETERS
1627</para>
1628<informaltable><tgroup cols="2"><tbody><row><entry
1629 align="char">
1630<para>int fd</para>
1631</entry><entry
1632 align="char">
1633<para>File descriptor returned by a previous call to open().</para>
1634</entry>
1635 </row><row><entry
1636 align="char">
1637<para>int request</para>
1638</entry><entry
1639 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001640<para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001641</entry>
1642 </row><row><entry
1643 align="char">
1644<para>fe_sec_tone_mode_t
1645 tone</para>
1646</entry><entry
1647 align="char">
1648<para>The requested tone generation mode (on/off).</para>
1649</entry>
1650 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001651&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001652<informaltable><tgroup cols="2"><tbody><row><entry
1653 align="char">
1654<para>ENODEV</para>
1655</entry><entry
1656 align="char">
1657<para>Device driver not loaded/available.</para>
1658</entry>
1659 </row><row><entry
1660 align="char">
1661<para>EBUSY</para>
1662</entry><entry
1663 align="char">
1664<para>Device or resource busy.</para>
1665</entry>
1666 </row><row><entry
1667 align="char">
1668<para>EINVAL</para>
1669</entry><entry
1670 align="char">
1671<para>Invalid argument.</para>
1672</entry>
1673 </row><row><entry
1674 align="char">
1675<para>EPERM</para>
1676</entry><entry
1677 align="char">
1678<para>File not opened with read permissions.</para>
1679</entry>
1680 </row><row><entry
1681 align="char">
1682<para>EINTERNAL</para>
1683</entry><entry
1684 align="char">
1685<para>Internal error in the device driver.</para>
1686</entry>
1687</row></tbody></tgroup></informaltable>
1688</section>
1689
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001690<section id="FE_SET_VOLTAGE">
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001691<title>FE_SET_VOLTAGE</title>
1692<para>DESCRIPTION
1693</para>
1694<informaltable><tgroup cols="1"><tbody><row><entry
1695 align="char">
1696<para>This call is used to set the bus voltage. This call requires read/write
1697 permissions.</para>
1698</entry>
1699 </row></tbody></tgroup></informaltable>
1700<para>SYNOPSIS
1701</para>
1702<informaltable><tgroup cols="1"><tbody><row><entry
1703 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001704<para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001705 fe_sec_voltage_t voltage);</para>
1706</entry>
1707 </row></tbody></tgroup></informaltable>
1708
1709<para>PARAMETERS
1710</para>
1711<informaltable><tgroup cols="2"><tbody><row><entry
1712 align="char">
1713<para>int fd</para>
1714</entry><entry
1715 align="char">
1716<para>File descriptor returned by a previous call to open().</para>
1717</entry>
1718 </row><row><entry
1719 align="char">
1720<para>int request</para>
1721</entry><entry
1722 align="char">
Mauro Carvalho Chehab6dea3832009-10-24 19:10:46 -03001723<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001724</entry>
1725 </row><row><entry
1726 align="char">
1727<para>fe_sec_voltage_t
1728 voltage</para>
1729</entry><entry
1730 align="char">
1731<para>The requested bus voltage.</para>
1732</entry>
1733 </row></tbody></tgroup></informaltable>
1734
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001735&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001736<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
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001820&return-value-dvb;
Mauro Carvalho Chehab8e080c22009-09-13 22:16:04 -03001821<informaltable><tgroup cols="2"><tbody><row><entry
1822 align="char">
1823<para>ENODEV</para>
1824</entry><entry
1825 align="char">
1826<para>Device driver not loaded/available.</para>
1827</entry>
1828 </row><row><entry
1829 align="char">
1830<para>EBUSY</para>
1831</entry><entry
1832 align="char">
1833<para>Device or resource busy.</para>
1834</entry>
1835 </row><row><entry
1836 align="char">
1837<para>EINVAL</para>
1838</entry><entry
1839 align="char">
1840<para>Invalid argument.</para>
1841</entry>
1842 </row><row><entry
1843 align="char">
1844<para>EPERM</para>
1845</entry><entry
1846 align="char">
1847<para>File not opened with read permissions.</para>
1848</entry>
1849 </row><row><entry
1850 align="char">
1851<para>EINTERNAL</para>
1852</entry><entry
1853 align="char">
1854<para>Internal error in the device driver.</para>
1855</entry>
1856 </row></tbody></tgroup></informaltable>
1857</section>
Mauro Carvalho Chehabf0964a72009-10-24 19:55:24 -03001858
1859<section id="FE_SET_FRONTEND_TUNE_MODE">
1860<title>FE_SET_FRONTEND_TUNE_MODE</title>
1861<para>DESCRIPTION</para>
1862<informaltable><tgroup cols="1"><tbody><row>
1863<entry align="char">
1864<para>Allow setting tuner mode flags to the frontend.</para>
1865</entry>
1866</row></tbody></tgroup></informaltable>
1867
1868<para>SYNOPSIS</para>
1869<informaltable><tgroup cols="1"><tbody><row>
1870<entry align="char">
1871<para>int ioctl(int fd, int request =
1872<link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>
1873</entry>
1874</row></tbody></tgroup></informaltable>
1875
1876<para>PARAMETERS</para>
1877<informaltable><tgroup cols="2"><tbody><row>
1878<entry align="char">
1879 <para>unsigned int flags</para>
1880</entry>
1881<entry align="char">
1882<para>
1883FE_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.
1884</para>
1885</entry>
1886 </row></tbody></tgroup></informaltable>
1887
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001888&return-value-dvb;
Mauro Carvalho Chehabf0964a72009-10-24 19:55:24 -03001889<informaltable><tgroup cols="2"><tbody><row>
1890<entry align="char"><para>EINVAL</para></entry>
1891<entry align="char"><para>Invalid argument.</para></entry>
1892 </row></tbody></tgroup></informaltable>
Mauro Carvalho Chehab603c0d802009-10-24 20:19:20 -03001893</section>
1894
1895<section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
1896 <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
1897<para>DESCRIPTION</para>
1898<informaltable><tgroup cols="1"><tbody><row>
1899<entry align="char">
1900<para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
1901<para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
1902<para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
1903</entry>
1904</row></tbody></tgroup></informaltable>
1905
1906<para>SYNOPSIS</para>
1907<informaltable><tgroup cols="1"><tbody><row>
1908<entry align="char">
1909<para>int ioctl(int fd, int request =
1910 <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
1911</entry>
1912</row></tbody></tgroup></informaltable>
1913
1914<para>PARAMETERS</para>
1915<informaltable><tgroup cols="2"><tbody><row>
1916<entry align="char">
1917 <para>unsigned long cmd</para>
1918</entry>
1919<entry align="char">
1920<para>
1921sends the specified raw cmd to the dish via DISEqC.
1922</para>
1923</entry>
1924 </row></tbody></tgroup></informaltable>
1925
Mauro Carvalho Chehab3de530f2011-07-05 12:36:01 -03001926&return-value-dvb;
Mauro Carvalho Chehab603c0d802009-10-24 20:19:20 -03001927<informaltable><tgroup cols="1"><tbody><row>
1928<entry align="char">
1929 <para>There are no errors in use for this call</para>
1930</entry>
1931</row></tbody></tgroup></informaltable>
Mauro Carvalho Chehabb8321042009-10-24 21:01:22 -03001932</section>
Mauro Carvalho Chehabf0964a72009-10-24 19:55:24 -03001933
1934</section>
Mauro Carvalho Chehab603c0d802009-10-24 20:19:20 -03001935
Mauro Carvalho Chehabb8321042009-10-24 21:01:22 -03001936&sub-dvbproperty;