frontend.xml 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515
  1. <title>DVB Frontend API</title>
  2. <para>The DVB frontend device controls the tuner and DVB demodulator
  3. hardware. It can be accessed through <emphasis
  4. role="tt">/dev/dvb/adapter0/frontend0</emphasis>. Data types and and
  5. ioctl definitions can be accessed by including <emphasis
  6. role="tt">linux/dvb/frontend.h</emphasis> in your application.</para>
  7. <para>DVB frontends come in three varieties: DVB-S (satellite), DVB-C
  8. (cable) and DVB-T (terrestrial). Transmission via the internet (DVB-IP)
  9. is not yet handled by this API but a future extension is possible. For
  10. DVB-S the frontend device also supports satellite equipment control
  11. (SEC) via DiSEqC and V-SEC protocols. The DiSEqC (digital SEC)
  12. specification is available from
  13. <ulink url="http://www.eutelsat.com/satellites/4_5_5.html">Eutelsat</ulink>.</para>
  14. <para>Note that the DVB API may also be used for MPEG decoder-only PCI
  15. cards, in which case there exists no frontend device.</para>
  16. <section id="frontend_types">
  17. <title>Frontend Data Types</title>
  18. <section id="fe-type-t">
  19. <title>Frontend type</title>
  20. <para>For historical reasons, frontend types are named by the type of modulation used in
  21. transmission. The fontend types are given by fe_type_t type, defined as:</para>
  22. <table pgwide="1" frame="none" id="fe-type">
  23. <title>Frontend types</title>
  24. <tgroup cols="3">
  25. &cs-def;
  26. <thead>
  27. <row>
  28. <entry>fe_type</entry>
  29. <entry>Description</entry>
  30. <entry><link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> equivalent type</entry>
  31. </row>
  32. </thead>
  33. <tbody valign="top">
  34. <row>
  35. <entry id="FE_QPSK"><constant>FE_QPSK</constant></entry>
  36. <entry>For DVB-S standard</entry>
  37. <entry><constant>SYS_DVBS</constant></entry>
  38. </row>
  39. <row>
  40. <entry id="FE_QAM"><constant>FE_QAM</constant></entry>
  41. <entry>For DVB-C annex A/C standard</entry>
  42. <entry><constant>SYS_DVBC_ANNEX_AC</constant></entry>
  43. </row>
  44. <row>
  45. <entry id="FE_OFDM"><constant>FE_OFDM</constant></entry>
  46. <entry>For DVB-T standard</entry>
  47. <entry><constant>SYS_DVBT</constant></entry>
  48. </row>
  49. <row>
  50. <entry id="FE_ATSC"><constant>FE_ATSC</constant></entry>
  51. <entry>For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used in US.</entry>
  52. <entry><constant>SYS_ATSC</constant> (terrestrial) or <constant>SYS_DVBC_ANNEX_B</constant> (cable)</entry>
  53. </row>
  54. </tbody></tgroup></table>
  55. <para>Newer formats like DVB-S2, ISDB-T, ISDB-S and DVB-T2 are not described at the above, as they're
  56. supported 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.
  57. </para>
  58. </section>
  59. <section id="fe-caps-t">
  60. <title>frontend capabilities</title>
  61. <para>Capabilities describe what a frontend can do. Some capabilities can only be supported for
  62. a specific frontend type.</para>
  63. <programlisting>
  64. typedef enum fe_caps {
  65. FE_IS_STUPID = 0,
  66. FE_CAN_INVERSION_AUTO = 0x1,
  67. FE_CAN_FEC_1_2 = 0x2,
  68. FE_CAN_FEC_2_3 = 0x4,
  69. FE_CAN_FEC_3_4 = 0x8,
  70. FE_CAN_FEC_4_5 = 0x10,
  71. FE_CAN_FEC_5_6 = 0x20,
  72. FE_CAN_FEC_6_7 = 0x40,
  73. FE_CAN_FEC_7_8 = 0x80,
  74. FE_CAN_FEC_8_9 = 0x100,
  75. FE_CAN_FEC_AUTO = 0x200,
  76. FE_CAN_QPSK = 0x400,
  77. FE_CAN_QAM_16 = 0x800,
  78. FE_CAN_QAM_32 = 0x1000,
  79. FE_CAN_QAM_64 = 0x2000,
  80. FE_CAN_QAM_128 = 0x4000,
  81. FE_CAN_QAM_256 = 0x8000,
  82. FE_CAN_QAM_AUTO = 0x10000,
  83. FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
  84. FE_CAN_BANDWIDTH_AUTO = 0x40000,
  85. FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
  86. FE_CAN_HIERARCHY_AUTO = 0x100000,
  87. FE_CAN_8VSB = 0x200000,
  88. FE_CAN_16VSB = 0x400000,
  89. FE_HAS_EXTENDED_CAPS = 0x800000,
  90. FE_CAN_TURBO_FEC = 0x8000000,
  91. FE_CAN_2G_MODULATION = 0x10000000,
  92. FE_NEEDS_BENDING = 0x20000000,
  93. FE_CAN_RECOVER = 0x40000000,
  94. FE_CAN_MUTE_TS = 0x80000000
  95. } fe_caps_t;
  96. </programlisting>
  97. </section>
  98. <section id="dvb-frontend-info">
  99. <title>frontend information</title>
  100. <para>Information about the frontend ca be queried with
  101. <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
  102. <programlisting>
  103. struct dvb_frontend_info {
  104. char name[128];
  105. fe_type_t type;
  106. uint32_t frequency_min;
  107. uint32_t frequency_max;
  108. uint32_t frequency_stepsize;
  109. uint32_t frequency_tolerance;
  110. uint32_t symbol_rate_min;
  111. uint32_t symbol_rate_max;
  112. uint32_t symbol_rate_tolerance; /&#x22C6; ppm &#x22C6;/
  113. uint32_t notifier_delay; /&#x22C6; ms &#x22C6;/
  114. fe_caps_t caps;
  115. };
  116. </programlisting>
  117. </section>
  118. <section id="dvb-diseqc-master-cmd">
  119. <title>diseqc master command</title>
  120. <para>A message sent from the frontend to DiSEqC capable equipment.</para>
  121. <programlisting>
  122. struct dvb_diseqc_master_cmd {
  123. uint8_t msg [6]; /&#x22C6; { framing, address, command, data[3] } &#x22C6;/
  124. uint8_t msg_len; /&#x22C6; valid values are 3...6 &#x22C6;/
  125. };
  126. </programlisting>
  127. </section>
  128. <section role="subsection" id="dvb-diseqc-slave-reply">
  129. <title>diseqc slave reply</title>
  130. <para>A reply to the frontend from DiSEqC 2.0 capable equipment.</para>
  131. <programlisting>
  132. struct dvb_diseqc_slave_reply {
  133. uint8_t msg [4]; /&#x22C6; { framing, data [3] } &#x22C6;/
  134. uint8_t msg_len; /&#x22C6; valid values are 0...4, 0 means no msg &#x22C6;/
  135. int timeout; /&#x22C6; return from ioctl after timeout ms with &#x22C6;/
  136. }; /&#x22C6; errorcode when no message was received &#x22C6;/
  137. </programlisting>
  138. </section>
  139. <section id="fe-sec-voltage-t">
  140. <title>diseqc slave reply</title>
  141. <para>The voltage is usually used with non-DiSEqC capable LNBs to switch the polarzation
  142. (horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched
  143. consistently to the DiSEqC commands as described in the DiSEqC spec.</para>
  144. <programlisting>
  145. typedef enum fe_sec_voltage {
  146. SEC_VOLTAGE_13,
  147. SEC_VOLTAGE_18
  148. } fe_sec_voltage_t;
  149. </programlisting>
  150. </section>
  151. <section id="fe-sec-tone-mode-t">
  152. <title>SEC continuous tone</title>
  153. <para>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
  154. high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to
  155. be switched consistently to the DiSEqC commands as described in the DiSEqC
  156. spec.</para>
  157. <programlisting>
  158. typedef enum fe_sec_tone_mode {
  159. SEC_TONE_ON,
  160. SEC_TONE_OFF
  161. } fe_sec_tone_mode_t;
  162. </programlisting>
  163. </section>
  164. <section id="fe-sec-mini-cmd-t">
  165. <title>SEC tone burst</title>
  166. <para>The 22KHz tone burst is usually used with non-DiSEqC capable switches to select
  167. between two connected LNBs/satellites. When using DiSEqC epuipment this voltage has to
  168. be switched consistently to the DiSEqC commands as described in the DiSEqC
  169. spec.</para>
  170. <programlisting>
  171. typedef enum fe_sec_mini_cmd {
  172. SEC_MINI_A,
  173. SEC_MINI_B
  174. } fe_sec_mini_cmd_t;
  175. </programlisting>
  176. <para></para>
  177. </section>
  178. <section id="fe-status-t">
  179. <title>frontend status</title>
  180. <para>Several functions of the frontend device use the fe_status data type defined
  181. by</para>
  182. <programlisting>
  183. typedef enum fe_status {
  184. FE_HAS_SIGNAL = 0x01, /&#x22C6; found something above the noise level &#x22C6;/
  185. FE_HAS_CARRIER = 0x02, /&#x22C6; found a DVB signal &#x22C6;/
  186. FE_HAS_VITERBI = 0x04, /&#x22C6; FEC is stable &#x22C6;/
  187. FE_HAS_SYNC = 0x08, /&#x22C6; found sync bytes &#x22C6;/
  188. FE_HAS_LOCK = 0x10, /&#x22C6; everything's working... &#x22C6;/
  189. FE_TIMEDOUT = 0x20, /&#x22C6; no lock within the last ~2 seconds &#x22C6;/
  190. FE_REINIT = 0x40 /&#x22C6; frontend was reinitialized, &#x22C6;/
  191. } fe_status_t; /&#x22C6; application is recommned to reset &#x22C6;/
  192. </programlisting>
  193. <para>to indicate the current state and/or state changes of the frontend hardware.
  194. </para>
  195. </section>
  196. <section id="dvb-frontend-parameters">
  197. <title>frontend parameters</title>
  198. <para>The kind of parameters passed to the frontend device for tuning depend on
  199. the kind of hardware you are using.</para>
  200. <para>The struct <constant>dvb_frontend_parameters</constant> uses an
  201. union with specific per-system parameters. However, as newer delivery systems
  202. required more data, the structure size weren't enough to fit, and just
  203. extending its size would break the existing applications. So, those parameters
  204. were replaced by the usage of <link linkend="FE_GET_SET_PROPERTY">
  205. <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> ioctl's. The
  206. new API is flexible enough to add new parameters to existing delivery systems,
  207. and to add newer delivery systems.</para>
  208. <para>So, newer applications should use <link linkend="FE_GET_SET_PROPERTY">
  209. <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> instead, in
  210. order to be able to support the newer System Delivery like DVB-S2, DVB-T2,
  211. DVB-C2, ISDB, etc.</para>
  212. <para>All kinds of parameters are combined as an union in the FrontendParameters structure:</para>
  213. <programlisting>
  214. struct dvb_frontend_parameters {
  215. uint32_t frequency; /&#x22C6; (absolute) frequency in Hz for QAM/OFDM &#x22C6;/
  216. /&#x22C6; intermediate frequency in kHz for QPSK &#x22C6;/
  217. fe_spectral_inversion_t inversion;
  218. union {
  219. struct dvb_qpsk_parameters qpsk;
  220. struct dvb_qam_parameters qam;
  221. struct dvb_ofdm_parameters ofdm;
  222. struct dvb_vsb_parameters vsb;
  223. } u;
  224. };
  225. </programlisting>
  226. <para>In the case of QPSK frontends the <constant>frequency</constant> field specifies the intermediate
  227. frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
  228. the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
  229. OFDM frontends the <constant>frequency</constant> specifies the absolute frequency and is given in Hz.
  230. </para>
  231. <section id="dvb-qpsk-parameters">
  232. <title>QPSK parameters</title>
  233. <para>For satellite QPSK frontends you have to use the <constant>dvb_qpsk_parameters</constant> structure:</para>
  234. <programlisting>
  235. struct dvb_qpsk_parameters {
  236. uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
  237. fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
  238. };
  239. </programlisting>
  240. </section>
  241. <section id="dvb-qam-parameters">
  242. <title>QAM parameters</title>
  243. <para>for cable QAM frontend you use the <constant>dvb_qam_parameters</constant> structure:</para>
  244. <programlisting>
  245. struct dvb_qam_parameters {
  246. uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
  247. fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
  248. fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
  249. };
  250. </programlisting>
  251. </section>
  252. <section id="dvb-vsb-parameters">
  253. <title>VSB parameters</title>
  254. <para>ATSC frontends are supported by the <constant>dvb_vsb_parameters</constant> structure:</para>
  255. <programlisting>
  256. struct dvb_vsb_parameters {
  257. fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
  258. };
  259. </programlisting>
  260. </section>
  261. <section id="dvb-ofdm-parameters">
  262. <title>OFDM parameters</title>
  263. <para>DVB-T frontends are supported by the <constant>dvb_ofdm_parameters</constant> structure:</para>
  264. <programlisting>
  265. struct dvb_ofdm_parameters {
  266. fe_bandwidth_t bandwidth;
  267. fe_code_rate_t code_rate_HP; /&#x22C6; high priority stream code rate &#x22C6;/
  268. fe_code_rate_t code_rate_LP; /&#x22C6; low priority stream code rate &#x22C6;/
  269. fe_modulation_t constellation; /&#x22C6; modulation type (see above) &#x22C6;/
  270. fe_transmit_mode_t transmission_mode;
  271. fe_guard_interval_t guard_interval;
  272. fe_hierarchy_t hierarchy_information;
  273. };
  274. </programlisting>
  275. </section>
  276. <section id="fe-spectral-inversion-t">
  277. <title>frontend spectral inversion</title>
  278. <para>The Inversion field can take one of these values:
  279. </para>
  280. <programlisting>
  281. typedef enum fe_spectral_inversion {
  282. INVERSION_OFF,
  283. INVERSION_ON,
  284. INVERSION_AUTO
  285. } fe_spectral_inversion_t;
  286. </programlisting>
  287. <para>It indicates if spectral inversion should be presumed or not. In the automatic setting
  288. (<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by
  289. itself.
  290. </para>
  291. </section>
  292. <section id="fe-code-rate-t">
  293. <title>frontend code rate</title>
  294. <para>The possible values for the <constant>fec_inner</constant> field used on
  295. <link refend="dvb-qpsk-parameters"><constant>struct dvb_qpsk_parameters</constant></link> and
  296. <link refend="dvb-qam-parameters"><constant>struct dvb_qam_parameters</constant></link> are:
  297. </para>
  298. <programlisting>
  299. typedef enum fe_code_rate {
  300. FEC_NONE = 0,
  301. FEC_1_2,
  302. FEC_2_3,
  303. FEC_3_4,
  304. FEC_4_5,
  305. FEC_5_6,
  306. FEC_6_7,
  307. FEC_7_8,
  308. FEC_8_9,
  309. FEC_AUTO,
  310. FEC_3_5,
  311. FEC_9_10,
  312. } fe_code_rate_t;
  313. </programlisting>
  314. <para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
  315. detection.
  316. </para>
  317. </section>
  318. <section id="fe-modulation-t">
  319. <title>frontend modulation type for QAM, OFDM and VSB</title>
  320. <para>For cable and terrestrial frontends, e. g. for
  321. <link refend="dvb-qam-parameters"><constant>struct dvb_qpsk_parameters</constant></link>,
  322. <link refend="dvb-ofdm-parameters"><constant>struct dvb_qam_parameters</constant></link> and
  323. <link refend="dvb-vsb-parameters"><constant>struct dvb_qam_parameters</constant></link>,
  324. it needs to specify the quadrature modulation mode which can be one of the following:
  325. </para>
  326. <programlisting>
  327. typedef enum fe_modulation {
  328. QPSK,
  329. QAM_16,
  330. QAM_32,
  331. QAM_64,
  332. QAM_128,
  333. QAM_256,
  334. QAM_AUTO,
  335. VSB_8,
  336. VSB_16,
  337. PSK_8,
  338. APSK_16,
  339. APSK_32,
  340. DQPSK,
  341. } fe_modulation_t;
  342. </programlisting>
  343. </section>
  344. <para>Finally, there are several more parameters for OFDM:
  345. </para>
  346. <section id="fe-transmit-mode-t">
  347. <title>Number of carriers per channel</title>
  348. <programlisting>
  349. typedef enum fe_transmit_mode {
  350. TRANSMISSION_MODE_2K,
  351. TRANSMISSION_MODE_8K,
  352. TRANSMISSION_MODE_AUTO,
  353. TRANSMISSION_MODE_4K,
  354. TRANSMISSION_MODE_1K,
  355. TRANSMISSION_MODE_16K,
  356. TRANSMISSION_MODE_32K,
  357. } fe_transmit_mode_t;
  358. </programlisting>
  359. </section>
  360. <section id="fe-bandwidth-t">
  361. <title>frontend bandwidth</title>
  362. <programlisting>
  363. typedef enum fe_bandwidth {
  364. BANDWIDTH_8_MHZ,
  365. BANDWIDTH_7_MHZ,
  366. BANDWIDTH_6_MHZ,
  367. BANDWIDTH_AUTO,
  368. BANDWIDTH_5_MHZ,
  369. BANDWIDTH_10_MHZ,
  370. BANDWIDTH_1_712_MHZ,
  371. } fe_bandwidth_t;
  372. </programlisting>
  373. </section>
  374. <section id="fe-guard-interval-t">
  375. <title>frontend guard inverval</title>
  376. <programlisting>
  377. typedef enum fe_guard_interval {
  378. GUARD_INTERVAL_1_32,
  379. GUARD_INTERVAL_1_16,
  380. GUARD_INTERVAL_1_8,
  381. GUARD_INTERVAL_1_4,
  382. GUARD_INTERVAL_AUTO,
  383. GUARD_INTERVAL_1_128,
  384. GUARD_INTERVAL_19_128,
  385. GUARD_INTERVAL_19_256,
  386. } fe_guard_interval_t;
  387. </programlisting>
  388. </section>
  389. <section id="fe-hierarchy-t">
  390. <title>frontend hierarchy</title>
  391. <programlisting>
  392. typedef enum fe_hierarchy {
  393. HIERARCHY_NONE,
  394. HIERARCHY_1,
  395. HIERARCHY_2,
  396. HIERARCHY_4,
  397. HIERARCHY_AUTO
  398. } fe_hierarchy_t;
  399. </programlisting>
  400. </section>
  401. </section>
  402. <section id="dvb-frontend-event">
  403. <title>frontend events</title>
  404. <programlisting>
  405. struct dvb_frontend_event {
  406. fe_status_t status;
  407. struct dvb_frontend_parameters parameters;
  408. };
  409. </programlisting>
  410. </section>
  411. </section>
  412. <section id="frontend_fcalls">
  413. <title>Frontend Function Calls</title>
  414. <section id="frontend_f_open">
  415. <title>open()</title>
  416. <para>DESCRIPTION</para>
  417. <informaltable><tgroup cols="1"><tbody><row>
  418. <entry align="char">
  419. <para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)
  420. for subsequent use. Usually the first thing to do after a successful open is to
  421. find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
  422. <para>The device can be opened in read-only mode, which only allows monitoring of
  423. device status and statistics, or read/write mode, which allows any kind of use
  424. (e.g. performing tuning operations.)
  425. </para>
  426. <para>In a system with multiple front-ends, it is usually the case that multiple devices
  427. cannot be open in read/write mode simultaneously. As long as a front-end
  428. device is opened in read/write mode, other open() calls in read/write mode will
  429. either fail or block, depending on whether non-blocking or blocking mode was
  430. specified. A front-end device opened in blocking mode can later be put into
  431. non-blocking mode (and vice versa) using the F_SETFL command of the fcntl
  432. system call. This is a standard system call, documented in the Linux manual
  433. page for fcntl. When an open() call has succeeded, the device will be ready
  434. for use in the specified mode. This implies that the corresponding hardware is
  435. powered up, and that other front-ends may have been powered down to make
  436. that possible.</para>
  437. </entry>
  438. </row></tbody></tgroup></informaltable>
  439. <para>SYNOPSIS</para>
  440. <informaltable><tgroup cols="1"><tbody><row><entry
  441. align="char">
  442. <para>int open(const char &#x22C6;deviceName, int flags);</para>
  443. </entry>
  444. </row></tbody></tgroup></informaltable>
  445. <para>PARAMETERS
  446. </para>
  447. <informaltable><tgroup cols="2"><tbody><row><entry
  448. align="char">
  449. <para>const char
  450. *deviceName</para>
  451. </entry><entry
  452. align="char">
  453. <para>Name of specific video device.</para>
  454. </entry>
  455. </row><row><entry
  456. align="char">
  457. <para>int flags</para>
  458. </entry><entry
  459. align="char">
  460. <para>A bit-wise OR of the following flags:</para>
  461. </entry>
  462. </row><row><entry
  463. align="char">
  464. </entry><entry
  465. align="char">
  466. <para>O_RDONLY read-only access</para>
  467. </entry>
  468. </row><row><entry
  469. align="char">
  470. </entry><entry
  471. align="char">
  472. <para>O_RDWR read/write access</para>
  473. </entry>
  474. </row><row><entry
  475. align="char">
  476. </entry><entry
  477. align="char">
  478. <para>O_NONBLOCK open in non-blocking mode</para>
  479. </entry>
  480. </row><row><entry
  481. align="char">
  482. </entry><entry
  483. align="char">
  484. <para>(blocking mode is the default)</para>
  485. </entry>
  486. </row></tbody></tgroup></informaltable>
  487. <para>RETURN VALUE</para>
  488. <informaltable><tgroup cols="2"><tbody><row><entry
  489. align="char">
  490. <para>ENODEV</para>
  491. </entry><entry
  492. align="char">
  493. <para>Device driver not loaded/available.</para>
  494. </entry>
  495. </row><row><entry
  496. align="char">
  497. <para>EINTERNAL</para>
  498. </entry><entry
  499. align="char">
  500. <para>Internal error.</para>
  501. </entry>
  502. </row><row><entry
  503. align="char">
  504. <para>EBUSY</para>
  505. </entry><entry
  506. align="char">
  507. <para>Device or resource busy.</para>
  508. </entry>
  509. </row><row><entry
  510. align="char">
  511. <para>EINVAL</para>
  512. </entry><entry
  513. align="char">
  514. <para>Invalid argument.</para>
  515. </entry>
  516. </row></tbody></tgroup></informaltable>
  517. </section>
  518. <section id="frontend_f_close">
  519. <title>close()</title>
  520. <para>DESCRIPTION
  521. </para>
  522. <informaltable><tgroup cols="1"><tbody><row><entry
  523. align="char">
  524. <para>This system call closes a previously opened front-end device. After closing
  525. a front-end device, its corresponding hardware might be powered down
  526. automatically.</para>
  527. </entry>
  528. </row></tbody></tgroup></informaltable>
  529. <para>SYNOPSIS
  530. </para>
  531. <informaltable><tgroup cols="1"><tbody><row><entry
  532. align="char">
  533. <para>int close(int fd);</para>
  534. </entry>
  535. </row></tbody></tgroup></informaltable>
  536. <para>PARAMETERS
  537. </para>
  538. <informaltable><tgroup cols="2"><tbody><row><entry
  539. align="char">
  540. <para>int fd</para>
  541. </entry><entry
  542. align="char">
  543. <para>File descriptor returned by a previous call to open().</para>
  544. </entry>
  545. </row></tbody></tgroup></informaltable>
  546. <para>RETURN VALUE</para>
  547. <informaltable><tgroup cols="2"><tbody><row><entry
  548. align="char">
  549. <para>EBADF</para>
  550. </entry><entry
  551. align="char">
  552. <para>fd is not a valid open file descriptor.</para>
  553. </entry>
  554. </row></tbody></tgroup></informaltable>
  555. </section>
  556. <section id="FE_READ_STATUS">
  557. <title>FE_READ_STATUS</title>
  558. <para>DESCRIPTION
  559. </para>
  560. <informaltable><tgroup cols="1"><tbody><row><entry
  561. align="char">
  562. <para>This ioctl call returns status information about the front-end. This call only
  563. requires read-only access to the device.</para>
  564. </entry>
  565. </row></tbody></tgroup></informaltable>
  566. <para>SYNOPSIS
  567. </para>
  568. <informaltable><tgroup cols="1"><tbody><row><entry
  569. align="char">
  570. <para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,
  571. fe_status_t &#x22C6;status);</para>
  572. </entry>
  573. </row></tbody></tgroup></informaltable>
  574. <para>PARAMETERS
  575. </para>
  576. <informaltable><tgroup cols="2"><tbody><row><entry
  577. align="char">
  578. <para>int fd</para>
  579. </entry><entry
  580. align="char">
  581. <para>File descriptor returned by a previous call to open().</para>
  582. </entry>
  583. </row><row><entry
  584. align="char">
  585. <para>int request</para>
  586. </entry><entry
  587. align="char">
  588. <para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>
  589. </entry>
  590. </row><row><entry
  591. align="char">
  592. <para>struct fe_status_t
  593. *status</para>
  594. </entry><entry
  595. align="char">
  596. <para>Points to the location where the front-end status word is
  597. to be stored.</para>
  598. </entry>
  599. </row></tbody></tgroup></informaltable>
  600. <para>RETURN VALUE</para>
  601. <informaltable><tgroup cols="2"><tbody><row><entry
  602. align="char">
  603. <para>EBADF</para>
  604. </entry><entry
  605. align="char">
  606. <para>fd is not a valid open file descriptor.</para>
  607. </entry>
  608. </row><row><entry
  609. align="char">
  610. <para>EFAULT</para>
  611. </entry><entry
  612. align="char">
  613. <para>status points to invalid address.</para>
  614. </entry>
  615. </row></tbody></tgroup></informaltable>
  616. </section>
  617. <section id="FE_READ_BER">
  618. <title>FE_READ_BER</title>
  619. <para>DESCRIPTION
  620. </para>
  621. <informaltable><tgroup cols="1"><tbody><row><entry
  622. align="char">
  623. <para>This ioctl call returns the bit error rate for the signal currently
  624. received/demodulated by the front-end. For this command, read-only access to
  625. the device is sufficient.</para>
  626. </entry>
  627. </row></tbody></tgroup></informaltable>
  628. <para>SYNOPSIS
  629. </para>
  630. <informaltable><tgroup cols="1"><tbody><row><entry
  631. align="char">
  632. <para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
  633. uint32_t &#x22C6;ber);</para>
  634. </entry>
  635. </row></tbody></tgroup></informaltable>
  636. <para>PARAMETERS
  637. </para>
  638. <informaltable><tgroup cols="2"><tbody><row><entry
  639. align="char">
  640. <para>int fd</para>
  641. </entry><entry
  642. align="char">
  643. <para>File descriptor returned by a previous call to open().</para>
  644. </entry>
  645. </row><row><entry
  646. align="char">
  647. <para>int request</para>
  648. </entry><entry
  649. align="char">
  650. <para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
  651. </entry>
  652. </row><row><entry
  653. align="char">
  654. <para>uint32_t *ber</para>
  655. </entry><entry
  656. align="char">
  657. <para>The bit error rate is stored into *ber.</para>
  658. </entry>
  659. </row></tbody></tgroup></informaltable>
  660. &return-value-dvb;
  661. </section>
  662. <section id="FE_READ_SNR">
  663. <title>FE_READ_SNR</title>
  664. <para>DESCRIPTION
  665. </para>
  666. <informaltable><tgroup cols="1"><tbody><row><entry
  667. align="char">
  668. <para>This ioctl call returns the signal-to-noise ratio for the signal currently received
  669. by the front-end. For this command, read-only access to the device is sufficient.</para>
  670. </entry>
  671. </row></tbody></tgroup></informaltable>
  672. <para>SYNOPSIS
  673. </para>
  674. <informaltable><tgroup cols="1"><tbody><row><entry
  675. align="char">
  676. <para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t
  677. &#x22C6;snr);</para>
  678. </entry>
  679. </row></tbody></tgroup></informaltable>
  680. <para>PARAMETERS
  681. </para>
  682. <informaltable><tgroup cols="2"><tbody><row><entry
  683. align="char">
  684. <para>int fd</para>
  685. </entry><entry
  686. align="char">
  687. <para>File descriptor returned by a previous call to open().</para>
  688. </entry>
  689. </row><row><entry
  690. align="char">
  691. <para>int request</para>
  692. </entry><entry
  693. align="char">
  694. <para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>
  695. </entry>
  696. </row><row><entry
  697. align="char">
  698. <para>int16_t *snr</para>
  699. </entry><entry
  700. align="char">
  701. <para>The signal-to-noise ratio is stored into *snr.</para>
  702. </entry>
  703. </row></tbody></tgroup></informaltable>
  704. &return-value-dvb;
  705. </section>
  706. <section id="FE_READ_SIGNAL_STRENGTH">
  707. <title>FE_READ_SIGNAL_STRENGTH</title>
  708. <para>DESCRIPTION
  709. </para>
  710. <informaltable><tgroup cols="1"><tbody><row><entry
  711. align="char">
  712. <para>This ioctl call returns the signal strength value for the signal currently received
  713. by the front-end. For this command, read-only access to the device is sufficient.</para>
  714. </entry>
  715. </row></tbody></tgroup></informaltable>
  716. <para>SYNOPSIS
  717. </para>
  718. <informaltable><tgroup cols="1"><tbody><row><entry
  719. align="char">
  720. <para>int ioctl( int fd, int request =
  721. <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t &#x22C6;strength);</para>
  722. </entry>
  723. </row></tbody></tgroup></informaltable>
  724. <para>PARAMETERS
  725. </para>
  726. <informaltable><tgroup cols="2"><tbody><row><entry
  727. align="char">
  728. <para>int fd</para>
  729. </entry><entry
  730. align="char">
  731. <para>File descriptor returned by a previous call to open().</para>
  732. </entry>
  733. </row><row><entry
  734. align="char">
  735. <para>int request</para>
  736. </entry><entry
  737. align="char">
  738. <para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
  739. command.</para>
  740. </entry>
  741. </row><row><entry
  742. align="char">
  743. <para>int16_t *strength</para>
  744. </entry><entry
  745. align="char">
  746. <para>The signal strength value is stored into *strength.</para>
  747. </entry>
  748. </row></tbody></tgroup></informaltable>
  749. &return-value-dvb;
  750. </section>
  751. <section id="FE_READ_UNCORRECTED_BLOCKS">
  752. <title>FE_READ_UNCORRECTED_BLOCKS</title>
  753. <para>DESCRIPTION
  754. </para>
  755. <informaltable><tgroup cols="1"><tbody><row><entry
  756. align="char">
  757. <para>This ioctl call returns the number of uncorrected blocks detected by the device
  758. driver during its lifetime. For meaningful measurements, the increment in block
  759. count during a specific time interval should be calculated. For this command,
  760. read-only access to the device is sufficient.</para>
  761. </entry>
  762. </row><row><entry
  763. align="char">
  764. <para>Note that the counter will wrap to zero after its maximum count has been
  765. reached.</para>
  766. </entry>
  767. </row></tbody></tgroup></informaltable>
  768. <para>SYNOPSIS
  769. </para>
  770. <informaltable><tgroup cols="1"><tbody><row><entry
  771. align="char">
  772. <para>int ioctl( int fd, int request =
  773. <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t &#x22C6;ublocks);</para>
  774. </entry>
  775. </row></tbody></tgroup></informaltable>
  776. <para>PARAMETERS
  777. </para>
  778. <informaltable><tgroup cols="2"><tbody><row><entry
  779. align="char">
  780. <para>int fd</para>
  781. </entry><entry
  782. align="char">
  783. <para>File descriptor returned by a previous call to open().</para>
  784. </entry>
  785. </row><row><entry
  786. align="char">
  787. <para>int request</para>
  788. </entry><entry
  789. align="char">
  790. <para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
  791. command.</para>
  792. </entry>
  793. </row><row><entry
  794. align="char">
  795. <para>uint32_t *ublocks</para>
  796. </entry><entry
  797. align="char">
  798. <para>The total number of uncorrected blocks seen by the driver
  799. so far.</para>
  800. </entry>
  801. </row></tbody></tgroup></informaltable>
  802. &return-value-dvb;
  803. </section>
  804. <section id="FE_SET_FRONTEND">
  805. <title>FE_SET_FRONTEND</title>
  806. <para>DESCRIPTION
  807. </para>
  808. <informaltable><tgroup cols="1"><tbody><row><entry
  809. align="char">
  810. <para>This ioctl call starts a tuning operation using specified parameters. The result
  811. of this call will be successful if the parameters were valid and the tuning could
  812. be initiated. The result of the tuning operation in itself, however, will arrive
  813. asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
  814. FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before
  815. the previous one was completed, the previous operation will be aborted in favor
  816. of the new one. This command requires read/write access to the device.</para>
  817. </entry>
  818. </row></tbody></tgroup></informaltable>
  819. <para>SYNOPSIS
  820. </para>
  821. <informaltable><tgroup cols="1"><tbody><row><entry
  822. align="char">
  823. <para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
  824. struct dvb_frontend_parameters &#x22C6;p);</para>
  825. </entry>
  826. </row></tbody></tgroup></informaltable>
  827. <para>PARAMETERS
  828. </para>
  829. <informaltable><tgroup cols="2"><tbody><row><entry
  830. align="char">
  831. <para>int fd</para>
  832. </entry><entry
  833. align="char">
  834. <para>File descriptor returned by a previous call to open().</para>
  835. </entry>
  836. </row><row><entry
  837. align="char">
  838. <para>int request</para>
  839. </entry><entry
  840. align="char">
  841. <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
  842. </entry>
  843. </row><row><entry
  844. align="char">
  845. <para>struct
  846. dvb_frontend_parameters
  847. *p</para>
  848. </entry><entry
  849. align="char">
  850. <para>Points to parameters for tuning operation.</para>
  851. </entry>
  852. </row></tbody></tgroup></informaltable>
  853. &return-value-dvb;
  854. <informaltable><tgroup cols="2"><tbody><row><entry
  855. align="char">
  856. <para>EINVAL</para>
  857. </entry><entry
  858. align="char">
  859. <para>Maximum supported symbol rate reached.</para>
  860. </entry>
  861. </row></tbody></tgroup></informaltable>
  862. </section>
  863. <section id="FE_GET_FRONTEND">
  864. <title>FE_GET_FRONTEND</title>
  865. <para>DESCRIPTION
  866. </para>
  867. <informaltable><tgroup cols="1"><tbody><row><entry
  868. align="char">
  869. <para>This ioctl call queries the currently effective frontend parameters. For this
  870. command, read-only access to the device is sufficient.</para>
  871. </entry>
  872. </row></tbody></tgroup></informaltable>
  873. <para>SYNOPSIS
  874. </para>
  875. <informaltable><tgroup cols="1"><tbody><row><entry
  876. align="char">
  877. <para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
  878. struct dvb_frontend_parameters &#x22C6;p);</para>
  879. </entry>
  880. </row></tbody></tgroup></informaltable>
  881. <para>PARAMETERS
  882. </para>
  883. <informaltable><tgroup cols="2"><tbody><row><entry
  884. align="char">
  885. <para>int fd</para>
  886. </entry><entry
  887. align="char">
  888. <para>File descriptor returned by a previous call to open().</para>
  889. </entry>
  890. </row><row><entry
  891. align="char">
  892. <para>int request</para>
  893. </entry><entry
  894. align="char">
  895. <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
  896. </entry>
  897. </row><row><entry
  898. align="char">
  899. <para>struct
  900. dvb_frontend_parameters
  901. *p</para>
  902. </entry><entry
  903. align="char">
  904. <para>Points to parameters for tuning operation.</para>
  905. </entry>
  906. </row></tbody></tgroup></informaltable>
  907. &return-value-dvb;
  908. <informaltable><tgroup cols="2"><tbody><row><entry
  909. align="char">
  910. <para>EINVAL</para>
  911. </entry><entry
  912. align="char">
  913. <para>Maximum supported symbol rate reached.</para>
  914. </entry>
  915. </row></tbody></tgroup></informaltable>
  916. </section>
  917. <section id="FE_GET_EVENT">
  918. <title>FE_GET_EVENT</title>
  919. <para>DESCRIPTION
  920. </para>
  921. <informaltable><tgroup cols="1"><tbody><row><entry
  922. align="char">
  923. <para>This ioctl call returns a frontend event if available. If an event is not
  924. available, the behavior depends on whether the device is in blocking or
  925. non-blocking mode. In the latter case, the call fails immediately with errno
  926. set to EWOULDBLOCK. In the former case, the call blocks until an event
  927. becomes available.</para>
  928. </entry>
  929. </row><row><entry
  930. align="char">
  931. <para>The standard Linux poll() and/or select() system calls can be used with the
  932. device file descriptor to watch for new events. For select(), the file descriptor
  933. should be included in the exceptfds argument, and for poll(), POLLPRI should
  934. be specified as the wake-up condition. Since the event queue allocated is
  935. rather small (room for 8 events), the queue must be serviced regularly to avoid
  936. overflow. If an overflow happens, the oldest event is discarded from the queue,
  937. and an error (EOVERFLOW) occurs the next time the queue is read. After
  938. reporting the error condition in this fashion, subsequent
  939. <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
  940. calls will return events from the queue as usual.</para>
  941. </entry>
  942. </row><row><entry
  943. align="char">
  944. <para>For the sake of implementation simplicity, this command requires read/write
  945. access to the device.</para>
  946. </entry>
  947. </row></tbody></tgroup></informaltable>
  948. <para>SYNOPSIS
  949. </para>
  950. <informaltable><tgroup cols="1"><tbody><row><entry
  951. align="char">
  952. <para>int ioctl(int fd, int request = QPSK_GET_EVENT,
  953. struct dvb_frontend_event &#x22C6;ev);</para>
  954. </entry>
  955. </row></tbody></tgroup></informaltable>
  956. <para>PARAMETERS
  957. </para>
  958. <informaltable><tgroup cols="2"><tbody><row><entry
  959. align="char">
  960. <para>int fd</para>
  961. </entry><entry
  962. align="char">
  963. <para>File descriptor returned by a previous call to open().</para>
  964. </entry>
  965. </row><row><entry
  966. align="char">
  967. <para>int request</para>
  968. </entry><entry
  969. align="char">
  970. <para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
  971. </entry>
  972. </row><row><entry
  973. align="char">
  974. <para>struct
  975. dvb_frontend_event
  976. *ev</para>
  977. </entry><entry
  978. align="char">
  979. <para>Points to the location where the event,</para>
  980. </entry>
  981. </row><row><entry
  982. align="char">
  983. </entry><entry
  984. align="char">
  985. <para>if any, is to be stored.</para>
  986. </entry>
  987. </row></tbody></tgroup></informaltable>
  988. &return-value-dvb;
  989. <informaltable><tgroup cols="2"><tbody><row><entry
  990. align="char">
  991. <para>EWOULDBLOCK</para>
  992. </entry><entry
  993. align="char">
  994. <para>There is no event pending, and the device is in
  995. non-blocking mode.</para>
  996. </entry>
  997. </row><row><entry
  998. align="char">
  999. <para>EOVERFLOW</para>
  1000. </entry><entry
  1001. align="char">
  1002. <para>Overflow in event queue - one or more events were lost.</para>
  1003. </entry>
  1004. </row></tbody></tgroup></informaltable>
  1005. </section>
  1006. <section id="FE_GET_INFO">
  1007. <title>FE_GET_INFO</title>
  1008. <para>DESCRIPTION
  1009. </para>
  1010. <informaltable><tgroup cols="1"><tbody><row><entry
  1011. align="char">
  1012. <para>This ioctl call returns information about the front-end. This call only requires
  1013. read-only access to the device.</para>
  1014. </entry>
  1015. </row></tbody></tgroup></informaltable>
  1016. <para>SYNOPSIS
  1017. </para>
  1018. <informaltable><tgroup cols="1"><tbody><row><entry
  1019. align="char">
  1020. <para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct
  1021. dvb_frontend_info &#x22C6;info);</para>
  1022. </entry>
  1023. </row></tbody></tgroup></informaltable>
  1024. <para>PARAMETERS
  1025. </para>
  1026. <informaltable><tgroup cols="2"><tbody><row><entry
  1027. align="char">
  1028. <para>int fd</para>
  1029. </entry><entry
  1030. align="char">
  1031. <para>File descriptor returned by a previous call to open().</para>
  1032. </entry>
  1033. </row><row><entry
  1034. align="char">
  1035. <para>int request</para>
  1036. </entry><entry
  1037. align="char">
  1038. <para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>
  1039. </entry>
  1040. </row><row><entry
  1041. align="char">
  1042. <para>struct
  1043. dvb_frontend_info
  1044. *info</para>
  1045. </entry><entry
  1046. align="char">
  1047. <para>Points to the location where the front-end information is
  1048. to be stored.</para>
  1049. </entry>
  1050. </row></tbody></tgroup></informaltable>
  1051. &return-value-dvb;
  1052. </section>
  1053. <section id="FE_DISEQC_RESET_OVERLOAD">
  1054. <title>FE_DISEQC_RESET_OVERLOAD</title>
  1055. <para>DESCRIPTION
  1056. </para>
  1057. <informaltable><tgroup cols="1"><tbody><row><entry
  1058. align="char">
  1059. <para>If the bus has been automatically powered off due to power overload, this ioctl
  1060. call restores the power to the bus. The call requires read/write access to the
  1061. device. This call has no effect if the device is manually powered off. Not all
  1062. DVB adapters support this ioctl.</para>
  1063. </entry>
  1064. </row></tbody></tgroup></informaltable>
  1065. <para>SYNOPSIS
  1066. </para>
  1067. <informaltable><tgroup cols="1"><tbody><row><entry
  1068. align="char">
  1069. <para>int ioctl(int fd, int request =
  1070. <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>
  1071. </entry>
  1072. </row></tbody></tgroup></informaltable>
  1073. <para>PARAMETERS
  1074. </para>
  1075. <informaltable><tgroup cols="2"><tbody><row><entry
  1076. align="char">
  1077. <para>int fd</para>
  1078. </entry><entry
  1079. align="char">
  1080. <para>File descriptor returned by a previous call to open().</para>
  1081. </entry>
  1082. </row><row><entry
  1083. align="char">
  1084. <para>int request</para>
  1085. </entry><entry
  1086. align="char">
  1087. <para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this
  1088. command.</para>
  1089. </entry>
  1090. </row></tbody></tgroup></informaltable>
  1091. &return-value-dvb;
  1092. </section>
  1093. <section id="FE_DISEQC_SEND_MASTER_CMD">
  1094. <title>FE_DISEQC_SEND_MASTER_CMD</title>
  1095. <para>DESCRIPTION
  1096. </para>
  1097. <informaltable><tgroup cols="1"><tbody><row><entry
  1098. align="char">
  1099. <para>This ioctl call is used to send a a DiSEqC command.</para>
  1100. </entry>
  1101. </row></tbody></tgroup></informaltable>
  1102. <para>SYNOPSIS
  1103. </para>
  1104. <informaltable><tgroup cols="1"><tbody><row><entry
  1105. align="char">
  1106. <para>int ioctl(int fd, int request =
  1107. <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct
  1108. dvb_diseqc_master_cmd &#x22C6;cmd);</para>
  1109. </entry>
  1110. </row></tbody></tgroup></informaltable>
  1111. <para>PARAMETERS
  1112. </para>
  1113. <informaltable><tgroup cols="2"><tbody><row><entry
  1114. align="char">
  1115. <para>int fd</para>
  1116. </entry><entry
  1117. align="char">
  1118. <para>File descriptor returned by a previous call to open().</para>
  1119. </entry>
  1120. </row><row><entry
  1121. align="char">
  1122. <para>int request</para>
  1123. </entry><entry
  1124. align="char">
  1125. <para>Equals <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> for this
  1126. command.</para>
  1127. </entry>
  1128. </row><row><entry
  1129. align="char">
  1130. <para>struct
  1131. dvb_diseqc_master_cmd
  1132. *cmd</para>
  1133. </entry><entry
  1134. align="char">
  1135. <para>Pointer to the command to be transmitted.</para>
  1136. </entry>
  1137. </row></tbody></tgroup></informaltable>
  1138. &return-value-dvb;
  1139. </section>
  1140. <section id="FE_DISEQC_RECV_SLAVE_REPLY">
  1141. <title>FE_DISEQC_RECV_SLAVE_REPLY</title>
  1142. <para>DESCRIPTION
  1143. </para>
  1144. <informaltable><tgroup cols="1"><tbody><row><entry
  1145. align="char">
  1146. <para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>
  1147. </entry>
  1148. </row></tbody></tgroup></informaltable>
  1149. <para>SYNOPSIS
  1150. </para>
  1151. <informaltable><tgroup cols="1"><tbody><row><entry
  1152. align="char">
  1153. <para>int ioctl(int fd, int request =
  1154. <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct
  1155. dvb_diseqc_slave_reply &#x22C6;reply);</para>
  1156. </entry>
  1157. </row></tbody></tgroup></informaltable>
  1158. <para>PARAMETERS
  1159. </para>
  1160. <informaltable><tgroup cols="2"><tbody><row><entry
  1161. align="char">
  1162. <para>int fd</para>
  1163. </entry><entry
  1164. align="char">
  1165. <para>File descriptor returned by a previous call to open().</para>
  1166. </entry>
  1167. </row><row><entry
  1168. align="char">
  1169. <para>int request</para>
  1170. </entry><entry
  1171. align="char">
  1172. <para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this
  1173. command.</para>
  1174. </entry>
  1175. </row><row><entry
  1176. align="char">
  1177. <para>struct
  1178. dvb_diseqc_slave_reply
  1179. *reply</para>
  1180. </entry><entry
  1181. align="char">
  1182. <para>Pointer to the command to be received.</para>
  1183. </entry>
  1184. </row></tbody></tgroup></informaltable>
  1185. &return-value-dvb;
  1186. </section>
  1187. <section id="FE_DISEQC_SEND_BURST">
  1188. <title>FE_DISEQC_SEND_BURST</title>
  1189. <para>DESCRIPTION
  1190. </para>
  1191. <informaltable><tgroup cols="1"><tbody><row><entry
  1192. align="char">
  1193. <para>This ioctl call is used to send a 22KHz tone burst.</para>
  1194. </entry>
  1195. </row></tbody></tgroup></informaltable>
  1196. <para>SYNOPSIS
  1197. </para>
  1198. <informaltable><tgroup cols="1"><tbody><row><entry
  1199. align="char">
  1200. <para>int ioctl(int fd, int request =
  1201. <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para>
  1202. </entry>
  1203. </row></tbody></tgroup></informaltable>
  1204. <para>PARAMETERS
  1205. </para>
  1206. <informaltable><tgroup cols="2"><tbody><row><entry
  1207. align="char">
  1208. <para>int fd</para>
  1209. </entry><entry
  1210. align="char">
  1211. <para>File descriptor returned by a previous call to open().</para>
  1212. </entry>
  1213. </row><row><entry
  1214. align="char">
  1215. <para>int request</para>
  1216. </entry><entry
  1217. align="char">
  1218. <para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para>
  1219. </entry>
  1220. </row><row><entry
  1221. align="char">
  1222. <para>fe_sec_mini_cmd_t
  1223. burst</para>
  1224. </entry><entry
  1225. align="char">
  1226. <para>burst A or B.</para>
  1227. </entry>
  1228. </row></tbody></tgroup></informaltable>
  1229. &return-value-dvb;
  1230. </section>
  1231. <section id="FE_SET_TONE">
  1232. <title>FE_SET_TONE</title>
  1233. <para>DESCRIPTION
  1234. </para>
  1235. <informaltable><tgroup cols="1"><tbody><row><entry
  1236. align="char">
  1237. <para>This call is used to set the generation of the continuous 22kHz tone. This call
  1238. requires read/write permissions.</para>
  1239. </entry>
  1240. </row></tbody></tgroup></informaltable>
  1241. <para>SYNOPSIS
  1242. </para>
  1243. <informaltable><tgroup cols="1"><tbody><row><entry
  1244. align="char">
  1245. <para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,
  1246. fe_sec_tone_mode_t tone);</para>
  1247. </entry>
  1248. </row></tbody></tgroup></informaltable>
  1249. <para>PARAMETERS
  1250. </para>
  1251. <informaltable><tgroup cols="2"><tbody><row><entry
  1252. align="char">
  1253. <para>int fd</para>
  1254. </entry><entry
  1255. align="char">
  1256. <para>File descriptor returned by a previous call to open().</para>
  1257. </entry>
  1258. </row><row><entry
  1259. align="char">
  1260. <para>int request</para>
  1261. </entry><entry
  1262. align="char">
  1263. <para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>
  1264. </entry>
  1265. </row><row><entry
  1266. align="char">
  1267. <para>fe_sec_tone_mode_t
  1268. tone</para>
  1269. </entry><entry
  1270. align="char">
  1271. <para>The requested tone generation mode (on/off).</para>
  1272. </entry>
  1273. </row></tbody></tgroup></informaltable>
  1274. &return-value-dvb;
  1275. </section>
  1276. <section id="FE_SET_VOLTAGE">
  1277. <title>FE_SET_VOLTAGE</title>
  1278. <para>DESCRIPTION
  1279. </para>
  1280. <informaltable><tgroup cols="1"><tbody><row><entry
  1281. align="char">
  1282. <para>This call is used to set the bus voltage. This call requires read/write
  1283. permissions.</para>
  1284. </entry>
  1285. </row></tbody></tgroup></informaltable>
  1286. <para>SYNOPSIS
  1287. </para>
  1288. <informaltable><tgroup cols="1"><tbody><row><entry
  1289. align="char">
  1290. <para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,
  1291. fe_sec_voltage_t voltage);</para>
  1292. </entry>
  1293. </row></tbody></tgroup></informaltable>
  1294. <para>PARAMETERS
  1295. </para>
  1296. <informaltable><tgroup cols="2"><tbody><row><entry
  1297. align="char">
  1298. <para>int fd</para>
  1299. </entry><entry
  1300. align="char">
  1301. <para>File descriptor returned by a previous call to open().</para>
  1302. </entry>
  1303. </row><row><entry
  1304. align="char">
  1305. <para>int request</para>
  1306. </entry><entry
  1307. align="char">
  1308. <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
  1309. </entry>
  1310. </row><row><entry
  1311. align="char">
  1312. <para>fe_sec_voltage_t
  1313. voltage</para>
  1314. </entry><entry
  1315. align="char">
  1316. <para>The requested bus voltage.</para>
  1317. </entry>
  1318. </row></tbody></tgroup></informaltable>
  1319. &return-value-dvb;
  1320. </section>
  1321. <section id="FE_ENABLE_HIGH_LNB_VOLTAGE">
  1322. <title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>
  1323. <para>DESCRIPTION
  1324. </para>
  1325. <informaltable><tgroup cols="1"><tbody><row><entry
  1326. align="char">
  1327. <para>If high != 0 enables slightly higher voltages instead of 13/18V (to compensate
  1328. for long cables). This call requires read/write permissions. Not all DVB
  1329. adapters support this ioctl.</para>
  1330. </entry>
  1331. </row></tbody></tgroup></informaltable>
  1332. <para>SYNOPSIS
  1333. </para>
  1334. <informaltable><tgroup cols="1"><tbody><row><entry
  1335. align="char">
  1336. <para>int ioctl(int fd, int request =
  1337. <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para>
  1338. </entry>
  1339. </row></tbody></tgroup></informaltable>
  1340. <para>PARAMETERS
  1341. </para>
  1342. <informaltable><tgroup cols="2"><tbody><row><entry
  1343. align="char">
  1344. <para>int fd</para>
  1345. </entry><entry
  1346. align="char">
  1347. <para>File descriptor returned by a previous call to open().</para>
  1348. </entry>
  1349. </row><row><entry
  1350. align="char">
  1351. <para>int request</para>
  1352. </entry><entry
  1353. align="char">
  1354. <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
  1355. </entry>
  1356. </row><row><entry
  1357. align="char">
  1358. <para>int high</para>
  1359. </entry><entry
  1360. align="char">
  1361. <para>The requested bus voltage.</para>
  1362. </entry>
  1363. </row></tbody></tgroup></informaltable>
  1364. &return-value-dvb;
  1365. </section>
  1366. <section id="FE_SET_FRONTEND_TUNE_MODE">
  1367. <title>FE_SET_FRONTEND_TUNE_MODE</title>
  1368. <para>DESCRIPTION</para>
  1369. <informaltable><tgroup cols="1"><tbody><row>
  1370. <entry align="char">
  1371. <para>Allow setting tuner mode flags to the frontend.</para>
  1372. </entry>
  1373. </row></tbody></tgroup></informaltable>
  1374. <para>SYNOPSIS</para>
  1375. <informaltable><tgroup cols="1"><tbody><row>
  1376. <entry align="char">
  1377. <para>int ioctl(int fd, int request =
  1378. <link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>
  1379. </entry>
  1380. </row></tbody></tgroup></informaltable>
  1381. <para>PARAMETERS</para>
  1382. <informaltable><tgroup cols="2"><tbody><row>
  1383. <entry align="char">
  1384. <para>unsigned int flags</para>
  1385. </entry>
  1386. <entry align="char">
  1387. <para>
  1388. FE_TUNE_MODE_ONESHOT When set, this flag will disable any zigzagging or other "normal" tuning behaviour. Additionally, there will be no automatic monitoring of the lock status, and hence no frontend events will be generated. If a frontend device is closed, this flag will be automatically turned off when the device is reopened read-write.
  1389. </para>
  1390. </entry>
  1391. </row></tbody></tgroup></informaltable>
  1392. &return-value-dvb;
  1393. </section>
  1394. <section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
  1395. <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
  1396. <para>DESCRIPTION</para>
  1397. <informaltable><tgroup cols="1"><tbody><row>
  1398. <entry align="char">
  1399. <para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
  1400. <para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
  1401. <para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
  1402. </entry>
  1403. </row></tbody></tgroup></informaltable>
  1404. <para>SYNOPSIS</para>
  1405. <informaltable><tgroup cols="1"><tbody><row>
  1406. <entry align="char">
  1407. <para>int ioctl(int fd, int request =
  1408. <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
  1409. </entry>
  1410. </row></tbody></tgroup></informaltable>
  1411. <para>PARAMETERS</para>
  1412. <informaltable><tgroup cols="2"><tbody><row>
  1413. <entry align="char">
  1414. <para>unsigned long cmd</para>
  1415. </entry>
  1416. <entry align="char">
  1417. <para>
  1418. sends the specified raw cmd to the dish via DISEqC.
  1419. </para>
  1420. </entry>
  1421. </row></tbody></tgroup></informaltable>
  1422. &return-value-dvb;
  1423. </section>
  1424. </section>
  1425. &sub-dvbproperty;