1*54f38fcaSMauro Carvalho Chehab.. Permission is granted to copy, distribute and/or modify this 2*54f38fcaSMauro Carvalho Chehab.. document under the terms of the GNU Free Documentation License, 3*54f38fcaSMauro Carvalho Chehab.. Version 1.1 or any later version published by the Free Software 4*54f38fcaSMauro Carvalho Chehab.. Foundation, with no Invariant Sections, no Front-Cover Texts 5*54f38fcaSMauro Carvalho Chehab.. and no Back-Cover Texts. A copy of the license is included at 6*54f38fcaSMauro Carvalho Chehab.. Documentation/userspace-api/media/fdl-appendix.rst. 7*54f38fcaSMauro Carvalho Chehab.. 8*54f38fcaSMauro Carvalho Chehab.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections 9*54f38fcaSMauro Carvalho Chehab 10*54f38fcaSMauro Carvalho Chehab.. _frontend-stat-properties: 11*54f38fcaSMauro Carvalho Chehab 12*54f38fcaSMauro Carvalho Chehab****************************** 13*54f38fcaSMauro Carvalho ChehabFrontend statistics indicators 14*54f38fcaSMauro Carvalho Chehab****************************** 15*54f38fcaSMauro Carvalho Chehab 16*54f38fcaSMauro Carvalho ChehabThe values are returned via ``dtv_property.stat``. If the property is 17*54f38fcaSMauro Carvalho Chehabsupported, ``dtv_property.stat.len`` is bigger than zero. 18*54f38fcaSMauro Carvalho Chehab 19*54f38fcaSMauro Carvalho ChehabFor most delivery systems, ``dtv_property.stat.len`` will be 1 if the 20*54f38fcaSMauro Carvalho Chehabstats is supported, and the properties will return a single value for 21*54f38fcaSMauro Carvalho Chehabeach parameter. 22*54f38fcaSMauro Carvalho Chehab 23*54f38fcaSMauro Carvalho ChehabIt should be noted, however, that new OFDM delivery systems like ISDB 24*54f38fcaSMauro Carvalho Chehabcan use different modulation types for each group of carriers. On such 25*54f38fcaSMauro Carvalho Chehabstandards, up to 3 groups of statistics can be provided, and 26*54f38fcaSMauro Carvalho Chehab``dtv_property.stat.len`` is updated to reflect the "global" metrics, 27*54f38fcaSMauro Carvalho Chehabplus one metric per each carrier group (called "layer" on ISDB). 28*54f38fcaSMauro Carvalho Chehab 29*54f38fcaSMauro Carvalho ChehabSo, in order to be consistent with other delivery systems, the first 30*54f38fcaSMauro Carvalho Chehabvalue at :c:type:`dtv_property.stat.dtv_stats <dtv_stats>` array refers 31*54f38fcaSMauro Carvalho Chehabto the global metric. The other elements of the array represent each 32*54f38fcaSMauro Carvalho Chehablayer, starting from layer A(index 1), layer B (index 2) and so on. 33*54f38fcaSMauro Carvalho Chehab 34*54f38fcaSMauro Carvalho ChehabThe number of filled elements are stored at ``dtv_property.stat.len``. 35*54f38fcaSMauro Carvalho Chehab 36*54f38fcaSMauro Carvalho ChehabEach element of the ``dtv_property.stat.dtv_stats`` array consists on 37*54f38fcaSMauro Carvalho Chehabtwo elements: 38*54f38fcaSMauro Carvalho Chehab 39*54f38fcaSMauro Carvalho Chehab- ``svalue`` or ``uvalue``, where ``svalue`` is for signed values of 40*54f38fcaSMauro Carvalho Chehab the measure (dB measures) and ``uvalue`` is for unsigned values 41*54f38fcaSMauro Carvalho Chehab (counters, relative scale) 42*54f38fcaSMauro Carvalho Chehab 43*54f38fcaSMauro Carvalho Chehab- ``scale`` - Scale for the value. It can be: 44*54f38fcaSMauro Carvalho Chehab 45*54f38fcaSMauro Carvalho Chehab - ``FE_SCALE_NOT_AVAILABLE`` - The parameter is supported by the 46*54f38fcaSMauro Carvalho Chehab frontend, but it was not possible to collect it (could be a 47*54f38fcaSMauro Carvalho Chehab transitory or permanent condition) 48*54f38fcaSMauro Carvalho Chehab 49*54f38fcaSMauro Carvalho Chehab - ``FE_SCALE_DECIBEL`` - parameter is a signed value, measured in 50*54f38fcaSMauro Carvalho Chehab 1/1000 dB 51*54f38fcaSMauro Carvalho Chehab 52*54f38fcaSMauro Carvalho Chehab - ``FE_SCALE_RELATIVE`` - parameter is a unsigned value, where 0 53*54f38fcaSMauro Carvalho Chehab means 0% and 65535 means 100%. 54*54f38fcaSMauro Carvalho Chehab 55*54f38fcaSMauro Carvalho Chehab - ``FE_SCALE_COUNTER`` - parameter is a unsigned value that counts 56*54f38fcaSMauro Carvalho Chehab the occurrence of an event, like bit error, block error, or lapsed 57*54f38fcaSMauro Carvalho Chehab time. 58*54f38fcaSMauro Carvalho Chehab 59*54f38fcaSMauro Carvalho Chehab 60*54f38fcaSMauro Carvalho Chehab.. _DTV-STAT-SIGNAL-STRENGTH: 61*54f38fcaSMauro Carvalho Chehab 62*54f38fcaSMauro Carvalho ChehabDTV_STAT_SIGNAL_STRENGTH 63*54f38fcaSMauro Carvalho Chehab======================== 64*54f38fcaSMauro Carvalho Chehab 65*54f38fcaSMauro Carvalho ChehabIndicates the signal strength level at the analog part of the tuner or 66*54f38fcaSMauro Carvalho Chehabof the demod. 67*54f38fcaSMauro Carvalho Chehab 68*54f38fcaSMauro Carvalho ChehabPossible scales for this metric are: 69*54f38fcaSMauro Carvalho Chehab 70*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the 71*54f38fcaSMauro Carvalho Chehab measurement was not complete yet. 72*54f38fcaSMauro Carvalho Chehab 73*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_DECIBEL`` - signal strength is in 0.001 dBm units, power 74*54f38fcaSMauro Carvalho Chehab measured in miliwatts. This value is generally negative. 75*54f38fcaSMauro Carvalho Chehab 76*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_RELATIVE`` - The frontend provides a 0% to 100% 77*54f38fcaSMauro Carvalho Chehab measurement for power (actually, 0 to 65535). 78*54f38fcaSMauro Carvalho Chehab 79*54f38fcaSMauro Carvalho Chehab 80*54f38fcaSMauro Carvalho Chehab.. _DTV-STAT-CNR: 81*54f38fcaSMauro Carvalho Chehab 82*54f38fcaSMauro Carvalho ChehabDTV_STAT_CNR 83*54f38fcaSMauro Carvalho Chehab============ 84*54f38fcaSMauro Carvalho Chehab 85*54f38fcaSMauro Carvalho ChehabIndicates the Signal to Noise ratio for the main carrier. 86*54f38fcaSMauro Carvalho Chehab 87*54f38fcaSMauro Carvalho ChehabPossible scales for this metric are: 88*54f38fcaSMauro Carvalho Chehab 89*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the 90*54f38fcaSMauro Carvalho Chehab measurement was not complete yet. 91*54f38fcaSMauro Carvalho Chehab 92*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_DECIBEL`` - Signal/Noise ratio is in 0.001 dB units. 93*54f38fcaSMauro Carvalho Chehab 94*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_RELATIVE`` - The frontend provides a 0% to 100% 95*54f38fcaSMauro Carvalho Chehab measurement for Signal/Noise (actually, 0 to 65535). 96*54f38fcaSMauro Carvalho Chehab 97*54f38fcaSMauro Carvalho Chehab 98*54f38fcaSMauro Carvalho Chehab.. _DTV-STAT-PRE-ERROR-BIT-COUNT: 99*54f38fcaSMauro Carvalho Chehab 100*54f38fcaSMauro Carvalho ChehabDTV_STAT_PRE_ERROR_BIT_COUNT 101*54f38fcaSMauro Carvalho Chehab============================ 102*54f38fcaSMauro Carvalho Chehab 103*54f38fcaSMauro Carvalho ChehabMeasures the number of bit errors before the forward error correction 104*54f38fcaSMauro Carvalho Chehab(FEC) on the inner coding block (before Viterbi, LDPC or other inner 105*54f38fcaSMauro Carvalho Chehabcode). 106*54f38fcaSMauro Carvalho Chehab 107*54f38fcaSMauro Carvalho ChehabThis measure is taken during the same interval as 108*54f38fcaSMauro Carvalho Chehab``DTV_STAT_PRE_TOTAL_BIT_COUNT``. 109*54f38fcaSMauro Carvalho Chehab 110*54f38fcaSMauro Carvalho ChehabIn order to get the BER (Bit Error Rate) measurement, it should be 111*54f38fcaSMauro Carvalho Chehabdivided by 112*54f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_PRE_TOTAL_BIT_COUNT <DTV-STAT-PRE-TOTAL-BIT-COUNT>`. 113*54f38fcaSMauro Carvalho Chehab 114*54f38fcaSMauro Carvalho ChehabThis measurement is monotonically increased, as the frontend gets more 115*54f38fcaSMauro Carvalho Chehabbit count measurements. The frontend may reset it when a 116*54f38fcaSMauro Carvalho Chehabchannel/transponder is tuned. 117*54f38fcaSMauro Carvalho Chehab 118*54f38fcaSMauro Carvalho ChehabPossible scales for this metric are: 119*54f38fcaSMauro Carvalho Chehab 120*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the 121*54f38fcaSMauro Carvalho Chehab measurement was not complete yet. 122*54f38fcaSMauro Carvalho Chehab 123*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_COUNTER`` - Number of error bits counted before the inner 124*54f38fcaSMauro Carvalho Chehab coding. 125*54f38fcaSMauro Carvalho Chehab 126*54f38fcaSMauro Carvalho Chehab 127*54f38fcaSMauro Carvalho Chehab.. _DTV-STAT-PRE-TOTAL-BIT-COUNT: 128*54f38fcaSMauro Carvalho Chehab 129*54f38fcaSMauro Carvalho ChehabDTV_STAT_PRE_TOTAL_BIT_COUNT 130*54f38fcaSMauro Carvalho Chehab============================ 131*54f38fcaSMauro Carvalho Chehab 132*54f38fcaSMauro Carvalho ChehabMeasures the amount of bits received before the inner code block, during 133*54f38fcaSMauro Carvalho Chehabthe same period as 134*54f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_PRE_ERROR_BIT_COUNT <DTV-STAT-PRE-ERROR-BIT-COUNT>` 135*54f38fcaSMauro Carvalho Chehabmeasurement was taken. 136*54f38fcaSMauro Carvalho Chehab 137*54f38fcaSMauro Carvalho ChehabIt should be noted that this measurement can be smaller than the total 138*54f38fcaSMauro Carvalho Chehabamount of bits on the transport stream, as the frontend may need to 139*54f38fcaSMauro Carvalho Chehabmanually restart the measurement, losing some data between each 140*54f38fcaSMauro Carvalho Chehabmeasurement interval. 141*54f38fcaSMauro Carvalho Chehab 142*54f38fcaSMauro Carvalho ChehabThis measurement is monotonically increased, as the frontend gets more 143*54f38fcaSMauro Carvalho Chehabbit count measurements. The frontend may reset it when a 144*54f38fcaSMauro Carvalho Chehabchannel/transponder is tuned. 145*54f38fcaSMauro Carvalho Chehab 146*54f38fcaSMauro Carvalho ChehabPossible scales for this metric are: 147*54f38fcaSMauro Carvalho Chehab 148*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the 149*54f38fcaSMauro Carvalho Chehab measurement was not complete yet. 150*54f38fcaSMauro Carvalho Chehab 151*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_COUNTER`` - Number of bits counted while measuring 152*54f38fcaSMauro Carvalho Chehab :ref:`DTV_STAT_PRE_ERROR_BIT_COUNT <DTV-STAT-PRE-ERROR-BIT-COUNT>`. 153*54f38fcaSMauro Carvalho Chehab 154*54f38fcaSMauro Carvalho Chehab 155*54f38fcaSMauro Carvalho Chehab.. _DTV-STAT-POST-ERROR-BIT-COUNT: 156*54f38fcaSMauro Carvalho Chehab 157*54f38fcaSMauro Carvalho ChehabDTV_STAT_POST_ERROR_BIT_COUNT 158*54f38fcaSMauro Carvalho Chehab============================= 159*54f38fcaSMauro Carvalho Chehab 160*54f38fcaSMauro Carvalho ChehabMeasures the number of bit errors after the forward error correction 161*54f38fcaSMauro Carvalho Chehab(FEC) done by inner code block (after Viterbi, LDPC or other inner 162*54f38fcaSMauro Carvalho Chehabcode). 163*54f38fcaSMauro Carvalho Chehab 164*54f38fcaSMauro Carvalho ChehabThis measure is taken during the same interval as 165*54f38fcaSMauro Carvalho Chehab``DTV_STAT_POST_TOTAL_BIT_COUNT``. 166*54f38fcaSMauro Carvalho Chehab 167*54f38fcaSMauro Carvalho ChehabIn order to get the BER (Bit Error Rate) measurement, it should be 168*54f38fcaSMauro Carvalho Chehabdivided by 169*54f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_POST_TOTAL_BIT_COUNT <DTV-STAT-POST-TOTAL-BIT-COUNT>`. 170*54f38fcaSMauro Carvalho Chehab 171*54f38fcaSMauro Carvalho ChehabThis measurement is monotonically increased, as the frontend gets more 172*54f38fcaSMauro Carvalho Chehabbit count measurements. The frontend may reset it when a 173*54f38fcaSMauro Carvalho Chehabchannel/transponder is tuned. 174*54f38fcaSMauro Carvalho Chehab 175*54f38fcaSMauro Carvalho ChehabPossible scales for this metric are: 176*54f38fcaSMauro Carvalho Chehab 177*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the 178*54f38fcaSMauro Carvalho Chehab measurement was not complete yet. 179*54f38fcaSMauro Carvalho Chehab 180*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_COUNTER`` - Number of error bits counted after the inner 181*54f38fcaSMauro Carvalho Chehab coding. 182*54f38fcaSMauro Carvalho Chehab 183*54f38fcaSMauro Carvalho Chehab 184*54f38fcaSMauro Carvalho Chehab.. _DTV-STAT-POST-TOTAL-BIT-COUNT: 185*54f38fcaSMauro Carvalho Chehab 186*54f38fcaSMauro Carvalho ChehabDTV_STAT_POST_TOTAL_BIT_COUNT 187*54f38fcaSMauro Carvalho Chehab============================= 188*54f38fcaSMauro Carvalho Chehab 189*54f38fcaSMauro Carvalho ChehabMeasures the amount of bits received after the inner coding, during the 190*54f38fcaSMauro Carvalho Chehabsame period as 191*54f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_POST_ERROR_BIT_COUNT <DTV-STAT-POST-ERROR-BIT-COUNT>` 192*54f38fcaSMauro Carvalho Chehabmeasurement was taken. 193*54f38fcaSMauro Carvalho Chehab 194*54f38fcaSMauro Carvalho ChehabIt should be noted that this measurement can be smaller than the total 195*54f38fcaSMauro Carvalho Chehabamount of bits on the transport stream, as the frontend may need to 196*54f38fcaSMauro Carvalho Chehabmanually restart the measurement, losing some data between each 197*54f38fcaSMauro Carvalho Chehabmeasurement interval. 198*54f38fcaSMauro Carvalho Chehab 199*54f38fcaSMauro Carvalho ChehabThis measurement is monotonically increased, as the frontend gets more 200*54f38fcaSMauro Carvalho Chehabbit count measurements. The frontend may reset it when a 201*54f38fcaSMauro Carvalho Chehabchannel/transponder is tuned. 202*54f38fcaSMauro Carvalho Chehab 203*54f38fcaSMauro Carvalho ChehabPossible scales for this metric are: 204*54f38fcaSMauro Carvalho Chehab 205*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the 206*54f38fcaSMauro Carvalho Chehab measurement was not complete yet. 207*54f38fcaSMauro Carvalho Chehab 208*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_COUNTER`` - Number of bits counted while measuring 209*54f38fcaSMauro Carvalho Chehab :ref:`DTV_STAT_POST_ERROR_BIT_COUNT <DTV-STAT-POST-ERROR-BIT-COUNT>`. 210*54f38fcaSMauro Carvalho Chehab 211*54f38fcaSMauro Carvalho Chehab 212*54f38fcaSMauro Carvalho Chehab.. _DTV-STAT-ERROR-BLOCK-COUNT: 213*54f38fcaSMauro Carvalho Chehab 214*54f38fcaSMauro Carvalho ChehabDTV_STAT_ERROR_BLOCK_COUNT 215*54f38fcaSMauro Carvalho Chehab========================== 216*54f38fcaSMauro Carvalho Chehab 217*54f38fcaSMauro Carvalho ChehabMeasures the number of block errors after the outer forward error 218*54f38fcaSMauro Carvalho Chehabcorrection coding (after Reed-Solomon or other outer code). 219*54f38fcaSMauro Carvalho Chehab 220*54f38fcaSMauro Carvalho ChehabThis measurement is monotonically increased, as the frontend gets more 221*54f38fcaSMauro Carvalho Chehabbit count measurements. The frontend may reset it when a 222*54f38fcaSMauro Carvalho Chehabchannel/transponder is tuned. 223*54f38fcaSMauro Carvalho Chehab 224*54f38fcaSMauro Carvalho ChehabPossible scales for this metric are: 225*54f38fcaSMauro Carvalho Chehab 226*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the 227*54f38fcaSMauro Carvalho Chehab measurement was not complete yet. 228*54f38fcaSMauro Carvalho Chehab 229*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_COUNTER`` - Number of error blocks counted after the outer 230*54f38fcaSMauro Carvalho Chehab coding. 231*54f38fcaSMauro Carvalho Chehab 232*54f38fcaSMauro Carvalho Chehab 233*54f38fcaSMauro Carvalho Chehab.. _DTV-STAT-TOTAL-BLOCK-COUNT: 234*54f38fcaSMauro Carvalho Chehab 235*54f38fcaSMauro Carvalho ChehabDTV-STAT_TOTAL_BLOCK_COUNT 236*54f38fcaSMauro Carvalho Chehab========================== 237*54f38fcaSMauro Carvalho Chehab 238*54f38fcaSMauro Carvalho ChehabMeasures the total number of blocks received during the same period as 239*54f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_ERROR_BLOCK_COUNT <DTV-STAT-ERROR-BLOCK-COUNT>` 240*54f38fcaSMauro Carvalho Chehabmeasurement was taken. 241*54f38fcaSMauro Carvalho Chehab 242*54f38fcaSMauro Carvalho ChehabIt can be used to calculate the PER indicator, by dividing 243*54f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_ERROR_BLOCK_COUNT <DTV-STAT-ERROR-BLOCK-COUNT>` by 244*54f38fcaSMauro Carvalho Chehab:ref:`DTV-STAT-TOTAL-BLOCK-COUNT`. 245*54f38fcaSMauro Carvalho Chehab 246*54f38fcaSMauro Carvalho ChehabPossible scales for this metric are: 247*54f38fcaSMauro Carvalho Chehab 248*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the 249*54f38fcaSMauro Carvalho Chehab measurement was not complete yet. 250*54f38fcaSMauro Carvalho Chehab 251*54f38fcaSMauro Carvalho Chehab- ``FE_SCALE_COUNTER`` - Number of blocks counted while measuring 252*54f38fcaSMauro Carvalho Chehab :ref:`DTV_STAT_ERROR_BLOCK_COUNT <DTV-STAT-ERROR-BLOCK-COUNT>`. 253