···3535<revhistory>3636<!-- Put document revisions here, newest first. -->3737<revision>3838+ <revnumber>2.0.4</revnumber>3939+ <date>2011-05-06</date>4040+ <authorinitials>mcc</authorinitials>4141+ <revremark>4242+ Add more information about DVB APIv5, better describing the frontend GET/SET props ioctl's.4343+ </revremark>4444+</revision>4545+<revision>3846 <revnumber>2.0.3</revnumber>3947 <date>2010-07-03</date>4048 <authorinitials>mcc</authorinitials>
+307-68
Documentation/DocBook/dvb/dvbproperty.xml
···11-<section id="FE_GET_PROPERTY">11+<section id="FE_GET_SET_PROPERTY">22<title>FE_GET_PROPERTY/FE_SET_PROPERTY</title>33+44+<programlisting>55+/* Reserved fields should be set to 0 */66+struct dtv_property {77+ __u32 cmd;88+ union {99+ __u32 data;1010+ struct {1111+ __u8 data[32];1212+ __u32 len;1313+ __u32 reserved1[3];1414+ void *reserved2;1515+ } buffer;1616+ } u;1717+ int result;1818+} __attribute__ ((packed));1919+2020+/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */2121+#define DTV_IOCTL_MAX_MSGS 642222+2323+struct dtv_properties {2424+ __u32 num;2525+ struct dtv_property *props;2626+};2727+</programlisting>2828+2929+<section id="FE_GET_PROPERTY">3030+<title>FE_GET_PROPERTY</title>3131+<para>DESCRIPTION3232+</para>3333+<informaltable><tgroup cols="1"><tbody><row><entry3434+ align="char">3535+<para>This ioctl call returns one or more frontend properties. This call only3636+ requires read-only access to the device.</para>3737+</entry>3838+ </row></tbody></tgroup></informaltable>3939+<para>SYNOPSIS4040+</para>4141+<informaltable><tgroup cols="1"><tbody><row><entry4242+ align="char">4343+<para>int ioctl(int fd, int request = <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link>,4444+ dtv_properties ⋆props);</para>4545+</entry>4646+ </row></tbody></tgroup></informaltable>4747+<para>PARAMETERS4848+</para>4949+<informaltable><tgroup cols="2"><tbody><row><entry align="char">5050+<para>int fd</para>5151+</entry><entry5252+ align="char">5353+<para>File descriptor returned by a previous call to open().</para>5454+</entry>5555+ </row><row><entry5656+ align="char">5757+<para>int num</para>5858+</entry><entry5959+ align="char">6060+<para>Equals <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link> for this command.</para>6161+</entry>6262+ </row><row><entry6363+ align="char">6464+<para>struct dtv_property *props</para>6565+</entry><entry6666+ align="char">6767+<para>Points to the location where the front-end property commands are stored.</para>6868+</entry>6969+ </row></tbody></tgroup></informaltable>7070+<para>ERRORS</para>7171+<informaltable><tgroup cols="2"><tbody><row>7272+ <entry align="char"><para>EINVAL</para></entry>7373+ <entry align="char"><para>Invalid parameter(s) received or number of parameters out of the range.</para></entry>7474+ </row><row>7575+ <entry align="char"><para>ENOMEM</para></entry>7676+ <entry align="char"><para>Out of memory.</para></entry>7777+ </row><row>7878+ <entry align="char"><para>EFAULT</para></entry>7979+ <entry align="char"><para>Failure while copying data from/to userspace.</para></entry>8080+ </row><row>8181+ <entry align="char"><para>EOPNOTSUPP</para></entry>8282+ <entry align="char"><para>Property type not supported.</para></entry>8383+ </row></tbody></tgroup></informaltable>8484+</section>8585+8686+<section id="FE_SET_PROPERTY">8787+<title>FE_SET_PROPERTY</title>8888+<para>DESCRIPTION8989+</para>9090+<informaltable><tgroup cols="1"><tbody><row><entry9191+ align="char">9292+<para>This ioctl call sets one or more frontend properties. This call only9393+ requires read-only access to the device.</para>9494+</entry>9595+ </row></tbody></tgroup></informaltable>9696+<para>SYNOPSIS9797+</para>9898+<informaltable><tgroup cols="1"><tbody><row><entry9999+ align="char">100100+<para>int ioctl(int fd, int request = <link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link>,101101+ dtv_properties ⋆props);</para>102102+</entry>103103+ </row></tbody></tgroup></informaltable>104104+<para>PARAMETERS105105+</para>106106+<informaltable><tgroup cols="2"><tbody><row><entry align="char">107107+<para>int fd</para>108108+</entry><entry109109+ align="char">110110+<para>File descriptor returned by a previous call to open().</para>111111+</entry>112112+ </row><row><entry113113+ align="char">114114+<para>int num</para>115115+</entry><entry116116+ align="char">117117+<para>Equals <link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link> for this command.</para>118118+</entry>119119+ </row><row><entry120120+ align="char">121121+<para>struct dtv_property *props</para>122122+</entry><entry123123+ align="char">124124+<para>Points to the location where the front-end property commands are stored.</para>125125+</entry>126126+ </row></tbody></tgroup></informaltable>127127+<para>ERRORS128128+</para>129129+<informaltable><tgroup cols="2"><tbody><row>130130+ <entry align="char"><para>EINVAL</para></entry>131131+ <entry align="char"><para>Invalid parameter(s) received or number of parameters out of the range.</para></entry>132132+ </row><row>133133+ <entry align="char"><para>ENOMEM</para></entry>134134+ <entry align="char"><para>Out of memory.</para></entry>135135+ </row><row>136136+ <entry align="char"><para>EFAULT</para></entry>137137+ <entry align="char"><para>Failure while copying data from/to userspace.</para></entry>138138+ </row><row>139139+ <entry align="char"><para>EOPNOTSUPP</para></entry>140140+ <entry align="char"><para>Property type not supported.</para></entry>141141+ </row></tbody></tgroup></informaltable>142142+</section>143143+144144+<para>145145+On <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link>/<link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link>,146146+the actual action is determined by the dtv_property cmd/data pairs. With one single ioctl, is possible to147147+get/set up to 64 properties. The actual meaning of each property is described on the next sections.148148+</para>149149+150150+<para>The Available frontend property types are:</para>151151+<programlisting>152152+#define DTV_UNDEFINED 0153153+#define DTV_TUNE 1154154+#define DTV_CLEAR 2155155+#define DTV_FREQUENCY 3156156+#define DTV_MODULATION 4157157+#define DTV_BANDWIDTH_HZ 5158158+#define DTV_INVERSION 6159159+#define DTV_DISEQC_MASTER 7160160+#define DTV_SYMBOL_RATE 8161161+#define DTV_INNER_FEC 9162162+#define DTV_VOLTAGE 10163163+#define DTV_TONE 11164164+#define DTV_PILOT 12165165+#define DTV_ROLLOFF 13166166+#define DTV_DISEQC_SLAVE_REPLY 14167167+#define DTV_FE_CAPABILITY_COUNT 15168168+#define DTV_FE_CAPABILITY 16169169+#define DTV_DELIVERY_SYSTEM 17170170+#define DTV_ISDBT_PARTIAL_RECEPTION 18171171+#define DTV_ISDBT_SOUND_BROADCASTING 19172172+#define DTV_ISDBT_SB_SUBCHANNEL_ID 20173173+#define DTV_ISDBT_SB_SEGMENT_IDX 21174174+#define DTV_ISDBT_SB_SEGMENT_COUNT 22175175+#define DTV_ISDBT_LAYERA_FEC 23176176+#define DTV_ISDBT_LAYERA_MODULATION 24177177+#define DTV_ISDBT_LAYERA_SEGMENT_COUNT 25178178+#define DTV_ISDBT_LAYERA_TIME_INTERLEAVING 26179179+#define DTV_ISDBT_LAYERB_FEC 27180180+#define DTV_ISDBT_LAYERB_MODULATION 28181181+#define DTV_ISDBT_LAYERB_SEGMENT_COUNT 29182182+#define DTV_ISDBT_LAYERB_TIME_INTERLEAVING 30183183+#define DTV_ISDBT_LAYERC_FEC 31184184+#define DTV_ISDBT_LAYERC_MODULATION 32185185+#define DTV_ISDBT_LAYERC_SEGMENT_COUNT 33186186+#define DTV_ISDBT_LAYERC_TIME_INTERLEAVING 34187187+#define DTV_API_VERSION 35188188+#define DTV_CODE_RATE_HP 36189189+#define DTV_CODE_RATE_LP 37190190+#define DTV_GUARD_INTERVAL 38191191+#define DTV_TRANSMISSION_MODE 39192192+#define DTV_HIERARCHY 40193193+#define DTV_ISDBT_LAYER_ENABLED 41194194+#define DTV_ISDBS_TS_ID 42195195+</programlisting>196196+197197+<section id="fe_property_common">198198+ <title>Parameters that are common to all Digital TV standards</title>199199+ <section id="DTV_FREQUENCY">200200+ <title><constant>DTV_FREQUENCY</constant></title>201201+202202+ <para>Central frequency of the channel, in HZ.</para>203203+204204+ <para>Notes:</para>205205+ <para>1)For ISDB-T, the channels are usually transmitted with an offset of 143kHz.206206+ E.g. a valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of207207+ the channel which is 6MHz.</para>208208+209209+ <para>2)As in ISDB-Tsb the channel consists of only one or three segments the210210+ frequency step is 429kHz, 3*429 respectively. As for ISDB-T the211211+ central frequency of the channel is expected.</para>212212+ </section>213213+214214+ <section id="DTV_BANDWIDTH_HZ">215215+ <title><constant>DTV_BANDWIDTH_HZ</constant></title>216216+217217+ <para>Bandwidth for the channel, in HZ.</para>218218+219219+ <para>Possible values:220220+ <constant>6000000</constant>,221221+ <constant>7000000</constant>,222222+ <constant>8000000</constant>.223223+ </para>224224+225225+ <para>Notes:</para>226226+227227+ <para>1) For ISDB-T it should be always 6000000Hz (6MHz)</para>228228+ <para>2) For ISDB-Tsb it can vary depending on the number of connected segments</para>229229+ <para>3) Bandwidth doesn't apply for DVB-C transmissions, as the bandwidth230230+ for DVB-C depends on the symbol rate</para>231231+ <para>4) Bandwidth in ISDB-T is fixed (6MHz) or can be easily derived from232232+ other parameters (DTV_ISDBT_SB_SEGMENT_IDX,233233+ DTV_ISDBT_SB_SEGMENT_COUNT).</para>234234+ </section>235235+236236+ <section id="DTV_DELIVERY_SYSTEM">237237+ <title><constant>DTV_DELIVERY_SYSTEM</constant></title>238238+239239+ <para>Specifies the type of Delivery system</para>240240+241241+ <para>Possible values: </para>242242+<programlisting>243243+typedef enum fe_delivery_system {244244+ SYS_UNDEFINED,245245+ SYS_DVBC_ANNEX_AC,246246+ SYS_DVBC_ANNEX_B,247247+ SYS_DVBT,248248+ SYS_DSS,249249+ SYS_DVBS,250250+ SYS_DVBS2,251251+ SYS_DVBH,252252+ SYS_ISDBT,253253+ SYS_ISDBS,254254+ SYS_ISDBC,255255+ SYS_ATSC,256256+ SYS_ATSCMH,257257+ SYS_DMBTH,258258+ SYS_CMMB,259259+ SYS_DAB,260260+} fe_delivery_system_t;261261+</programlisting>262262+263263+ </section>264264+265265+ <section id="DTV_TRANSMISSION_MODE">266266+ <title><constant>DTV_TRANSMISSION_MODE</constant></title>267267+268268+ <para>Specifies the number of carriers used by the standard</para>269269+270270+ <para>Possible values are:</para>271271+<programlisting>272272+typedef enum fe_transmit_mode {273273+ TRANSMISSION_MODE_2K,274274+ TRANSMISSION_MODE_8K,275275+ TRANSMISSION_MODE_AUTO,276276+ TRANSMISSION_MODE_4K277277+} fe_transmit_mode_t;278278+</programlisting>279279+280280+ <para>Notes:</para>281281+ <para>1) ISDB-T supports three carrier/symbol-size: 8K, 4K, 2K. It is called282282+ 'mode' in the standard: Mode 1 is 2K, mode 2 is 4K, mode 3 is 8K</para>283283+284284+ <para>2) If <constant>DTV_TRANSMISSION_MODE</constant> is set the <constant>TRANSMISSION_MODE_AUTO</constant> the285285+ hardware will try to find the correct FFT-size (if capable) and will286286+ use TMCC to fill in the missing parameters.</para>287287+ </section>288288+289289+ <section id="DTV_GUARD_INTERVAL">290290+ <title><constant>DTV_GUARD_INTERVAL</constant></title>291291+292292+ <para>Possible values are:</para>293293+<programlisting>294294+typedef enum fe_guard_interval {295295+ GUARD_INTERVAL_1_32,296296+ GUARD_INTERVAL_1_16,297297+ GUARD_INTERVAL_1_8,298298+ GUARD_INTERVAL_1_4,299299+ GUARD_INTERVAL_AUTO300300+} fe_guard_interval_t;301301+</programlisting>302302+303303+ <para>Notes:</para>304304+ <para>1) If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will305305+ try to find the correct guard interval (if capable) and will use TMCC to fill306306+ in the missing parameters.</para>307307+ </section>308308+</section>33094310<section id="isdbt">5311 <title>ISDB-T frontend</title>···3383233933 <para>Parameters used by ISDB-T and ISDB-Tsb.</para>34034341341- <section id="isdbt-parms">342342- <title>Parameters that are common with DVB-T and ATSC</title>343343-344344- <section id="isdbt-freq">345345- <title><constant>DTV_FREQUENCY</constant></title>346346-347347- <para>Central frequency of the channel.</para>348348-349349- <para>For ISDB-T the channels are usually transmitted with an offset of 143kHz. E.g. a350350- valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of351351- the channel which is 6MHz.</para>352352-353353- <para>As in ISDB-Tsb the channel consists of only one or three segments the354354- frequency step is 429kHz, 3*429 respectively. As for ISDB-T the355355- central frequency of the channel is expected.</para>356356- </section>357357-358358- <section id="isdbt-bw">359359- <title><constant>DTV_BANDWIDTH_HZ</constant> (optional)</title>360360-361361- <para>Possible values:</para>362362-363363- <para>For ISDB-T it should be always 6000000Hz (6MHz)</para>364364- <para>For ISDB-Tsb it can vary depending on the number of connected segments</para>365365-366366- <para>Note: Hardware specific values might be given here, but standard367367- applications should not bother to set a value to this field as368368- standard demods are ignoring it anyway.</para>369369-370370- <para>Bandwidth in ISDB-T is fixed (6MHz) or can be easily derived from371371- other parameters (DTV_ISDBT_SB_SEGMENT_IDX,372372- DTV_ISDBT_SB_SEGMENT_COUNT).</para>373373- </section>374374-375375- <section id="isdbt-delivery-sys">376376- <title><constant>DTV_DELIVERY_SYSTEM</constant></title>377377-378378- <para>Possible values: <constant>SYS_ISDBT</constant></para>379379- </section>380380-381381- <section id="isdbt-tx-mode">382382- <title><constant>DTV_TRANSMISSION_MODE</constant></title>383383-384384- <para>ISDB-T supports three carrier/symbol-size: 8K, 4K, 2K. It is called385385- 'mode' in the standard: Mode 1 is 2K, mode 2 is 4K, mode 3 is 8K</para>386386-387387- <para>Possible values: <constant>TRANSMISSION_MODE_2K</constant>, <constant>TRANSMISSION_MODE_8K</constant>,388388- <constant>TRANSMISSION_MODE_AUTO</constant>, <constant>TRANSMISSION_MODE_4K</constant></para>389389-390390- <para>If <constant>DTV_TRANSMISSION_MODE</constant> is set the <constant>TRANSMISSION_MODE_AUTO</constant> the391391- hardware will try to find the correct FFT-size (if capable) and will392392- use TMCC to fill in the missing parameters.</para>393393-394394- <para><constant>TRANSMISSION_MODE_4K</constant> is added at the same time as the other new parameters.</para>395395- </section>396396-397397- <section id="isdbt-guard-interval">398398- <title><constant>DTV_GUARD_INTERVAL</constant></title>399399-400400- <para>Possible values: <constant>GUARD_INTERVAL_1_32</constant>, <constant>GUARD_INTERVAL_1_16</constant>, <constant>GUARD_INTERVAL_1_8</constant>,401401- <constant>GUARD_INTERVAL_1_4</constant>, <constant>GUARD_INTERVAL_AUTO</constant></para>402402-403403- <para>If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will404404- try to find the correct guard interval (if capable) and will use TMCC to fill405405- in the missing parameters.</para>406406- </section>407407- </section>40835 <section id="isdbt-new-parms">40936 <title>ISDB-T only parameters</title>41037