frontend.xml 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936
  1. <title>DVB Frontend API</title>
  2. <para>The DVB frontend device controls the tuner and DVB demodulator
  3. hardware. It can be accessed through <emphasis
  4. role="tt">/dev/dvb/adapter0/frontend0</emphasis>. Data types and and
  5. ioctl definitions can be accessed by including <emphasis
  6. role="tt">linux/dvb/frontend.h</emphasis> in your application.</para>
  7. <para>DVB frontends come in three varieties: DVB-S (satellite), DVB-C
  8. (cable) and DVB-T (terrestrial). Transmission via the internet (DVB-IP)
  9. is not yet handled by this API but a future extension is possible. For
  10. DVB-S the frontend device also supports satellite equipment control
  11. (SEC) via DiSEqC and V-SEC protocols. The DiSEqC (digital SEC)
  12. specification is available from
  13. <ulink url="http://www.eutelsat.com/satellites/4_5_5.html">Eutelsat</ulink>.</para>
  14. <para>Note that the DVB API may also be used for MPEG decoder-only PCI
  15. cards, in which case there exists no frontend device.</para>
  16. <section id="frontend_types">
  17. <title>Frontend Data Types</title>
  18. <section id="fe-type-t">
  19. <title>Frontend type</title>
  20. <para>For historical reasons, frontend types are named by the type of modulation used in
  21. transmission. The fontend types are given by fe_type_t type, defined as:</para>
  22. <table pgwide="1" frame="none" id="fe-type">
  23. <title>Frontend types</title>
  24. <tgroup cols="3">
  25. &cs-def;
  26. <thead>
  27. <row>
  28. <entry>fe_type</entry>
  29. <entry>Description</entry>
  30. <entry><link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> equivalent type</entry>
  31. </row>
  32. </thead>
  33. <tbody valign="top">
  34. <row>
  35. <entry id="FE_QPSK"><constant>FE_QPSK</constant></entry>
  36. <entry>For DVB-S standard</entry>
  37. <entry><constant>SYS_DVBS</constant></entry>
  38. </row>
  39. <row>
  40. <entry id="FE_QAM"><constant>FE_QAM</constant></entry>
  41. <entry>For DVB-C annex A/C standard</entry>
  42. <entry><constant>SYS_DVBC_ANNEX_AC</constant></entry>
  43. </row>
  44. <row>
  45. <entry id="FE_OFDM"><constant>FE_OFDM</constant></entry>
  46. <entry>For DVB-T standard</entry>
  47. <entry><constant>SYS_DVBT</constant></entry>
  48. </row>
  49. <row>
  50. <entry id="FE_ATSC"><constant>FE_ATSC</constant></entry>
  51. <entry>For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used in US.</entry>
  52. <entry><constant>SYS_ATSC</constant> (terrestrial) or <constant>SYS_DVBC_ANNEX_B</constant> (cable)</entry>
  53. </row>
  54. </tbody></tgroup></table>
  55. <para>Newer formats like DVB-S2, ISDB-T, ISDB-S and DVB-T2 are not described at the above, as they're
  56. supported via the new <link linkend="FE_GET_SET_PROPERTY">FE_GET_PROPERTY/FE_GET_SET_PROPERTY</link> ioctl's, using the <link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> parameter.
  57. </para>
  58. </section>
  59. <section id="fe-caps-t">
  60. <title>frontend capabilities</title>
  61. <para>Capabilities describe what a frontend can do. Some capabilities can only be supported for
  62. a specific frontend type.</para>
  63. <programlisting>
  64. typedef enum fe_caps {
  65. FE_IS_STUPID = 0,
  66. FE_CAN_INVERSION_AUTO = 0x1,
  67. FE_CAN_FEC_1_2 = 0x2,
  68. FE_CAN_FEC_2_3 = 0x4,
  69. FE_CAN_FEC_3_4 = 0x8,
  70. FE_CAN_FEC_4_5 = 0x10,
  71. FE_CAN_FEC_5_6 = 0x20,
  72. FE_CAN_FEC_6_7 = 0x40,
  73. FE_CAN_FEC_7_8 = 0x80,
  74. FE_CAN_FEC_8_9 = 0x100,
  75. FE_CAN_FEC_AUTO = 0x200,
  76. FE_CAN_QPSK = 0x400,
  77. FE_CAN_QAM_16 = 0x800,
  78. FE_CAN_QAM_32 = 0x1000,
  79. FE_CAN_QAM_64 = 0x2000,
  80. FE_CAN_QAM_128 = 0x4000,
  81. FE_CAN_QAM_256 = 0x8000,
  82. FE_CAN_QAM_AUTO = 0x10000,
  83. FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
  84. FE_CAN_BANDWIDTH_AUTO = 0x40000,
  85. FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
  86. FE_CAN_HIERARCHY_AUTO = 0x100000,
  87. FE_CAN_8VSB = 0x200000,
  88. FE_CAN_16VSB = 0x400000,
  89. FE_HAS_EXTENDED_CAPS = 0x800000,
  90. FE_CAN_TURBO_FEC = 0x8000000,
  91. FE_CAN_2G_MODULATION = 0x10000000,
  92. FE_NEEDS_BENDING = 0x20000000,
  93. FE_CAN_RECOVER = 0x40000000,
  94. FE_CAN_MUTE_TS = 0x80000000
  95. } fe_caps_t;
  96. </programlisting>
  97. </section>
  98. <section id="dvb-frontend-info">
  99. <title>frontend information</title>
  100. <para>Information about the frontend ca be queried with
  101. <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
  102. <programlisting>
  103. struct dvb_frontend_info {
  104. char name[128];
  105. fe_type_t type;
  106. uint32_t frequency_min;
  107. uint32_t frequency_max;
  108. uint32_t frequency_stepsize;
  109. uint32_t frequency_tolerance;
  110. uint32_t symbol_rate_min;
  111. uint32_t symbol_rate_max;
  112. uint32_t symbol_rate_tolerance; /&#x22C6; ppm &#x22C6;/
  113. uint32_t notifier_delay; /&#x22C6; ms &#x22C6;/
  114. fe_caps_t caps;
  115. };
  116. </programlisting>
  117. </section>
  118. <section id="dvb-diseqc-master-cmd">
  119. <title>diseqc master command</title>
  120. <para>A message sent from the frontend to DiSEqC capable equipment.</para>
  121. <programlisting>
  122. struct dvb_diseqc_master_cmd {
  123. uint8_t msg [6]; /&#x22C6; { framing, address, command, data[3] } &#x22C6;/
  124. uint8_t msg_len; /&#x22C6; valid values are 3...6 &#x22C6;/
  125. };
  126. </programlisting>
  127. </section>
  128. <section role="subsection" id="dvb-diseqc-slave-reply">
  129. <title>diseqc slave reply</title>
  130. <para>A reply to the frontend from DiSEqC 2.0 capable equipment.</para>
  131. <programlisting>
  132. struct dvb_diseqc_slave_reply {
  133. uint8_t msg [4]; /&#x22C6; { framing, data [3] } &#x22C6;/
  134. uint8_t msg_len; /&#x22C6; valid values are 0...4, 0 means no msg &#x22C6;/
  135. int timeout; /&#x22C6; return from ioctl after timeout ms with &#x22C6;/
  136. }; /&#x22C6; errorcode when no message was received &#x22C6;/
  137. </programlisting>
  138. </section>
  139. <section id="fe-sec-voltage-t">
  140. <title>diseqc slave reply</title>
  141. <para>The voltage is usually used with non-DiSEqC capable LNBs to switch the polarzation
  142. (horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched
  143. consistently to the DiSEqC commands as described in the DiSEqC spec.</para>
  144. <programlisting>
  145. typedef enum fe_sec_voltage {
  146. SEC_VOLTAGE_13,
  147. SEC_VOLTAGE_18
  148. } fe_sec_voltage_t;
  149. </programlisting>
  150. </section>
  151. <section id="fe-sec-tone-mode-t">
  152. <title>SEC continuous tone</title>
  153. <para>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
  154. high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to
  155. be switched consistently to the DiSEqC commands as described in the DiSEqC
  156. spec.</para>
  157. <programlisting>
  158. typedef enum fe_sec_tone_mode {
  159. SEC_TONE_ON,
  160. SEC_TONE_OFF
  161. } fe_sec_tone_mode_t;
  162. </programlisting>
  163. </section>
  164. <section id="fe-sec-mini-cmd-t">
  165. <title>SEC tone burst</title>
  166. <para>The 22KHz tone burst is usually used with non-DiSEqC capable switches to select
  167. between two connected LNBs/satellites. When using DiSEqC epuipment this voltage has to
  168. be switched consistently to the DiSEqC commands as described in the DiSEqC
  169. spec.</para>
  170. <programlisting>
  171. typedef enum fe_sec_mini_cmd {
  172. SEC_MINI_A,
  173. SEC_MINI_B
  174. } fe_sec_mini_cmd_t;
  175. </programlisting>
  176. <para></para>
  177. </section>
  178. <section id="fe-status-t">
  179. <title>frontend status</title>
  180. <para>Several functions of the frontend device use the fe_status data type defined
  181. by</para>
  182. <programlisting>
  183. typedef enum fe_status {
  184. FE_HAS_SIGNAL = 0x01, /&#x22C6; found something above the noise level &#x22C6;/
  185. FE_HAS_CARRIER = 0x02, /&#x22C6; found a DVB signal &#x22C6;/
  186. FE_HAS_VITERBI = 0x04, /&#x22C6; FEC is stable &#x22C6;/
  187. FE_HAS_SYNC = 0x08, /&#x22C6; found sync bytes &#x22C6;/
  188. FE_HAS_LOCK = 0x10, /&#x22C6; everything's working... &#x22C6;/
  189. FE_TIMEDOUT = 0x20, /&#x22C6; no lock within the last ~2 seconds &#x22C6;/
  190. FE_REINIT = 0x40 /&#x22C6; frontend was reinitialized, &#x22C6;/
  191. } fe_status_t; /&#x22C6; application is recommned to reset &#x22C6;/
  192. </programlisting>
  193. <para>to indicate the current state and/or state changes of the frontend hardware.
  194. </para>
  195. </section>
  196. <section id="dvb-frontend-parameters">
  197. <title>frontend parameters</title>
  198. <para>The kind of parameters passed to the frontend device for tuning depend on
  199. the kind of hardware you are using.</para>
  200. <para>The struct <constant>dvb_frontend_parameters</constant> uses an
  201. union with specific per-system parameters. However, as newer delivery systems
  202. required more data, the structure size weren't enough to fit, and just
  203. extending its size would break the existing applications. So, those parameters
  204. were replaced by the usage of <link linkend="FE_GET_SET_PROPERTY">
  205. <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> ioctl's. The
  206. new API is flexible enough to add new parameters to existing delivery systems,
  207. and to add newer delivery systems.</para>
  208. <para>So, newer applications should use <link linkend="FE_GET_SET_PROPERTY">
  209. <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> instead, in
  210. order to be able to support the newer System Delivery like DVB-S2, DVB-T2,
  211. DVB-C2, ISDB, etc.</para>
  212. <para>All kinds of parameters are combined as an union in the FrontendParameters structure:</para>
  213. <programlisting>
  214. struct dvb_frontend_parameters {
  215. uint32_t frequency; /&#x22C6; (absolute) frequency in Hz for QAM/OFDM &#x22C6;/
  216. /&#x22C6; intermediate frequency in kHz for QPSK &#x22C6;/
  217. fe_spectral_inversion_t inversion;
  218. union {
  219. struct dvb_qpsk_parameters qpsk;
  220. struct dvb_qam_parameters qam;
  221. struct dvb_ofdm_parameters ofdm;
  222. struct dvb_vsb_parameters vsb;
  223. } u;
  224. };
  225. </programlisting>
  226. <para>In the case of QPSK frontends the <constant>frequency</constant> field specifies the intermediate
  227. frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
  228. the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
  229. OFDM frontends the <constant>frequency</constant> specifies the absolute frequency and is given in Hz.
  230. </para>
  231. <section id="dvb-qpsk-parameters">
  232. <title>QPSK parameters</title>
  233. <para>For satellite QPSK frontends you have to use the <constant>dvb_qpsk_parameters</constant> structure:</para>
  234. <programlisting>
  235. struct dvb_qpsk_parameters {
  236. uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
  237. fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
  238. };
  239. </programlisting>
  240. </section>
  241. <section id="dvb-qam-parameters">
  242. <title>QAM parameters</title>
  243. <para>for cable QAM frontend you use the <constant>dvb_qam_parameters</constant> structure:</para>
  244. <programlisting>
  245. struct dvb_qam_parameters {
  246. uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
  247. fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
  248. fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
  249. };
  250. </programlisting>
  251. </section>
  252. <section id="dvb-vsb-parameters">
  253. <title>VSB parameters</title>
  254. <para>ATSC frontends are supported by the <constant>dvb_vsb_parameters</constant> structure:</para>
  255. <programlisting>
  256. struct dvb_vsb_parameters {
  257. fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
  258. };
  259. </programlisting>
  260. </section>
  261. <section id="dvb-ofdm-parameters">
  262. <title>OFDM parameters</title>
  263. <para>DVB-T frontends are supported by the <constant>dvb_ofdm_parameters</constant> structure:</para>
  264. <programlisting>
  265. struct dvb_ofdm_parameters {
  266. fe_bandwidth_t bandwidth;
  267. fe_code_rate_t code_rate_HP; /&#x22C6; high priority stream code rate &#x22C6;/
  268. fe_code_rate_t code_rate_LP; /&#x22C6; low priority stream code rate &#x22C6;/
  269. fe_modulation_t constellation; /&#x22C6; modulation type (see above) &#x22C6;/
  270. fe_transmit_mode_t transmission_mode;
  271. fe_guard_interval_t guard_interval;
  272. fe_hierarchy_t hierarchy_information;
  273. };
  274. </programlisting>
  275. </section>
  276. <section id="fe-spectral-inversion-t">
  277. <title>frontend spectral inversion</title>
  278. <para>The Inversion field can take one of these values:
  279. </para>
  280. <programlisting>
  281. typedef enum fe_spectral_inversion {
  282. INVERSION_OFF,
  283. INVERSION_ON,
  284. INVERSION_AUTO
  285. } fe_spectral_inversion_t;
  286. </programlisting>
  287. <para>It indicates if spectral inversion should be presumed or not. In the automatic setting
  288. (<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by
  289. itself.
  290. </para>
  291. </section>
  292. <section id="fe-code-rate-t">
  293. <title>frontend code rate</title>
  294. <para>The possible values for the <constant>fec_inner</constant> field used on
  295. <link refend="dvb-qpsk-parameters"><constant>struct dvb_qpsk_parameters</constant></link> and
  296. <link refend="dvb-qam-parameters"><constant>struct dvb_qam_parameters</constant></link> are:
  297. </para>
  298. <programlisting>
  299. typedef enum fe_code_rate {
  300. FEC_NONE = 0,
  301. FEC_1_2,
  302. FEC_2_3,
  303. FEC_3_4,
  304. FEC_4_5,
  305. FEC_5_6,
  306. FEC_6_7,
  307. FEC_7_8,
  308. FEC_8_9,
  309. FEC_AUTO,
  310. FEC_3_5,
  311. FEC_9_10,
  312. } fe_code_rate_t;
  313. </programlisting>
  314. <para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
  315. detection.
  316. </para>
  317. </section>
  318. <section id="fe-modulation-t">
  319. <title>frontend modulation type for QAM, OFDM and VSB</title>
  320. <para>For cable and terrestrial frontends, e. g. for
  321. <link refend="dvb-qam-parameters"><constant>struct dvb_qpsk_parameters</constant></link>,
  322. <link refend="dvb-ofdm-parameters"><constant>struct dvb_qam_parameters</constant></link> and
  323. <link refend="dvb-vsb-parameters"><constant>struct dvb_qam_parameters</constant></link>,
  324. it needs to specify the quadrature modulation mode which can be one of the following:
  325. </para>
  326. <programlisting>
  327. typedef enum fe_modulation {
  328. QPSK,
  329. QAM_16,
  330. QAM_32,
  331. QAM_64,
  332. QAM_128,
  333. QAM_256,
  334. QAM_AUTO,
  335. VSB_8,
  336. VSB_16,
  337. PSK_8,
  338. APSK_16,
  339. APSK_32,
  340. DQPSK,
  341. } fe_modulation_t;
  342. </programlisting>
  343. </section>
  344. <para>Finally, there are several more parameters for OFDM:
  345. </para>
  346. <section id="fe-transmit-mode-t">
  347. <title>Number of carriers per channel</title>
  348. <programlisting>
  349. typedef enum fe_transmit_mode {
  350. TRANSMISSION_MODE_2K,
  351. TRANSMISSION_MODE_8K,
  352. TRANSMISSION_MODE_AUTO,
  353. TRANSMISSION_MODE_4K,
  354. TRANSMISSION_MODE_1K,
  355. TRANSMISSION_MODE_16K,
  356. TRANSMISSION_MODE_32K,
  357. } fe_transmit_mode_t;
  358. </programlisting>
  359. </section>
  360. <section id="fe-bandwidth-t">
  361. <title>frontend bandwidth</title>
  362. <programlisting>
  363. typedef enum fe_bandwidth {
  364. BANDWIDTH_8_MHZ,
  365. BANDWIDTH_7_MHZ,
  366. BANDWIDTH_6_MHZ,
  367. BANDWIDTH_AUTO,
  368. BANDWIDTH_5_MHZ,
  369. BANDWIDTH_10_MHZ,
  370. BANDWIDTH_1_712_MHZ,
  371. } fe_bandwidth_t;
  372. </programlisting>
  373. </section>
  374. <section id="fe-guard-interval-t">
  375. <title>frontend guard inverval</title>
  376. <programlisting>
  377. typedef enum fe_guard_interval {
  378. GUARD_INTERVAL_1_32,
  379. GUARD_INTERVAL_1_16,
  380. GUARD_INTERVAL_1_8,
  381. GUARD_INTERVAL_1_4,
  382. GUARD_INTERVAL_AUTO,
  383. GUARD_INTERVAL_1_128,
  384. GUARD_INTERVAL_19_128,
  385. GUARD_INTERVAL_19_256,
  386. } fe_guard_interval_t;
  387. </programlisting>
  388. </section>
  389. <section id="fe-hierarchy-t">
  390. <title>frontend hierarchy</title>
  391. <programlisting>
  392. typedef enum fe_hierarchy {
  393. HIERARCHY_NONE,
  394. HIERARCHY_1,
  395. HIERARCHY_2,
  396. HIERARCHY_4,
  397. HIERARCHY_AUTO
  398. } fe_hierarchy_t;
  399. </programlisting>
  400. </section>
  401. </section>
  402. <section id="dvb-frontend-event">
  403. <title>frontend events</title>
  404. <programlisting>
  405. struct dvb_frontend_event {
  406. fe_status_t status;
  407. struct dvb_frontend_parameters parameters;
  408. };
  409. </programlisting>
  410. </section>
  411. </section>
  412. <section id="frontend_fcalls">
  413. <title>Frontend Function Calls</title>
  414. <section id="frontend_f_open">
  415. <title>open()</title>
  416. <para>DESCRIPTION</para>
  417. <informaltable><tgroup cols="1"><tbody><row>
  418. <entry align="char">
  419. <para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)
  420. for subsequent use. Usually the first thing to do after a successful open is to
  421. find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
  422. <para>The device can be opened in read-only mode, which only allows monitoring of
  423. device status and statistics, or read/write mode, which allows any kind of use
  424. (e.g. performing tuning operations.)
  425. </para>
  426. <para>In a system with multiple front-ends, it is usually the case that multiple devices
  427. cannot be open in read/write mode simultaneously. As long as a front-end
  428. device is opened in read/write mode, other open() calls in read/write mode will
  429. either fail or block, depending on whether non-blocking or blocking mode was
  430. specified. A front-end device opened in blocking mode can later be put into
  431. non-blocking mode (and vice versa) using the F_SETFL command of the fcntl
  432. system call. This is a standard system call, documented in the Linux manual
  433. page for fcntl. When an open() call has succeeded, the device will be ready
  434. for use in the specified mode. This implies that the corresponding hardware is
  435. powered up, and that other front-ends may have been powered down to make
  436. that possible.</para>
  437. </entry>
  438. </row></tbody></tgroup></informaltable>
  439. <para>SYNOPSIS</para>
  440. <informaltable><tgroup cols="1"><tbody><row><entry
  441. align="char">
  442. <para>int open(const char &#x22C6;deviceName, int flags);</para>
  443. </entry>
  444. </row></tbody></tgroup></informaltable>
  445. <para>PARAMETERS
  446. </para>
  447. <informaltable><tgroup cols="2"><tbody><row><entry
  448. align="char">
  449. <para>const char
  450. *deviceName</para>
  451. </entry><entry
  452. align="char">
  453. <para>Name of specific video device.</para>
  454. </entry>
  455. </row><row><entry
  456. align="char">
  457. <para>int flags</para>
  458. </entry><entry
  459. align="char">
  460. <para>A bit-wise OR of the following flags:</para>
  461. </entry>
  462. </row><row><entry
  463. align="char">
  464. </entry><entry
  465. align="char">
  466. <para>O_RDONLY read-only access</para>
  467. </entry>
  468. </row><row><entry
  469. align="char">
  470. </entry><entry
  471. align="char">
  472. <para>O_RDWR read/write access</para>
  473. </entry>
  474. </row><row><entry
  475. align="char">
  476. </entry><entry
  477. align="char">
  478. <para>O_NONBLOCK open in non-blocking mode</para>
  479. </entry>
  480. </row><row><entry
  481. align="char">
  482. </entry><entry
  483. align="char">
  484. <para>(blocking mode is the default)</para>
  485. </entry>
  486. </row></tbody></tgroup></informaltable>
  487. <para>RETURN VALUE</para>
  488. <informaltable><tgroup cols="2"><tbody><row><entry
  489. align="char">
  490. <para>ENODEV</para>
  491. </entry><entry
  492. align="char">
  493. <para>Device driver not loaded/available.</para>
  494. </entry>
  495. </row><row><entry
  496. align="char">
  497. <para>EINTERNAL</para>
  498. </entry><entry
  499. align="char">
  500. <para>Internal error.</para>
  501. </entry>
  502. </row><row><entry
  503. align="char">
  504. <para>EBUSY</para>
  505. </entry><entry
  506. align="char">
  507. <para>Device or resource busy.</para>
  508. </entry>
  509. </row><row><entry
  510. align="char">
  511. <para>EINVAL</para>
  512. </entry><entry
  513. align="char">
  514. <para>Invalid argument.</para>
  515. </entry>
  516. </row></tbody></tgroup></informaltable>
  517. </section>
  518. <section id="frontend_f_close">
  519. <title>close()</title>
  520. <para>DESCRIPTION
  521. </para>
  522. <informaltable><tgroup cols="1"><tbody><row><entry
  523. align="char">
  524. <para>This system call closes a previously opened front-end device. After closing
  525. a front-end device, its corresponding hardware might be powered down
  526. automatically.</para>
  527. </entry>
  528. </row></tbody></tgroup></informaltable>
  529. <para>SYNOPSIS
  530. </para>
  531. <informaltable><tgroup cols="1"><tbody><row><entry
  532. align="char">
  533. <para>int close(int fd);</para>
  534. </entry>
  535. </row></tbody></tgroup></informaltable>
  536. <para>PARAMETERS
  537. </para>
  538. <informaltable><tgroup cols="2"><tbody><row><entry
  539. align="char">
  540. <para>int fd</para>
  541. </entry><entry
  542. align="char">
  543. <para>File descriptor returned by a previous call to open().</para>
  544. </entry>
  545. </row></tbody></tgroup></informaltable>
  546. &return-value-dvb;
  547. <informaltable><tgroup cols="2"><tbody><row><entry
  548. align="char">
  549. <para>EBADF</para>
  550. </entry><entry
  551. align="char">
  552. <para>fd is not a valid open file descriptor.</para>
  553. </entry>
  554. </row></tbody></tgroup></informaltable>
  555. </section>
  556. <section id="FE_READ_STATUS">
  557. <title>FE_READ_STATUS</title>
  558. <para>DESCRIPTION
  559. </para>
  560. <informaltable><tgroup cols="1"><tbody><row><entry
  561. align="char">
  562. <para>This ioctl call returns status information about the front-end. This call only
  563. requires read-only access to the device.</para>
  564. </entry>
  565. </row></tbody></tgroup></informaltable>
  566. <para>SYNOPSIS
  567. </para>
  568. <informaltable><tgroup cols="1"><tbody><row><entry
  569. align="char">
  570. <para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,
  571. fe_status_t &#x22C6;status);</para>
  572. </entry>
  573. </row></tbody></tgroup></informaltable>
  574. <para>PARAMETERS
  575. </para>
  576. <informaltable><tgroup cols="2"><tbody><row><entry
  577. align="char">
  578. <para>int fd</para>
  579. </entry><entry
  580. align="char">
  581. <para>File descriptor returned by a previous call to open().</para>
  582. </entry>
  583. </row><row><entry
  584. align="char">
  585. <para>int request</para>
  586. </entry><entry
  587. align="char">
  588. <para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>
  589. </entry>
  590. </row><row><entry
  591. align="char">
  592. <para>struct fe_status_t
  593. *status</para>
  594. </entry><entry
  595. align="char">
  596. <para>Points to the location where the front-end status word is
  597. to be stored.</para>
  598. </entry>
  599. </row></tbody></tgroup></informaltable>
  600. <para>RETURN VALUE</para>
  601. <informaltable><tgroup cols="2"><tbody><row><entry
  602. align="char">
  603. <para>EBADF</para>
  604. </entry><entry
  605. align="char">
  606. <para>fd is not a valid open file descriptor.</para>
  607. </entry>
  608. </row><row><entry
  609. align="char">
  610. <para>EFAULT</para>
  611. </entry><entry
  612. align="char">
  613. <para>status points to invalid address.</para>
  614. </entry>
  615. </row></tbody></tgroup></informaltable>
  616. </section>
  617. <section id="FE_READ_BER">
  618. <title>FE_READ_BER</title>
  619. <para>DESCRIPTION
  620. </para>
  621. <informaltable><tgroup cols="1"><tbody><row><entry
  622. align="char">
  623. <para>This ioctl call returns the bit error rate for the signal currently
  624. received/demodulated by the front-end. For this command, read-only access to
  625. the device is sufficient.</para>
  626. </entry>
  627. </row></tbody></tgroup></informaltable>
  628. <para>SYNOPSIS
  629. </para>
  630. <informaltable><tgroup cols="1"><tbody><row><entry
  631. align="char">
  632. <para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
  633. uint32_t &#x22C6;ber);</para>
  634. </entry>
  635. </row></tbody></tgroup></informaltable>
  636. <para>PARAMETERS
  637. </para>
  638. <informaltable><tgroup cols="2"><tbody><row><entry
  639. align="char">
  640. <para>int fd</para>
  641. </entry><entry
  642. align="char">
  643. <para>File descriptor returned by a previous call to open().</para>
  644. </entry>
  645. </row><row><entry
  646. align="char">
  647. <para>int request</para>
  648. </entry><entry
  649. align="char">
  650. <para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
  651. </entry>
  652. </row><row><entry
  653. align="char">
  654. <para>uint32_t *ber</para>
  655. </entry><entry
  656. align="char">
  657. <para>The bit error rate is stored into *ber.</para>
  658. </entry>
  659. </row></tbody></tgroup></informaltable>
  660. &return-value-dvb;
  661. <informaltable><tgroup cols="2"><tbody><row><entry
  662. align="char">
  663. <para>EBADF</para>
  664. </entry><entry
  665. align="char">
  666. <para>fd is not a valid open file descriptor.</para>
  667. </entry>
  668. </row><row><entry
  669. align="char">
  670. <para>EFAULT</para>
  671. </entry><entry
  672. align="char">
  673. <para>ber points to invalid address.</para>
  674. </entry>
  675. </row><row><entry
  676. align="char">
  677. <para>ENOSIGNAL</para>
  678. </entry><entry
  679. align="char">
  680. <para>There is no signal, thus no meaningful bit error rate. Also
  681. returned if the front-end is not turned on.</para>
  682. </entry>
  683. </row><row><entry
  684. align="char">
  685. <para>ENOSYS</para>
  686. </entry><entry
  687. align="char">
  688. <para>Function not available for this device.</para>
  689. </entry>
  690. </row></tbody></tgroup></informaltable>
  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. <informaltable><tgroup cols="2"><tbody><row><entry
  736. align="char">
  737. <para>EBADF</para>
  738. </entry><entry
  739. align="char">
  740. <para>fd is not a valid open file descriptor.</para>
  741. </entry>
  742. </row><row><entry
  743. align="char">
  744. <para>EFAULT</para>
  745. </entry><entry
  746. align="char">
  747. <para>snr points to invalid address.</para>
  748. </entry>
  749. </row><row><entry
  750. align="char">
  751. <para>ENOSIGNAL</para>
  752. </entry><entry
  753. align="char">
  754. <para>There is no signal, thus no meaningful signal strength
  755. value. Also returned if front-end is not turned on.</para>
  756. </entry>
  757. </row><row><entry
  758. align="char">
  759. <para>ENOSYS</para>
  760. </entry><entry
  761. align="char">
  762. <para>Function not available for this device.</para>
  763. </entry>
  764. </row></tbody></tgroup></informaltable>
  765. </section>
  766. <section id="FE_READ_SIGNAL_STRENGTH">
  767. <title>FE_READ_SIGNAL_STRENGTH</title>
  768. <para>DESCRIPTION
  769. </para>
  770. <informaltable><tgroup cols="1"><tbody><row><entry
  771. align="char">
  772. <para>This ioctl call returns the signal strength value for the signal currently received
  773. by the front-end. For this command, read-only access to the device is sufficient.</para>
  774. </entry>
  775. </row></tbody></tgroup></informaltable>
  776. <para>SYNOPSIS
  777. </para>
  778. <informaltable><tgroup cols="1"><tbody><row><entry
  779. align="char">
  780. <para>int ioctl( int fd, int request =
  781. <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t &#x22C6;strength);</para>
  782. </entry>
  783. </row></tbody></tgroup></informaltable>
  784. <para>PARAMETERS
  785. </para>
  786. <informaltable><tgroup cols="2"><tbody><row><entry
  787. align="char">
  788. <para>int fd</para>
  789. </entry><entry
  790. align="char">
  791. <para>File descriptor returned by a previous call to open().</para>
  792. </entry>
  793. </row><row><entry
  794. align="char">
  795. <para>int request</para>
  796. </entry><entry
  797. align="char">
  798. <para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
  799. command.</para>
  800. </entry>
  801. </row><row><entry
  802. align="char">
  803. <para>int16_t *strength</para>
  804. </entry><entry
  805. align="char">
  806. <para>The signal strength value is stored into *strength.</para>
  807. </entry>
  808. </row></tbody></tgroup></informaltable>
  809. &return-value-dvb;
  810. <informaltable><tgroup cols="2"><tbody><row><entry
  811. align="char">
  812. <para>EBADF</para>
  813. </entry><entry
  814. align="char">
  815. <para>fd is not a valid open file descriptor.</para>
  816. </entry>
  817. </row><row><entry
  818. align="char">
  819. <para>EFAULT</para>
  820. </entry><entry
  821. align="char">
  822. <para>status points to invalid address.</para>
  823. </entry>
  824. </row><row><entry
  825. align="char">
  826. <para>ENOSIGNAL</para>
  827. </entry><entry
  828. align="char">
  829. <para>There is no signal, thus no meaningful signal strength
  830. value. Also returned if front-end is not turned on.</para>
  831. </entry>
  832. </row><row><entry
  833. align="char">
  834. <para>ENOSYS</para>
  835. </entry><entry
  836. align="char">
  837. <para>Function not available for this device.</para>
  838. </entry>
  839. </row></tbody></tgroup></informaltable>
  840. </section>
  841. <section id="FE_READ_UNCORRECTED_BLOCKS">
  842. <title>FE_READ_UNCORRECTED_BLOCKS</title>
  843. <para>DESCRIPTION
  844. </para>
  845. <informaltable><tgroup cols="1"><tbody><row><entry
  846. align="char">
  847. <para>This ioctl call returns the number of uncorrected blocks detected by the device
  848. driver during its lifetime. For meaningful measurements, the increment in block
  849. count during a specific time interval should be calculated. For this command,
  850. read-only access to the device is sufficient.</para>
  851. </entry>
  852. </row><row><entry
  853. align="char">
  854. <para>Note that the counter will wrap to zero after its maximum count has been
  855. reached.</para>
  856. </entry>
  857. </row></tbody></tgroup></informaltable>
  858. <para>SYNOPSIS
  859. </para>
  860. <informaltable><tgroup cols="1"><tbody><row><entry
  861. align="char">
  862. <para>int ioctl( int fd, int request =
  863. <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t &#x22C6;ublocks);</para>
  864. </entry>
  865. </row></tbody></tgroup></informaltable>
  866. <para>PARAMETERS
  867. </para>
  868. <informaltable><tgroup cols="2"><tbody><row><entry
  869. align="char">
  870. <para>int fd</para>
  871. </entry><entry
  872. align="char">
  873. <para>File descriptor returned by a previous call to open().</para>
  874. </entry>
  875. </row><row><entry
  876. align="char">
  877. <para>int request</para>
  878. </entry><entry
  879. align="char">
  880. <para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
  881. command.</para>
  882. </entry>
  883. </row><row><entry
  884. align="char">
  885. <para>uint32_t *ublocks</para>
  886. </entry><entry
  887. align="char">
  888. <para>The total number of uncorrected blocks seen by the driver
  889. so far.</para>
  890. </entry>
  891. </row></tbody></tgroup></informaltable>
  892. &return-value-dvb;
  893. <informaltable><tgroup cols="2"><tbody><row><entry
  894. align="char">
  895. <para>EBADF</para>
  896. </entry><entry
  897. align="char">
  898. <para>fd is not a valid open file descriptor.</para>
  899. </entry>
  900. </row><row><entry
  901. align="char">
  902. <para>EFAULT</para>
  903. </entry><entry
  904. align="char">
  905. <para>ublocks points to invalid address.</para>
  906. </entry>
  907. </row><row><entry
  908. align="char">
  909. <para>ENOSYS</para>
  910. </entry><entry
  911. align="char">
  912. <para>Function not available for this device.</para>
  913. </entry>
  914. </row></tbody></tgroup></informaltable>
  915. </section>
  916. <section id="FE_SET_FRONTEND">
  917. <title>FE_SET_FRONTEND</title>
  918. <para>DESCRIPTION
  919. </para>
  920. <informaltable><tgroup cols="1"><tbody><row><entry
  921. align="char">
  922. <para>This ioctl call starts a tuning operation using specified parameters. The result
  923. of this call will be successful if the parameters were valid and the tuning could
  924. be initiated. The result of the tuning operation in itself, however, will arrive
  925. asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
  926. FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before
  927. the previous one was completed, the previous operation will be aborted in favor
  928. of the new one. This command requires read/write access to the device.</para>
  929. </entry>
  930. </row></tbody></tgroup></informaltable>
  931. <para>SYNOPSIS
  932. </para>
  933. <informaltable><tgroup cols="1"><tbody><row><entry
  934. align="char">
  935. <para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
  936. struct dvb_frontend_parameters &#x22C6;p);</para>
  937. </entry>
  938. </row></tbody></tgroup></informaltable>
  939. <para>PARAMETERS
  940. </para>
  941. <informaltable><tgroup cols="2"><tbody><row><entry
  942. align="char">
  943. <para>int fd</para>
  944. </entry><entry
  945. align="char">
  946. <para>File descriptor returned by a previous call to open().</para>
  947. </entry>
  948. </row><row><entry
  949. align="char">
  950. <para>int request</para>
  951. </entry><entry
  952. align="char">
  953. <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
  954. </entry>
  955. </row><row><entry
  956. align="char">
  957. <para>struct
  958. dvb_frontend_parameters
  959. *p</para>
  960. </entry><entry
  961. align="char">
  962. <para>Points to parameters for tuning operation.</para>
  963. </entry>
  964. </row></tbody></tgroup></informaltable>
  965. &return-value-dvb;
  966. <informaltable><tgroup cols="2"><tbody><row><entry
  967. align="char">
  968. <para>EBADF</para>
  969. </entry><entry
  970. align="char">
  971. <para>fd is not a valid open file descriptor.</para>
  972. </entry>
  973. </row><row><entry
  974. align="char">
  975. <para>EFAULT</para>
  976. </entry><entry
  977. align="char">
  978. <para>p points to invalid address.</para>
  979. </entry>
  980. </row><row><entry
  981. align="char">
  982. <para>EINVAL</para>
  983. </entry><entry
  984. align="char">
  985. <para>Maximum supported symbol rate reached.</para>
  986. </entry>
  987. </row></tbody></tgroup></informaltable>
  988. </section>
  989. <section id="FE_GET_FRONTEND">
  990. <title>FE_GET_FRONTEND</title>
  991. <para>DESCRIPTION
  992. </para>
  993. <informaltable><tgroup cols="1"><tbody><row><entry
  994. align="char">
  995. <para>This ioctl call queries the currently effective frontend parameters. For this
  996. command, read-only access to the device is sufficient.</para>
  997. </entry>
  998. </row></tbody></tgroup></informaltable>
  999. <para>SYNOPSIS
  1000. </para>
  1001. <informaltable><tgroup cols="1"><tbody><row><entry
  1002. align="char">
  1003. <para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
  1004. struct dvb_frontend_parameters &#x22C6;p);</para>
  1005. </entry>
  1006. </row></tbody></tgroup></informaltable>
  1007. <para>PARAMETERS
  1008. </para>
  1009. <informaltable><tgroup cols="2"><tbody><row><entry
  1010. align="char">
  1011. <para>int fd</para>
  1012. </entry><entry
  1013. align="char">
  1014. <para>File descriptor returned by a previous call to open().</para>
  1015. </entry>
  1016. </row><row><entry
  1017. align="char">
  1018. <para>int request</para>
  1019. </entry><entry
  1020. align="char">
  1021. <para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
  1022. </entry>
  1023. </row><row><entry
  1024. align="char">
  1025. <para>struct
  1026. dvb_frontend_parameters
  1027. *p</para>
  1028. </entry><entry
  1029. align="char">
  1030. <para>Points to parameters for tuning operation.</para>
  1031. </entry>
  1032. </row></tbody></tgroup></informaltable>
  1033. &return-value-dvb;
  1034. <informaltable><tgroup cols="2"><tbody><row><entry
  1035. align="char">
  1036. <para>EBADF</para>
  1037. </entry><entry
  1038. align="char">
  1039. <para>fd is not a valid open file descriptor.</para>
  1040. </entry>
  1041. </row><row><entry
  1042. align="char">
  1043. <para>EFAULT</para>
  1044. </entry><entry
  1045. align="char">
  1046. <para>p points to invalid address.</para>
  1047. </entry>
  1048. </row><row><entry
  1049. align="char">
  1050. <para>EINVAL</para>
  1051. </entry><entry
  1052. align="char">
  1053. <para>Maximum supported symbol rate reached.</para>
  1054. </entry>
  1055. </row></tbody></tgroup></informaltable>
  1056. </section>
  1057. <section id="FE_GET_EVENT">
  1058. <title>FE_GET_EVENT</title>
  1059. <para>DESCRIPTION
  1060. </para>
  1061. <informaltable><tgroup cols="1"><tbody><row><entry
  1062. align="char">
  1063. <para>This ioctl call returns a frontend event if available. If an event is not
  1064. available, the behavior depends on whether the device is in blocking or
  1065. non-blocking mode. In the latter case, the call fails immediately with errno
  1066. set to EWOULDBLOCK. In the former case, the call blocks until an event
  1067. becomes available.</para>
  1068. </entry>
  1069. </row><row><entry
  1070. align="char">
  1071. <para>The standard Linux poll() and/or select() system calls can be used with the
  1072. device file descriptor to watch for new events. For select(), the file descriptor
  1073. should be included in the exceptfds argument, and for poll(), POLLPRI should
  1074. be specified as the wake-up condition. Since the event queue allocated is
  1075. rather small (room for 8 events), the queue must be serviced regularly to avoid
  1076. overflow. If an overflow happens, the oldest event is discarded from the queue,
  1077. and an error (EOVERFLOW) occurs the next time the queue is read. After
  1078. reporting the error condition in this fashion, subsequent
  1079. <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
  1080. calls will return events from the queue as usual.</para>
  1081. </entry>
  1082. </row><row><entry
  1083. align="char">
  1084. <para>For the sake of implementation simplicity, this command requires read/write
  1085. access to the device.</para>
  1086. </entry>
  1087. </row></tbody></tgroup></informaltable>
  1088. <para>SYNOPSIS
  1089. </para>
  1090. <informaltable><tgroup cols="1"><tbody><row><entry
  1091. align="char">
  1092. <para>int ioctl(int fd, int request = QPSK_GET_EVENT,
  1093. struct dvb_frontend_event &#x22C6;ev);</para>
  1094. </entry>
  1095. </row></tbody></tgroup></informaltable>
  1096. <para>PARAMETERS
  1097. </para>
  1098. <informaltable><tgroup cols="2"><tbody><row><entry
  1099. align="char">
  1100. <para>int fd</para>
  1101. </entry><entry
  1102. align="char">
  1103. <para>File descriptor returned by a previous call to open().</para>
  1104. </entry>
  1105. </row><row><entry
  1106. align="char">
  1107. <para>int request</para>
  1108. </entry><entry
  1109. align="char">
  1110. <para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
  1111. </entry>
  1112. </row><row><entry
  1113. align="char">
  1114. <para>struct
  1115. dvb_frontend_event
  1116. *ev</para>
  1117. </entry><entry
  1118. align="char">
  1119. <para>Points to the location where the event,</para>
  1120. </entry>
  1121. </row><row><entry
  1122. align="char">
  1123. </entry><entry
  1124. align="char">
  1125. <para>if any, is to be stored.</para>
  1126. </entry>
  1127. </row></tbody></tgroup></informaltable>
  1128. &return-value-dvb;
  1129. <informaltable><tgroup cols="2"><tbody><row><entry
  1130. align="char">
  1131. <para>EBADF</para>
  1132. </entry><entry
  1133. align="char">
  1134. <para>fd is not a valid open file descriptor.</para>
  1135. </entry>
  1136. </row><row><entry
  1137. align="char">
  1138. <para>EFAULT</para>
  1139. </entry><entry
  1140. align="char">
  1141. <para>ev points to invalid address.</para>
  1142. </entry>
  1143. </row><row><entry
  1144. align="char">
  1145. <para>EWOULDBLOCK</para>
  1146. </entry><entry
  1147. align="char">
  1148. <para>There is no event pending, and the device is in
  1149. non-blocking mode.</para>
  1150. </entry>
  1151. </row><row><entry
  1152. align="char">
  1153. <para>EOVERFLOW</para>
  1154. </entry><entry
  1155. align="char">
  1156. </entry>
  1157. </row><row><entry
  1158. align="char">
  1159. </entry><entry
  1160. align="char">
  1161. <para>Overflow in event queue - one or more events were lost.</para>
  1162. </entry>
  1163. </row></tbody></tgroup></informaltable>
  1164. </section>
  1165. <section id="FE_GET_INFO">
  1166. <title>FE_GET_INFO</title>
  1167. <para>DESCRIPTION
  1168. </para>
  1169. <informaltable><tgroup cols="1"><tbody><row><entry
  1170. align="char">
  1171. <para>This ioctl call returns information about the front-end. This call only requires
  1172. read-only access to the device.</para>
  1173. </entry>
  1174. </row></tbody></tgroup></informaltable>
  1175. <para>SYNOPSIS
  1176. </para>
  1177. <informaltable><tgroup cols="1"><tbody><row><entry
  1178. align="char">
  1179. <para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct
  1180. dvb_frontend_info &#x22C6;info);</para>
  1181. </entry>
  1182. </row></tbody></tgroup></informaltable>
  1183. <para>PARAMETERS
  1184. </para>
  1185. <informaltable><tgroup cols="2"><tbody><row><entry
  1186. align="char">
  1187. <para>int fd</para>
  1188. </entry><entry
  1189. align="char">
  1190. <para>File descriptor returned by a previous call to open().</para>
  1191. </entry>
  1192. </row><row><entry
  1193. align="char">
  1194. <para>int request</para>
  1195. </entry><entry
  1196. align="char">
  1197. <para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>
  1198. </entry>
  1199. </row><row><entry
  1200. align="char">
  1201. <para>struct
  1202. dvb_frontend_info
  1203. *info</para>
  1204. </entry><entry
  1205. align="char">
  1206. <para>Points to the location where the front-end information is
  1207. to be stored.</para>
  1208. </entry>
  1209. </row></tbody></tgroup></informaltable>
  1210. &return-value-dvb;
  1211. <informaltable><tgroup cols="2"><tbody><row><entry
  1212. align="char">
  1213. <para>EBADF</para>
  1214. </entry><entry
  1215. align="char">
  1216. <para>fd is not a valid open file descriptor.</para>
  1217. </entry>
  1218. </row><row><entry
  1219. align="char">
  1220. <para>EFAULT</para>
  1221. </entry><entry
  1222. align="char">
  1223. <para>info points to invalid address.</para>
  1224. </entry>
  1225. </row></tbody></tgroup></informaltable>
  1226. </section>
  1227. <section id="FE_DISEQC_RESET_OVERLOAD">
  1228. <title>FE_DISEQC_RESET_OVERLOAD</title>
  1229. <para>DESCRIPTION
  1230. </para>
  1231. <informaltable><tgroup cols="1"><tbody><row><entry
  1232. align="char">
  1233. <para>If the bus has been automatically powered off due to power overload, this ioctl
  1234. call restores the power to the bus. The call requires read/write access to the
  1235. device. This call has no effect if the device is manually powered off. Not all
  1236. DVB adapters support this ioctl.</para>
  1237. </entry>
  1238. </row></tbody></tgroup></informaltable>
  1239. <para>SYNOPSIS
  1240. </para>
  1241. <informaltable><tgroup cols="1"><tbody><row><entry
  1242. align="char">
  1243. <para>int ioctl(int fd, int request =
  1244. <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>
  1245. </entry>
  1246. </row></tbody></tgroup></informaltable>
  1247. <para>PARAMETERS
  1248. </para>
  1249. <informaltable><tgroup cols="2"><tbody><row><entry
  1250. align="char">
  1251. <para>int fd</para>
  1252. </entry><entry
  1253. align="char">
  1254. <para>File descriptor returned by a previous call to open().</para>
  1255. </entry>
  1256. </row><row><entry
  1257. align="char">
  1258. <para>int request</para>
  1259. </entry><entry
  1260. align="char">
  1261. <para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this
  1262. command.</para>
  1263. </entry>
  1264. </row></tbody></tgroup></informaltable>
  1265. &return-value-dvb;
  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. &return-value-dvb;
  1335. <informaltable><tgroup cols="2"><tbody><row><entry
  1336. align="char">
  1337. <para>EBADF</para>
  1338. </entry><entry
  1339. align="char">
  1340. <para>fd is not a valid file descriptor.</para>
  1341. </entry>
  1342. </row><row><entry
  1343. align="char">
  1344. <para>EFAULT</para>
  1345. </entry><entry
  1346. align="char">
  1347. <para>Seq points to an invalid address.</para>
  1348. </entry>
  1349. </row><row><entry
  1350. align="char">
  1351. <para>EINVAL</para>
  1352. </entry><entry
  1353. align="char">
  1354. <para>The data structure referred to by seq is invalid in some
  1355. way.</para>
  1356. </entry>
  1357. </row><row><entry
  1358. align="char">
  1359. <para>EPERM</para>
  1360. </entry><entry
  1361. align="char">
  1362. <para>Permission denied (needs read/write access).</para>
  1363. </entry>
  1364. </row><row><entry
  1365. align="char">
  1366. <para>EINTERNAL</para>
  1367. </entry><entry
  1368. align="char">
  1369. <para>Internal error in the device driver.</para>
  1370. </entry>
  1371. </row></tbody></tgroup></informaltable>
  1372. </section>
  1373. <section id="FE_DISEQC_RECV_SLAVE_REPLY">
  1374. <title>FE_DISEQC_RECV_SLAVE_REPLY</title>
  1375. <para>DESCRIPTION
  1376. </para>
  1377. <informaltable><tgroup cols="1"><tbody><row><entry
  1378. align="char">
  1379. <para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>
  1380. </entry>
  1381. </row></tbody></tgroup></informaltable>
  1382. <para>SYNOPSIS
  1383. </para>
  1384. <informaltable><tgroup cols="1"><tbody><row><entry
  1385. align="char">
  1386. <para>int ioctl(int fd, int request =
  1387. <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct
  1388. dvb_diseqc_slave_reply &#x22C6;reply);</para>
  1389. </entry>
  1390. </row></tbody></tgroup></informaltable>
  1391. <para>PARAMETERS
  1392. </para>
  1393. <informaltable><tgroup cols="2"><tbody><row><entry
  1394. align="char">
  1395. <para>int fd</para>
  1396. </entry><entry
  1397. align="char">
  1398. <para>File descriptor returned by a previous call to open().</para>
  1399. </entry>
  1400. </row><row><entry
  1401. align="char">
  1402. <para>int request</para>
  1403. </entry><entry
  1404. align="char">
  1405. <para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this
  1406. command.</para>
  1407. </entry>
  1408. </row><row><entry
  1409. align="char">
  1410. <para>struct
  1411. dvb_diseqc_slave_reply
  1412. *reply</para>
  1413. </entry><entry
  1414. align="char">
  1415. <para>Pointer to the command to be received.</para>
  1416. </entry>
  1417. </row></tbody></tgroup></informaltable>
  1418. &return-value-dvb;
  1419. <informaltable><tgroup cols="2"><tbody><row><entry
  1420. align="char">
  1421. <para>EBADF</para>
  1422. </entry><entry
  1423. align="char">
  1424. <para>fd is not a valid file descriptor.</para>
  1425. </entry>
  1426. </row><row><entry
  1427. align="char">
  1428. <para>EFAULT</para>
  1429. </entry><entry
  1430. align="char">
  1431. <para>Seq points to an invalid address.</para>
  1432. </entry>
  1433. </row><row><entry
  1434. align="char">
  1435. <para>EINVAL</para>
  1436. </entry><entry
  1437. align="char">
  1438. <para>The data structure referred to by seq is invalid in some
  1439. way.</para>
  1440. </entry>
  1441. </row><row><entry
  1442. align="char">
  1443. <para>EPERM</para>
  1444. </entry><entry
  1445. align="char">
  1446. <para>Permission denied (needs read/write access).</para>
  1447. </entry>
  1448. </row><row><entry
  1449. align="char">
  1450. <para>EINTERNAL</para>
  1451. </entry><entry
  1452. align="char">
  1453. <para>Internal error in the device driver.</para>
  1454. </entry>
  1455. </row></tbody></tgroup></informaltable>
  1456. </section>
  1457. <section id="FE_DISEQC_SEND_BURST">
  1458. <title>FE_DISEQC_SEND_BURST</title>
  1459. <para>DESCRIPTION
  1460. </para>
  1461. <informaltable><tgroup cols="1"><tbody><row><entry
  1462. align="char">
  1463. <para>This ioctl call is used to send a 22KHz tone burst.</para>
  1464. </entry>
  1465. </row></tbody></tgroup></informaltable>
  1466. <para>SYNOPSIS
  1467. </para>
  1468. <informaltable><tgroup cols="1"><tbody><row><entry
  1469. align="char">
  1470. <para>int ioctl(int fd, int request =
  1471. <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para>
  1472. </entry>
  1473. </row></tbody></tgroup></informaltable>
  1474. <para>PARAMETERS
  1475. </para>
  1476. <informaltable><tgroup cols="2"><tbody><row><entry
  1477. align="char">
  1478. <para>int fd</para>
  1479. </entry><entry
  1480. align="char">
  1481. <para>File descriptor returned by a previous call to open().</para>
  1482. </entry>
  1483. </row><row><entry
  1484. align="char">
  1485. <para>int request</para>
  1486. </entry><entry
  1487. align="char">
  1488. <para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para>
  1489. </entry>
  1490. </row><row><entry
  1491. align="char">
  1492. <para>fe_sec_mini_cmd_t
  1493. burst</para>
  1494. </entry><entry
  1495. align="char">
  1496. <para>burst A or B.</para>
  1497. </entry>
  1498. </row></tbody></tgroup></informaltable>
  1499. &return-value-dvb;
  1500. <informaltable><tgroup cols="2"><tbody><row><entry
  1501. align="char">
  1502. <para>EBADF</para>
  1503. </entry><entry
  1504. align="char">
  1505. <para>fd is not a valid file descriptor.</para>
  1506. </entry>
  1507. </row><row><entry
  1508. align="char">
  1509. <para>EFAULT</para>
  1510. </entry><entry
  1511. align="char">
  1512. <para>Seq points to an invalid address.</para>
  1513. </entry>
  1514. </row><row><entry
  1515. align="char">
  1516. <para>EINVAL</para>
  1517. </entry><entry
  1518. align="char">
  1519. <para>The data structure referred to by seq is invalid in some
  1520. way.</para>
  1521. </entry>
  1522. </row><row><entry
  1523. align="char">
  1524. <para>EPERM</para>
  1525. </entry><entry
  1526. align="char">
  1527. <para>Permission denied (needs read/write access).</para>
  1528. </entry>
  1529. </row><row><entry
  1530. align="char">
  1531. <para>EINTERNAL</para>
  1532. </entry><entry
  1533. align="char">
  1534. <para>Internal error in the device driver.</para>
  1535. </entry>
  1536. </row></tbody></tgroup></informaltable>
  1537. </section>
  1538. <section id="FE_SET_TONE">
  1539. <title>FE_SET_TONE</title>
  1540. <para>DESCRIPTION
  1541. </para>
  1542. <informaltable><tgroup cols="1"><tbody><row><entry
  1543. align="char">
  1544. <para>This call is used to set the generation of the continuous 22kHz tone. This call
  1545. requires read/write permissions.</para>
  1546. </entry>
  1547. </row></tbody></tgroup></informaltable>
  1548. <para>SYNOPSIS
  1549. </para>
  1550. <informaltable><tgroup cols="1"><tbody><row><entry
  1551. align="char">
  1552. <para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,
  1553. fe_sec_tone_mode_t tone);</para>
  1554. </entry>
  1555. </row></tbody></tgroup></informaltable>
  1556. <para>PARAMETERS
  1557. </para>
  1558. <informaltable><tgroup cols="2"><tbody><row><entry
  1559. align="char">
  1560. <para>int fd</para>
  1561. </entry><entry
  1562. align="char">
  1563. <para>File descriptor returned by a previous call to open().</para>
  1564. </entry>
  1565. </row><row><entry
  1566. align="char">
  1567. <para>int request</para>
  1568. </entry><entry
  1569. align="char">
  1570. <para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>
  1571. </entry>
  1572. </row><row><entry
  1573. align="char">
  1574. <para>fe_sec_tone_mode_t
  1575. tone</para>
  1576. </entry><entry
  1577. align="char">
  1578. <para>The requested tone generation mode (on/off).</para>
  1579. </entry>
  1580. </row></tbody></tgroup></informaltable>
  1581. &return-value-dvb;
  1582. <informaltable><tgroup cols="2"><tbody><row><entry
  1583. align="char">
  1584. <para>ENODEV</para>
  1585. </entry><entry
  1586. align="char">
  1587. <para>Device driver not loaded/available.</para>
  1588. </entry>
  1589. </row><row><entry
  1590. align="char">
  1591. <para>EBUSY</para>
  1592. </entry><entry
  1593. align="char">
  1594. <para>Device or resource busy.</para>
  1595. </entry>
  1596. </row><row><entry
  1597. align="char">
  1598. <para>EINVAL</para>
  1599. </entry><entry
  1600. align="char">
  1601. <para>Invalid argument.</para>
  1602. </entry>
  1603. </row><row><entry
  1604. align="char">
  1605. <para>EPERM</para>
  1606. </entry><entry
  1607. align="char">
  1608. <para>File not opened with read permissions.</para>
  1609. </entry>
  1610. </row><row><entry
  1611. align="char">
  1612. <para>EINTERNAL</para>
  1613. </entry><entry
  1614. align="char">
  1615. <para>Internal error in the device driver.</para>
  1616. </entry>
  1617. </row></tbody></tgroup></informaltable>
  1618. </section>
  1619. <section id="FE_SET_VOLTAGE">
  1620. <title>FE_SET_VOLTAGE</title>
  1621. <para>DESCRIPTION
  1622. </para>
  1623. <informaltable><tgroup cols="1"><tbody><row><entry
  1624. align="char">
  1625. <para>This call is used to set the bus voltage. This call requires read/write
  1626. permissions.</para>
  1627. </entry>
  1628. </row></tbody></tgroup></informaltable>
  1629. <para>SYNOPSIS
  1630. </para>
  1631. <informaltable><tgroup cols="1"><tbody><row><entry
  1632. align="char">
  1633. <para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,
  1634. fe_sec_voltage_t voltage);</para>
  1635. </entry>
  1636. </row></tbody></tgroup></informaltable>
  1637. <para>PARAMETERS
  1638. </para>
  1639. <informaltable><tgroup cols="2"><tbody><row><entry
  1640. align="char">
  1641. <para>int fd</para>
  1642. </entry><entry
  1643. align="char">
  1644. <para>File descriptor returned by a previous call to open().</para>
  1645. </entry>
  1646. </row><row><entry
  1647. align="char">
  1648. <para>int request</para>
  1649. </entry><entry
  1650. align="char">
  1651. <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
  1652. </entry>
  1653. </row><row><entry
  1654. align="char">
  1655. <para>fe_sec_voltage_t
  1656. voltage</para>
  1657. </entry><entry
  1658. align="char">
  1659. <para>The requested bus voltage.</para>
  1660. </entry>
  1661. </row></tbody></tgroup></informaltable>
  1662. &return-value-dvb;
  1663. <informaltable><tgroup cols="2"><tbody><row><entry
  1664. align="char">
  1665. <para>ENODEV</para>
  1666. </entry><entry
  1667. align="char">
  1668. <para>Device driver not loaded/available.</para>
  1669. </entry>
  1670. </row><row><entry
  1671. align="char">
  1672. <para>EBUSY</para>
  1673. </entry><entry
  1674. align="char">
  1675. <para>Device or resource busy.</para>
  1676. </entry>
  1677. </row><row><entry
  1678. align="char">
  1679. <para>EINVAL</para>
  1680. </entry><entry
  1681. align="char">
  1682. <para>Invalid argument.</para>
  1683. </entry>
  1684. </row><row><entry
  1685. align="char">
  1686. <para>EPERM</para>
  1687. </entry><entry
  1688. align="char">
  1689. <para>File not opened with read permissions.</para>
  1690. </entry>
  1691. </row><row><entry
  1692. align="char">
  1693. <para>EINTERNAL</para>
  1694. </entry><entry
  1695. align="char">
  1696. <para>Internal error in the device driver.</para>
  1697. </entry>
  1698. </row></tbody></tgroup></informaltable>
  1699. </section>
  1700. <section id="FE_ENABLE_HIGH_LNB_VOLTAGE">
  1701. <title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>
  1702. <para>DESCRIPTION
  1703. </para>
  1704. <informaltable><tgroup cols="1"><tbody><row><entry
  1705. align="char">
  1706. <para>If high != 0 enables slightly higher voltages instead of 13/18V (to compensate
  1707. for long cables). This call requires read/write permissions. Not all DVB
  1708. adapters support this ioctl.</para>
  1709. </entry>
  1710. </row></tbody></tgroup></informaltable>
  1711. <para>SYNOPSIS
  1712. </para>
  1713. <informaltable><tgroup cols="1"><tbody><row><entry
  1714. align="char">
  1715. <para>int ioctl(int fd, int request =
  1716. <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para>
  1717. </entry>
  1718. </row></tbody></tgroup></informaltable>
  1719. <para>PARAMETERS
  1720. </para>
  1721. <informaltable><tgroup cols="2"><tbody><row><entry
  1722. align="char">
  1723. <para>int fd</para>
  1724. </entry><entry
  1725. align="char">
  1726. <para>File descriptor returned by a previous call to open().</para>
  1727. </entry>
  1728. </row><row><entry
  1729. align="char">
  1730. <para>int request</para>
  1731. </entry><entry
  1732. align="char">
  1733. <para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
  1734. </entry>
  1735. </row><row><entry
  1736. align="char">
  1737. <para>int high</para>
  1738. </entry><entry
  1739. align="char">
  1740. <para>The requested bus voltage.</para>
  1741. </entry>
  1742. </row></tbody></tgroup></informaltable>
  1743. &return-value-dvb;
  1744. <informaltable><tgroup cols="2"><tbody><row><entry
  1745. align="char">
  1746. <para>ENODEV</para>
  1747. </entry><entry
  1748. align="char">
  1749. <para>Device driver not loaded/available.</para>
  1750. </entry>
  1751. </row><row><entry
  1752. align="char">
  1753. <para>EBUSY</para>
  1754. </entry><entry
  1755. align="char">
  1756. <para>Device or resource busy.</para>
  1757. </entry>
  1758. </row><row><entry
  1759. align="char">
  1760. <para>EINVAL</para>
  1761. </entry><entry
  1762. align="char">
  1763. <para>Invalid argument.</para>
  1764. </entry>
  1765. </row><row><entry
  1766. align="char">
  1767. <para>EPERM</para>
  1768. </entry><entry
  1769. align="char">
  1770. <para>File not opened with read permissions.</para>
  1771. </entry>
  1772. </row><row><entry
  1773. align="char">
  1774. <para>EINTERNAL</para>
  1775. </entry><entry
  1776. align="char">
  1777. <para>Internal error in the device driver.</para>
  1778. </entry>
  1779. </row></tbody></tgroup></informaltable>
  1780. </section>
  1781. <section id="FE_SET_FRONTEND_TUNE_MODE">
  1782. <title>FE_SET_FRONTEND_TUNE_MODE</title>
  1783. <para>DESCRIPTION</para>
  1784. <informaltable><tgroup cols="1"><tbody><row>
  1785. <entry align="char">
  1786. <para>Allow setting tuner mode flags to the frontend.</para>
  1787. </entry>
  1788. </row></tbody></tgroup></informaltable>
  1789. <para>SYNOPSIS</para>
  1790. <informaltable><tgroup cols="1"><tbody><row>
  1791. <entry align="char">
  1792. <para>int ioctl(int fd, int request =
  1793. <link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>
  1794. </entry>
  1795. </row></tbody></tgroup></informaltable>
  1796. <para>PARAMETERS</para>
  1797. <informaltable><tgroup cols="2"><tbody><row>
  1798. <entry align="char">
  1799. <para>unsigned int flags</para>
  1800. </entry>
  1801. <entry align="char">
  1802. <para>
  1803. 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.
  1804. </para>
  1805. </entry>
  1806. </row></tbody></tgroup></informaltable>
  1807. &return-value-dvb;
  1808. <informaltable><tgroup cols="2"><tbody><row>
  1809. <entry align="char"><para>EINVAL</para></entry>
  1810. <entry align="char"><para>Invalid argument.</para></entry>
  1811. </row></tbody></tgroup></informaltable>
  1812. </section>
  1813. <section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
  1814. <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
  1815. <para>DESCRIPTION</para>
  1816. <informaltable><tgroup cols="1"><tbody><row>
  1817. <entry align="char">
  1818. <para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
  1819. <para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
  1820. <para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
  1821. </entry>
  1822. </row></tbody></tgroup></informaltable>
  1823. <para>SYNOPSIS</para>
  1824. <informaltable><tgroup cols="1"><tbody><row>
  1825. <entry align="char">
  1826. <para>int ioctl(int fd, int request =
  1827. <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
  1828. </entry>
  1829. </row></tbody></tgroup></informaltable>
  1830. <para>PARAMETERS</para>
  1831. <informaltable><tgroup cols="2"><tbody><row>
  1832. <entry align="char">
  1833. <para>unsigned long cmd</para>
  1834. </entry>
  1835. <entry align="char">
  1836. <para>
  1837. sends the specified raw cmd to the dish via DISEqC.
  1838. </para>
  1839. </entry>
  1840. </row></tbody></tgroup></informaltable>
  1841. &return-value-dvb;
  1842. <informaltable><tgroup cols="1"><tbody><row>
  1843. <entry align="char">
  1844. <para>There are no errors in use for this call</para>
  1845. </entry>
  1846. </row></tbody></tgroup></informaltable>
  1847. </section>
  1848. </section>
  1849. &sub-dvbproperty;