frontend.xml 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942
  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">
  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. All kinds of parameters are combined as an
  200. union in the FrontendParameters structure:</para>
  201. <programlisting>
  202. struct dvb_frontend_parameters {
  203. uint32_t frequency; /&#x22C6; (absolute) frequency in Hz for QAM/OFDM &#x22C6;/
  204. /&#x22C6; intermediate frequency in kHz for QPSK &#x22C6;/
  205. fe_spectral_inversion_t inversion;
  206. union {
  207. struct dvb_qpsk_parameters qpsk;
  208. struct dvb_qam_parameters qam;
  209. struct dvb_ofdm_parameters ofdm;
  210. struct dvb_vsb_parameters vsb;
  211. } u;
  212. };
  213. </programlisting>
  214. <para>In the case of QPSK frontends the <constant>frequency</constant> field specifies the intermediate
  215. frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
  216. the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
  217. OFDM frontends the <constant>frequency</constant> specifies the absolute frequency and is given in Hz.
  218. </para>
  219. <section id="dvb-qpsk-parameters">
  220. <title>QPSK parameters</title>
  221. <para>For satellite QPSK frontends you have to use the <constant>dvb_qpsk_parameters</constant> structure:</para>
  222. <programlisting>
  223. struct dvb_qpsk_parameters {
  224. uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
  225. fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
  226. };
  227. </programlisting>
  228. </section>
  229. <section id="dvb-qam-parameters">
  230. <title>QAM parameters</title>
  231. <para>for cable QAM frontend you use the <constant>dvb_qam_parameters</constant> structure:</para>
  232. <programlisting>
  233. struct dvb_qam_parameters {
  234. uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
  235. fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
  236. fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
  237. };
  238. </programlisting>
  239. </section>
  240. <section id="dvb-vsb-parameters">
  241. <title>VSB parameters</title>
  242. <para>DVB-T frontends are supported by the <constant>dvb_vsb_parameters</constant> structure:</para>
  243. <programlisting>
  244. struct dvb_vsb_parameters {
  245. fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
  246. };
  247. </programlisting>
  248. </section>
  249. <section id="dvb-ofdm-parameters">
  250. <title>OFDM parameters</title>
  251. <para>DVB-T frontends are supported by the <constant>dvb_ofdm_parameters</constant> structure:</para>
  252. <programlisting>
  253. struct dvb_ofdm_parameters {
  254. fe_bandwidth_t bandwidth;
  255. fe_code_rate_t code_rate_HP; /&#x22C6; high priority stream code rate &#x22C6;/
  256. fe_code_rate_t code_rate_LP; /&#x22C6; low priority stream code rate &#x22C6;/
  257. fe_modulation_t constellation; /&#x22C6; modulation type (see above) &#x22C6;/
  258. fe_transmit_mode_t transmission_mode;
  259. fe_guard_interval_t guard_interval;
  260. fe_hierarchy_t hierarchy_information;
  261. };
  262. </programlisting>
  263. </section>
  264. <section id="fe-spectral-inversion-t">
  265. <title>frontend spectral inversion</title>
  266. <para>The Inversion field can take one of these values:
  267. </para>
  268. <programlisting>
  269. typedef enum fe_spectral_inversion {
  270. INVERSION_OFF,
  271. INVERSION_ON,
  272. INVERSION_AUTO
  273. } fe_spectral_inversion_t;
  274. </programlisting>
  275. <para>It indicates if spectral inversion should be presumed or not. In the automatic setting
  276. (<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by
  277. itself.
  278. </para>
  279. </section>
  280. <section id="fe-code-rate-t">
  281. <title>frontend code rate</title>
  282. <para>The possible values for the <constant>fec_inner</constant> field used on
  283. <link refend="dvb-qpsk-parameters"><constant>struct dvb_qpsk_parameters</constant></link> and
  284. <link refend="dvb-qam-parameters"><constant>struct dvb_qam_parameters</constant></link> are:
  285. </para>
  286. <programlisting>
  287. typedef enum fe_code_rate {
  288. FEC_NONE = 0,
  289. FEC_1_2,
  290. FEC_2_3,
  291. FEC_3_4,
  292. FEC_4_5,
  293. FEC_5_6,
  294. FEC_6_7,
  295. FEC_7_8,
  296. FEC_8_9,
  297. FEC_AUTO,
  298. FEC_3_5,
  299. FEC_9_10,
  300. } fe_code_rate_t;
  301. </programlisting>
  302. <para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
  303. detection.
  304. </para>
  305. </section>
  306. <section id="fe-modulation-t">
  307. <title>frontend modulation type for QAM, OFDM and VSB</title>
  308. <para>For cable and terrestrial frontends, e. g. for
  309. <link refend="dvb-qam-parameters"><constant>struct dvb_qpsk_parameters</constant></link>,
  310. <link refend="dvb-ofdm-parameters"><constant>struct dvb_qam_parameters</constant></link> and
  311. <link refend="dvb-vsb-parameters"><constant>struct dvb_qam_parameters</constant></link>,
  312. it needs to specify the quadrature modulation mode which can be one of the following:
  313. </para>
  314. <programlisting>
  315. typedef enum fe_modulation {
  316. QPSK,
  317. QAM_16,
  318. QAM_32,
  319. QAM_64,
  320. QAM_128,
  321. QAM_256,
  322. QAM_AUTO,
  323. VSB_8,
  324. VSB_16,
  325. PSK_8,
  326. APSK_16,
  327. APSK_32,
  328. DQPSK,
  329. } fe_modulation_t;
  330. </programlisting>
  331. </section>
  332. <para>Finally, there are several more parameters for OFDM:
  333. </para>
  334. <section id="fe-transmit-mode-t">
  335. <title>Number of carriers per channel</title>
  336. <programlisting>
  337. typedef enum fe_transmit_mode {
  338. TRANSMISSION_MODE_2K,
  339. TRANSMISSION_MODE_8K,
  340. TRANSMISSION_MODE_AUTO,
  341. TRANSMISSION_MODE_4K,
  342. TRANSMISSION_MODE_1K,
  343. TRANSMISSION_MODE_16K,
  344. TRANSMISSION_MODE_32K,
  345. } fe_transmit_mode_t;
  346. </programlisting>
  347. </section>
  348. <section id="fe-bandwidth-t">
  349. <title>frontend bandwidth</title>
  350. <programlisting>
  351. typedef enum fe_bandwidth {
  352. BANDWIDTH_8_MHZ,
  353. BANDWIDTH_7_MHZ,
  354. BANDWIDTH_6_MHZ,
  355. BANDWIDTH_AUTO,
  356. BANDWIDTH_5_MHZ,
  357. BANDWIDTH_10_MHZ,
  358. BANDWIDTH_1_712_MHZ,
  359. } fe_bandwidth_t;
  360. </programlisting>
  361. </section>
  362. <section id="fe-guard-interval-t">
  363. <title>frontend guard inverval</title>
  364. <programlisting>
  365. typedef enum fe_guard_interval {
  366. GUARD_INTERVAL_1_32,
  367. GUARD_INTERVAL_1_16,
  368. GUARD_INTERVAL_1_8,
  369. GUARD_INTERVAL_1_4,
  370. GUARD_INTERVAL_AUTO,
  371. GUARD_INTERVAL_1_128,
  372. GUARD_INTERVAL_19_128,
  373. GUARD_INTERVAL_19_256,
  374. } fe_guard_interval_t;
  375. </programlisting>
  376. </section>
  377. <section id="fe-hierarchy-t">
  378. <title>frontend hierarchy</title>
  379. <programlisting>
  380. typedef enum fe_hierarchy {
  381. HIERARCHY_NONE,
  382. HIERARCHY_1,
  383. HIERARCHY_2,
  384. HIERARCHY_4,
  385. HIERARCHY_AUTO
  386. } fe_hierarchy_t;
  387. </programlisting>
  388. </section>
  389. </section>
  390. <section id="dvb-frontend-event">
  391. <title>frontend events</title>
  392. <programlisting>
  393. struct dvb_frontend_event {
  394. fe_status_t status;
  395. struct dvb_frontend_parameters parameters;
  396. };
  397. </programlisting>
  398. </section>
  399. </section>
  400. <section id="frontend_fcalls">
  401. <title>Frontend Function Calls</title>
  402. <section id="frontend_f_open">
  403. <title>open()</title>
  404. <para>DESCRIPTION</para>
  405. <informaltable><tgroup cols="1"><tbody><row>
  406. <entry align="char">
  407. <para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)
  408. for subsequent use. Usually the first thing to do after a successful open is to
  409. find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
  410. <para>The device can be opened in read-only mode, which only allows monitoring of
  411. device status and statistics, or read/write mode, which allows any kind of use
  412. (e.g. performing tuning operations.)
  413. </para>
  414. <para>In a system with multiple front-ends, it is usually the case that multiple devices
  415. cannot be open in read/write mode simultaneously. As long as a front-end
  416. device is opened in read/write mode, other open() calls in read/write mode will
  417. either fail or block, depending on whether non-blocking or blocking mode was
  418. specified. A front-end device opened in blocking mode can later be put into
  419. non-blocking mode (and vice versa) using the F_SETFL command of the fcntl
  420. system call. This is a standard system call, documented in the Linux manual
  421. page for fcntl. When an open() call has succeeded, the device will be ready
  422. for use in the specified mode. This implies that the corresponding hardware is
  423. powered up, and that other front-ends may have been powered down to make
  424. that possible.</para>
  425. </entry>
  426. </row></tbody></tgroup></informaltable>
  427. <para>SYNOPSIS</para>
  428. <informaltable><tgroup cols="1"><tbody><row><entry
  429. align="char">
  430. <para>int open(const char &#x22C6;deviceName, int flags);</para>
  431. </entry>
  432. </row></tbody></tgroup></informaltable>
  433. <para>PARAMETERS
  434. </para>
  435. <informaltable><tgroup cols="2"><tbody><row><entry
  436. align="char">
  437. <para>const char
  438. *deviceName</para>
  439. </entry><entry
  440. align="char">
  441. <para>Name of specific video device.</para>
  442. </entry>
  443. </row><row><entry
  444. align="char">
  445. <para>int flags</para>
  446. </entry><entry
  447. align="char">
  448. <para>A bit-wise OR of the following flags:</para>
  449. </entry>
  450. </row><row><entry
  451. align="char">
  452. </entry><entry
  453. align="char">
  454. <para>O_RDONLY read-only access</para>
  455. </entry>
  456. </row><row><entry
  457. align="char">
  458. </entry><entry
  459. align="char">
  460. <para>O_RDWR read/write access</para>
  461. </entry>
  462. </row><row><entry
  463. align="char">
  464. </entry><entry
  465. align="char">
  466. <para>O_NONBLOCK open in non-blocking mode</para>
  467. </entry>
  468. </row><row><entry
  469. align="char">
  470. </entry><entry
  471. align="char">
  472. <para>(blocking mode is the default)</para>
  473. </entry>
  474. </row></tbody></tgroup></informaltable>
  475. <para>ERRORS
  476. </para>
  477. <informaltable><tgroup cols="2"><tbody><row><entry
  478. align="char">
  479. <para>ENODEV</para>
  480. </entry><entry
  481. align="char">
  482. <para>Device driver not loaded/available.</para>
  483. </entry>
  484. </row><row><entry
  485. align="char">
  486. <para>EINTERNAL</para>
  487. </entry><entry
  488. align="char">
  489. <para>Internal error.</para>
  490. </entry>
  491. </row><row><entry
  492. align="char">
  493. <para>EBUSY</para>
  494. </entry><entry
  495. align="char">
  496. <para>Device or resource busy.</para>
  497. </entry>
  498. </row><row><entry
  499. align="char">
  500. <para>EINVAL</para>
  501. </entry><entry
  502. align="char">
  503. <para>Invalid argument.</para>
  504. </entry>
  505. </row></tbody></tgroup></informaltable>
  506. </section>
  507. <section id="frontend_f_close">
  508. <title>close()</title>
  509. <para>DESCRIPTION
  510. </para>
  511. <informaltable><tgroup cols="1"><tbody><row><entry
  512. align="char">
  513. <para>This system call closes a previously opened front-end device. After closing
  514. a front-end device, its corresponding hardware might be powered down
  515. automatically.</para>
  516. </entry>
  517. </row></tbody></tgroup></informaltable>
  518. <para>SYNOPSIS
  519. </para>
  520. <informaltable><tgroup cols="1"><tbody><row><entry
  521. align="char">
  522. <para>int close(int fd);</para>
  523. </entry>
  524. </row></tbody></tgroup></informaltable>
  525. <para>PARAMETERS
  526. </para>
  527. <informaltable><tgroup cols="2"><tbody><row><entry
  528. align="char">
  529. <para>int fd</para>
  530. </entry><entry
  531. align="char">
  532. <para>File descriptor returned by a previous call to open().</para>
  533. </entry>
  534. </row></tbody></tgroup></informaltable>
  535. <para>ERRORS
  536. </para>
  537. <informaltable><tgroup cols="2"><tbody><row><entry
  538. align="char">
  539. <para>EBADF</para>
  540. </entry><entry
  541. align="char">
  542. <para>fd is not a valid open file descriptor.</para>
  543. </entry>
  544. </row></tbody></tgroup></informaltable>
  545. </section>
  546. <section id="FE_READ_STATUS">
  547. <title>FE_READ_STATUS</title>
  548. <para>DESCRIPTION
  549. </para>
  550. <informaltable><tgroup cols="1"><tbody><row><entry
  551. align="char">
  552. <para>This ioctl call returns status information about the front-end. This call only
  553. requires read-only access to the device.</para>
  554. </entry>
  555. </row></tbody></tgroup></informaltable>
  556. <para>SYNOPSIS
  557. </para>
  558. <informaltable><tgroup cols="1"><tbody><row><entry
  559. align="char">
  560. <para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,
  561. fe_status_t &#x22C6;status);</para>
  562. </entry>
  563. </row></tbody></tgroup></informaltable>
  564. <para>PARAMETERS
  565. </para>
  566. <informaltable><tgroup cols="2"><tbody><row><entry
  567. align="char">
  568. <para>int fd</para>
  569. </entry><entry
  570. align="char">
  571. <para>File descriptor returned by a previous call to open().</para>
  572. </entry>
  573. </row><row><entry
  574. align="char">
  575. <para>int request</para>
  576. </entry><entry
  577. align="char">
  578. <para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>
  579. </entry>
  580. </row><row><entry
  581. align="char">
  582. <para>struct fe_status_t
  583. *status</para>
  584. </entry><entry
  585. align="char">
  586. <para>Points to the location where the front-end status word is
  587. to be stored.</para>
  588. </entry>
  589. </row></tbody></tgroup></informaltable>
  590. <para>ERRORS
  591. </para>
  592. <informaltable><tgroup cols="2"><tbody><row><entry
  593. align="char">
  594. <para>EBADF</para>
  595. </entry><entry
  596. align="char">
  597. <para>fd is not a valid open file descriptor.</para>
  598. </entry>
  599. </row><row><entry
  600. align="char">
  601. <para>EFAULT</para>
  602. </entry><entry
  603. align="char">
  604. <para>status points to invalid address.</para>
  605. </entry>
  606. </row></tbody></tgroup></informaltable>
  607. </section>
  608. <section id="FE_READ_BER">
  609. <title>FE_READ_BER</title>
  610. <para>DESCRIPTION
  611. </para>
  612. <informaltable><tgroup cols="1"><tbody><row><entry
  613. align="char">
  614. <para>This ioctl call returns the bit error rate for the signal currently
  615. received/demodulated by the front-end. For this command, read-only access to
  616. the device is sufficient.</para>
  617. </entry>
  618. </row></tbody></tgroup></informaltable>
  619. <para>SYNOPSIS
  620. </para>
  621. <informaltable><tgroup cols="1"><tbody><row><entry
  622. align="char">
  623. <para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
  624. uint32_t &#x22C6;ber);</para>
  625. </entry>
  626. </row></tbody></tgroup></informaltable>
  627. <para>PARAMETERS
  628. </para>
  629. <informaltable><tgroup cols="2"><tbody><row><entry
  630. align="char">
  631. <para>int fd</para>
  632. </entry><entry
  633. align="char">
  634. <para>File descriptor returned by a previous call to open().</para>
  635. </entry>
  636. </row><row><entry
  637. align="char">
  638. <para>int request</para>
  639. </entry><entry
  640. align="char">
  641. <para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
  642. </entry>
  643. </row><row><entry
  644. align="char">
  645. <para>uint32_t *ber</para>
  646. </entry><entry
  647. align="char">
  648. <para>The bit error rate is stored into *ber.</para>
  649. </entry>
  650. </row></tbody></tgroup></informaltable>
  651. <para>ERRORS
  652. </para>
  653. <informaltable><tgroup cols="2"><tbody><row><entry
  654. align="char">
  655. <para>EBADF</para>
  656. </entry><entry
  657. align="char">
  658. <para>fd is not a valid open file descriptor.</para>
  659. </entry>
  660. </row><row><entry
  661. align="char">
  662. <para>EFAULT</para>
  663. </entry><entry
  664. align="char">
  665. <para>ber points to invalid address.</para>
  666. </entry>
  667. </row><row><entry
  668. align="char">
  669. <para>ENOSIGNAL</para>
  670. </entry><entry
  671. align="char">
  672. <para>There is no signal, thus no meaningful bit error rate. Also
  673. returned if the front-end is not turned on.</para>
  674. </entry>
  675. </row><row><entry
  676. align="char">
  677. <para>ENOSYS</para>
  678. </entry><entry
  679. align="char">
  680. <para>Function not available for this device.</para>
  681. </entry>
  682. </row></tbody></tgroup></informaltable>
  683. </section>
  684. <section id="FE_READ_SNR">
  685. <title>FE_READ_SNR</title>
  686. <para>DESCRIPTION
  687. </para>
  688. <informaltable><tgroup cols="1"><tbody><row><entry
  689. align="char">
  690. <para>This ioctl call returns the signal-to-noise ratio for the signal currently received
  691. by the front-end. For this command, read-only access to the device is sufficient.</para>
  692. </entry>
  693. </row></tbody></tgroup></informaltable>
  694. <para>SYNOPSIS
  695. </para>
  696. <informaltable><tgroup cols="1"><tbody><row><entry
  697. align="char">
  698. <para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t
  699. &#x22C6;snr);</para>
  700. </entry>
  701. </row></tbody></tgroup></informaltable>
  702. <para>PARAMETERS
  703. </para>
  704. <informaltable><tgroup cols="2"><tbody><row><entry
  705. align="char">
  706. <para>int fd</para>
  707. </entry><entry
  708. align="char">
  709. <para>File descriptor returned by a previous call to open().</para>
  710. </entry>
  711. </row><row><entry
  712. align="char">
  713. <para>int request</para>
  714. </entry><entry
  715. align="char">
  716. <para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>
  717. </entry>
  718. </row><row><entry
  719. align="char">
  720. <para>int16_t *snr</para>
  721. </entry><entry
  722. align="char">
  723. <para>The signal-to-noise ratio is stored into *snr.</para>
  724. </entry>
  725. </row></tbody></tgroup></informaltable>
  726. <para>ERRORS
  727. </para>
  728. <informaltable><tgroup cols="2"><tbody><row><entry
  729. align="char">
  730. <para>EBADF</para>
  731. </entry><entry
  732. align="char">
  733. <para>fd is not a valid open file descriptor.</para>
  734. </entry>
  735. </row><row><entry
  736. align="char">
  737. <para>EFAULT</para>
  738. </entry><entry
  739. align="char">
  740. <para>snr points to invalid address.</para>
  741. </entry>
  742. </row><row><entry
  743. align="char">
  744. <para>ENOSIGNAL</para>
  745. </entry><entry
  746. align="char">
  747. <para>There is no signal, thus no meaningful signal strength
  748. value. Also returned if front-end is not turned on.</para>
  749. </entry>
  750. </row><row><entry
  751. align="char">
  752. <para>ENOSYS</para>
  753. </entry><entry
  754. align="char">
  755. <para>Function not available for this device.</para>
  756. </entry>
  757. </row></tbody></tgroup></informaltable>
  758. </section>
  759. <section id="FE_READ_SIGNAL_STRENGTH">
  760. <title>FE_READ_SIGNAL_STRENGTH</title>
  761. <para>DESCRIPTION
  762. </para>
  763. <informaltable><tgroup cols="1"><tbody><row><entry
  764. align="char">
  765. <para>This ioctl call returns the signal strength value for the signal currently received
  766. by the front-end. For this command, read-only access to the device is sufficient.</para>
  767. </entry>
  768. </row></tbody></tgroup></informaltable>
  769. <para>SYNOPSIS
  770. </para>
  771. <informaltable><tgroup cols="1"><tbody><row><entry
  772. align="char">
  773. <para>int ioctl( int fd, int request =
  774. <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t &#x22C6;strength);</para>
  775. </entry>
  776. </row></tbody></tgroup></informaltable>
  777. <para>PARAMETERS
  778. </para>
  779. <informaltable><tgroup cols="2"><tbody><row><entry
  780. align="char">
  781. <para>int fd</para>
  782. </entry><entry
  783. align="char">
  784. <para>File descriptor returned by a previous call to open().</para>
  785. </entry>
  786. </row><row><entry
  787. align="char">
  788. <para>int request</para>
  789. </entry><entry
  790. align="char">
  791. <para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
  792. command.</para>
  793. </entry>
  794. </row><row><entry
  795. align="char">
  796. <para>int16_t *strength</para>
  797. </entry><entry
  798. align="char">
  799. <para>The signal strength value is stored into *strength.</para>
  800. </entry>
  801. </row></tbody></tgroup></informaltable>
  802. <para>ERRORS
  803. </para>
  804. <informaltable><tgroup cols="2"><tbody><row><entry
  805. align="char">
  806. <para>EBADF</para>
  807. </entry><entry
  808. align="char">
  809. <para>fd is not a valid open file descriptor.</para>
  810. </entry>
  811. </row><row><entry
  812. align="char">
  813. <para>EFAULT</para>
  814. </entry><entry
  815. align="char">
  816. <para>status points to invalid address.</para>
  817. </entry>
  818. </row><row><entry
  819. align="char">
  820. <para>ENOSIGNAL</para>
  821. </entry><entry
  822. align="char">
  823. <para>There is no signal, thus no meaningful signal strength
  824. value. Also returned if front-end is not turned on.</para>
  825. </entry>
  826. </row><row><entry
  827. align="char">
  828. <para>ENOSYS</para>
  829. </entry><entry
  830. align="char">
  831. <para>Function not available for this device.</para>
  832. </entry>
  833. </row></tbody></tgroup></informaltable>
  834. </section>
  835. <section id="FE_READ_UNCORRECTED_BLOCKS">
  836. <title>FE_READ_UNCORRECTED_BLOCKS</title>
  837. <para>DESCRIPTION
  838. </para>
  839. <informaltable><tgroup cols="1"><tbody><row><entry
  840. align="char">
  841. <para>This ioctl call returns the number of uncorrected blocks detected by the device
  842. driver during its lifetime. For meaningful measurements, the increment in block
  843. count during a specific time interval should be calculated. For this command,
  844. read-only access to the device is sufficient.</para>
  845. </entry>
  846. </row><row><entry
  847. align="char">
  848. <para>Note that the counter will wrap to zero after its maximum count has been
  849. reached.</para>
  850. </entry>
  851. </row></tbody></tgroup></informaltable>
  852. <para>SYNOPSIS
  853. </para>
  854. <informaltable><tgroup cols="1"><tbody><row><entry
  855. align="char">
  856. <para>int ioctl( int fd, int request =
  857. <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t &#x22C6;ublocks);</para>
  858. </entry>
  859. </row></tbody></tgroup></informaltable>
  860. <para>PARAMETERS
  861. </para>
  862. <informaltable><tgroup cols="2"><tbody><row><entry
  863. align="char">
  864. <para>int fd</para>
  865. </entry><entry
  866. align="char">
  867. <para>File descriptor returned by a previous call to open().</para>
  868. </entry>
  869. </row><row><entry
  870. align="char">
  871. <para>int request</para>
  872. </entry><entry
  873. align="char">
  874. <para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
  875. command.</para>
  876. </entry>
  877. </row><row><entry
  878. align="char">
  879. <para>uint32_t *ublocks</para>
  880. </entry><entry
  881. align="char">
  882. <para>The total number of uncorrected blocks seen by the driver
  883. so far.</para>
  884. </entry>
  885. </row></tbody></tgroup></informaltable>
  886. <para>ERRORS
  887. </para>
  888. <informaltable><tgroup cols="2"><tbody><row><entry
  889. align="char">
  890. <para>EBADF</para>
  891. </entry><entry
  892. align="char">
  893. <para>fd is not a valid open file descriptor.</para>
  894. </entry>
  895. </row><row><entry
  896. align="char">
  897. <para>EFAULT</para>
  898. </entry><entry
  899. align="char">
  900. <para>ublocks points to invalid address.</para>
  901. </entry>
  902. </row><row><entry
  903. align="char">
  904. <para>ENOSYS</para>
  905. </entry><entry
  906. align="char">
  907. <para>Function not available for this device.</para>
  908. </entry>
  909. </row></tbody></tgroup></informaltable>
  910. </section>
  911. <section id="FE_SET_FRONTEND">
  912. <title>FE_SET_FRONTEND</title>
  913. <para>DESCRIPTION
  914. </para>
  915. <informaltable><tgroup cols="1"><tbody><row><entry
  916. align="char">
  917. <para>This ioctl call starts a tuning operation using specified parameters. The result
  918. of this call will be successful if the parameters were valid and the tuning could
  919. be initiated. The result of the tuning operation in itself, however, will arrive
  920. asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
  921. FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before
  922. the previous one was completed, the previous operation will be aborted in favor
  923. of the new one. This command requires read/write access to the device.</para>
  924. </entry>
  925. </row></tbody></tgroup></informaltable>
  926. <para>SYNOPSIS
  927. </para>
  928. <informaltable><tgroup cols="1"><tbody><row><entry
  929. align="char">
  930. <para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
  931. struct dvb_frontend_parameters &#x22C6;p);</para>
  932. </entry>
  933. </row></tbody></tgroup></informaltable>
  934. <para>PARAMETERS
  935. </para>
  936. <informaltable><tgroup cols="2"><tbody><row><entry
  937. align="char">
  938. <para>int fd</para>
  939. </entry><entry
  940. align="char">
  941. <para>File descriptor returned by a previous call to open().</para>
  942. </entry>
  943. </row><row><entry
  944. align="char">
  945. <para>int request</para>
  946. </entry><entry
  947. align="char">
  948. <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
  949. </entry>
  950. </row><row><entry
  951. align="char">
  952. <para>struct
  953. dvb_frontend_parameters
  954. *p</para>
  955. </entry><entry
  956. align="char">
  957. <para>Points to parameters for tuning operation.</para>
  958. </entry>
  959. </row></tbody></tgroup></informaltable>
  960. <para>ERRORS
  961. </para>
  962. <informaltable><tgroup cols="2"><tbody><row><entry
  963. align="char">
  964. <para>EBADF</para>
  965. </entry><entry
  966. align="char">
  967. <para>fd is not a valid open file descriptor.</para>
  968. </entry>
  969. </row><row><entry
  970. align="char">
  971. <para>EFAULT</para>
  972. </entry><entry
  973. align="char">
  974. <para>p points to invalid address.</para>
  975. </entry>
  976. </row><row><entry
  977. align="char">
  978. <para>EINVAL</para>
  979. </entry><entry
  980. align="char">
  981. <para>Maximum supported symbol rate reached.</para>
  982. </entry>
  983. </row></tbody></tgroup></informaltable>
  984. </section>
  985. <section id="FE_GET_FRONTEND">
  986. <title>FE_GET_FRONTEND</title>
  987. <para>DESCRIPTION
  988. </para>
  989. <informaltable><tgroup cols="1"><tbody><row><entry
  990. align="char">
  991. <para>This ioctl call queries the currently effective frontend parameters. For this
  992. command, read-only access to the device is sufficient.</para>
  993. </entry>
  994. </row></tbody></tgroup></informaltable>
  995. <para>SYNOPSIS
  996. </para>
  997. <informaltable><tgroup cols="1"><tbody><row><entry
  998. align="char">
  999. <para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
  1000. struct dvb_frontend_parameters &#x22C6;p);</para>
  1001. </entry>
  1002. </row></tbody></tgroup></informaltable>
  1003. <para>PARAMETERS
  1004. </para>
  1005. <informaltable><tgroup cols="2"><tbody><row><entry
  1006. align="char">
  1007. <para>int fd</para>
  1008. </entry><entry
  1009. align="char">
  1010. <para>File descriptor returned by a previous call to open().</para>
  1011. </entry>
  1012. </row><row><entry
  1013. align="char">
  1014. <para>int request</para>
  1015. </entry><entry
  1016. align="char">
  1017. <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
  1018. </entry>
  1019. </row><row><entry
  1020. align="char">
  1021. <para>struct
  1022. dvb_frontend_parameters
  1023. *p</para>
  1024. </entry><entry
  1025. align="char">
  1026. <para>Points to parameters for tuning operation.</para>
  1027. </entry>
  1028. </row></tbody></tgroup></informaltable>
  1029. <para>ERRORS
  1030. </para>
  1031. <informaltable><tgroup cols="2"><tbody><row><entry
  1032. align="char">
  1033. <para>EBADF</para>
  1034. </entry><entry
  1035. align="char">
  1036. <para>fd is not a valid open file descriptor.</para>
  1037. </entry>
  1038. </row><row><entry
  1039. align="char">
  1040. <para>EFAULT</para>
  1041. </entry><entry
  1042. align="char">
  1043. <para>p points to invalid address.</para>
  1044. </entry>
  1045. </row><row><entry
  1046. align="char">
  1047. <para>EINVAL</para>
  1048. </entry><entry
  1049. align="char">
  1050. <para>Maximum supported symbol rate reached.</para>
  1051. </entry>
  1052. </row></tbody></tgroup></informaltable>
  1053. </section>
  1054. <section id="FE_GET_EVENT">
  1055. <title>FE_GET_EVENT</title>
  1056. <para>DESCRIPTION
  1057. </para>
  1058. <informaltable><tgroup cols="1"><tbody><row><entry
  1059. align="char">
  1060. <para>This ioctl call returns a frontend event if available. If an event is not
  1061. available, the behavior depends on whether the device is in blocking or
  1062. non-blocking mode. In the latter case, the call fails immediately with errno
  1063. set to EWOULDBLOCK. In the former case, the call blocks until an event
  1064. becomes available.</para>
  1065. </entry>
  1066. </row><row><entry
  1067. align="char">
  1068. <para>The standard Linux poll() and/or select() system calls can be used with the
  1069. device file descriptor to watch for new events. For select(), the file descriptor
  1070. should be included in the exceptfds argument, and for poll(), POLLPRI should
  1071. be specified as the wake-up condition. Since the event queue allocated is
  1072. rather small (room for 8 events), the queue must be serviced regularly to avoid
  1073. overflow. If an overflow happens, the oldest event is discarded from the queue,
  1074. and an error (EOVERFLOW) occurs the next time the queue is read. After
  1075. reporting the error condition in this fashion, subsequent
  1076. <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
  1077. calls will return events from the queue as usual.</para>
  1078. </entry>
  1079. </row><row><entry
  1080. align="char">
  1081. <para>For the sake of implementation simplicity, this command requires read/write
  1082. access to the device.</para>
  1083. </entry>
  1084. </row></tbody></tgroup></informaltable>
  1085. <para>SYNOPSIS
  1086. </para>
  1087. <informaltable><tgroup cols="1"><tbody><row><entry
  1088. align="char">
  1089. <para>int ioctl(int fd, int request = QPSK_GET_EVENT,
  1090. struct dvb_frontend_event &#x22C6;ev);</para>
  1091. </entry>
  1092. </row></tbody></tgroup></informaltable>
  1093. <para>PARAMETERS
  1094. </para>
  1095. <informaltable><tgroup cols="2"><tbody><row><entry
  1096. align="char">
  1097. <para>int fd</para>
  1098. </entry><entry
  1099. align="char">
  1100. <para>File descriptor returned by a previous call to open().</para>
  1101. </entry>
  1102. </row><row><entry
  1103. align="char">
  1104. <para>int request</para>
  1105. </entry><entry
  1106. align="char">
  1107. <para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
  1108. </entry>
  1109. </row><row><entry
  1110. align="char">
  1111. <para>struct
  1112. dvb_frontend_event
  1113. *ev</para>
  1114. </entry><entry
  1115. align="char">
  1116. <para>Points to the location where the event,</para>
  1117. </entry>
  1118. </row><row><entry
  1119. align="char">
  1120. </entry><entry
  1121. align="char">
  1122. <para>if any, is to be stored.</para>
  1123. </entry>
  1124. </row></tbody></tgroup></informaltable>
  1125. <para>ERRORS
  1126. </para>
  1127. <informaltable><tgroup cols="2"><tbody><row><entry
  1128. align="char">
  1129. <para>EBADF</para>
  1130. </entry><entry
  1131. align="char">
  1132. <para>fd is not a valid open file descriptor.</para>
  1133. </entry>
  1134. </row><row><entry
  1135. align="char">
  1136. <para>EFAULT</para>
  1137. </entry><entry
  1138. align="char">
  1139. <para>ev points to invalid address.</para>
  1140. </entry>
  1141. </row><row><entry
  1142. align="char">
  1143. <para>EWOULDBLOCK</para>
  1144. </entry><entry
  1145. align="char">
  1146. <para>There is no event pending, and the device is in
  1147. non-blocking mode.</para>
  1148. </entry>
  1149. </row><row><entry
  1150. align="char">
  1151. <para>EOVERFLOW</para>
  1152. </entry><entry
  1153. align="char">
  1154. </entry>
  1155. </row><row><entry
  1156. align="char">
  1157. </entry><entry
  1158. align="char">
  1159. <para>Overflow in event queue - one or more events were lost.</para>
  1160. </entry>
  1161. </row></tbody></tgroup></informaltable>
  1162. </section>
  1163. <section id="FE_GET_INFO">
  1164. <title>FE_GET_INFO</title>
  1165. <para>DESCRIPTION
  1166. </para>
  1167. <informaltable><tgroup cols="1"><tbody><row><entry
  1168. align="char">
  1169. <para>This ioctl call returns information about the front-end. This call only requires
  1170. read-only access to the device.</para>
  1171. </entry>
  1172. </row></tbody></tgroup></informaltable>
  1173. <para>SYNOPSIS
  1174. </para>
  1175. <informaltable><tgroup cols="1"><tbody><row><entry
  1176. align="char">
  1177. <para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct
  1178. dvb_frontend_info &#x22C6;info);</para>
  1179. </entry>
  1180. </row></tbody></tgroup></informaltable>
  1181. <para>PARAMETERS
  1182. </para>
  1183. <informaltable><tgroup cols="2"><tbody><row><entry
  1184. align="char">
  1185. <para>int fd</para>
  1186. </entry><entry
  1187. align="char">
  1188. <para>File descriptor returned by a previous call to open().</para>
  1189. </entry>
  1190. </row><row><entry
  1191. align="char">
  1192. <para>int request</para>
  1193. </entry><entry
  1194. align="char">
  1195. <para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>
  1196. </entry>
  1197. </row><row><entry
  1198. align="char">
  1199. <para>struct
  1200. dvb_frontend_info
  1201. *info</para>
  1202. </entry><entry
  1203. align="char">
  1204. <para>Points to the location where the front-end information is
  1205. to be stored.</para>
  1206. </entry>
  1207. </row></tbody></tgroup></informaltable>
  1208. <para>ERRORS
  1209. </para>
  1210. <informaltable><tgroup cols="2"><tbody><row><entry
  1211. align="char">
  1212. <para>EBADF</para>
  1213. </entry><entry
  1214. align="char">
  1215. <para>fd is not a valid open file descriptor.</para>
  1216. </entry>
  1217. </row><row><entry
  1218. align="char">
  1219. <para>EFAULT</para>
  1220. </entry><entry
  1221. align="char">
  1222. <para>info points to invalid address.</para>
  1223. </entry>
  1224. </row></tbody></tgroup></informaltable>
  1225. </section>
  1226. <section id="FE_DISEQC_RESET_OVERLOAD">
  1227. <title>FE_DISEQC_RESET_OVERLOAD</title>
  1228. <para>DESCRIPTION
  1229. </para>
  1230. <informaltable><tgroup cols="1"><tbody><row><entry
  1231. align="char">
  1232. <para>If the bus has been automatically powered off due to power overload, this ioctl
  1233. call restores the power to the bus. The call requires read/write access to the
  1234. device. This call has no effect if the device is manually powered off. Not all
  1235. DVB adapters support this ioctl.</para>
  1236. </entry>
  1237. </row></tbody></tgroup></informaltable>
  1238. <para>SYNOPSIS
  1239. </para>
  1240. <informaltable><tgroup cols="1"><tbody><row><entry
  1241. align="char">
  1242. <para>int ioctl(int fd, int request =
  1243. <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>
  1244. </entry>
  1245. </row></tbody></tgroup></informaltable>
  1246. <para>PARAMETERS
  1247. </para>
  1248. <informaltable><tgroup cols="2"><tbody><row><entry
  1249. align="char">
  1250. <para>int fd</para>
  1251. </entry><entry
  1252. align="char">
  1253. <para>File descriptor returned by a previous call to open().</para>
  1254. </entry>
  1255. </row><row><entry
  1256. align="char">
  1257. <para>int request</para>
  1258. </entry><entry
  1259. align="char">
  1260. <para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this
  1261. command.</para>
  1262. </entry>
  1263. </row></tbody></tgroup></informaltable>
  1264. <para>ERRORS
  1265. </para>
  1266. <informaltable><tgroup cols="2"><tbody><row><entry
  1267. align="char">
  1268. <para>EBADF</para>
  1269. </entry><entry
  1270. align="char">
  1271. <para>fd is not a valid file descriptor.</para>
  1272. </entry>
  1273. </row><row><entry
  1274. align="char">
  1275. <para>EPERM</para>
  1276. </entry><entry
  1277. align="char">
  1278. <para>Permission denied (needs read/write access).</para>
  1279. </entry>
  1280. </row><row><entry
  1281. align="char">
  1282. <para>EINTERNAL</para>
  1283. </entry><entry
  1284. align="char">
  1285. <para>Internal error in the device driver.</para>
  1286. </entry>
  1287. </row></tbody></tgroup></informaltable>
  1288. </section>
  1289. <section id="FE_DISEQC_SEND_MASTER_CMD">
  1290. <title>FE_DISEQC_SEND_MASTER_CMD</title>
  1291. <para>DESCRIPTION
  1292. </para>
  1293. <informaltable><tgroup cols="1"><tbody><row><entry
  1294. align="char">
  1295. <para>This ioctl call is used to send a a DiSEqC command.</para>
  1296. </entry>
  1297. </row></tbody></tgroup></informaltable>
  1298. <para>SYNOPSIS
  1299. </para>
  1300. <informaltable><tgroup cols="1"><tbody><row><entry
  1301. align="char">
  1302. <para>int ioctl(int fd, int request =
  1303. <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct
  1304. dvb_diseqc_master_cmd &#x22C6;cmd);</para>
  1305. </entry>
  1306. </row></tbody></tgroup></informaltable>
  1307. <para>PARAMETERS
  1308. </para>
  1309. <informaltable><tgroup cols="2"><tbody><row><entry
  1310. align="char">
  1311. <para>int fd</para>
  1312. </entry><entry
  1313. align="char">
  1314. <para>File descriptor returned by a previous call to open().</para>
  1315. </entry>
  1316. </row><row><entry
  1317. align="char">
  1318. <para>int request</para>
  1319. </entry><entry
  1320. align="char">
  1321. <para>Equals <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> for this
  1322. command.</para>
  1323. </entry>
  1324. </row><row><entry
  1325. align="char">
  1326. <para>struct
  1327. dvb_diseqc_master_cmd
  1328. *cmd</para>
  1329. </entry><entry
  1330. align="char">
  1331. <para>Pointer to the command to be transmitted.</para>
  1332. </entry>
  1333. </row></tbody></tgroup></informaltable>
  1334. <para>ERRORS
  1335. </para>
  1336. <informaltable><tgroup cols="2"><tbody><row><entry
  1337. align="char">
  1338. <para>EBADF</para>
  1339. </entry><entry
  1340. align="char">
  1341. <para>fd is not a valid file descriptor.</para>
  1342. </entry>
  1343. </row><row><entry
  1344. align="char">
  1345. <para>EFAULT</para>
  1346. </entry><entry
  1347. align="char">
  1348. <para>Seq points to an invalid address.</para>
  1349. </entry>
  1350. </row><row><entry
  1351. align="char">
  1352. <para>EINVAL</para>
  1353. </entry><entry
  1354. align="char">
  1355. <para>The data structure referred to by seq is invalid in some
  1356. way.</para>
  1357. </entry>
  1358. </row><row><entry
  1359. align="char">
  1360. <para>EPERM</para>
  1361. </entry><entry
  1362. align="char">
  1363. <para>Permission denied (needs read/write access).</para>
  1364. </entry>
  1365. </row><row><entry
  1366. align="char">
  1367. <para>EINTERNAL</para>
  1368. </entry><entry
  1369. align="char">
  1370. <para>Internal error in the device driver.</para>
  1371. </entry>
  1372. </row></tbody></tgroup></informaltable>
  1373. </section>
  1374. <section id="FE_DISEQC_RECV_SLAVE_REPLY">
  1375. <title>FE_DISEQC_RECV_SLAVE_REPLY</title>
  1376. <para>DESCRIPTION
  1377. </para>
  1378. <informaltable><tgroup cols="1"><tbody><row><entry
  1379. align="char">
  1380. <para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>
  1381. </entry>
  1382. </row></tbody></tgroup></informaltable>
  1383. <para>SYNOPSIS
  1384. </para>
  1385. <informaltable><tgroup cols="1"><tbody><row><entry
  1386. align="char">
  1387. <para>int ioctl(int fd, int request =
  1388. <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct
  1389. dvb_diseqc_slave_reply &#x22C6;reply);</para>
  1390. </entry>
  1391. </row></tbody></tgroup></informaltable>
  1392. <para>PARAMETERS
  1393. </para>
  1394. <informaltable><tgroup cols="2"><tbody><row><entry
  1395. align="char">
  1396. <para>int fd</para>
  1397. </entry><entry
  1398. align="char">
  1399. <para>File descriptor returned by a previous call to open().</para>
  1400. </entry>
  1401. </row><row><entry
  1402. align="char">
  1403. <para>int request</para>
  1404. </entry><entry
  1405. align="char">
  1406. <para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this
  1407. command.</para>
  1408. </entry>
  1409. </row><row><entry
  1410. align="char">
  1411. <para>struct
  1412. dvb_diseqc_slave_reply
  1413. *reply</para>
  1414. </entry><entry
  1415. align="char">
  1416. <para>Pointer to the command to be received.</para>
  1417. </entry>
  1418. </row></tbody></tgroup></informaltable>
  1419. <para>ERRORS
  1420. </para>
  1421. <informaltable><tgroup cols="2"><tbody><row><entry
  1422. align="char">
  1423. <para>EBADF</para>
  1424. </entry><entry
  1425. align="char">
  1426. <para>fd is not a valid file descriptor.</para>
  1427. </entry>
  1428. </row><row><entry
  1429. align="char">
  1430. <para>EFAULT</para>
  1431. </entry><entry
  1432. align="char">
  1433. <para>Seq points to an invalid address.</para>
  1434. </entry>
  1435. </row><row><entry
  1436. align="char">
  1437. <para>EINVAL</para>
  1438. </entry><entry
  1439. align="char">
  1440. <para>The data structure referred to by seq is invalid in some
  1441. way.</para>
  1442. </entry>
  1443. </row><row><entry
  1444. align="char">
  1445. <para>EPERM</para>
  1446. </entry><entry
  1447. align="char">
  1448. <para>Permission denied (needs read/write access).</para>
  1449. </entry>
  1450. </row><row><entry
  1451. align="char">
  1452. <para>EINTERNAL</para>
  1453. </entry><entry
  1454. align="char">
  1455. <para>Internal error in the device driver.</para>
  1456. </entry>
  1457. </row></tbody></tgroup></informaltable>
  1458. </section>
  1459. <section id="FE_DISEQC_SEND_BURST">
  1460. <title>FE_DISEQC_SEND_BURST</title>
  1461. <para>DESCRIPTION
  1462. </para>
  1463. <informaltable><tgroup cols="1"><tbody><row><entry
  1464. align="char">
  1465. <para>This ioctl call is used to send a 22KHz tone burst.</para>
  1466. </entry>
  1467. </row></tbody></tgroup></informaltable>
  1468. <para>SYNOPSIS
  1469. </para>
  1470. <informaltable><tgroup cols="1"><tbody><row><entry
  1471. align="char">
  1472. <para>int ioctl(int fd, int request =
  1473. <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para>
  1474. </entry>
  1475. </row></tbody></tgroup></informaltable>
  1476. <para>PARAMETERS
  1477. </para>
  1478. <informaltable><tgroup cols="2"><tbody><row><entry
  1479. align="char">
  1480. <para>int fd</para>
  1481. </entry><entry
  1482. align="char">
  1483. <para>File descriptor returned by a previous call to open().</para>
  1484. </entry>
  1485. </row><row><entry
  1486. align="char">
  1487. <para>int request</para>
  1488. </entry><entry
  1489. align="char">
  1490. <para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para>
  1491. </entry>
  1492. </row><row><entry
  1493. align="char">
  1494. <para>fe_sec_mini_cmd_t
  1495. burst</para>
  1496. </entry><entry
  1497. align="char">
  1498. <para>burst A or B.</para>
  1499. </entry>
  1500. </row></tbody></tgroup></informaltable>
  1501. <para>ERRORS
  1502. </para>
  1503. <informaltable><tgroup cols="2"><tbody><row><entry
  1504. align="char">
  1505. <para>EBADF</para>
  1506. </entry><entry
  1507. align="char">
  1508. <para>fd is not a valid file descriptor.</para>
  1509. </entry>
  1510. </row><row><entry
  1511. align="char">
  1512. <para>EFAULT</para>
  1513. </entry><entry
  1514. align="char">
  1515. <para>Seq points to an invalid address.</para>
  1516. </entry>
  1517. </row><row><entry
  1518. align="char">
  1519. <para>EINVAL</para>
  1520. </entry><entry
  1521. align="char">
  1522. <para>The data structure referred to by seq is invalid in some
  1523. way.</para>
  1524. </entry>
  1525. </row><row><entry
  1526. align="char">
  1527. <para>EPERM</para>
  1528. </entry><entry
  1529. align="char">
  1530. <para>Permission denied (needs read/write access).</para>
  1531. </entry>
  1532. </row><row><entry
  1533. align="char">
  1534. <para>EINTERNAL</para>
  1535. </entry><entry
  1536. align="char">
  1537. <para>Internal error in the device driver.</para>
  1538. </entry>
  1539. </row></tbody></tgroup></informaltable>
  1540. </section>
  1541. <section id="FE_SET_TONE">
  1542. <title>FE_SET_TONE</title>
  1543. <para>DESCRIPTION
  1544. </para>
  1545. <informaltable><tgroup cols="1"><tbody><row><entry
  1546. align="char">
  1547. <para>This call is used to set the generation of the continuous 22kHz tone. This call
  1548. requires read/write permissions.</para>
  1549. </entry>
  1550. </row></tbody></tgroup></informaltable>
  1551. <para>SYNOPSIS
  1552. </para>
  1553. <informaltable><tgroup cols="1"><tbody><row><entry
  1554. align="char">
  1555. <para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,
  1556. fe_sec_tone_mode_t tone);</para>
  1557. </entry>
  1558. </row></tbody></tgroup></informaltable>
  1559. <para>PARAMETERS
  1560. </para>
  1561. <informaltable><tgroup cols="2"><tbody><row><entry
  1562. align="char">
  1563. <para>int fd</para>
  1564. </entry><entry
  1565. align="char">
  1566. <para>File descriptor returned by a previous call to open().</para>
  1567. </entry>
  1568. </row><row><entry
  1569. align="char">
  1570. <para>int request</para>
  1571. </entry><entry
  1572. align="char">
  1573. <para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>
  1574. </entry>
  1575. </row><row><entry
  1576. align="char">
  1577. <para>fe_sec_tone_mode_t
  1578. tone</para>
  1579. </entry><entry
  1580. align="char">
  1581. <para>The requested tone generation mode (on/off).</para>
  1582. </entry>
  1583. </row></tbody></tgroup></informaltable>
  1584. <para>ERRORS
  1585. </para>
  1586. <informaltable><tgroup cols="2"><tbody><row><entry
  1587. align="char">
  1588. <para>ENODEV</para>
  1589. </entry><entry
  1590. align="char">
  1591. <para>Device driver not loaded/available.</para>
  1592. </entry>
  1593. </row><row><entry
  1594. align="char">
  1595. <para>EBUSY</para>
  1596. </entry><entry
  1597. align="char">
  1598. <para>Device or resource busy.</para>
  1599. </entry>
  1600. </row><row><entry
  1601. align="char">
  1602. <para>EINVAL</para>
  1603. </entry><entry
  1604. align="char">
  1605. <para>Invalid argument.</para>
  1606. </entry>
  1607. </row><row><entry
  1608. align="char">
  1609. <para>EPERM</para>
  1610. </entry><entry
  1611. align="char">
  1612. <para>File not opened with read permissions.</para>
  1613. </entry>
  1614. </row><row><entry
  1615. align="char">
  1616. <para>EINTERNAL</para>
  1617. </entry><entry
  1618. align="char">
  1619. <para>Internal error in the device driver.</para>
  1620. </entry>
  1621. </row></tbody></tgroup></informaltable>
  1622. </section>
  1623. <section id="FE_SET_VOLTAGE">
  1624. <title>FE_SET_VOLTAGE</title>
  1625. <para>DESCRIPTION
  1626. </para>
  1627. <informaltable><tgroup cols="1"><tbody><row><entry
  1628. align="char">
  1629. <para>This call is used to set the bus voltage. This call requires read/write
  1630. permissions.</para>
  1631. </entry>
  1632. </row></tbody></tgroup></informaltable>
  1633. <para>SYNOPSIS
  1634. </para>
  1635. <informaltable><tgroup cols="1"><tbody><row><entry
  1636. align="char">
  1637. <para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,
  1638. fe_sec_voltage_t voltage);</para>
  1639. </entry>
  1640. </row></tbody></tgroup></informaltable>
  1641. <para>PARAMETERS
  1642. </para>
  1643. <informaltable><tgroup cols="2"><tbody><row><entry
  1644. align="char">
  1645. <para>int fd</para>
  1646. </entry><entry
  1647. align="char">
  1648. <para>File descriptor returned by a previous call to open().</para>
  1649. </entry>
  1650. </row><row><entry
  1651. align="char">
  1652. <para>int request</para>
  1653. </entry><entry
  1654. align="char">
  1655. <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
  1656. </entry>
  1657. </row><row><entry
  1658. align="char">
  1659. <para>fe_sec_voltage_t
  1660. voltage</para>
  1661. </entry><entry
  1662. align="char">
  1663. <para>The requested bus voltage.</para>
  1664. </entry>
  1665. </row></tbody></tgroup></informaltable>
  1666. <para>ERRORS
  1667. </para>
  1668. <informaltable><tgroup cols="2"><tbody><row><entry
  1669. align="char">
  1670. <para>ENODEV</para>
  1671. </entry><entry
  1672. align="char">
  1673. <para>Device driver not loaded/available.</para>
  1674. </entry>
  1675. </row><row><entry
  1676. align="char">
  1677. <para>EBUSY</para>
  1678. </entry><entry
  1679. align="char">
  1680. <para>Device or resource busy.</para>
  1681. </entry>
  1682. </row><row><entry
  1683. align="char">
  1684. <para>EINVAL</para>
  1685. </entry><entry
  1686. align="char">
  1687. <para>Invalid argument.</para>
  1688. </entry>
  1689. </row><row><entry
  1690. align="char">
  1691. <para>EPERM</para>
  1692. </entry><entry
  1693. align="char">
  1694. <para>File not opened with read permissions.</para>
  1695. </entry>
  1696. </row><row><entry
  1697. align="char">
  1698. <para>EINTERNAL</para>
  1699. </entry><entry
  1700. align="char">
  1701. <para>Internal error in the device driver.</para>
  1702. </entry>
  1703. </row></tbody></tgroup></informaltable>
  1704. </section>
  1705. <section id="FE_ENABLE_HIGH_LNB_VOLTAGE">
  1706. <title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>
  1707. <para>DESCRIPTION
  1708. </para>
  1709. <informaltable><tgroup cols="1"><tbody><row><entry
  1710. align="char">
  1711. <para>If high != 0 enables slightly higher voltages instead of 13/18V (to compensate
  1712. for long cables). This call requires read/write permissions. Not all DVB
  1713. adapters support this ioctl.</para>
  1714. </entry>
  1715. </row></tbody></tgroup></informaltable>
  1716. <para>SYNOPSIS
  1717. </para>
  1718. <informaltable><tgroup cols="1"><tbody><row><entry
  1719. align="char">
  1720. <para>int ioctl(int fd, int request =
  1721. <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para>
  1722. </entry>
  1723. </row></tbody></tgroup></informaltable>
  1724. <para>PARAMETERS
  1725. </para>
  1726. <informaltable><tgroup cols="2"><tbody><row><entry
  1727. align="char">
  1728. <para>int fd</para>
  1729. </entry><entry
  1730. align="char">
  1731. <para>File descriptor returned by a previous call to open().</para>
  1732. </entry>
  1733. </row><row><entry
  1734. align="char">
  1735. <para>int request</para>
  1736. </entry><entry
  1737. align="char">
  1738. <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
  1739. </entry>
  1740. </row><row><entry
  1741. align="char">
  1742. <para>int high</para>
  1743. </entry><entry
  1744. align="char">
  1745. <para>The requested bus voltage.</para>
  1746. </entry>
  1747. </row></tbody></tgroup></informaltable>
  1748. <para>ERRORS
  1749. </para>
  1750. <informaltable><tgroup cols="2"><tbody><row><entry
  1751. align="char">
  1752. <para>ENODEV</para>
  1753. </entry><entry
  1754. align="char">
  1755. <para>Device driver not loaded/available.</para>
  1756. </entry>
  1757. </row><row><entry
  1758. align="char">
  1759. <para>EBUSY</para>
  1760. </entry><entry
  1761. align="char">
  1762. <para>Device or resource busy.</para>
  1763. </entry>
  1764. </row><row><entry
  1765. align="char">
  1766. <para>EINVAL</para>
  1767. </entry><entry
  1768. align="char">
  1769. <para>Invalid argument.</para>
  1770. </entry>
  1771. </row><row><entry
  1772. align="char">
  1773. <para>EPERM</para>
  1774. </entry><entry
  1775. align="char">
  1776. <para>File not opened with read permissions.</para>
  1777. </entry>
  1778. </row><row><entry
  1779. align="char">
  1780. <para>EINTERNAL</para>
  1781. </entry><entry
  1782. align="char">
  1783. <para>Internal error in the device driver.</para>
  1784. </entry>
  1785. </row></tbody></tgroup></informaltable>
  1786. </section>
  1787. <section id="FE_SET_FRONTEND_TUNE_MODE">
  1788. <title>FE_SET_FRONTEND_TUNE_MODE</title>
  1789. <para>DESCRIPTION</para>
  1790. <informaltable><tgroup cols="1"><tbody><row>
  1791. <entry align="char">
  1792. <para>Allow setting tuner mode flags to the frontend.</para>
  1793. </entry>
  1794. </row></tbody></tgroup></informaltable>
  1795. <para>SYNOPSIS</para>
  1796. <informaltable><tgroup cols="1"><tbody><row>
  1797. <entry align="char">
  1798. <para>int ioctl(int fd, int request =
  1799. <link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>
  1800. </entry>
  1801. </row></tbody></tgroup></informaltable>
  1802. <para>PARAMETERS</para>
  1803. <informaltable><tgroup cols="2"><tbody><row>
  1804. <entry align="char">
  1805. <para>unsigned int flags</para>
  1806. </entry>
  1807. <entry align="char">
  1808. <para>
  1809. 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.
  1810. </para>
  1811. </entry>
  1812. </row></tbody></tgroup></informaltable>
  1813. <para>ERRORS</para>
  1814. <informaltable><tgroup cols="2"><tbody><row>
  1815. <entry align="char"><para>EINVAL</para></entry>
  1816. <entry align="char"><para>Invalid argument.</para></entry>
  1817. </row></tbody></tgroup></informaltable>
  1818. </section>
  1819. <section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
  1820. <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
  1821. <para>DESCRIPTION</para>
  1822. <informaltable><tgroup cols="1"><tbody><row>
  1823. <entry align="char">
  1824. <para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
  1825. <para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
  1826. <para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
  1827. </entry>
  1828. </row></tbody></tgroup></informaltable>
  1829. <para>SYNOPSIS</para>
  1830. <informaltable><tgroup cols="1"><tbody><row>
  1831. <entry align="char">
  1832. <para>int ioctl(int fd, int request =
  1833. <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
  1834. </entry>
  1835. </row></tbody></tgroup></informaltable>
  1836. <para>PARAMETERS</para>
  1837. <informaltable><tgroup cols="2"><tbody><row>
  1838. <entry align="char">
  1839. <para>unsigned long cmd</para>
  1840. </entry>
  1841. <entry align="char">
  1842. <para>
  1843. sends the specified raw cmd to the dish via DISEqC.
  1844. </para>
  1845. </entry>
  1846. </row></tbody></tgroup></informaltable>
  1847. <para>ERRORS</para>
  1848. <informaltable><tgroup cols="1"><tbody><row>
  1849. <entry align="char">
  1850. <para>There are no errors in use for this call</para>
  1851. </entry>
  1852. </row></tbody></tgroup></informaltable>
  1853. </section>
  1854. </section>
  1855. &sub-dvbproperty;