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