1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Chapter&#160;9.&#160;DVB Frontend API</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="dvbapi.html" title="Part&#160;II.&#160;LINUX DVB API"><link rel="prev" href="include_files.html" title="API include files"><link rel="next" href="frontend_fcalls.html" title="Frontend Function Calls"></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">Chapter&#160;9.&#160;DVB Frontend API</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="include_files.html">Prev</a>&#160;</td><th width="60%" align="center">Part&#160;II.&#160;LINUX DVB API</th><td width="20%" align="right">&#160;<a accesskey="n" href="frontend_fcalls.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="dvb_frontend"></a>Chapter&#160;9.&#160;DVB Frontend API</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="dvb_frontend.html#frontend_types">Frontend Data Types</a></span></dt><dd><dl><dt><span class="section"><a href="dvb_frontend.html#fe-type-t">Frontend type</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-caps-t">frontend capabilities</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-frontend-info">frontend information</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-diseqc-master-cmd">diseqc master command</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-diseqc-slave-reply">diseqc slave reply</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-sec-voltage-t">diseqc slave reply</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-sec-tone-mode-t">SEC continuous tone</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-sec-mini-cmd-t">SEC tone burst</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-status-t">frontend status</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-frontend-parameters">frontend parameters</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-frontend-event">frontend events</a></span></dt></dl></dd><dt><span class="section"><a href="frontend_fcalls.html">Frontend Function Calls</a></span></dt><dd><dl><dt><span class="section"><a href="frontend_fcalls.html#frontend_f_open">open()</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#frontend_f_close">close()</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_READ_STATUS">FE_READ_STATUS</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_READ_BER">FE_READ_BER</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_READ_SNR">FE_READ_SNR</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_SET_FRONTEND">FE_SET_FRONTEND</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_GET_FRONTEND">FE_GET_FRONTEND</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_GET_EVENT">FE_GET_EVENT</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_GET_INFO">FE_GET_INFO</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_SET_TONE">FE_SET_TONE</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_SET_VOLTAGE">FE_SET_VOLTAGE</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</a></span></dt><dt><span class="section"><a href="frontend_fcalls.html#FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</a></span></dt></dl></dd><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html"><code class="constant">FE_GET_PROPERTY/FE_SET_PROPERTY</code></a></span></dt><dd><dl><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#dtv-stats">DTV stats type</a></span></dt><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#dtv-fe-stats">DTV stats type</a></span></dt><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#dtv-property">DTV property type</a></span></dt><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#dtv-properties">DTV properties type</a></span></dt><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#FE_GET_PROPERTY">FE_GET_PROPERTY</a></span></dt><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#FE_SET_PROPERTY">FE_SET_PROPERTY</a></span></dt><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#idp1127791348">Property types</a></span></dt><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#fe_property_parameters">Digital TV property parameters</a></span></dt><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#frontend-stat-properties">Frontend statistics indicators</a></span></dt><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#frontend-property-terrestrial-systems">Properties used on terrestrial delivery systems</a></span></dt><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#frontend-property-cable-systems">Properties used on cable delivery systems</a></span></dt><dt><span class="section"><a href="FE_GET_SET_PROPERTY.html#frontend-property-satellital-systems">Properties used on satellital delivery systems</a></span></dt></dl></dd></dl></div><p>The DVB frontend device controls the tuner and DVB demodulator
2hardware. It can be accessed through <span class="tt">/dev/dvb/adapter0/frontend0</span>. Data types and and
3ioctl definitions can be accessed by including <span class="tt">linux/dvb/frontend.h</span> in your application.</p><p>DVB frontends come in three varieties: DVB-S (satellite), DVB-C
4(cable) and DVB-T (terrestrial). Transmission via the internet (DVB-IP)
5is not yet handled by this API but a future extension is possible. For
6DVB-S the frontend device also supports satellite equipment control
7(SEC) via DiSEqC and V-SEC protocols. The DiSEqC (digital SEC)
8specification is available from
9<a class="ulink" href="http://www.eutelsat.com/satellites/4_5_5.html" target="_top">Eutelsat</a>.</p><p>Note that the DVB API may also be used for MPEG decoder-only PCI
10cards, in which case there exists no frontend device.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="frontend_types"></a>Frontend Data Types</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="dvb_frontend.html#fe-type-t">Frontend type</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-caps-t">frontend capabilities</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-frontend-info">frontend information</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-diseqc-master-cmd">diseqc master command</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-diseqc-slave-reply">diseqc slave reply</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-sec-voltage-t">diseqc slave reply</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-sec-tone-mode-t">SEC continuous tone</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-sec-mini-cmd-t">SEC tone burst</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-status-t">frontend status</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-frontend-parameters">frontend parameters</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-frontend-event">frontend events</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="fe-type-t"></a>Frontend type</h3></div></div></div><p>For historical reasons, frontend types are named by the type of modulation used in
11transmission. 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&#160;9.1.&#160;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="FE_GET_SET_PROPERTY.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
12supported via the new <a class="link" href="FE_GET_SET_PROPERTY.html" title="FE_GET_PROPERTY/FE_SET_PROPERTY">FE_GET_PROPERTY/FE_GET_SET_PROPERTY</a> ioctl's, using the <a class="link" href="FE_GET_SET_PROPERTY.html#DTV-DELIVERY-SYSTEM" title="DTV_DELIVERY_SYSTEM">DTV_DELIVERY_SYSTEM</a> parameter.
13</p><p>The usage of this field is deprecated, as it doesn't report all supported standards, and
14will provide an incomplete information for frontends that support multiple delivery systems.
15Please use <a class="link" href="FE_GET_SET_PROPERTY.html#DTV-ENUM-DELSYS" title="DTV_ENUM_DELSYS">DTV_ENUM_DELSYS</a> instead.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="fe-caps-t"></a>frontend capabilities</h3></div></div></div><p>Capabilities describe what a frontend can do. Some capabilities can only be supported for
16a specific frontend type.</p><pre class="programlisting">
17	typedef enum fe_caps {
18	FE_IS_STUPID                  = 0,
19	FE_CAN_INVERSION_AUTO         = 0x1,
20	FE_CAN_FEC_1_2                = 0x2,
21	FE_CAN_FEC_2_3                = 0x4,
22	FE_CAN_FEC_3_4                = 0x8,
23	FE_CAN_FEC_4_5                = 0x10,
24	FE_CAN_FEC_5_6                = 0x20,
25	FE_CAN_FEC_6_7                = 0x40,
26	FE_CAN_FEC_7_8                = 0x80,
27	FE_CAN_FEC_8_9                = 0x100,
28	FE_CAN_FEC_AUTO               = 0x200,
29	FE_CAN_QPSK                   = 0x400,
30	FE_CAN_QAM_16                 = 0x800,
31	FE_CAN_QAM_32                 = 0x1000,
32	FE_CAN_QAM_64                 = 0x2000,
33	FE_CAN_QAM_128                = 0x4000,
34	FE_CAN_QAM_256                = 0x8000,
35	FE_CAN_QAM_AUTO               = 0x10000,
36	FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
37	FE_CAN_BANDWIDTH_AUTO         = 0x40000,
38	FE_CAN_GUARD_INTERVAL_AUTO    = 0x80000,
39	FE_CAN_HIERARCHY_AUTO         = 0x100000,
40	FE_CAN_8VSB                   = 0x200000,
41	FE_CAN_16VSB                  = 0x400000,
42	FE_HAS_EXTENDED_CAPS          = 0x800000,
43	FE_CAN_MULTISTREAM            = 0x4000000,
44	FE_CAN_TURBO_FEC              = 0x8000000,
45	FE_CAN_2G_MODULATION          = 0x10000000,
46	FE_NEEDS_BENDING              = 0x20000000,
47	FE_CAN_RECOVER                = 0x40000000,
48	FE_CAN_MUTE_TS                = 0x80000000
49	} fe_caps_t;
50</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="dvb-frontend-info"></a>frontend information</h3></div></div></div><p>Information about the frontend ca be queried with
51	<a class="link" href="frontend_fcalls.html#FE_GET_INFO" title="FE_GET_INFO">FE_GET_INFO</a>.</p><pre class="programlisting">
52	struct dvb_frontend_info {
53	char       name[128];
54	fe_type_t  type;
55	uint32_t   frequency_min;
56	uint32_t   frequency_max;
57	uint32_t   frequency_stepsize;
58	uint32_t   frequency_tolerance;
59	uint32_t   symbol_rate_min;
60	uint32_t   symbol_rate_max;
61	uint32_t   symbol_rate_tolerance;     /&#8902; ppm &#8902;/
62	uint32_t   notifier_delay;            /&#8902; ms &#8902;/
63	fe_caps_t  caps;
64	};
65</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="dvb-diseqc-master-cmd"></a>diseqc master command</h3></div></div></div><p>A message sent from the frontend to DiSEqC capable equipment.</p><pre class="programlisting">
66	struct dvb_diseqc_master_cmd {
67	uint8_t msg [6]; /&#8902;  { framing, address, command, data[3] } &#8902;/
68	uint8_t msg_len; /&#8902;  valid values are 3...6  &#8902;/
69	};
70</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="dvb-diseqc-slave-reply"></a>diseqc slave reply</h3></div></div></div><p>A reply to the frontend from DiSEqC 2.0 capable equipment.</p><pre class="programlisting">
71	struct dvb_diseqc_slave_reply {
72	uint8_t msg [4]; /&#8902;  { framing, data [3] } &#8902;/
73	uint8_t msg_len; /&#8902;  valid values are 0...4, 0 means no msg  &#8902;/
74	int     timeout; /&#8902;  return from ioctl after timeout ms with &#8902;/
75	};                       /&#8902;  errorcode when no message was received  &#8902;/
76</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="fe-sec-voltage-t"></a>diseqc slave reply</h3></div></div></div><p>The voltage is usually used with non-DiSEqC capable LNBs to switch the polarzation
77(horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched
78consistently to the DiSEqC commands as described in the DiSEqC spec.</p><pre class="programlisting">
79	typedef enum fe_sec_voltage {
80	SEC_VOLTAGE_13,
81	SEC_VOLTAGE_18
82	} fe_sec_voltage_t;
83</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="fe-sec-tone-mode-t"></a>SEC continuous tone</h3></div></div></div><p>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the
84high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to
85be switched consistently to the DiSEqC commands as described in the DiSEqC
86spec.</p><pre class="programlisting">
87	typedef enum fe_sec_tone_mode {
88	SEC_TONE_ON,
89	SEC_TONE_OFF
90	} fe_sec_tone_mode_t;
91</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="fe-sec-mini-cmd-t"></a>SEC tone burst</h3></div></div></div><p>The 22KHz tone burst is usually used with non-DiSEqC capable switches to select
92between two connected LNBs/satellites. When using DiSEqC epuipment this voltage has to
93be switched consistently to the DiSEqC commands as described in the DiSEqC
94spec.</p><pre class="programlisting">
95	typedef enum fe_sec_mini_cmd {
96	SEC_MINI_A,
97	SEC_MINI_B
98	} fe_sec_mini_cmd_t;
99</pre><p></p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="fe-status-t"></a>frontend status</h3></div></div></div><p>Several functions of the frontend device use the fe_status data type defined
100by</p><pre class="programlisting">
101typedef enum fe_status {
102	FE_HAS_SIGNAL		= 0x01,
103	FE_HAS_CARRIER		= 0x02,
104	FE_HAS_VITERBI		= 0x04,
105	FE_HAS_SYNC		= 0x08,
106	FE_HAS_LOCK		= 0x10,
107	FE_TIMEDOUT		= 0x20,
108	FE_REINIT		= 0x40,
109} fe_status_t;
110</pre><p>to indicate the current state and/or state changes of the frontend hardware:
111</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">FE_HAS_SIGNAL</td><td align="char">The frontend has found something above the noise level</td></tr><tr><td align="char">FE_HAS_CARRIER</td><td align="char">The frontend has found a DVB signal</td></tr><tr><td align="char">FE_HAS_VITERBI</td><td align="char">The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable</td></tr><tr><td align="char">FE_HAS_SYNC</td><td align="char">Synchronization bytes was found</td></tr><tr><td align="char">FE_HAS_LOCK</td><td align="char">The DVB were locked and everything is working</td></tr><tr><td align="char">FE_TIMEDOUT</td><td align="char">no lock within the last about 2 seconds</td></tr><tr><td align="char">FE_REINIT</td><td align="char">The frontend was reinitialized, application is
112recommended to reset DiSEqC, tone and parameters</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="dvb-frontend-parameters"></a>frontend parameters</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="dvb_frontend.html#dvb-qpsk-parameters">QPSK parameters</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-qam-parameters">QAM parameters</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-vsb-parameters">VSB parameters</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#dvb-ofdm-parameters">OFDM parameters</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-spectral-inversion-t">frontend spectral inversion</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-code-rate-t">frontend code rate</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#fe-modulation-t">frontend modulation type for QAM, OFDM and VSB</a></span></dt><dt><span class="section"><a href="dvb_frontend.html#idp1127508972">More OFDM parameters</a></span></dt></dl></div><p>The kind of parameters passed to the frontend device for tuning depend on
113the kind of hardware you are using.</p><p>The struct <code class="constant">dvb_frontend_parameters</code> uses an
114union with specific per-system parameters. However, as newer delivery systems
115required more data, the structure size weren't enough to fit, and just
116extending its size would break the existing applications. So, those parameters
117were replaced by the usage of <a class="link" href="FE_GET_SET_PROPERTY.html" title="FE_GET_PROPERTY/FE_SET_PROPERTY">
118<code class="constant">FE_GET_PROPERTY/FE_SET_PROPERTY</code></a> ioctl's. The
119new API is flexible enough to add new parameters to existing delivery systems,
120and to add newer delivery systems.</p><p>So, newer applications should use <a class="link" href="FE_GET_SET_PROPERTY.html" title="FE_GET_PROPERTY/FE_SET_PROPERTY">
121<code class="constant">FE_GET_PROPERTY/FE_SET_PROPERTY</code></a> instead, in
122order to be able to support the newer System Delivery like  DVB-S2, DVB-T2,
123DVB-C2, ISDB, etc.</p><p>All kinds of parameters are combined as an union in the FrontendParameters structure:
124</p><pre class="programlisting">
125struct dvb_frontend_parameters {
126	uint32_t frequency;     /&#8902; (absolute) frequency in Hz for QAM/OFDM &#8902;/
127				/&#8902; intermediate frequency in kHz for QPSK &#8902;/
128	fe_spectral_inversion_t inversion;
129	union {
130		struct dvb_qpsk_parameters qpsk;
131		struct dvb_qam_parameters  qam;
132		struct dvb_ofdm_parameters ofdm;
133		struct dvb_vsb_parameters  vsb;
134	} u;
135};
136</pre><p>In the case of QPSK frontends the <code class="constant">frequency</code> field specifies the intermediate
137frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
138the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
139OFDM frontends the <code class="constant">frequency</code> specifies the absolute frequency and is given in Hz.
140</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="dvb-qpsk-parameters"></a>QPSK parameters</h4></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">
141 struct dvb_qpsk_parameters {
142	 uint32_t        symbol_rate;  /&#8902; symbol rate in Symbols per second &#8902;/
143	 fe_code_rate_t  fec_inner;    /&#8902; forward error correction (see above) &#8902;/
144 };
145</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="dvb-qam-parameters"></a>QAM parameters</h4></div></div></div><p>for cable QAM frontend you use the <code class="constant">dvb_qam_parameters</code> structure:</p><pre class="programlisting">
146 struct dvb_qam_parameters {
147	 uint32_t         symbol_rate; /&#8902; symbol rate in Symbols per second &#8902;/
148	 fe_code_rate_t   fec_inner;   /&#8902; forward error correction (see above) &#8902;/
149	 fe_modulation_t  modulation;  /&#8902; modulation type (see above) &#8902;/
150 };
151</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="dvb-vsb-parameters"></a>VSB parameters</h4></div></div></div><p>ATSC frontends are supported by the <code class="constant">dvb_vsb_parameters</code> structure:</p><pre class="programlisting">
152struct dvb_vsb_parameters {
153	fe_modulation_t modulation;	/&#8902; modulation type (see above) &#8902;/
154};
155</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="dvb-ofdm-parameters"></a>OFDM parameters</h4></div></div></div><p>DVB-T frontends are supported by the <code class="constant">dvb_ofdm_parameters</code> structure:</p><pre class="programlisting">
156 struct dvb_ofdm_parameters {
157	 fe_bandwidth_t      bandwidth;
158	 fe_code_rate_t      code_rate_HP;  /&#8902; high priority stream code rate &#8902;/
159	 fe_code_rate_t      code_rate_LP;  /&#8902; low priority stream code rate &#8902;/
160	 fe_modulation_t     constellation; /&#8902; modulation type (see above) &#8902;/
161	 fe_transmit_mode_t  transmission_mode;
162	 fe_guard_interval_t guard_interval;
163	 fe_hierarchy_t      hierarchy_information;
164 };
165</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="fe-spectral-inversion-t"></a>frontend spectral inversion</h4></div></div></div><p>The Inversion field can take one of these values:
166</p><pre class="programlisting">
167typedef enum fe_spectral_inversion {
168	INVERSION_OFF,
169	INVERSION_ON,
170	INVERSION_AUTO
171} fe_spectral_inversion_t;
172</pre><p>It indicates if spectral inversion should be presumed or not. In the automatic setting
173(<code class="constant">INVERSION_AUTO</code>) the hardware will try to figure out the correct setting by
174itself.
175</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="fe-code-rate-t"></a>frontend code rate</h4></div></div></div><p>The possible values for the <code class="constant">fec_inner</code> field used on
176<a class="link" href="dvb_frontend.html#dvb-qpsk-parameters" title="QPSK parameters"><code class="constant">struct dvb_qpsk_parameters</code></a> and
177<a class="link" href="dvb_frontend.html#dvb-qam-parameters" title="QAM parameters"><code class="constant">struct dvb_qam_parameters</code></a> are:
178</p><pre class="programlisting">
179typedef enum fe_code_rate {
180	FEC_NONE = 0,
181	FEC_1_2,
182	FEC_2_3,
183	FEC_3_4,
184	FEC_4_5,
185	FEC_5_6,
186	FEC_6_7,
187	FEC_7_8,
188	FEC_8_9,
189	FEC_AUTO,
190	FEC_3_5,
191	FEC_9_10,
192} fe_code_rate_t;
193</pre><p>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
194detection.
195</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="fe-modulation-t"></a>frontend modulation type for QAM, OFDM and VSB</h4></div></div></div><p>For cable and terrestrial frontends, e. g. for
196<a class="link" href="dvb_frontend.html#dvb-qam-parameters" title="QAM parameters"><code class="constant">struct dvb_qpsk_parameters</code></a>,
197<a class="link" href="dvb_frontend.html#dvb-ofdm-parameters" title="OFDM parameters"><code class="constant">struct dvb_qam_parameters</code></a> and
198<a class="link" href="dvb_frontend.html#dvb-vsb-parameters" title="VSB parameters"><code class="constant">struct dvb_qam_parameters</code></a>,
199it needs to specify the quadrature modulation mode which can be one of the following:
200</p><pre class="programlisting">
201 typedef enum fe_modulation {
202	QPSK,
203	QAM_16,
204	QAM_32,
205	QAM_64,
206	QAM_128,
207	QAM_256,
208	QAM_AUTO,
209	VSB_8,
210	VSB_16,
211	PSK_8,
212	APSK_16,
213	APSK_32,
214	DQPSK,
215 } fe_modulation_t;
216</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="idp1127508972"></a>More OFDM parameters</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="fe-transmit-mode-t"></a>Number of carriers per channel</h5></div></div></div><pre class="programlisting">
217typedef enum fe_transmit_mode {
218	TRANSMISSION_MODE_2K,
219	TRANSMISSION_MODE_8K,
220	TRANSMISSION_MODE_AUTO,
221	TRANSMISSION_MODE_4K,
222	TRANSMISSION_MODE_1K,
223	TRANSMISSION_MODE_16K,
224	TRANSMISSION_MODE_32K,
225 } fe_transmit_mode_t;
226</pre></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="fe-bandwidth-t"></a>frontend bandwidth</h5></div></div></div><pre class="programlisting">
227typedef enum fe_bandwidth {
228	BANDWIDTH_8_MHZ,
229	BANDWIDTH_7_MHZ,
230	BANDWIDTH_6_MHZ,
231	BANDWIDTH_AUTO,
232	BANDWIDTH_5_MHZ,
233	BANDWIDTH_10_MHZ,
234	BANDWIDTH_1_712_MHZ,
235} fe_bandwidth_t;
236</pre></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="fe-guard-interval-t"></a>frontend guard inverval</h5></div></div></div><pre class="programlisting">
237typedef enum fe_guard_interval {
238	GUARD_INTERVAL_1_32,
239	GUARD_INTERVAL_1_16,
240	GUARD_INTERVAL_1_8,
241	GUARD_INTERVAL_1_4,
242	GUARD_INTERVAL_AUTO,
243	GUARD_INTERVAL_1_128,
244	GUARD_INTERVAL_19_128,
245	GUARD_INTERVAL_19_256,
246} fe_guard_interval_t;
247</pre></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="fe-hierarchy-t"></a>frontend hierarchy</h5></div></div></div><pre class="programlisting">
248typedef enum fe_hierarchy {
249	 HIERARCHY_NONE,
250	 HIERARCHY_1,
251	 HIERARCHY_2,
252	 HIERARCHY_4,
253	 HIERARCHY_AUTO
254 } fe_hierarchy_t;
255</pre></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="dvb-frontend-event"></a>frontend events</h3></div></div></div><pre class="programlisting">
256 struct dvb_frontend_event {
257	 fe_status_t status;
258	 struct dvb_frontend_parameters parameters;
259 };
260</pre></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="include_files.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="dvbapi.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="frontend_fcalls.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">API include files&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Frontend Function Calls</td></tr></table></div></body></html>
261