Path: blob/master/Documentation/DocBook/dvb/frontend.xml
10821 views
<title>DVB Frontend API</title>12<para>The DVB frontend device controls the tuner and DVB demodulator3hardware. It can be accessed through <emphasis4role="tt">/dev/dvb/adapter0/frontend0</emphasis>. Data types and and5ioctl definitions can be accessed by including <emphasis6role="tt">linux/dvb/frontend.h</emphasis> in your application.</para>78<para>DVB frontends come in three varieties: DVB-S (satellite), DVB-C9(cable) and DVB-T (terrestrial). Transmission via the internet (DVB-IP)10is not yet handled by this API but a future extension is possible. For11DVB-S the frontend device also supports satellite equipment control12(SEC) via DiSEqC and V-SEC protocols. The DiSEqC (digital SEC)13specification is available from14<ulink url="http://www.eutelsat.com/satellites/4_5_5.html">Eutelsat</ulink>.</para>1516<para>Note that the DVB API may also be used for MPEG decoder-only PCI17cards, in which case there exists no frontend device.</para>1819<section id="frontend_types">20<title>Frontend Data Types</title>2122<section id="frontend_type">23<title>frontend type</title>2425<para>For historical reasons frontend types are named after the type of modulation used in26transmission.</para>27<programlisting>28typedef enum fe_type {29FE_QPSK, /⋆ DVB-S ⋆/30FE_QAM, /⋆ DVB-C ⋆/31FE_OFDM /⋆ DVB-T ⋆/32} fe_type_t;33</programlisting>3435</section>3637<section id="frontend_caps">38<title>frontend capabilities</title>3940<para>Capabilities describe what a frontend can do. Some capabilities can only be supported for41a specific frontend type.</para>42<programlisting>43typedef enum fe_caps {44FE_IS_STUPID = 0,45FE_CAN_INVERSION_AUTO = 0x1,46FE_CAN_FEC_1_2 = 0x2,47FE_CAN_FEC_2_3 = 0x4,48FE_CAN_FEC_3_4 = 0x8,49FE_CAN_FEC_4_5 = 0x10,50FE_CAN_FEC_5_6 = 0x20,51FE_CAN_FEC_6_7 = 0x40,52FE_CAN_FEC_7_8 = 0x80,53FE_CAN_FEC_8_9 = 0x100,54FE_CAN_FEC_AUTO = 0x200,55FE_CAN_QPSK = 0x400,56FE_CAN_QAM_16 = 0x800,57FE_CAN_QAM_32 = 0x1000,58FE_CAN_QAM_64 = 0x2000,59FE_CAN_QAM_128 = 0x4000,60FE_CAN_QAM_256 = 0x8000,61FE_CAN_QAM_AUTO = 0x10000,62FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,63FE_CAN_BANDWIDTH_AUTO = 0x40000,64FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,65FE_CAN_HIERARCHY_AUTO = 0x100000,66FE_CAN_8VSB = 0x200000,67FE_CAN_16VSB = 0x400000,68FE_HAS_EXTENDED_CAPS = 0x800000,69FE_CAN_TURBO_FEC = 0x8000000,70FE_CAN_2G_MODULATION = 0x10000000,71FE_NEEDS_BENDING = 0x20000000,72FE_CAN_RECOVER = 0x40000000,73FE_CAN_MUTE_TS = 0x8000000074} fe_caps_t;75</programlisting>76</section>7778<section id="frontend_info">79<title>frontend information</title>8081<para>Information about the frontend ca be queried with82<link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>8384<programlisting>85struct dvb_frontend_info {86char name[128];87fe_type_t type;88uint32_t frequency_min;89uint32_t frequency_max;90uint32_t frequency_stepsize;91uint32_t frequency_tolerance;92uint32_t symbol_rate_min;93uint32_t symbol_rate_max;94uint32_t symbol_rate_tolerance; /⋆ ppm ⋆/95uint32_t notifier_delay; /⋆ ms ⋆/96fe_caps_t caps;97};98</programlisting>99</section>100101<section id="frontend_diseqc">102<title>diseqc master command</title>103104<para>A message sent from the frontend to DiSEqC capable equipment.</para>105<programlisting>106struct dvb_diseqc_master_cmd {107uint8_t msg [6]; /⋆ { framing, address, command, data[3] } ⋆/108uint8_t msg_len; /⋆ valid values are 3...6 ⋆/109};110</programlisting>111</section>112<section role="subsection">113<title>diseqc slave reply</title>114115<para>A reply to the frontend from DiSEqC 2.0 capable equipment.</para>116<programlisting>117struct dvb_diseqc_slave_reply {118uint8_t msg [4]; /⋆ { framing, data [3] } ⋆/119uint8_t msg_len; /⋆ valid values are 0...4, 0 means no msg ⋆/120int timeout; /⋆ return from ioctl after timeout ms with ⋆/121}; /⋆ errorcode when no message was received ⋆/122</programlisting>123</section>124125<section id="frontend_diseqc_slave_reply">126<title>diseqc slave reply</title>127<para>The voltage is usually used with non-DiSEqC capable LNBs to switch the polarzation128(horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched129consistently to the DiSEqC commands as described in the DiSEqC spec.</para>130<programlisting>131typedef enum fe_sec_voltage {132SEC_VOLTAGE_13,133SEC_VOLTAGE_18134} fe_sec_voltage_t;135</programlisting>136</section>137138<section id="frontend_sec_tone">139<title>SEC continuous tone</title>140141<para>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the142high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to143be switched consistently to the DiSEqC commands as described in the DiSEqC144spec.</para>145<programlisting>146typedef enum fe_sec_tone_mode {147SEC_TONE_ON,148SEC_TONE_OFF149} fe_sec_tone_mode_t;150</programlisting>151</section>152153<section id="frontend_sec_burst">154<title>SEC tone burst</title>155156<para>The 22KHz tone burst is usually used with non-DiSEqC capable switches to select157between two connected LNBs/satellites. When using DiSEqC epuipment this voltage has to158be switched consistently to the DiSEqC commands as described in the DiSEqC159spec.</para>160<programlisting>161typedef enum fe_sec_mini_cmd {162SEC_MINI_A,163SEC_MINI_B164} fe_sec_mini_cmd_t;165</programlisting>166167<para></para>168</section>169170<section id="frontend_status">171<title>frontend status</title>172<para>Several functions of the frontend device use the fe_status data type defined173by</para>174<programlisting>175typedef enum fe_status {176FE_HAS_SIGNAL = 0x01, /⋆ found something above the noise level ⋆/177FE_HAS_CARRIER = 0x02, /⋆ found a DVB signal ⋆/178FE_HAS_VITERBI = 0x04, /⋆ FEC is stable ⋆/179FE_HAS_SYNC = 0x08, /⋆ found sync bytes ⋆/180FE_HAS_LOCK = 0x10, /⋆ everything's working... ⋆/181FE_TIMEDOUT = 0x20, /⋆ no lock within the last ~2 seconds ⋆/182FE_REINIT = 0x40 /⋆ frontend was reinitialized, ⋆/183} fe_status_t; /⋆ application is recommned to reset ⋆/184</programlisting>185<para>to indicate the current state and/or state changes of the frontend hardware.186</para>187188</section>189190<section id="frontend_params">191<title>frontend parameters</title>192<para>The kind of parameters passed to the frontend device for tuning depend on193the kind of hardware you are using. All kinds of parameters are combined as an194union in the FrontendParameters structure:</para>195<programlisting>196struct dvb_frontend_parameters {197uint32_t frequency; /⋆ (absolute) frequency in Hz for QAM/OFDM ⋆/198/⋆ intermediate frequency in kHz for QPSK ⋆/199fe_spectral_inversion_t inversion;200union {201struct dvb_qpsk_parameters qpsk;202struct dvb_qam_parameters qam;203struct dvb_ofdm_parameters ofdm;204} u;205};206</programlisting>207<para>For satellite QPSK frontends you have to use the <constant>QPSKParameters</constant> member defined by</para>208<programlisting>209struct dvb_qpsk_parameters {210uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/211fe_code_rate_t fec_inner; /⋆ forward error correction (see above) ⋆/212};213</programlisting>214<para>for cable QAM frontend you use the <constant>QAMParameters</constant> structure</para>215<programlisting>216struct dvb_qam_parameters {217uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/218fe_code_rate_t fec_inner; /⋆ forward error correction (see above) ⋆/219fe_modulation_t modulation; /⋆ modulation type (see above) ⋆/220};221</programlisting>222<para>DVB-T frontends are supported by the <constant>OFDMParamters</constant> structure223</para>224<programlisting>225struct dvb_ofdm_parameters {226fe_bandwidth_t bandwidth;227fe_code_rate_t code_rate_HP; /⋆ high priority stream code rate ⋆/228fe_code_rate_t code_rate_LP; /⋆ low priority stream code rate ⋆/229fe_modulation_t constellation; /⋆ modulation type (see above) ⋆/230fe_transmit_mode_t transmission_mode;231fe_guard_interval_t guard_interval;232fe_hierarchy_t hierarchy_information;233};234</programlisting>235<para>In the case of QPSK frontends the <constant>Frequency</constant> field specifies the intermediate236frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of237the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and238OFDM frontends the Frequency specifies the absolute frequency and is given in239Hz.240</para>241<para>The Inversion field can take one of these values:242</para>243<programlisting>244typedef enum fe_spectral_inversion {245INVERSION_OFF,246INVERSION_ON,247INVERSION_AUTO248} fe_spectral_inversion_t;249</programlisting>250<para>It indicates if spectral inversion should be presumed or not. In the automatic setting251(<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by252itself.253</para>254<para>The possible values for the <constant>FEC_inner</constant> field are255</para>256<programlisting>257typedef enum fe_code_rate {258FEC_NONE = 0,259FEC_1_2,260FEC_2_3,261FEC_3_4,262FEC_4_5,263FEC_5_6,264FEC_6_7,265FEC_7_8,266FEC_8_9,267FEC_AUTO268} fe_code_rate_t;269</programlisting>270<para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto271detection.272</para>273<para>For cable and terrestrial frontends (QAM and OFDM) one also has to specify the quadrature274modulation mode which can be one of the following:275</para>276<programlisting>277typedef enum fe_modulation {278QPSK,279QAM_16,280QAM_32,281QAM_64,282QAM_128,283QAM_256,284QAM_AUTO285} fe_modulation_t;286</programlisting>287<para>Finally, there are several more parameters for OFDM:288</para>289<programlisting>290typedef enum fe_transmit_mode {291TRANSMISSION_MODE_2K,292TRANSMISSION_MODE_8K,293TRANSMISSION_MODE_AUTO294} fe_transmit_mode_t;295</programlisting>296<programlisting>297typedef enum fe_bandwidth {298BANDWIDTH_8_MHZ,299BANDWIDTH_7_MHZ,300BANDWIDTH_6_MHZ,301BANDWIDTH_AUTO302} fe_bandwidth_t;303</programlisting>304<programlisting>305typedef enum fe_guard_interval {306GUARD_INTERVAL_1_32,307GUARD_INTERVAL_1_16,308GUARD_INTERVAL_1_8,309GUARD_INTERVAL_1_4,310GUARD_INTERVAL_AUTO311} fe_guard_interval_t;312</programlisting>313<programlisting>314typedef enum fe_hierarchy {315HIERARCHY_NONE,316HIERARCHY_1,317HIERARCHY_2,318HIERARCHY_4,319HIERARCHY_AUTO320} fe_hierarchy_t;321</programlisting>322323</section>324325<section id="frontend_events">326<title>frontend events</title>327<programlisting>328struct dvb_frontend_event {329fe_status_t status;330struct dvb_frontend_parameters parameters;331};332</programlisting>333</section>334</section>335336337<section id="frontend_fcalls">338<title>Frontend Function Calls</title>339340<section id="frontend_f_open">341<title>open()</title>342<para>DESCRIPTION</para>343<informaltable><tgroup cols="1"><tbody><row>344<entry align="char">345<para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0)346for subsequent use. Usually the first thing to do after a successful open is to347find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>348<para>The device can be opened in read-only mode, which only allows monitoring of349device status and statistics, or read/write mode, which allows any kind of use350(e.g. performing tuning operations.)351</para>352<para>In a system with multiple front-ends, it is usually the case that multiple devices353cannot be open in read/write mode simultaneously. As long as a front-end354device is opened in read/write mode, other open() calls in read/write mode will355either fail or block, depending on whether non-blocking or blocking mode was356specified. A front-end device opened in blocking mode can later be put into357non-blocking mode (and vice versa) using the F_SETFL command of the fcntl358system call. This is a standard system call, documented in the Linux manual359page for fcntl. When an open() call has succeeded, the device will be ready360for use in the specified mode. This implies that the corresponding hardware is361powered up, and that other front-ends may have been powered down to make362that possible.</para>363</entry>364</row></tbody></tgroup></informaltable>365366<para>SYNOPSIS</para>367<informaltable><tgroup cols="1"><tbody><row><entry368align="char">369<para>int open(const char ⋆deviceName, int flags);</para>370</entry>371</row></tbody></tgroup></informaltable>372<para>PARAMETERS373</para>374<informaltable><tgroup cols="2"><tbody><row><entry375align="char">376<para>const char377*deviceName</para>378</entry><entry379align="char">380<para>Name of specific video device.</para>381</entry>382</row><row><entry383align="char">384<para>int flags</para>385</entry><entry386align="char">387<para>A bit-wise OR of the following flags:</para>388</entry>389</row><row><entry390align="char">391</entry><entry392align="char">393<para>O_RDONLY read-only access</para>394</entry>395</row><row><entry396align="char">397</entry><entry398align="char">399<para>O_RDWR read/write access</para>400</entry>401</row><row><entry402align="char">403</entry><entry404align="char">405<para>O_NONBLOCK open in non-blocking mode</para>406</entry>407</row><row><entry408align="char">409</entry><entry410align="char">411<para>(blocking mode is the default)</para>412</entry>413</row></tbody></tgroup></informaltable>414<para>ERRORS415</para>416<informaltable><tgroup cols="2"><tbody><row><entry417align="char">418<para>ENODEV</para>419</entry><entry420align="char">421<para>Device driver not loaded/available.</para>422</entry>423</row><row><entry424align="char">425<para>EINTERNAL</para>426</entry><entry427align="char">428<para>Internal error.</para>429</entry>430</row><row><entry431align="char">432<para>EBUSY</para>433</entry><entry434align="char">435<para>Device or resource busy.</para>436</entry>437</row><row><entry438align="char">439<para>EINVAL</para>440</entry><entry441align="char">442<para>Invalid argument.</para>443</entry>444</row></tbody></tgroup></informaltable>445</section>446447<section id="frontend_f_close">448<title>close()</title>449<para>DESCRIPTION450</para>451<informaltable><tgroup cols="1"><tbody><row><entry452align="char">453<para>This system call closes a previously opened front-end device. After closing454a front-end device, its corresponding hardware might be powered down455automatically.</para>456</entry>457</row></tbody></tgroup></informaltable>458<para>SYNOPSIS459</para>460<informaltable><tgroup cols="1"><tbody><row><entry461align="char">462<para>int close(int fd);</para>463</entry>464</row></tbody></tgroup></informaltable>465<para>PARAMETERS466</para>467<informaltable><tgroup cols="2"><tbody><row><entry468align="char">469<para>int fd</para>470</entry><entry471align="char">472<para>File descriptor returned by a previous call to open().</para>473</entry>474</row></tbody></tgroup></informaltable>475<para>ERRORS476</para>477<informaltable><tgroup cols="2"><tbody><row><entry478align="char">479<para>EBADF</para>480</entry><entry481align="char">482<para>fd is not a valid open file descriptor.</para>483</entry>484</row></tbody></tgroup></informaltable>485</section>486487<section id="FE_READ_STATUS">488<title>FE_READ_STATUS</title>489<para>DESCRIPTION490</para>491<informaltable><tgroup cols="1"><tbody><row><entry492align="char">493<para>This ioctl call returns status information about the front-end. This call only494requires read-only access to the device.</para>495</entry>496</row></tbody></tgroup></informaltable>497<para>SYNOPSIS498</para>499<informaltable><tgroup cols="1"><tbody><row><entry500align="char">501<para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,502fe_status_t ⋆status);</para>503</entry>504</row></tbody></tgroup></informaltable>505<para>PARAMETERS506</para>507508<informaltable><tgroup cols="2"><tbody><row><entry509align="char">510<para>int fd</para>511</entry><entry512align="char">513<para>File descriptor returned by a previous call to open().</para>514</entry>515</row><row><entry516align="char">517<para>int request</para>518</entry><entry519align="char">520<para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>521</entry>522</row><row><entry523align="char">524<para>struct fe_status_t525*status</para>526</entry><entry527align="char">528<para>Points to the location where the front-end status word is529to be stored.</para>530</entry>531</row></tbody></tgroup></informaltable>532<para>ERRORS533</para>534<informaltable><tgroup cols="2"><tbody><row><entry535align="char">536<para>EBADF</para>537</entry><entry538align="char">539<para>fd is not a valid open file descriptor.</para>540</entry>541</row><row><entry542align="char">543<para>EFAULT</para>544</entry><entry545align="char">546<para>status points to invalid address.</para>547</entry>548</row></tbody></tgroup></informaltable>549</section>550551<section id="FE_READ_BER">552<title>FE_READ_BER</title>553<para>DESCRIPTION554</para>555<informaltable><tgroup cols="1"><tbody><row><entry556align="char">557<para>This ioctl call returns the bit error rate for the signal currently558received/demodulated by the front-end. For this command, read-only access to559the device is sufficient.</para>560</entry>561</row></tbody></tgroup></informaltable>562<para>SYNOPSIS563</para>564<informaltable><tgroup cols="1"><tbody><row><entry565align="char">566<para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,567uint32_t ⋆ber);</para>568</entry>569</row></tbody></tgroup></informaltable>570<para>PARAMETERS571</para>572<informaltable><tgroup cols="2"><tbody><row><entry573align="char">574<para>int fd</para>575</entry><entry576align="char">577<para>File descriptor returned by a previous call to open().</para>578</entry>579</row><row><entry580align="char">581<para>int request</para>582</entry><entry583align="char">584<para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>585</entry>586</row><row><entry587align="char">588<para>uint32_t *ber</para>589</entry><entry590align="char">591<para>The bit error rate is stored into *ber.</para>592</entry>593</row></tbody></tgroup></informaltable>594<para>ERRORS595</para>596<informaltable><tgroup cols="2"><tbody><row><entry597align="char">598<para>EBADF</para>599</entry><entry600align="char">601<para>fd is not a valid open file descriptor.</para>602</entry>603</row><row><entry604align="char">605<para>EFAULT</para>606</entry><entry607align="char">608<para>ber points to invalid address.</para>609</entry>610</row><row><entry611align="char">612<para>ENOSIGNAL</para>613</entry><entry614align="char">615<para>There is no signal, thus no meaningful bit error rate. Also616returned if the front-end is not turned on.</para>617</entry>618</row><row><entry619align="char">620<para>ENOSYS</para>621</entry><entry622align="char">623<para>Function not available for this device.</para>624</entry>625</row></tbody></tgroup></informaltable>626</section>627628<section id="FE_READ_SNR">629<title>FE_READ_SNR</title>630631<para>DESCRIPTION632</para>633<informaltable><tgroup cols="1"><tbody><row><entry634align="char">635<para>This ioctl call returns the signal-to-noise ratio for the signal currently received636by the front-end. For this command, read-only access to the device is sufficient.</para>637</entry>638</row></tbody></tgroup></informaltable>639<para>SYNOPSIS640</para>641<informaltable><tgroup cols="1"><tbody><row><entry642align="char">643<para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t644⋆snr);</para>645</entry>646</row></tbody></tgroup></informaltable>647<para>PARAMETERS648</para>649<informaltable><tgroup cols="2"><tbody><row><entry650align="char">651<para>int fd</para>652</entry><entry653align="char">654<para>File descriptor returned by a previous call to open().</para>655</entry>656</row><row><entry657align="char">658<para>int request</para>659</entry><entry660align="char">661<para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>662</entry>663</row><row><entry664align="char">665<para>int16_t *snr</para>666</entry><entry667align="char">668<para>The signal-to-noise ratio is stored into *snr.</para>669</entry>670</row></tbody></tgroup></informaltable>671672<para>ERRORS673</para>674<informaltable><tgroup cols="2"><tbody><row><entry675align="char">676<para>EBADF</para>677</entry><entry678align="char">679<para>fd is not a valid open file descriptor.</para>680</entry>681</row><row><entry682align="char">683<para>EFAULT</para>684</entry><entry685align="char">686<para>snr points to invalid address.</para>687</entry>688</row><row><entry689align="char">690<para>ENOSIGNAL</para>691</entry><entry692align="char">693<para>There is no signal, thus no meaningful signal strength694value. Also returned if front-end is not turned on.</para>695</entry>696</row><row><entry697align="char">698<para>ENOSYS</para>699</entry><entry700align="char">701<para>Function not available for this device.</para>702</entry>703</row></tbody></tgroup></informaltable>704</section>705706<section id="FE_READ_SIGNAL_STRENGTH">707<title>FE_READ_SIGNAL_STRENGTH</title>708<para>DESCRIPTION709</para>710<informaltable><tgroup cols="1"><tbody><row><entry711align="char">712<para>This ioctl call returns the signal strength value for the signal currently received713by the front-end. For this command, read-only access to the device is sufficient.</para>714</entry>715</row></tbody></tgroup></informaltable>716<para>SYNOPSIS717</para>718<informaltable><tgroup cols="1"><tbody><row><entry719align="char">720<para>int ioctl( int fd, int request =721<link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t ⋆strength);</para>722</entry>723</row></tbody></tgroup></informaltable>724725<para>PARAMETERS726</para>727<informaltable><tgroup cols="2"><tbody><row><entry728align="char">729<para>int fd</para>730</entry><entry731align="char">732<para>File descriptor returned by a previous call to open().</para>733</entry>734</row><row><entry735align="char">736<para>int request</para>737</entry><entry738align="char">739<para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this740command.</para>741</entry>742</row><row><entry743align="char">744<para>int16_t *strength</para>745</entry><entry746align="char">747<para>The signal strength value is stored into *strength.</para>748</entry>749</row></tbody></tgroup></informaltable>750<para>ERRORS751</para>752<informaltable><tgroup cols="2"><tbody><row><entry753align="char">754<para>EBADF</para>755</entry><entry756align="char">757<para>fd is not a valid open file descriptor.</para>758</entry>759</row><row><entry760align="char">761<para>EFAULT</para>762</entry><entry763align="char">764<para>status points to invalid address.</para>765</entry>766</row><row><entry767align="char">768<para>ENOSIGNAL</para>769</entry><entry770align="char">771<para>There is no signal, thus no meaningful signal strength772value. Also returned if front-end is not turned on.</para>773</entry>774</row><row><entry775align="char">776<para>ENOSYS</para>777</entry><entry778align="char">779<para>Function not available for this device.</para>780</entry>781</row></tbody></tgroup></informaltable>782</section>783784<section id="FE_READ_UNCORRECTED_BLOCKS">785<title>FE_READ_UNCORRECTED_BLOCKS</title>786<para>DESCRIPTION787</para>788<informaltable><tgroup cols="1"><tbody><row><entry789align="char">790<para>This ioctl call returns the number of uncorrected blocks detected by the device791driver during its lifetime. For meaningful measurements, the increment in block792count during a specific time interval should be calculated. For this command,793read-only access to the device is sufficient.</para>794</entry>795</row><row><entry796align="char">797<para>Note that the counter will wrap to zero after its maximum count has been798reached.</para>799</entry>800</row></tbody></tgroup></informaltable>801<para>SYNOPSIS802</para>803<informaltable><tgroup cols="1"><tbody><row><entry804align="char">805<para>int ioctl( int fd, int request =806<link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t ⋆ublocks);</para>807</entry>808</row></tbody></tgroup></informaltable>809<para>PARAMETERS810</para>811<informaltable><tgroup cols="2"><tbody><row><entry812align="char">813<para>int fd</para>814</entry><entry815align="char">816<para>File descriptor returned by a previous call to open().</para>817</entry>818</row><row><entry819align="char">820<para>int request</para>821</entry><entry822align="char">823<para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this824command.</para>825</entry>826</row><row><entry827align="char">828<para>uint32_t *ublocks</para>829</entry><entry830align="char">831<para>The total number of uncorrected blocks seen by the driver832so far.</para>833</entry>834</row></tbody></tgroup></informaltable>835<para>ERRORS836</para>837<informaltable><tgroup cols="2"><tbody><row><entry838align="char">839<para>EBADF</para>840</entry><entry841align="char">842<para>fd is not a valid open file descriptor.</para>843</entry>844</row><row><entry845align="char">846<para>EFAULT</para>847</entry><entry848align="char">849<para>ublocks points to invalid address.</para>850</entry>851</row><row><entry852align="char">853<para>ENOSYS</para>854</entry><entry855align="char">856<para>Function not available for this device.</para>857</entry>858</row></tbody></tgroup></informaltable>859</section>860861<section id="FE_SET_FRONTEND">862<title>FE_SET_FRONTEND</title>863<para>DESCRIPTION864</para>865<informaltable><tgroup cols="1"><tbody><row><entry866align="char">867<para>This ioctl call starts a tuning operation using specified parameters. The result868of this call will be successful if the parameters were valid and the tuning could869be initiated. The result of the tuning operation in itself, however, will arrive870asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and871FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before872the previous one was completed, the previous operation will be aborted in favor873of the new one. This command requires read/write access to the device.</para>874</entry>875</row></tbody></tgroup></informaltable>876877<para>SYNOPSIS878</para>879<informaltable><tgroup cols="1"><tbody><row><entry880align="char">881<para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,882struct dvb_frontend_parameters ⋆p);</para>883</entry>884</row></tbody></tgroup></informaltable>885<para>PARAMETERS886</para>887<informaltable><tgroup cols="2"><tbody><row><entry888align="char">889<para>int fd</para>890</entry><entry891align="char">892<para>File descriptor returned by a previous call to open().</para>893</entry>894</row><row><entry895align="char">896<para>int request</para>897</entry><entry898align="char">899<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>900</entry>901</row><row><entry902align="char">903<para>struct904dvb_frontend_parameters905*p</para>906</entry><entry907align="char">908<para>Points to parameters for tuning operation.</para>909</entry>910</row></tbody></tgroup></informaltable>911<para>ERRORS912</para>913<informaltable><tgroup cols="2"><tbody><row><entry914align="char">915<para>EBADF</para>916</entry><entry917align="char">918<para>fd is not a valid open file descriptor.</para>919</entry>920</row><row><entry921align="char">922<para>EFAULT</para>923</entry><entry924align="char">925<para>p points to invalid address.</para>926</entry>927</row><row><entry928align="char">929<para>EINVAL</para>930</entry><entry931align="char">932<para>Maximum supported symbol rate reached.</para>933</entry>934</row></tbody></tgroup></informaltable>935</section>936937<section id="FE_GET_FRONTEND">938<title>FE_GET_FRONTEND</title>939<para>DESCRIPTION940</para>941<informaltable><tgroup cols="1"><tbody><row><entry942align="char">943<para>This ioctl call queries the currently effective frontend parameters. For this944command, read-only access to the device is sufficient.</para>945</entry>946</row></tbody></tgroup></informaltable>947948<para>SYNOPSIS949</para>950<informaltable><tgroup cols="1"><tbody><row><entry951align="char">952<para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,953struct dvb_frontend_parameters ⋆p);</para>954</entry>955</row></tbody></tgroup></informaltable>956957<para>PARAMETERS958</para>959<informaltable><tgroup cols="2"><tbody><row><entry960align="char">961<para>int fd</para>962</entry><entry963align="char">964<para>File descriptor returned by a previous call to open().</para>965</entry>966</row><row><entry967align="char">968<para>int request</para>969</entry><entry970align="char">971<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>972</entry>973</row><row><entry974align="char">975<para>struct976dvb_frontend_parameters977*p</para>978</entry><entry979align="char">980<para>Points to parameters for tuning operation.</para>981</entry>982</row></tbody></tgroup></informaltable>983984<para>ERRORS985</para>986987<informaltable><tgroup cols="2"><tbody><row><entry988align="char">989<para>EBADF</para>990</entry><entry991align="char">992<para>fd is not a valid open file descriptor.</para>993</entry>994</row><row><entry995align="char">996<para>EFAULT</para>997</entry><entry998align="char">999<para>p points to invalid address.</para>1000</entry>1001</row><row><entry1002align="char">1003<para>EINVAL</para>1004</entry><entry1005align="char">1006<para>Maximum supported symbol rate reached.</para>1007</entry>1008</row></tbody></tgroup></informaltable>10091010</section>10111012<section id="FE_GET_EVENT">1013<title>FE_GET_EVENT</title>1014<para>DESCRIPTION1015</para>1016<informaltable><tgroup cols="1"><tbody><row><entry1017align="char">1018<para>This ioctl call returns a frontend event if available. If an event is not1019available, the behavior depends on whether the device is in blocking or1020non-blocking mode. In the latter case, the call fails immediately with errno1021set to EWOULDBLOCK. In the former case, the call blocks until an event1022becomes available.</para>1023</entry>1024</row><row><entry1025align="char">1026<para>The standard Linux poll() and/or select() system calls can be used with the1027device file descriptor to watch for new events. For select(), the file descriptor1028should be included in the exceptfds argument, and for poll(), POLLPRI should1029be specified as the wake-up condition. Since the event queue allocated is1030rather small (room for 8 events), the queue must be serviced regularly to avoid1031overflow. If an overflow happens, the oldest event is discarded from the queue,1032and an error (EOVERFLOW) occurs the next time the queue is read. After1033reporting the error condition in this fashion, subsequent1034<link linkend="FE_GET_EVENT">FE_GET_EVENT</link>1035calls will return events from the queue as usual.</para>1036</entry>1037</row><row><entry1038align="char">1039<para>For the sake of implementation simplicity, this command requires read/write1040access to the device.</para>1041</entry>1042</row></tbody></tgroup></informaltable>10431044<para>SYNOPSIS1045</para>1046<informaltable><tgroup cols="1"><tbody><row><entry1047align="char">1048<para>int ioctl(int fd, int request = QPSK_GET_EVENT,1049struct dvb_frontend_event ⋆ev);</para>1050</entry>1051</row></tbody></tgroup></informaltable>10521053<para>PARAMETERS1054</para>1055<informaltable><tgroup cols="2"><tbody><row><entry1056align="char">1057<para>int fd</para>1058</entry><entry1059align="char">1060<para>File descriptor returned by a previous call to open().</para>1061</entry>1062</row><row><entry1063align="char">1064<para>int request</para>1065</entry><entry1066align="char">1067<para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>1068</entry>1069</row><row><entry1070align="char">1071<para>struct1072dvb_frontend_event1073*ev</para>1074</entry><entry1075align="char">1076<para>Points to the location where the event,</para>1077</entry>1078</row><row><entry1079align="char">1080</entry><entry1081align="char">1082<para>if any, is to be stored.</para>1083</entry>1084</row></tbody></tgroup></informaltable>10851086<para>ERRORS1087</para>1088<informaltable><tgroup cols="2"><tbody><row><entry1089align="char">1090<para>EBADF</para>1091</entry><entry1092align="char">1093<para>fd is not a valid open file descriptor.</para>1094</entry>1095</row><row><entry1096align="char">1097<para>EFAULT</para>1098</entry><entry1099align="char">1100<para>ev points to invalid address.</para>1101</entry>1102</row><row><entry1103align="char">1104<para>EWOULDBLOCK</para>1105</entry><entry1106align="char">1107<para>There is no event pending, and the device is in1108non-blocking mode.</para>1109</entry>1110</row><row><entry1111align="char">1112<para>EOVERFLOW</para>1113</entry><entry1114align="char">1115</entry>1116</row><row><entry1117align="char">1118</entry><entry1119align="char">1120<para>Overflow in event queue - one or more events were lost.</para>1121</entry>1122</row></tbody></tgroup></informaltable>1123</section>11241125<section id="FE_GET_INFO">1126<title>FE_GET_INFO</title>1127<para>DESCRIPTION1128</para>1129<informaltable><tgroup cols="1"><tbody><row><entry1130align="char">1131<para>This ioctl call returns information about the front-end. This call only requires1132read-only access to the device.</para>1133</entry>1134</row></tbody></tgroup></informaltable>1135<para>SYNOPSIS1136</para>11371138<informaltable><tgroup cols="1"><tbody><row><entry1139align="char">1140<para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct1141dvb_frontend_info ⋆info);</para>1142</entry>1143</row></tbody></tgroup></informaltable>1144<para>PARAMETERS1145</para>11461147<informaltable><tgroup cols="2"><tbody><row><entry1148align="char">1149<para>int fd</para>1150</entry><entry1151align="char">1152<para>File descriptor returned by a previous call to open().</para>1153</entry>1154</row><row><entry1155align="char">1156<para>int request</para>1157</entry><entry1158align="char">1159<para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>1160</entry>1161</row><row><entry1162align="char">1163<para>struct1164dvb_frontend_info1165*info</para>1166</entry><entry1167align="char">1168<para>Points to the location where the front-end information is1169to be stored.</para>1170</entry>1171</row></tbody></tgroup></informaltable>1172<para>ERRORS1173</para>1174<informaltable><tgroup cols="2"><tbody><row><entry1175align="char">1176<para>EBADF</para>1177</entry><entry1178align="char">1179<para>fd is not a valid open file descriptor.</para>1180</entry>1181</row><row><entry1182align="char">1183<para>EFAULT</para>1184</entry><entry1185align="char">1186<para>info points to invalid address.</para>1187</entry>1188</row></tbody></tgroup></informaltable>1189</section>11901191<section id="FE_DISEQC_RESET_OVERLOAD">1192<title>FE_DISEQC_RESET_OVERLOAD</title>1193<para>DESCRIPTION1194</para>1195<informaltable><tgroup cols="1"><tbody><row><entry1196align="char">1197<para>If the bus has been automatically powered off due to power overload, this ioctl1198call restores the power to the bus. The call requires read/write access to the1199device. This call has no effect if the device is manually powered off. Not all1200DVB adapters support this ioctl.</para>1201</entry>1202</row></tbody></tgroup></informaltable>12031204<para>SYNOPSIS1205</para>1206<informaltable><tgroup cols="1"><tbody><row><entry1207align="char">1208<para>int ioctl(int fd, int request =1209<link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>1210</entry>1211</row></tbody></tgroup></informaltable>1212<para>PARAMETERS1213</para>1214<informaltable><tgroup cols="2"><tbody><row><entry1215align="char">1216<para>int fd</para>1217</entry><entry1218align="char">1219<para>File descriptor returned by a previous call to open().</para>1220</entry>1221</row><row><entry1222align="char">1223<para>int request</para>1224</entry><entry1225align="char">1226<para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this1227command.</para>1228</entry>1229</row></tbody></tgroup></informaltable>12301231<para>ERRORS1232</para>1233<informaltable><tgroup cols="2"><tbody><row><entry1234align="char">1235<para>EBADF</para>1236</entry><entry1237align="char">1238<para>fd is not a valid file descriptor.</para>1239</entry>1240</row><row><entry1241align="char">1242<para>EPERM</para>1243</entry><entry1244align="char">1245<para>Permission denied (needs read/write access).</para>1246</entry>1247</row><row><entry1248align="char">1249<para>EINTERNAL</para>1250</entry><entry1251align="char">1252<para>Internal error in the device driver.</para>1253</entry>1254</row></tbody></tgroup></informaltable>1255</section>12561257<section id="FE_DISEQC_SEND_MASTER_CMD">1258<title>FE_DISEQC_SEND_MASTER_CMD</title>1259<para>DESCRIPTION1260</para>1261<informaltable><tgroup cols="1"><tbody><row><entry1262align="char">1263<para>This ioctl call is used to send a a DiSEqC command.</para>1264</entry>1265</row></tbody></tgroup></informaltable>1266<para>SYNOPSIS1267</para>1268<informaltable><tgroup cols="1"><tbody><row><entry1269align="char">1270<para>int ioctl(int fd, int request =1271<link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct1272dvb_diseqc_master_cmd ⋆cmd);</para>1273</entry>1274</row></tbody></tgroup></informaltable>12751276<para>PARAMETERS1277</para>1278<informaltable><tgroup cols="2"><tbody><row><entry1279align="char">1280<para>int fd</para>1281</entry><entry1282align="char">1283<para>File descriptor returned by a previous call to open().</para>1284</entry>1285</row><row><entry1286align="char">1287<para>int request</para>1288</entry><entry1289align="char">1290<para>Equals <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> for this1291command.</para>1292</entry>1293</row><row><entry1294align="char">1295<para>struct1296dvb_diseqc_master_cmd1297*cmd</para>1298</entry><entry1299align="char">1300<para>Pointer to the command to be transmitted.</para>1301</entry>1302</row></tbody></tgroup></informaltable>13031304<para>ERRORS1305</para>1306<informaltable><tgroup cols="2"><tbody><row><entry1307align="char">1308<para>EBADF</para>1309</entry><entry1310align="char">1311<para>fd is not a valid file descriptor.</para>1312</entry>1313</row><row><entry1314align="char">1315<para>EFAULT</para>1316</entry><entry1317align="char">1318<para>Seq points to an invalid address.</para>1319</entry>1320</row><row><entry1321align="char">1322<para>EINVAL</para>1323</entry><entry1324align="char">1325<para>The data structure referred to by seq is invalid in some1326way.</para>1327</entry>1328</row><row><entry1329align="char">1330<para>EPERM</para>1331</entry><entry1332align="char">1333<para>Permission denied (needs read/write access).</para>1334</entry>1335</row><row><entry1336align="char">1337<para>EINTERNAL</para>1338</entry><entry1339align="char">1340<para>Internal error in the device driver.</para>1341</entry>1342</row></tbody></tgroup></informaltable>1343</section>13441345<section id="FE_DISEQC_RECV_SLAVE_REPLY">1346<title>FE_DISEQC_RECV_SLAVE_REPLY</title>1347<para>DESCRIPTION1348</para>1349<informaltable><tgroup cols="1"><tbody><row><entry1350align="char">1351<para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>1352</entry>1353</row></tbody></tgroup></informaltable>13541355<para>SYNOPSIS1356</para>1357<informaltable><tgroup cols="1"><tbody><row><entry1358align="char">1359<para>int ioctl(int fd, int request =1360<link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct1361dvb_diseqc_slave_reply ⋆reply);</para>1362</entry>1363</row></tbody></tgroup></informaltable>13641365<para>PARAMETERS1366</para>1367<informaltable><tgroup cols="2"><tbody><row><entry1368align="char">1369<para>int fd</para>1370</entry><entry1371align="char">1372<para>File descriptor returned by a previous call to open().</para>1373</entry>1374</row><row><entry1375align="char">1376<para>int request</para>1377</entry><entry1378align="char">1379<para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this1380command.</para>1381</entry>1382</row><row><entry1383align="char">1384<para>struct1385dvb_diseqc_slave_reply1386*reply</para>1387</entry><entry1388align="char">1389<para>Pointer to the command to be received.</para>1390</entry>1391</row></tbody></tgroup></informaltable>1392<para>ERRORS1393</para>1394<informaltable><tgroup cols="2"><tbody><row><entry1395align="char">1396<para>EBADF</para>1397</entry><entry1398align="char">1399<para>fd is not a valid file descriptor.</para>1400</entry>1401</row><row><entry1402align="char">1403<para>EFAULT</para>1404</entry><entry1405align="char">1406<para>Seq points to an invalid address.</para>1407</entry>1408</row><row><entry1409align="char">1410<para>EINVAL</para>1411</entry><entry1412align="char">1413<para>The data structure referred to by seq is invalid in some1414way.</para>1415</entry>1416</row><row><entry1417align="char">1418<para>EPERM</para>1419</entry><entry1420align="char">1421<para>Permission denied (needs read/write access).</para>1422</entry>1423</row><row><entry1424align="char">1425<para>EINTERNAL</para>1426</entry><entry1427align="char">1428<para>Internal error in the device driver.</para>1429</entry>1430</row></tbody></tgroup></informaltable>1431</section>14321433<section id="FE_DISEQC_SEND_BURST">1434<title>FE_DISEQC_SEND_BURST</title>1435<para>DESCRIPTION1436</para>1437<informaltable><tgroup cols="1"><tbody><row><entry1438align="char">1439<para>This ioctl call is used to send a 22KHz tone burst.</para>1440</entry>1441</row></tbody></tgroup></informaltable>14421443<para>SYNOPSIS1444</para>1445<informaltable><tgroup cols="1"><tbody><row><entry1446align="char">1447<para>int ioctl(int fd, int request =1448<link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para>1449</entry>1450</row></tbody></tgroup></informaltable>14511452<para>PARAMETERS1453</para>1454<informaltable><tgroup cols="2"><tbody><row><entry1455align="char">1456<para>int fd</para>1457</entry><entry1458align="char">1459<para>File descriptor returned by a previous call to open().</para>1460</entry>1461</row><row><entry1462align="char">1463<para>int request</para>1464</entry><entry1465align="char">1466<para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para>1467</entry>1468</row><row><entry1469align="char">1470<para>fe_sec_mini_cmd_t1471burst</para>1472</entry><entry1473align="char">1474<para>burst A or B.</para>1475</entry>1476</row></tbody></tgroup></informaltable>14771478<para>ERRORS1479</para>1480<informaltable><tgroup cols="2"><tbody><row><entry1481align="char">1482<para>EBADF</para>1483</entry><entry1484align="char">1485<para>fd is not a valid file descriptor.</para>1486</entry>1487</row><row><entry1488align="char">1489<para>EFAULT</para>1490</entry><entry1491align="char">1492<para>Seq points to an invalid address.</para>1493</entry>1494</row><row><entry1495align="char">1496<para>EINVAL</para>1497</entry><entry1498align="char">1499<para>The data structure referred to by seq is invalid in some1500way.</para>1501</entry>1502</row><row><entry1503align="char">1504<para>EPERM</para>1505</entry><entry1506align="char">1507<para>Permission denied (needs read/write access).</para>1508</entry>1509</row><row><entry1510align="char">1511<para>EINTERNAL</para>1512</entry><entry1513align="char">1514<para>Internal error in the device driver.</para>1515</entry>1516</row></tbody></tgroup></informaltable>1517</section>15181519<section id="FE_SET_TONE">1520<title>FE_SET_TONE</title>1521<para>DESCRIPTION1522</para>1523<informaltable><tgroup cols="1"><tbody><row><entry1524align="char">1525<para>This call is used to set the generation of the continuous 22kHz tone. This call1526requires read/write permissions.</para>1527</entry>1528</row></tbody></tgroup></informaltable>1529<para>SYNOPSIS1530</para>1531<informaltable><tgroup cols="1"><tbody><row><entry1532align="char">1533<para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,1534fe_sec_tone_mode_t tone);</para>1535</entry>1536</row></tbody></tgroup></informaltable>1537<para>PARAMETERS1538</para>1539<informaltable><tgroup cols="2"><tbody><row><entry1540align="char">1541<para>int fd</para>1542</entry><entry1543align="char">1544<para>File descriptor returned by a previous call to open().</para>1545</entry>1546</row><row><entry1547align="char">1548<para>int request</para>1549</entry><entry1550align="char">1551<para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>1552</entry>1553</row><row><entry1554align="char">1555<para>fe_sec_tone_mode_t1556tone</para>1557</entry><entry1558align="char">1559<para>The requested tone generation mode (on/off).</para>1560</entry>1561</row></tbody></tgroup></informaltable>1562<para>ERRORS1563</para>1564<informaltable><tgroup cols="2"><tbody><row><entry1565align="char">1566<para>ENODEV</para>1567</entry><entry1568align="char">1569<para>Device driver not loaded/available.</para>1570</entry>1571</row><row><entry1572align="char">1573<para>EBUSY</para>1574</entry><entry1575align="char">1576<para>Device or resource busy.</para>1577</entry>1578</row><row><entry1579align="char">1580<para>EINVAL</para>1581</entry><entry1582align="char">1583<para>Invalid argument.</para>1584</entry>1585</row><row><entry1586align="char">1587<para>EPERM</para>1588</entry><entry1589align="char">1590<para>File not opened with read permissions.</para>1591</entry>1592</row><row><entry1593align="char">1594<para>EINTERNAL</para>1595</entry><entry1596align="char">1597<para>Internal error in the device driver.</para>1598</entry>1599</row></tbody></tgroup></informaltable>1600</section>16011602<section id="FE_SET_VOLTAGE">1603<title>FE_SET_VOLTAGE</title>1604<para>DESCRIPTION1605</para>1606<informaltable><tgroup cols="1"><tbody><row><entry1607align="char">1608<para>This call is used to set the bus voltage. This call requires read/write1609permissions.</para>1610</entry>1611</row></tbody></tgroup></informaltable>1612<para>SYNOPSIS1613</para>1614<informaltable><tgroup cols="1"><tbody><row><entry1615align="char">1616<para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,1617fe_sec_voltage_t voltage);</para>1618</entry>1619</row></tbody></tgroup></informaltable>16201621<para>PARAMETERS1622</para>1623<informaltable><tgroup cols="2"><tbody><row><entry1624align="char">1625<para>int fd</para>1626</entry><entry1627align="char">1628<para>File descriptor returned by a previous call to open().</para>1629</entry>1630</row><row><entry1631align="char">1632<para>int request</para>1633</entry><entry1634align="char">1635<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>1636</entry>1637</row><row><entry1638align="char">1639<para>fe_sec_voltage_t1640voltage</para>1641</entry><entry1642align="char">1643<para>The requested bus voltage.</para>1644</entry>1645</row></tbody></tgroup></informaltable>16461647<para>ERRORS1648</para>1649<informaltable><tgroup cols="2"><tbody><row><entry1650align="char">1651<para>ENODEV</para>1652</entry><entry1653align="char">1654<para>Device driver not loaded/available.</para>1655</entry>1656</row><row><entry1657align="char">1658<para>EBUSY</para>1659</entry><entry1660align="char">1661<para>Device or resource busy.</para>1662</entry>1663</row><row><entry1664align="char">1665<para>EINVAL</para>1666</entry><entry1667align="char">1668<para>Invalid argument.</para>1669</entry>1670</row><row><entry1671align="char">1672<para>EPERM</para>1673</entry><entry1674align="char">1675<para>File not opened with read permissions.</para>1676</entry>1677</row><row><entry1678align="char">1679<para>EINTERNAL</para>1680</entry><entry1681align="char">1682<para>Internal error in the device driver.</para>1683</entry>1684</row></tbody></tgroup></informaltable>1685</section>16861687<section id="FE_ENABLE_HIGH_LNB_VOLTAGE">1688<title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>1689<para>DESCRIPTION1690</para>1691<informaltable><tgroup cols="1"><tbody><row><entry1692align="char">1693<para>If high != 0 enables slightly higher voltages instead of 13/18V (to compensate1694for long cables). This call requires read/write permissions. Not all DVB1695adapters support this ioctl.</para>1696</entry>1697</row></tbody></tgroup></informaltable>16981699<para>SYNOPSIS1700</para>1701<informaltable><tgroup cols="1"><tbody><row><entry1702align="char">1703<para>int ioctl(int fd, int request =1704<link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para>1705</entry>1706</row></tbody></tgroup></informaltable>17071708<para>PARAMETERS1709</para>1710<informaltable><tgroup cols="2"><tbody><row><entry1711align="char">1712<para>int fd</para>1713</entry><entry1714align="char">1715<para>File descriptor returned by a previous call to open().</para>1716</entry>1717</row><row><entry1718align="char">1719<para>int request</para>1720</entry><entry1721align="char">1722<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>1723</entry>1724</row><row><entry1725align="char">1726<para>int high</para>1727</entry><entry1728align="char">1729<para>The requested bus voltage.</para>1730</entry>1731</row></tbody></tgroup></informaltable>17321733<para>ERRORS1734</para>1735<informaltable><tgroup cols="2"><tbody><row><entry1736align="char">1737<para>ENODEV</para>1738</entry><entry1739align="char">1740<para>Device driver not loaded/available.</para>1741</entry>1742</row><row><entry1743align="char">1744<para>EBUSY</para>1745</entry><entry1746align="char">1747<para>Device or resource busy.</para>1748</entry>1749</row><row><entry1750align="char">1751<para>EINVAL</para>1752</entry><entry1753align="char">1754<para>Invalid argument.</para>1755</entry>1756</row><row><entry1757align="char">1758<para>EPERM</para>1759</entry><entry1760align="char">1761<para>File not opened with read permissions.</para>1762</entry>1763</row><row><entry1764align="char">1765<para>EINTERNAL</para>1766</entry><entry1767align="char">1768<para>Internal error in the device driver.</para>1769</entry>1770</row></tbody></tgroup></informaltable>1771</section>17721773<section id="FE_SET_FRONTEND_TUNE_MODE">1774<title>FE_SET_FRONTEND_TUNE_MODE</title>1775<para>DESCRIPTION</para>1776<informaltable><tgroup cols="1"><tbody><row>1777<entry align="char">1778<para>Allow setting tuner mode flags to the frontend.</para>1779</entry>1780</row></tbody></tgroup></informaltable>17811782<para>SYNOPSIS</para>1783<informaltable><tgroup cols="1"><tbody><row>1784<entry align="char">1785<para>int ioctl(int fd, int request =1786<link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>1787</entry>1788</row></tbody></tgroup></informaltable>17891790<para>PARAMETERS</para>1791<informaltable><tgroup cols="2"><tbody><row>1792<entry align="char">1793<para>unsigned int flags</para>1794</entry>1795<entry align="char">1796<para>1797FE_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.1798</para>1799</entry>1800</row></tbody></tgroup></informaltable>18011802<para>ERRORS</para>1803<informaltable><tgroup cols="2"><tbody><row>1804<entry align="char"><para>EINVAL</para></entry>1805<entry align="char"><para>Invalid argument.</para></entry>1806</row></tbody></tgroup></informaltable>1807</section>18081809<section id="FE_DISHNETWORK_SEND_LEGACY_CMD">1810<title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>1811<para>DESCRIPTION</para>1812<informaltable><tgroup cols="1"><tbody><row>1813<entry align="char">1814<para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>1815<para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>1816<para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>1817</entry>1818</row></tbody></tgroup></informaltable>18191820<para>SYNOPSIS</para>1821<informaltable><tgroup cols="1"><tbody><row>1822<entry align="char">1823<para>int ioctl(int fd, int request =1824<link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>1825</entry>1826</row></tbody></tgroup></informaltable>18271828<para>PARAMETERS</para>1829<informaltable><tgroup cols="2"><tbody><row>1830<entry align="char">1831<para>unsigned long cmd</para>1832</entry>1833<entry align="char">1834<para>1835sends the specified raw cmd to the dish via DISEqC.1836</para>1837</entry>1838</row></tbody></tgroup></informaltable>18391840<para>ERRORS</para>1841<informaltable><tgroup cols="1"><tbody><row>1842<entry align="char">1843<para>There are no errors in use for this call</para>1844</entry>1845</row></tbody></tgroup></informaltable>1846</section>18471848</section>18491850&sub-dvbproperty;185118521853