frontend.xml 45 KB

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