frontend.xml 45 KB

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