Path: blob/master/Documentation/DocBook/dvb/dvbproperty.xml
10823 views
<section id="FE_GET_SET_PROPERTY">1<title>FE_GET_PROPERTY/FE_SET_PROPERTY</title>23<programlisting>4/* Reserved fields should be set to 0 */5struct dtv_property {6__u32 cmd;7union {8__u32 data;9struct {10__u8 data[32];11__u32 len;12__u32 reserved1[3];13void *reserved2;14} buffer;15} u;16int result;17} __attribute__ ((packed));1819/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */20#define DTV_IOCTL_MAX_MSGS 642122struct dtv_properties {23__u32 num;24struct dtv_property *props;25};26</programlisting>2728<section id="FE_GET_PROPERTY">29<title>FE_GET_PROPERTY</title>30<para>DESCRIPTION31</para>32<informaltable><tgroup cols="1"><tbody><row><entry33align="char">34<para>This ioctl call returns one or more frontend properties. This call only35requires read-only access to the device.</para>36</entry>37</row></tbody></tgroup></informaltable>38<para>SYNOPSIS39</para>40<informaltable><tgroup cols="1"><tbody><row><entry41align="char">42<para>int ioctl(int fd, int request = <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link>,43dtv_properties ⋆props);</para>44</entry>45</row></tbody></tgroup></informaltable>46<para>PARAMETERS47</para>48<informaltable><tgroup cols="2"><tbody><row><entry align="char">49<para>int fd</para>50</entry><entry51align="char">52<para>File descriptor returned by a previous call to open().</para>53</entry>54</row><row><entry55align="char">56<para>int num</para>57</entry><entry58align="char">59<para>Equals <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link> for this command.</para>60</entry>61</row><row><entry62align="char">63<para>struct dtv_property *props</para>64</entry><entry65align="char">66<para>Points to the location where the front-end property commands are stored.</para>67</entry>68</row></tbody></tgroup></informaltable>69<para>ERRORS</para>70<informaltable><tgroup cols="2"><tbody><row>71<entry align="char"><para>EINVAL</para></entry>72<entry align="char"><para>Invalid parameter(s) received or number of parameters out of the range.</para></entry>73</row><row>74<entry align="char"><para>ENOMEM</para></entry>75<entry align="char"><para>Out of memory.</para></entry>76</row><row>77<entry align="char"><para>EFAULT</para></entry>78<entry align="char"><para>Failure while copying data from/to userspace.</para></entry>79</row><row>80<entry align="char"><para>EOPNOTSUPP</para></entry>81<entry align="char"><para>Property type not supported.</para></entry>82</row></tbody></tgroup></informaltable>83</section>8485<section id="FE_SET_PROPERTY">86<title>FE_SET_PROPERTY</title>87<para>DESCRIPTION88</para>89<informaltable><tgroup cols="1"><tbody><row><entry90align="char">91<para>This ioctl call sets one or more frontend properties. This call only92requires read-only access to the device.</para>93</entry>94</row></tbody></tgroup></informaltable>95<para>SYNOPSIS96</para>97<informaltable><tgroup cols="1"><tbody><row><entry98align="char">99<para>int ioctl(int fd, int request = <link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link>,100dtv_properties ⋆props);</para>101</entry>102</row></tbody></tgroup></informaltable>103<para>PARAMETERS104</para>105<informaltable><tgroup cols="2"><tbody><row><entry align="char">106<para>int fd</para>107</entry><entry108align="char">109<para>File descriptor returned by a previous call to open().</para>110</entry>111</row><row><entry112align="char">113<para>int num</para>114</entry><entry115align="char">116<para>Equals <link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link> for this command.</para>117</entry>118</row><row><entry119align="char">120<para>struct dtv_property *props</para>121</entry><entry122align="char">123<para>Points to the location where the front-end property commands are stored.</para>124</entry>125</row></tbody></tgroup></informaltable>126<para>ERRORS127</para>128<informaltable><tgroup cols="2"><tbody><row>129<entry align="char"><para>EINVAL</para></entry>130<entry align="char"><para>Invalid parameter(s) received or number of parameters out of the range.</para></entry>131</row><row>132<entry align="char"><para>ENOMEM</para></entry>133<entry align="char"><para>Out of memory.</para></entry>134</row><row>135<entry align="char"><para>EFAULT</para></entry>136<entry align="char"><para>Failure while copying data from/to userspace.</para></entry>137</row><row>138<entry align="char"><para>EOPNOTSUPP</para></entry>139<entry align="char"><para>Property type not supported.</para></entry>140</row></tbody></tgroup></informaltable>141</section>142143<section>144<title>Property types</title>145<para>146On <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link>/<link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link>,147the actual action is determined by the dtv_property cmd/data pairs. With one single ioctl, is possible to148get/set up to 64 properties. The actual meaning of each property is described on the next sections.149</para>150151<para>The available frontend property types are:</para>152<programlisting>153#define DTV_UNDEFINED 0154#define DTV_TUNE 1155#define DTV_CLEAR 2156#define DTV_FREQUENCY 3157#define DTV_MODULATION 4158#define DTV_BANDWIDTH_HZ 5159#define DTV_INVERSION 6160#define DTV_DISEQC_MASTER 7161#define DTV_SYMBOL_RATE 8162#define DTV_INNER_FEC 9163#define DTV_VOLTAGE 10164#define DTV_TONE 11165#define DTV_PILOT 12166#define DTV_ROLLOFF 13167#define DTV_DISEQC_SLAVE_REPLY 14168#define DTV_FE_CAPABILITY_COUNT 15169#define DTV_FE_CAPABILITY 16170#define DTV_DELIVERY_SYSTEM 17171#define DTV_ISDBT_PARTIAL_RECEPTION 18172#define DTV_ISDBT_SOUND_BROADCASTING 19173#define DTV_ISDBT_SB_SUBCHANNEL_ID 20174#define DTV_ISDBT_SB_SEGMENT_IDX 21175#define DTV_ISDBT_SB_SEGMENT_COUNT 22176#define DTV_ISDBT_LAYERA_FEC 23177#define DTV_ISDBT_LAYERA_MODULATION 24178#define DTV_ISDBT_LAYERA_SEGMENT_COUNT 25179#define DTV_ISDBT_LAYERA_TIME_INTERLEAVING 26180#define DTV_ISDBT_LAYERB_FEC 27181#define DTV_ISDBT_LAYERB_MODULATION 28182#define DTV_ISDBT_LAYERB_SEGMENT_COUNT 29183#define DTV_ISDBT_LAYERB_TIME_INTERLEAVING 30184#define DTV_ISDBT_LAYERC_FEC 31185#define DTV_ISDBT_LAYERC_MODULATION 32186#define DTV_ISDBT_LAYERC_SEGMENT_COUNT 33187#define DTV_ISDBT_LAYERC_TIME_INTERLEAVING 34188#define DTV_API_VERSION 35189#define DTV_CODE_RATE_HP 36190#define DTV_CODE_RATE_LP 37191#define DTV_GUARD_INTERVAL 38192#define DTV_TRANSMISSION_MODE 39193#define DTV_HIERARCHY 40194#define DTV_ISDBT_LAYER_ENABLED 41195#define DTV_ISDBS_TS_ID 42196</programlisting>197</section>198199<section id="fe_property_common">200<title>Parameters that are common to all Digital TV standards</title>201<section id="DTV_FREQUENCY">202<title><constant>DTV_FREQUENCY</constant></title>203204<para>Central frequency of the channel, in HZ.</para>205206<para>Notes:</para>207<para>1)For ISDB-T, the channels are usually transmitted with an offset of 143kHz.208E.g. a valid frequncy could be 474143 kHz. The stepping is bound to the bandwidth of209the channel which is 6MHz.</para>210211<para>2)As in ISDB-Tsb the channel consists of only one or three segments the212frequency step is 429kHz, 3*429 respectively. As for ISDB-T the213central frequency of the channel is expected.</para>214</section>215216<section id="DTV_BANDWIDTH_HZ">217<title><constant>DTV_BANDWIDTH_HZ</constant></title>218219<para>Bandwidth for the channel, in HZ.</para>220221<para>Possible values:222<constant>1712000</constant>,223<constant>5000000</constant>,224<constant>6000000</constant>,225<constant>7000000</constant>,226<constant>8000000</constant>,227<constant>10000000</constant>.228</para>229230<para>Notes:</para>231232<para>1) For ISDB-T it should be always 6000000Hz (6MHz)</para>233<para>2) For ISDB-Tsb it can vary depending on the number of connected segments</para>234<para>3) Bandwidth doesn't apply for DVB-C transmissions, as the bandwidth235for DVB-C depends on the symbol rate</para>236<para>4) Bandwidth in ISDB-T is fixed (6MHz) or can be easily derived from237other parameters (DTV_ISDBT_SB_SEGMENT_IDX,238DTV_ISDBT_SB_SEGMENT_COUNT).</para>239<para>5) DVB-T supports 6, 7 and 8MHz.</para>240<para>6) In addition, DVB-T2 supports 1.172, 5 and 10MHz.</para>241</section>242243<section id="DTV_DELIVERY_SYSTEM">244<title><constant>DTV_DELIVERY_SYSTEM</constant></title>245246<para>Specifies the type of Delivery system</para>247248<para>Possible values: </para>249<programlisting>250typedef enum fe_delivery_system {251SYS_UNDEFINED,252SYS_DVBC_ANNEX_AC,253SYS_DVBC_ANNEX_B,254SYS_DVBT,255SYS_DSS,256SYS_DVBS,257SYS_DVBS2,258SYS_DVBH,259SYS_ISDBT,260SYS_ISDBS,261SYS_ISDBC,262SYS_ATSC,263SYS_ATSCMH,264SYS_DMBTH,265SYS_CMMB,266SYS_DAB,267SYS_DVBT2,268} fe_delivery_system_t;269</programlisting>270271</section>272273<section id="DTV_TRANSMISSION_MODE">274<title><constant>DTV_TRANSMISSION_MODE</constant></title>275276<para>Specifies the number of carriers used by the standard</para>277278<para>Possible values are:</para>279<programlisting>280typedef enum fe_transmit_mode {281TRANSMISSION_MODE_2K,282TRANSMISSION_MODE_8K,283TRANSMISSION_MODE_AUTO,284TRANSMISSION_MODE_4K,285TRANSMISSION_MODE_1K,286TRANSMISSION_MODE_16K,287TRANSMISSION_MODE_32K,288} fe_transmit_mode_t;289</programlisting>290291<para>Notes:</para>292<para>1) ISDB-T supports three carrier/symbol-size: 8K, 4K, 2K. It is called293'mode' in the standard: Mode 1 is 2K, mode 2 is 4K, mode 3 is 8K</para>294295<para>2) If <constant>DTV_TRANSMISSION_MODE</constant> is set the <constant>TRANSMISSION_MODE_AUTO</constant> the296hardware will try to find the correct FFT-size (if capable) and will297use TMCC to fill in the missing parameters.</para>298<para>3) DVB-T specifies 2K and 8K as valid sizes.</para>299<para>4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K.</para>300</section>301302<section id="DTV_GUARD_INTERVAL">303<title><constant>DTV_GUARD_INTERVAL</constant></title>304305<para>Possible values are:</para>306<programlisting>307typedef enum fe_guard_interval {308GUARD_INTERVAL_1_32,309GUARD_INTERVAL_1_16,310GUARD_INTERVAL_1_8,311GUARD_INTERVAL_1_4,312GUARD_INTERVAL_AUTO,313GUARD_INTERVAL_1_128,314GUARD_INTERVAL_19_128,315GUARD_INTERVAL_19_256,316} fe_guard_interval_t;317</programlisting>318319<para>Notes:</para>320<para>1) If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will321try to find the correct guard interval (if capable) and will use TMCC to fill322in the missing parameters.</para>323<para>2) Intervals 1/128, 19/128 and 19/256 are used only for DVB-T2 at present</para>324</section>325</section>326327<section id="isdbt">328<title>ISDB-T frontend</title>329<para>This section describes shortly what are the possible parameters in the Linux330DVB-API called "S2API" and now DVB API 5 in order to tune an ISDB-T/ISDB-Tsb331demodulator:</para>332333<para>This ISDB-T/ISDB-Tsb API extension should reflect all information334needed to tune any ISDB-T/ISDB-Tsb hardware. Of course it is possible335that some very sophisticated devices won't need certain parameters to336tune.</para>337338<para>The information given here should help application writers to know how339to handle ISDB-T and ISDB-Tsb hardware using the Linux DVB-API.</para>340341<para>The details given here about ISDB-T and ISDB-Tsb are just enough to342basically show the dependencies between the needed parameter values,343but surely some information is left out. For more detailed information344see the following documents:</para>345346<para>ARIB STD-B31 - "Transmission System for Digital Terrestrial347Television Broadcasting" and</para>348<para>ARIB TR-B14 - "Operational Guidelines for Digital Terrestrial349Television Broadcasting".</para>350351<para>In order to read this document one has to have some knowledge the352channel structure in ISDB-T and ISDB-Tsb. I.e. it has to be known to353the reader that an ISDB-T channel consists of 13 segments, that it can354have up to 3 layer sharing those segments, and things like that.</para>355356<para>Parameters used by ISDB-T and ISDB-Tsb.</para>357358<section id="isdbt-new-parms">359<title>ISDB-T only parameters</title>360361<section id="isdbt-part-rec">362<title><constant>DTV_ISDBT_PARTIAL_RECEPTION</constant></title>363364<para><constant>If DTV_ISDBT_SOUND_BROADCASTING</constant> is '0' this bit-field represents whether365the channel is in partial reception mode or not.</para>366367<para>If '1' <constant>DTV_ISDBT_LAYERA_*</constant> values are assigned to the center segment and368<constant>DTV_ISDBT_LAYERA_SEGMENT_COUNT</constant> has to be '1'.</para>369370<para>If in addition <constant>DTV_ISDBT_SOUND_BROADCASTING</constant> is '1'371<constant>DTV_ISDBT_PARTIAL_RECEPTION</constant> represents whether this ISDB-Tsb channel372is consisting of one segment and layer or three segments and two layers.</para>373374<para>Possible values: 0, 1, -1 (AUTO)</para>375</section>376377<section id="isdbt-sound-bcast">378<title><constant>DTV_ISDBT_SOUND_BROADCASTING</constant></title>379380<para>This field represents whether the other DTV_ISDBT_*-parameters are381referring to an ISDB-T and an ISDB-Tsb channel. (See also382<constant>DTV_ISDBT_PARTIAL_RECEPTION</constant>).</para>383384<para>Possible values: 0, 1, -1 (AUTO)</para>385</section>386387<section id="isdbt-sb-ch-id">388<title><constant>DTV_ISDBT_SB_SUBCHANNEL_ID</constant></title>389390<para>This field only applies if <constant>DTV_ISDBT_SOUND_BROADCASTING</constant> is '1'.</para>391392<para>(Note of the author: This might not be the correct description of the393<constant>SUBCHANNEL-ID</constant> in all details, but it is my understanding of the technical394background needed to program a device)</para>395396<para>An ISDB-Tsb channel (1 or 3 segments) can be broadcasted alone or in a397set of connected ISDB-Tsb channels. In this set of channels every398channel can be received independently. The number of connected399ISDB-Tsb segment can vary, e.g. depending on the frequency spectrum400bandwidth available.</para>401402<para>Example: Assume 8 ISDB-Tsb connected segments are broadcasted. The403broadcaster has several possibilities to put those channels in the404air: Assuming a normal 13-segment ISDB-T spectrum he can align the 8405segments from position 1-8 to 5-13 or anything in between.</para>406407<para>The underlying layer of segments are subchannels: each segment is408consisting of several subchannels with a predefined IDs. A sub-channel409is used to help the demodulator to synchronize on the channel.</para>410411<para>An ISDB-T channel is always centered over all sub-channels. As for412the example above, in ISDB-Tsb it is no longer as simple as that.</para>413414<para><constant>The DTV_ISDBT_SB_SUBCHANNEL_ID</constant> parameter is used to give the415sub-channel ID of the segment to be demodulated.</para>416417<para>Possible values: 0 .. 41, -1 (AUTO)</para>418</section>419420<section id="isdbt-sb-seg-idx">421422<title><constant>DTV_ISDBT_SB_SEGMENT_IDX</constant></title>423424<para>This field only applies if <constant>DTV_ISDBT_SOUND_BROADCASTING</constant> is '1'.</para>425426<para><constant>DTV_ISDBT_SB_SEGMENT_IDX</constant> gives the index of the segment to be427demodulated for an ISDB-Tsb channel where several of them are428transmitted in the connected manner.</para>429430<para>Possible values: 0 .. <constant>DTV_ISDBT_SB_SEGMENT_COUNT</constant> - 1</para>431432<para>Note: This value cannot be determined by an automatic channel search.</para>433</section>434435<section id="isdbt-sb-seg-cnt">436<title><constant>DTV_ISDBT_SB_SEGMENT_COUNT</constant></title>437438<para>This field only applies if <constant>DTV_ISDBT_SOUND_BROADCASTING</constant> is '1'.</para>439440<para><constant>DTV_ISDBT_SB_SEGMENT_COUNT</constant> gives the total count of connected ISDB-Tsb441channels.</para>442443<para>Possible values: 1 .. 13</para>444445<para>Note: This value cannot be determined by an automatic channel search.</para>446</section>447448<section id="isdb-hierq-layers">449<title>Hierarchical layers</title>450451<para>ISDB-T channels can be coded hierarchically. As opposed to DVB-T in452ISDB-T hierarchical layers can be decoded simultaneously. For that453reason a ISDB-T demodulator has 3 viterbi and 3 reed-solomon-decoders.</para>454455<para>ISDB-T has 3 hierarchical layers which each can use a part of the456available segments. The total number of segments over all layers has457to 13 in ISDB-T.</para>458459<section id="isdbt-layer-ena">460<title><constant>DTV_ISDBT_LAYER_ENABLED</constant></title>461462<para>Hierarchical reception in ISDB-T is achieved by enabling or disabling463layers in the decoding process. Setting all bits of464<constant>DTV_ISDBT_LAYER_ENABLED</constant> to '1' forces all layers (if applicable) to be465demodulated. This is the default.</para>466467<para>If the channel is in the partial reception mode468(<constant>DTV_ISDBT_PARTIAL_RECEPTION</constant> = 1) the central segment can be decoded469independently of the other 12 segments. In that mode layer A has to470have a <constant>SEGMENT_COUNT</constant> of 1.</para>471472<para>In ISDB-Tsb only layer A is used, it can be 1 or 3 in ISDB-Tsb473according to <constant>DTV_ISDBT_PARTIAL_RECEPTION</constant>. <constant>SEGMENT_COUNT</constant> must be filled474accordingly.</para>475476<para>Possible values: 0x1, 0x2, 0x4 (|-able)</para>477478<para><constant>DTV_ISDBT_LAYER_ENABLED[0:0]</constant> - layer A</para>479<para><constant>DTV_ISDBT_LAYER_ENABLED[1:1]</constant> - layer B</para>480<para><constant>DTV_ISDBT_LAYER_ENABLED[2:2]</constant> - layer C</para>481<para><constant>DTV_ISDBT_LAYER_ENABLED[31:3]</constant> unused</para>482</section>483484<section id="isdbt-layer-fec">485<title><constant>DTV_ISDBT_LAYER*_FEC</constant></title>486487<para>Possible values: <constant>FEC_AUTO</constant>, <constant>FEC_1_2</constant>, <constant>FEC_2_3</constant>, <constant>FEC_3_4</constant>, <constant>FEC_5_6</constant>, <constant>FEC_7_8</constant></para>488</section>489490<section id="isdbt-layer-mod">491<title><constant>DTV_ISDBT_LAYER*_MODULATION</constant></title>492493<para>Possible values: <constant>QAM_AUTO</constant>, QP<constant>SK, QAM_16</constant>, <constant>QAM_64</constant>, <constant>DQPSK</constant></para>494495<para>Note: If layer C is <constant>DQPSK</constant> layer B has to be <constant>DQPSK</constant>. If layer B is <constant>DQPSK</constant>496and <constant>DTV_ISDBT_PARTIAL_RECEPTION</constant>=0 layer has to be <constant>DQPSK</constant>.</para>497</section>498499<section id="isdbt-layer-seg-cnt">500<title><constant>DTV_ISDBT_LAYER*_SEGMENT_COUNT</constant></title>501502<para>Possible values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1 (AUTO)</para>503504<para>Note: Truth table for <constant>DTV_ISDBT_SOUND_BROADCASTING</constant> and505<constant>DTV_ISDBT_PARTIAL_RECEPTION</constant> and <constant>LAYER</constant>*_SEGMENT_COUNT</para>506507<informaltable id="isdbt-layer_seg-cnt-table">508<tgroup cols="6">509510<tbody>511<row>512<entry>PR</entry>513<entry>SB</entry>514<entry>Layer A width</entry>515<entry>Layer B width</entry>516<entry>Layer C width</entry>517<entry>total width</entry>518</row>519520<row>521<entry>0</entry>522<entry>0</entry>523<entry>1 .. 13</entry>524<entry>1 .. 13</entry>525<entry>1 .. 13</entry>526<entry>13</entry>527</row>528529<row>530<entry>1</entry>531<entry>0</entry>532<entry>1</entry>533<entry>1 .. 13</entry>534<entry>1 .. 13</entry>535<entry>13</entry>536</row>537538<row>539<entry>0</entry>540<entry>1</entry>541<entry>1</entry>542<entry>0</entry>543<entry>0</entry>544<entry>1</entry>545</row>546547<row>548<entry>1</entry>549<entry>1</entry>550<entry>1</entry>551<entry>2</entry>552<entry>0</entry>553<entry>13</entry>554</row>555</tbody>556557</tgroup>558</informaltable>559560</section>561562<section id="isdbt_layer_t_interl">563<title><constant>DTV_ISDBT_LAYER*_TIME_INTERLEAVING</constant></title>564565<para>Possible values: 0, 1, 2, 3, -1 (AUTO)</para>566567<para>Note: The real inter-leaver depth-names depend on the mode (fft-size); the values568here are referring to what can be found in the TMCC-structure -569independent of the mode.</para>570</section>571</section>572</section>573<section id="dvbt2-params">574<title>DVB-T2 parameters</title>575576<para>This section covers parameters that apply only to the DVB-T2 delivery method. DVB-T2577support is currently in the early stages development so expect this section to grow578and become more detailed with time.</para>579580<section id="dvbt2-plp-id">581<title><constant>DTV_DVBT2_PLP_ID</constant></title>582583<para>DVB-T2 supports Physical Layer Pipes (PLP) to allow transmission of584many data types via a single multiplex. The API will soon support this585at which point this section will be expanded.</para>586</section>587</section>588</section>589</section>590591592