1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>DVB Frontend legacy API (a. k. a. DVBv3)</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="dvb_frontend.html" title="Chapter 9. DVB Frontend API"><link rel="prev" href="FE_SET_FRONTEND_TUNE_MODE.html" title="ioctl FE_SET_FRONTEND_TUNE_MODE"><link rel="next" href="dvb_demux.html" title="Chapter 10. DVB Demux Device"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">DVB Frontend legacy API (a. k. a. DVBv3)</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="FE_SET_FRONTEND_TUNE_MODE.html">Prev</a> </td><th width="60%" align="center">Chapter 9. DVB Frontend API</th><td width="20%" align="right"> <a accesskey="n" href="dvb_demux.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="frontend_legacy_dvbv3_api"></a>DVB Frontend legacy API (a. k. a. DVBv3)</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#frontend_legacy_types">Frontend Legacy Data Types</a></span></dt><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#frontend_legacy_fcalls">Frontend Legacy Function Calls</a></span></dt></dl></div><p>The usage of this API is deprecated, as it doesn't support all digital 2 TV standards, doesn't provide good statistics measurements and provides 3 incomplete information. This is kept only to support legacy applications.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="frontend_legacy_types"></a>Frontend Legacy Data Types</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#fe-type-t">Frontend type</a></span></dt><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#fe-bandwidth-t">Frontend bandwidth</a></span></dt><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#dvb-frontend-parameters">frontend parameters</a></span></dt><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#dvb-frontend-event">frontend events</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="fe-type-t"></a>Frontend type</h4></div></div></div><p>For historical reasons, frontend types are named by the type of modulation 4 used in transmission. The fontend types are given by fe_type_t type, defined as:</p><div class="table"><a name="fe-type"></a><p class="title"><b>Table 9.24. Frontend types</b></p><div class="table-contents"><table summary="Frontend types" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"></colgroup><thead><tr><th>fe_type</th><th>Description</th><th><a class="link" href="frontend-properties.html#DTV-DELIVERY-SYSTEM" title="DTV_DELIVERY_SYSTEM">DTV_DELIVERY_SYSTEM</a> equivalent type</th></tr></thead><tbody valign="top"><tr><td valign="top"><a name="FE-QPSK"></a><code class="constant">FE_QPSK</code></td><td valign="top">For DVB-S standard</td><td valign="top"><code class="constant">SYS_DVBS</code></td></tr><tr><td valign="top"><a name="FE-QAM"></a><code class="constant">FE_QAM</code></td><td valign="top">For DVB-C annex A standard</td><td valign="top"><code class="constant">SYS_DVBC_ANNEX_A</code></td></tr><tr><td valign="top"><a name="FE-OFDM"></a><code class="constant">FE_OFDM</code></td><td valign="top">For DVB-T standard</td><td valign="top"><code class="constant">SYS_DVBT</code></td></tr><tr><td valign="top"><a name="FE-ATSC"></a><code class="constant">FE_ATSC</code></td><td valign="top">For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used in US.</td><td valign="top"><code class="constant">SYS_ATSC</code> (terrestrial) or <code class="constant">SYS_DVBC_ANNEX_B</code> (cable)</td></tr></tbody></table></div></div><br class="table-break"><p>Newer formats like DVB-S2, ISDB-T, ISDB-S and DVB-T2 are not described at the above, as they're 5supported via the new <a class="link" href="FE_GET_PROPERTY.html" title="ioctl FE_SET_PROPERTY, FE_GET_PROPERTY">FE_GET_PROPERTY/FE_GET_SET_PROPERTY</a> ioctl's, using the <a class="link" href="frontend-properties.html#DTV-DELIVERY-SYSTEM" title="DTV_DELIVERY_SYSTEM">DTV_DELIVERY_SYSTEM</a> parameter. 6</p><p>In the old days, struct <a class="link" href="FE_GET_INFO.html#dvb-frontend-info" title="Table 9.17. struct dvb_frontend_info">dvb_frontend_info</a> used to contain 7 <code class="constant">fe_type_t</code> field to indicate the delivery systems, 8 filled with either FE_QPSK, FE_QAM, FE_OFDM or FE_ATSC. While this is 9 still filled to keep backward compatibility, the usage of this 10 field is deprecated, as it can report just one delivery system, but some 11 devices support multiple delivery systems. Please use 12 <a class="link" href="frontend-properties.html#DTV-ENUM-DELSYS" title="DTV_ENUM_DELSYS">DTV_ENUM_DELSYS</a> instead. 13</p><p>On devices that support multiple delivery systems, 14 struct <a class="link" href="FE_GET_INFO.html#dvb-frontend-info" title="Table 9.17. struct dvb_frontend_info">dvb_frontend_info</a>::<code class="constant">fe_type_t</code> is filled with the 15 currently standard, as selected by the last call to 16 <a class="link" href="FE_GET_PROPERTY.html" title="ioctl FE_SET_PROPERTY, FE_GET_PROPERTY">FE_SET_PROPERTY</a> 17 using the <a class="link" href="frontend-properties.html#DTV-DELIVERY-SYSTEM" title="DTV_DELIVERY_SYSTEM"><code class="constant">DTV_DELIVERY_SYSTEM</code></a> property.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="fe-bandwidth-t"></a>Frontend bandwidth</h4></div></div></div><div class="table"><a name="fe-bandwidth"></a><p class="title"><b>Table 9.25. enum fe_bandwidth</b></p><div class="table-contents"><table summary="enum fe_bandwidth" width="100%" border="0"><colgroup><col class="c1"><col class="c2"></colgroup><thead><tr><th>ID</th><th>Description</th></tr></thead><tbody valign="top"><tr><td valign="top"><a name="BANDWIDTH-AUTO"></a><code class="constant">BANDWIDTH_AUTO</code></td><td valign="top">Autodetect bandwidth (if supported)</td></tr><tr><td valign="top"><a name="BANDWIDTH-1-712-MHZ"></a><code class="constant">BANDWIDTH_1_712_MHZ</code></td><td valign="top">1.712 MHz</td></tr><tr><td valign="top"><a name="BANDWIDTH-5-MHZ"></a><code class="constant">BANDWIDTH_5_MHZ</code></td><td valign="top">5 MHz</td></tr><tr><td valign="top"><a name="BANDWIDTH-6-MHZ"></a><code class="constant">BANDWIDTH_6_MHZ</code></td><td valign="top">6 MHz</td></tr><tr><td valign="top"><a name="BANDWIDTH-7-MHZ"></a><code class="constant">BANDWIDTH_7_MHZ</code></td><td valign="top">7 MHz</td></tr><tr><td valign="top"><a name="BANDWIDTH-8-MHZ"></a><code class="constant">BANDWIDTH_8_MHZ</code></td><td valign="top">8 MHz</td></tr><tr><td valign="top"><a name="BANDWIDTH-10-MHZ"></a><code class="constant">BANDWIDTH_10_MHZ</code></td><td valign="top">10 MHz</td></tr></tbody></table></div></div><br class="table-break"></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="dvb-frontend-parameters"></a>frontend parameters</h4></div></div></div><p>The kind of parameters passed to the frontend device for tuning depend on 18the kind of hardware you are using.</p><p>The struct <code class="constant">dvb_frontend_parameters</code> uses an 19union with specific per-system parameters. However, as newer delivery systems 20required more data, the structure size weren't enough to fit, and just 21extending its size would break the existing applications. So, those parameters 22were replaced by the usage of <a class="link" href="FE_GET_PROPERTY.html" title="ioctl FE_SET_PROPERTY, FE_GET_PROPERTY"> 23<code class="constant">FE_GET_PROPERTY/FE_SET_PROPERTY</code></a> ioctl's. The 24new API is flexible enough to add new parameters to existing delivery systems, 25and to add newer delivery systems.</p><p>So, newer applications should use <a class="link" href="FE_GET_PROPERTY.html" title="ioctl FE_SET_PROPERTY, FE_GET_PROPERTY"> 26<code class="constant">FE_GET_PROPERTY/FE_SET_PROPERTY</code></a> instead, in 27order to be able to support the newer System Delivery like DVB-S2, DVB-T2, 28DVB-C2, ISDB, etc.</p><p>All kinds of parameters are combined as an union in the FrontendParameters structure: 29</p><pre class="programlisting"> 30struct dvb_frontend_parameters { 31 uint32_t frequency; /⋆ (absolute) frequency in Hz for QAM/OFDM ⋆/ 32 /⋆ intermediate frequency in kHz for QPSK ⋆/ 33 <a class="link" href="frontend-properties.html#fe-spectral-inversion-t" title="enum fe_modulation: Frontend spectral inversion">fe_spectral_inversion_t</a> inversion; 34 union { 35 struct dvb_qpsk_parameters qpsk; 36 struct dvb_qam_parameters qam; 37 struct dvb_ofdm_parameters ofdm; 38 struct dvb_vsb_parameters vsb; 39 } u; 40}; 41</pre><p>In the case of QPSK frontends the <code class="constant">frequency</code> field specifies the intermediate 42frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of 43the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and 44OFDM frontends the <code class="constant">frequency</code> specifies the absolute frequency and is given in Hz. 45</p><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="dvb-qpsk-parameters"></a>QPSK parameters</h5></div></div></div><p>For satellite QPSK frontends you have to use the <code class="constant">dvb_qpsk_parameters</code> structure:</p><pre class="programlisting"> 46 struct dvb_qpsk_parameters { 47 uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/ 48 <a class="link" href="frontend-properties.html#fe-code-rate-t" title="enum fe_code_rate: type of the Forward Error Correction.">fe_code_rate_t</a> fec_inner; /⋆ forward error correction (see above) ⋆/ 49 }; 50</pre></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="dvb-qam-parameters"></a>QAM parameters</h5></div></div></div><p>for cable QAM frontend you use the <code class="constant">dvb_qam_parameters</code> structure:</p><pre class="programlisting"> 51 struct dvb_qam_parameters { 52 uint32_t symbol_rate; /⋆ symbol rate in Symbols per second ⋆/ 53 <a class="link" href="frontend-properties.html#fe-code-rate-t" title="enum fe_code_rate: type of the Forward Error Correction.">fe_code_rate_t</a> fec_inner; /⋆ forward error correction (see above) ⋆/ 54 <a class="link" href="frontend-properties.html#fe-modulation-t" title="Modulation property">fe_modulation_t</a> modulation; /⋆ modulation type (see above) ⋆/ 55 }; 56</pre></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="dvb-vsb-parameters"></a>VSB parameters</h5></div></div></div><p>ATSC frontends are supported by the <code class="constant">dvb_vsb_parameters</code> structure:</p><pre class="programlisting"> 57struct dvb_vsb_parameters { 58 <a class="link" href="frontend-properties.html#fe-modulation-t" title="Modulation property">fe_modulation_t</a> modulation; /⋆ modulation type (see above) ⋆/ 59}; 60</pre></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="dvb-ofdm-parameters"></a>OFDM parameters</h5></div></div></div><p>DVB-T frontends are supported by the <code class="constant">dvb_ofdm_parameters</code> structure:</p><pre class="programlisting"> 61 struct dvb_ofdm_parameters { 62 <a class="link" href="frontend_legacy_dvbv3_api.html#fe-bandwidth-t" title="Frontend bandwidth">fe_bandwidth_t</a> bandwidth; 63 <a class="link" href="frontend-properties.html#fe-code-rate-t" title="enum fe_code_rate: type of the Forward Error Correction.">fe_code_rate_t</a> code_rate_HP; /⋆ high priority stream code rate ⋆/ 64 <a class="link" href="frontend-properties.html#fe-code-rate-t" title="enum fe_code_rate: type of the Forward Error Correction.">fe_code_rate_t</a> code_rate_LP; /⋆ low priority stream code rate ⋆/ 65 <a class="link" href="frontend-properties.html#fe-modulation-t" title="Modulation property">fe_modulation_t</a> constellation; /⋆ modulation type (see above) ⋆/ 66 <a class="link" href="frontend-properties.html#fe-transmit-mode-t" title="enum fe_transmit_mode: Number of carriers per channel">fe_transmit_mode_t</a> transmission_mode; 67 <a class="link" href="frontend-properties.html#fe-guard-interval-t" title="Modulation guard interval">fe_guard_interval_t</a> guard_interval; 68 <a class="link" href="frontend-properties.html#fe-hierarchy-t" title="Frontend hierarchy">fe_hierarchy_t</a> hierarchy_information; 69 }; 70</pre></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="dvb-frontend-event"></a>frontend events</h4></div></div></div><pre class="programlisting"> 71 struct dvb_frontend_event { 72 fe_status_t status; 73 struct dvb_frontend_parameters parameters; 74 }; 75</pre></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="frontend_legacy_fcalls"></a>Frontend Legacy Function Calls</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#FE_READ_BER">FE_READ_BER</a></span></dt><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#FE_READ_SNR">FE_READ_SNR</a></span></dt><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</a></span></dt><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</a></span></dt><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#FE_SET_FRONTEND">FE_SET_FRONTEND</a></span></dt><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#FE_GET_FRONTEND">FE_GET_FRONTEND</a></span></dt><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#FE_GET_EVENT">FE_GET_EVENT</a></span></dt><dt><span class="section"><a href="frontend_legacy_dvbv3_api.html#FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</a></span></dt></dl></div><p>Those functions are defined at DVB version 3. The support is kept in 76 the kernel due to compatibility issues only. Their usage is strongly 77 not recommended</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="FE_READ_BER"></a>FE_READ_BER</h4></div></div></div><p>DESCRIPTION 78</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 79<p>This ioctl call returns the bit error rate for the signal currently 80 received/demodulated by the front-end. For this command, read-only access to 81 the device is sufficient.</p> 82</td></tr></tbody></table></div><p>SYNOPSIS 83</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 84<p>int ioctl(int fd, int request = <a class="link" href="frontend_legacy_dvbv3_api.html#FE_READ_BER" title="FE_READ_BER">FE_READ_BER</a>, 85 uint32_t ⋆ber);</p> 86</td></tr></tbody></table></div><p>PARAMETERS 87</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 88<p>int fd</p> 89</td><td align="char"> 90<p>File descriptor returned by a previous call to open().</p> 91</td></tr><tr><td align="char"> 92<p>int request</p> 93</td><td align="char"> 94<p>Equals <a class="link" href="frontend_legacy_dvbv3_api.html#FE_READ_BER" title="FE_READ_BER">FE_READ_BER</a> for this command.</p> 95</td></tr><tr><td align="char"> 96<p>uint32_t *ber</p> 97</td><td align="char"> 98<p>The bit error rate is stored into *ber.</p> 99</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="FE_READ_SNR"></a>FE_READ_SNR</h4></div></div></div><p>DESCRIPTION 100</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 101<p>This ioctl call returns the signal-to-noise ratio for the signal currently received 102 by the front-end. For this command, read-only access to the device is sufficient.</p> 103</td></tr></tbody></table></div><p>SYNOPSIS 104</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 105<p>int ioctl(int fd, int request = <a class="link" href="frontend_legacy_dvbv3_api.html#FE_READ_SNR" title="FE_READ_SNR">FE_READ_SNR</a>, uint16_t 106 ⋆snr);</p> 107</td></tr></tbody></table></div><p>PARAMETERS 108</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 109<p>int fd</p> 110</td><td align="char"> 111<p>File descriptor returned by a previous call to open().</p> 112</td></tr><tr><td align="char"> 113<p>int request</p> 114</td><td align="char"> 115<p>Equals <a class="link" href="frontend_legacy_dvbv3_api.html#FE_READ_SNR" title="FE_READ_SNR">FE_READ_SNR</a> for this command.</p> 116</td></tr><tr><td align="char"> 117<p>uint16_t *snr</p> 118</td><td align="char"> 119<p>The signal-to-noise ratio is stored into *snr.</p> 120</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="FE_READ_SIGNAL_STRENGTH"></a>FE_READ_SIGNAL_STRENGTH</h4></div></div></div><p>DESCRIPTION 121</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 122<p>This ioctl call returns the signal strength value for the signal currently received 123 by the front-end. For this command, read-only access to the device is sufficient.</p> 124</td></tr></tbody></table></div><p>SYNOPSIS 125</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 126<p>int ioctl( int fd, int request = 127 <a class="link" href="frontend_legacy_dvbv3_api.html#FE_READ_SIGNAL_STRENGTH" title="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</a>, uint16_t ⋆strength);</p> 128</td></tr></tbody></table></div><p>PARAMETERS 129</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 130<p>int fd</p> 131</td><td align="char"> 132<p>File descriptor returned by a previous call to open().</p> 133</td></tr><tr><td align="char"> 134<p>int request</p> 135</td><td align="char"> 136<p>Equals <a class="link" href="frontend_legacy_dvbv3_api.html#FE_READ_SIGNAL_STRENGTH" title="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</a> for this 137 command.</p> 138</td></tr><tr><td align="char"> 139<p>uint16_t *strength</p> 140</td><td align="char"> 141<p>The signal strength value is stored into *strength.</p> 142</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="FE_READ_UNCORRECTED_BLOCKS"></a>FE_READ_UNCORRECTED_BLOCKS</h4></div></div></div><p>DESCRIPTION 143</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 144<p>This ioctl call returns the number of uncorrected blocks detected by the device 145 driver during its lifetime. For meaningful measurements, the increment in block 146 count during a specific time interval should be calculated. For this command, 147 read-only access to the device is sufficient.</p> 148</td></tr><tr><td align="char"> 149<p>Note that the counter will wrap to zero after its maximum count has been 150 reached.</p> 151</td></tr></tbody></table></div><p>SYNOPSIS 152</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 153<p>int ioctl( int fd, int request = 154 <a class="link" href="frontend_legacy_dvbv3_api.html#FE_READ_UNCORRECTED_BLOCKS" title="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</a>, uint32_t ⋆ublocks);</p> 155</td></tr></tbody></table></div><p>PARAMETERS 156</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 157<p>int fd</p> 158</td><td align="char"> 159<p>File descriptor returned by a previous call to open().</p> 160</td></tr><tr><td align="char"> 161<p>int request</p> 162</td><td align="char"> 163<p>Equals <a class="link" href="frontend_legacy_dvbv3_api.html#FE_READ_UNCORRECTED_BLOCKS" title="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</a> for this 164 command.</p> 165</td></tr><tr><td align="char"> 166<p>uint32_t *ublocks</p> 167</td><td align="char"> 168<p>The total number of uncorrected blocks seen by the driver 169 so far.</p> 170</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="FE_SET_FRONTEND"></a>FE_SET_FRONTEND</h4></div></div></div><p>DESCRIPTION 171</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 172<p>This ioctl call starts a tuning operation using specified parameters. The result 173 of this call will be successful if the parameters were valid and the tuning could 174 be initiated. The result of the tuning operation in itself, however, will arrive 175 asynchronously as an event (see documentation for <a class="link" href="frontend_legacy_dvbv3_api.html#FE_GET_EVENT" title="FE_GET_EVENT">FE_GET_EVENT</a> and 176 FrontendEvent.) If a new <a class="link" href="frontend_legacy_dvbv3_api.html#FE_SET_FRONTEND" title="FE_SET_FRONTEND">FE_SET_FRONTEND</a> operation is initiated before 177 the previous one was completed, the previous operation will be aborted in favor 178 of the new one. This command requires read/write access to the device.</p> 179</td></tr></tbody></table></div><p>SYNOPSIS 180</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 181<p>int ioctl(int fd, int request = <a class="link" href="frontend_legacy_dvbv3_api.html#FE_SET_FRONTEND" title="FE_SET_FRONTEND">FE_SET_FRONTEND</a>, 182 struct dvb_frontend_parameters ⋆p);</p> 183</td></tr></tbody></table></div><p>PARAMETERS 184</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 185<p>int fd</p> 186</td><td align="char"> 187<p>File descriptor returned by a previous call to open().</p> 188</td></tr><tr><td align="char"> 189<p>int request</p> 190</td><td align="char"> 191<p>Equals <a class="link" href="frontend_legacy_dvbv3_api.html#FE_SET_FRONTEND" title="FE_SET_FRONTEND">FE_SET_FRONTEND</a> for this command.</p> 192</td></tr><tr><td align="char"> 193<p>struct 194 dvb_frontend_parameters 195 *p</p> 196</td><td align="char"> 197<p>Points to parameters for tuning operation.</p> 198</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 199<p>EINVAL</p> 200</td><td align="char"> 201<p>Maximum supported symbol rate reached.</p> 202</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="FE_GET_FRONTEND"></a>FE_GET_FRONTEND</h4></div></div></div><p>DESCRIPTION 203</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 204<p>This ioctl call queries the currently effective frontend parameters. For this 205 command, read-only access to the device is sufficient.</p> 206</td></tr></tbody></table></div><p>SYNOPSIS 207</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 208<p>int ioctl(int fd, int request = <a class="link" href="frontend_legacy_dvbv3_api.html#FE_GET_FRONTEND" title="FE_GET_FRONTEND">FE_GET_FRONTEND</a>, 209 struct dvb_frontend_parameters ⋆p);</p> 210</td></tr></tbody></table></div><p>PARAMETERS 211</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 212<p>int fd</p> 213</td><td align="char"> 214<p>File descriptor returned by a previous call to open().</p> 215</td></tr><tr><td align="char"> 216<p>int request</p> 217</td><td align="char"> 218<p>Equals <a class="link" href="frontend_legacy_dvbv3_api.html#FE_SET_FRONTEND" title="FE_SET_FRONTEND">FE_SET_FRONTEND</a> for this command.</p> 219</td></tr><tr><td align="char"> 220<p>struct 221 dvb_frontend_parameters 222 *p</p> 223</td><td align="char"> 224<p>Points to parameters for tuning operation.</p> 225</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 226<p>EINVAL</p> 227</td><td align="char"> 228<p>Maximum supported symbol rate reached.</p> 229</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="FE_GET_EVENT"></a>FE_GET_EVENT</h4></div></div></div><p>DESCRIPTION 230</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 231<p>This ioctl call returns a frontend event if available. If an event is not 232 available, the behavior depends on whether the device is in blocking or 233 non-blocking mode. In the latter case, the call fails immediately with errno 234 set to EWOULDBLOCK. In the former case, the call blocks until an event 235 becomes available.</p> 236</td></tr><tr><td align="char"> 237<p>The standard Linux poll() and/or select() system calls can be used with the 238 device file descriptor to watch for new events. For select(), the file descriptor 239 should be included in the exceptfds argument, and for poll(), POLLPRI should 240 be specified as the wake-up condition. Since the event queue allocated is 241 rather small (room for 8 events), the queue must be serviced regularly to avoid 242 overflow. If an overflow happens, the oldest event is discarded from the queue, 243 and an error (EOVERFLOW) occurs the next time the queue is read. After 244 reporting the error condition in this fashion, subsequent 245 <a class="link" href="frontend_legacy_dvbv3_api.html#FE_GET_EVENT" title="FE_GET_EVENT">FE_GET_EVENT</a> 246 calls will return events from the queue as usual.</p> 247</td></tr><tr><td align="char"> 248<p>For the sake of implementation simplicity, this command requires read/write 249 access to the device.</p> 250</td></tr></tbody></table></div><p>SYNOPSIS 251</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 252<p>int ioctl(int fd, int request = QPSK_GET_EVENT, 253 struct dvb_frontend_event ⋆ev);</p> 254</td></tr></tbody></table></div><p>PARAMETERS 255</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 256<p>int fd</p> 257</td><td align="char"> 258<p>File descriptor returned by a previous call to open().</p> 259</td></tr><tr><td align="char"> 260<p>int request</p> 261</td><td align="char"> 262<p>Equals <a class="link" href="frontend_legacy_dvbv3_api.html#FE_GET_EVENT" title="FE_GET_EVENT">FE_GET_EVENT</a> for this command.</p> 263</td></tr><tr><td align="char"> 264<p>struct 265 dvb_frontend_event 266 *ev</p> 267</td><td align="char"> 268<p>Points to the location where the event,</p> 269</td></tr><tr><td align="char"> 270</td><td align="char"> 271<p>if any, is to be stored.</p> 272</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 273<p>EWOULDBLOCK</p> 274</td><td align="char"> 275<p>There is no event pending, and the device is in 276 non-blocking mode.</p> 277</td></tr><tr><td align="char"> 278<p>EOVERFLOW</p> 279</td><td align="char"> 280<p>Overflow in event queue - one or more events were lost.</p> 281</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="FE_DISHNETWORK_SEND_LEGACY_CMD"></a>FE_DISHNETWORK_SEND_LEGACY_CMD</h4></div></div></div><p>DESCRIPTION</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 282<p>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</p> 283<p>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</p> 284<p>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</p> 285</td></tr></tbody></table></div><p>SYNOPSIS</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 286<p>int ioctl(int fd, int request = 287 <a class="link" href="frontend_legacy_dvbv3_api.html#FE_DISHNETWORK_SEND_LEGACY_CMD" title="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</a>, unsigned long cmd);</p> 288</td></tr></tbody></table></div><p>PARAMETERS</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 289 <p>unsigned long cmd</p> 290</td><td align="char"> 291<p> 292sends the specified raw cmd to the dish via DISEqC. 293</p> 294</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="FE_SET_FRONTEND_TUNE_MODE.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="dvb_frontend.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="dvb_demux.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl FE_SET_FRONTEND_TUNE_MODE </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 10. DVB Demux Device</td></tr></table></div></body></html> 295