frontend.xml 46 KB

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