xref: /openbmc/linux/Documentation/userspace-api/media/dvb/frontend-stat-properties.rst (revision cbecf716ca618fd44feda6bd9a64a8179d031fc5)
1*059b1c5bSMauro Carvalho Chehab.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
254f38fcaSMauro Carvalho Chehab
354f38fcaSMauro Carvalho Chehab.. _frontend-stat-properties:
454f38fcaSMauro Carvalho Chehab
554f38fcaSMauro Carvalho Chehab******************************
654f38fcaSMauro Carvalho ChehabFrontend statistics indicators
754f38fcaSMauro Carvalho Chehab******************************
854f38fcaSMauro Carvalho Chehab
954f38fcaSMauro Carvalho ChehabThe values are returned via ``dtv_property.stat``. If the property is
1054f38fcaSMauro Carvalho Chehabsupported, ``dtv_property.stat.len`` is bigger than zero.
1154f38fcaSMauro Carvalho Chehab
1254f38fcaSMauro Carvalho ChehabFor most delivery systems, ``dtv_property.stat.len`` will be 1 if the
1354f38fcaSMauro Carvalho Chehabstats is supported, and the properties will return a single value for
1454f38fcaSMauro Carvalho Chehabeach parameter.
1554f38fcaSMauro Carvalho Chehab
1654f38fcaSMauro Carvalho ChehabIt should be noted, however, that new OFDM delivery systems like ISDB
1754f38fcaSMauro Carvalho Chehabcan use different modulation types for each group of carriers. On such
1854f38fcaSMauro Carvalho Chehabstandards, up to 3 groups of statistics can be provided, and
1954f38fcaSMauro Carvalho Chehab``dtv_property.stat.len`` is updated to reflect the "global" metrics,
2054f38fcaSMauro Carvalho Chehabplus one metric per each carrier group (called "layer" on ISDB).
2154f38fcaSMauro Carvalho Chehab
2254f38fcaSMauro Carvalho ChehabSo, in order to be consistent with other delivery systems, the first
2354f38fcaSMauro Carvalho Chehabvalue at :c:type:`dtv_property.stat.dtv_stats <dtv_stats>` array refers
2454f38fcaSMauro Carvalho Chehabto the global metric. The other elements of the array represent each
2554f38fcaSMauro Carvalho Chehablayer, starting from layer A(index 1), layer B (index 2) and so on.
2654f38fcaSMauro Carvalho Chehab
2754f38fcaSMauro Carvalho ChehabThe number of filled elements are stored at ``dtv_property.stat.len``.
2854f38fcaSMauro Carvalho Chehab
2954f38fcaSMauro Carvalho ChehabEach element of the ``dtv_property.stat.dtv_stats`` array consists on
3054f38fcaSMauro Carvalho Chehabtwo elements:
3154f38fcaSMauro Carvalho Chehab
3254f38fcaSMauro Carvalho Chehab-  ``svalue`` or ``uvalue``, where ``svalue`` is for signed values of
3354f38fcaSMauro Carvalho Chehab   the measure (dB measures) and ``uvalue`` is for unsigned values
3454f38fcaSMauro Carvalho Chehab   (counters, relative scale)
3554f38fcaSMauro Carvalho Chehab
3654f38fcaSMauro Carvalho Chehab-  ``scale`` - Scale for the value. It can be:
3754f38fcaSMauro Carvalho Chehab
3854f38fcaSMauro Carvalho Chehab   -  ``FE_SCALE_NOT_AVAILABLE`` - The parameter is supported by the
3954f38fcaSMauro Carvalho Chehab      frontend, but it was not possible to collect it (could be a
4054f38fcaSMauro Carvalho Chehab      transitory or permanent condition)
4154f38fcaSMauro Carvalho Chehab
4254f38fcaSMauro Carvalho Chehab   -  ``FE_SCALE_DECIBEL`` - parameter is a signed value, measured in
4354f38fcaSMauro Carvalho Chehab      1/1000 dB
4454f38fcaSMauro Carvalho Chehab
4554f38fcaSMauro Carvalho Chehab   -  ``FE_SCALE_RELATIVE`` - parameter is a unsigned value, where 0
4654f38fcaSMauro Carvalho Chehab      means 0% and 65535 means 100%.
4754f38fcaSMauro Carvalho Chehab
4854f38fcaSMauro Carvalho Chehab   -  ``FE_SCALE_COUNTER`` - parameter is a unsigned value that counts
4954f38fcaSMauro Carvalho Chehab      the occurrence of an event, like bit error, block error, or lapsed
5054f38fcaSMauro Carvalho Chehab      time.
5154f38fcaSMauro Carvalho Chehab
5254f38fcaSMauro Carvalho Chehab
5354f38fcaSMauro Carvalho Chehab.. _DTV-STAT-SIGNAL-STRENGTH:
5454f38fcaSMauro Carvalho Chehab
5554f38fcaSMauro Carvalho ChehabDTV_STAT_SIGNAL_STRENGTH
5654f38fcaSMauro Carvalho Chehab========================
5754f38fcaSMauro Carvalho Chehab
5854f38fcaSMauro Carvalho ChehabIndicates the signal strength level at the analog part of the tuner or
5954f38fcaSMauro Carvalho Chehabof the demod.
6054f38fcaSMauro Carvalho Chehab
6154f38fcaSMauro Carvalho ChehabPossible scales for this metric are:
6254f38fcaSMauro Carvalho Chehab
6354f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the
6454f38fcaSMauro Carvalho Chehab   measurement was not complete yet.
6554f38fcaSMauro Carvalho Chehab
6654f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_DECIBEL`` - signal strength is in 0.001 dBm units, power
6754f38fcaSMauro Carvalho Chehab   measured in miliwatts. This value is generally negative.
6854f38fcaSMauro Carvalho Chehab
6954f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_RELATIVE`` - The frontend provides a 0% to 100%
7054f38fcaSMauro Carvalho Chehab   measurement for power (actually, 0 to 65535).
7154f38fcaSMauro Carvalho Chehab
7254f38fcaSMauro Carvalho Chehab
7354f38fcaSMauro Carvalho Chehab.. _DTV-STAT-CNR:
7454f38fcaSMauro Carvalho Chehab
7554f38fcaSMauro Carvalho ChehabDTV_STAT_CNR
7654f38fcaSMauro Carvalho Chehab============
7754f38fcaSMauro Carvalho Chehab
7854f38fcaSMauro Carvalho ChehabIndicates the Signal to Noise ratio for the main carrier.
7954f38fcaSMauro Carvalho Chehab
8054f38fcaSMauro Carvalho ChehabPossible scales for this metric are:
8154f38fcaSMauro Carvalho Chehab
8254f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the
8354f38fcaSMauro Carvalho Chehab   measurement was not complete yet.
8454f38fcaSMauro Carvalho Chehab
8554f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_DECIBEL`` - Signal/Noise ratio is in 0.001 dB units.
8654f38fcaSMauro Carvalho Chehab
8754f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_RELATIVE`` - The frontend provides a 0% to 100%
8854f38fcaSMauro Carvalho Chehab   measurement for Signal/Noise (actually, 0 to 65535).
8954f38fcaSMauro Carvalho Chehab
9054f38fcaSMauro Carvalho Chehab
9154f38fcaSMauro Carvalho Chehab.. _DTV-STAT-PRE-ERROR-BIT-COUNT:
9254f38fcaSMauro Carvalho Chehab
9354f38fcaSMauro Carvalho ChehabDTV_STAT_PRE_ERROR_BIT_COUNT
9454f38fcaSMauro Carvalho Chehab============================
9554f38fcaSMauro Carvalho Chehab
9654f38fcaSMauro Carvalho ChehabMeasures the number of bit errors before the forward error correction
9754f38fcaSMauro Carvalho Chehab(FEC) on the inner coding block (before Viterbi, LDPC or other inner
9854f38fcaSMauro Carvalho Chehabcode).
9954f38fcaSMauro Carvalho Chehab
10054f38fcaSMauro Carvalho ChehabThis measure is taken during the same interval as
10154f38fcaSMauro Carvalho Chehab``DTV_STAT_PRE_TOTAL_BIT_COUNT``.
10254f38fcaSMauro Carvalho Chehab
10354f38fcaSMauro Carvalho ChehabIn order to get the BER (Bit Error Rate) measurement, it should be
10454f38fcaSMauro Carvalho Chehabdivided by
10554f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_PRE_TOTAL_BIT_COUNT <DTV-STAT-PRE-TOTAL-BIT-COUNT>`.
10654f38fcaSMauro Carvalho Chehab
10754f38fcaSMauro Carvalho ChehabThis measurement is monotonically increased, as the frontend gets more
10854f38fcaSMauro Carvalho Chehabbit count measurements. The frontend may reset it when a
10954f38fcaSMauro Carvalho Chehabchannel/transponder is tuned.
11054f38fcaSMauro Carvalho Chehab
11154f38fcaSMauro Carvalho ChehabPossible scales for this metric are:
11254f38fcaSMauro Carvalho Chehab
11354f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the
11454f38fcaSMauro Carvalho Chehab   measurement was not complete yet.
11554f38fcaSMauro Carvalho Chehab
11654f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_COUNTER`` - Number of error bits counted before the inner
11754f38fcaSMauro Carvalho Chehab   coding.
11854f38fcaSMauro Carvalho Chehab
11954f38fcaSMauro Carvalho Chehab
12054f38fcaSMauro Carvalho Chehab.. _DTV-STAT-PRE-TOTAL-BIT-COUNT:
12154f38fcaSMauro Carvalho Chehab
12254f38fcaSMauro Carvalho ChehabDTV_STAT_PRE_TOTAL_BIT_COUNT
12354f38fcaSMauro Carvalho Chehab============================
12454f38fcaSMauro Carvalho Chehab
12554f38fcaSMauro Carvalho ChehabMeasures the amount of bits received before the inner code block, during
12654f38fcaSMauro Carvalho Chehabthe same period as
12754f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_PRE_ERROR_BIT_COUNT <DTV-STAT-PRE-ERROR-BIT-COUNT>`
12854f38fcaSMauro Carvalho Chehabmeasurement was taken.
12954f38fcaSMauro Carvalho Chehab
13054f38fcaSMauro Carvalho ChehabIt should be noted that this measurement can be smaller than the total
13154f38fcaSMauro Carvalho Chehabamount of bits on the transport stream, as the frontend may need to
13254f38fcaSMauro Carvalho Chehabmanually restart the measurement, losing some data between each
13354f38fcaSMauro Carvalho Chehabmeasurement interval.
13454f38fcaSMauro Carvalho Chehab
13554f38fcaSMauro Carvalho ChehabThis measurement is monotonically increased, as the frontend gets more
13654f38fcaSMauro Carvalho Chehabbit count measurements. The frontend may reset it when a
13754f38fcaSMauro Carvalho Chehabchannel/transponder is tuned.
13854f38fcaSMauro Carvalho Chehab
13954f38fcaSMauro Carvalho ChehabPossible scales for this metric are:
14054f38fcaSMauro Carvalho Chehab
14154f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the
14254f38fcaSMauro Carvalho Chehab   measurement was not complete yet.
14354f38fcaSMauro Carvalho Chehab
14454f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_COUNTER`` - Number of bits counted while measuring
14554f38fcaSMauro Carvalho Chehab   :ref:`DTV_STAT_PRE_ERROR_BIT_COUNT <DTV-STAT-PRE-ERROR-BIT-COUNT>`.
14654f38fcaSMauro Carvalho Chehab
14754f38fcaSMauro Carvalho Chehab
14854f38fcaSMauro Carvalho Chehab.. _DTV-STAT-POST-ERROR-BIT-COUNT:
14954f38fcaSMauro Carvalho Chehab
15054f38fcaSMauro Carvalho ChehabDTV_STAT_POST_ERROR_BIT_COUNT
15154f38fcaSMauro Carvalho Chehab=============================
15254f38fcaSMauro Carvalho Chehab
15354f38fcaSMauro Carvalho ChehabMeasures the number of bit errors after the forward error correction
15454f38fcaSMauro Carvalho Chehab(FEC) done by inner code block (after Viterbi, LDPC or other inner
15554f38fcaSMauro Carvalho Chehabcode).
15654f38fcaSMauro Carvalho Chehab
15754f38fcaSMauro Carvalho ChehabThis measure is taken during the same interval as
15854f38fcaSMauro Carvalho Chehab``DTV_STAT_POST_TOTAL_BIT_COUNT``.
15954f38fcaSMauro Carvalho Chehab
16054f38fcaSMauro Carvalho ChehabIn order to get the BER (Bit Error Rate) measurement, it should be
16154f38fcaSMauro Carvalho Chehabdivided by
16254f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_POST_TOTAL_BIT_COUNT <DTV-STAT-POST-TOTAL-BIT-COUNT>`.
16354f38fcaSMauro Carvalho Chehab
16454f38fcaSMauro Carvalho ChehabThis measurement is monotonically increased, as the frontend gets more
16554f38fcaSMauro Carvalho Chehabbit count measurements. The frontend may reset it when a
16654f38fcaSMauro Carvalho Chehabchannel/transponder is tuned.
16754f38fcaSMauro Carvalho Chehab
16854f38fcaSMauro Carvalho ChehabPossible scales for this metric are:
16954f38fcaSMauro Carvalho Chehab
17054f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the
17154f38fcaSMauro Carvalho Chehab   measurement was not complete yet.
17254f38fcaSMauro Carvalho Chehab
17354f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_COUNTER`` - Number of error bits counted after the inner
17454f38fcaSMauro Carvalho Chehab   coding.
17554f38fcaSMauro Carvalho Chehab
17654f38fcaSMauro Carvalho Chehab
17754f38fcaSMauro Carvalho Chehab.. _DTV-STAT-POST-TOTAL-BIT-COUNT:
17854f38fcaSMauro Carvalho Chehab
17954f38fcaSMauro Carvalho ChehabDTV_STAT_POST_TOTAL_BIT_COUNT
18054f38fcaSMauro Carvalho Chehab=============================
18154f38fcaSMauro Carvalho Chehab
18254f38fcaSMauro Carvalho ChehabMeasures the amount of bits received after the inner coding, during the
18354f38fcaSMauro Carvalho Chehabsame period as
18454f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_POST_ERROR_BIT_COUNT <DTV-STAT-POST-ERROR-BIT-COUNT>`
18554f38fcaSMauro Carvalho Chehabmeasurement was taken.
18654f38fcaSMauro Carvalho Chehab
18754f38fcaSMauro Carvalho ChehabIt should be noted that this measurement can be smaller than the total
18854f38fcaSMauro Carvalho Chehabamount of bits on the transport stream, as the frontend may need to
18954f38fcaSMauro Carvalho Chehabmanually restart the measurement, losing some data between each
19054f38fcaSMauro Carvalho Chehabmeasurement interval.
19154f38fcaSMauro Carvalho Chehab
19254f38fcaSMauro Carvalho ChehabThis measurement is monotonically increased, as the frontend gets more
19354f38fcaSMauro Carvalho Chehabbit count measurements. The frontend may reset it when a
19454f38fcaSMauro Carvalho Chehabchannel/transponder is tuned.
19554f38fcaSMauro Carvalho Chehab
19654f38fcaSMauro Carvalho ChehabPossible scales for this metric are:
19754f38fcaSMauro Carvalho Chehab
19854f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the
19954f38fcaSMauro Carvalho Chehab   measurement was not complete yet.
20054f38fcaSMauro Carvalho Chehab
20154f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_COUNTER`` - Number of bits counted while measuring
20254f38fcaSMauro Carvalho Chehab   :ref:`DTV_STAT_POST_ERROR_BIT_COUNT <DTV-STAT-POST-ERROR-BIT-COUNT>`.
20354f38fcaSMauro Carvalho Chehab
20454f38fcaSMauro Carvalho Chehab
20554f38fcaSMauro Carvalho Chehab.. _DTV-STAT-ERROR-BLOCK-COUNT:
20654f38fcaSMauro Carvalho Chehab
20754f38fcaSMauro Carvalho ChehabDTV_STAT_ERROR_BLOCK_COUNT
20854f38fcaSMauro Carvalho Chehab==========================
20954f38fcaSMauro Carvalho Chehab
21054f38fcaSMauro Carvalho ChehabMeasures the number of block errors after the outer forward error
21154f38fcaSMauro Carvalho Chehabcorrection coding (after Reed-Solomon or other outer code).
21254f38fcaSMauro Carvalho Chehab
21354f38fcaSMauro Carvalho ChehabThis measurement is monotonically increased, as the frontend gets more
21454f38fcaSMauro Carvalho Chehabbit count measurements. The frontend may reset it when a
21554f38fcaSMauro Carvalho Chehabchannel/transponder is tuned.
21654f38fcaSMauro Carvalho Chehab
21754f38fcaSMauro Carvalho ChehabPossible scales for this metric are:
21854f38fcaSMauro Carvalho Chehab
21954f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the
22054f38fcaSMauro Carvalho Chehab   measurement was not complete yet.
22154f38fcaSMauro Carvalho Chehab
22254f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_COUNTER`` - Number of error blocks counted after the outer
22354f38fcaSMauro Carvalho Chehab   coding.
22454f38fcaSMauro Carvalho Chehab
22554f38fcaSMauro Carvalho Chehab
22654f38fcaSMauro Carvalho Chehab.. _DTV-STAT-TOTAL-BLOCK-COUNT:
22754f38fcaSMauro Carvalho Chehab
22854f38fcaSMauro Carvalho ChehabDTV-STAT_TOTAL_BLOCK_COUNT
22954f38fcaSMauro Carvalho Chehab==========================
23054f38fcaSMauro Carvalho Chehab
23154f38fcaSMauro Carvalho ChehabMeasures the total number of blocks received during the same period as
23254f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_ERROR_BLOCK_COUNT <DTV-STAT-ERROR-BLOCK-COUNT>`
23354f38fcaSMauro Carvalho Chehabmeasurement was taken.
23454f38fcaSMauro Carvalho Chehab
23554f38fcaSMauro Carvalho ChehabIt can be used to calculate the PER indicator, by dividing
23654f38fcaSMauro Carvalho Chehab:ref:`DTV_STAT_ERROR_BLOCK_COUNT <DTV-STAT-ERROR-BLOCK-COUNT>` by
23754f38fcaSMauro Carvalho Chehab:ref:`DTV-STAT-TOTAL-BLOCK-COUNT`.
23854f38fcaSMauro Carvalho Chehab
23954f38fcaSMauro Carvalho ChehabPossible scales for this metric are:
24054f38fcaSMauro Carvalho Chehab
24154f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_NOT_AVAILABLE`` - it failed to measure it, or the
24254f38fcaSMauro Carvalho Chehab   measurement was not complete yet.
24354f38fcaSMauro Carvalho Chehab
24454f38fcaSMauro Carvalho Chehab-  ``FE_SCALE_COUNTER`` - Number of blocks counted while measuring
24554f38fcaSMauro Carvalho Chehab   :ref:`DTV_STAT_ERROR_BLOCK_COUNT <DTV-STAT-ERROR-BLOCK-COUNT>`.
246