Lines Matching +full:full +full:- +full:scale
1 .. SPDX-License-Identifier: GPL-2.0
4 ------------------------
9 The Digital TV Frontend kABI defines a driver-internal interface for
10 registering low-level, hardware specific driver to a hardware independent
29 .name = "foo DVB-T/T2/C driver",
70 .name = "Bar DVB-S/S2 demodulator",
91 /* Satellite-specific */
100 #) For satellite digital TV standards (DVB-S, DVB-S2, ISDB-S), the
129 ``DVBFE_ALGO_SW``, meaning that the dvb-core will do a zigzag when tuning,
131 then, it will do ``f`` + |delta|, ``f`` - |delta|, ``f`` + 2 x |delta|,
132 ``f`` - 2 x |delta| and so on.
141 define its own hardware-assisted algorithm. Very few hardware need to
173 :ref:`statistics <frontend-stat-properties>` meant to help tuning the device
176 For each statistics measurement, the driver should set the type of scale used,
182 scale at its init code. For example, if the frontend provides signal
185 struct dtv_frontend_properties *c = &state->fe.dtv_property_cache;
187 c->strength.len = 1;
188 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
190 And, when the statistics got updated, set the scale::
192 c->strength.stat[0].scale = FE_SCALE_DECIBEL;
193 c->strength.stat[0].uvalue = strength;
195 .. [#f2] For ISDB-T, it may provide both a global statistics and a per-layer
199 - c->cnr.stat[0] for global S/N carrier ratio,
200 - c->cnr.stat[1] for Layer A S/N carrier ratio,
201 - c->cnr.stat[2] for layer B S/N carrier ratio,
202 - c->cnr.stat[3] for layer C S/N carrier ratio.
212 Signal strength (:ref:`DTV-STAT-SIGNAL-STRENGTH`)
213 - Measures the signal strength level at the analog part of the tuner or
216 - Typically obtained from the gain applied to the tuner and/or frontend
220 - As the gain is visible through the set of registers that adjust the gain,
223 - Drivers should try to make it available all the times, as these statistics
232 Carrier Signal to Noise ratio (:ref:`DTV-STAT-CNR`)
233 - Signal to Noise ratio for the main carrier.
235 - Signal to Noise measurement depends on the device. On some hardware, it is
246 Bit counts post-FEC (:ref:`DTV-STAT-POST-ERROR-BIT-COUNT` and :ref:`DTV-STAT-POST-TOTAL-BIT-COUNT`)
247 - Those counters measure the number of bits and bit errors after
251 - Due to its nature, those statistics depend on full coding lock
255 Bit counts pre-FEC (:ref:`DTV-STAT-PRE-ERROR-BIT-COUNT` and :ref:`DTV-STAT-PRE-TOTAL-BIT-COUNT`)
256 - Those counters measure the number of bits and bit errors before
260 - Not all frontends provide this kind of statistics.
262 - Due to its nature, those statistics depend on inner coding lock (e. g.
265 Block counts (:ref:`DTV-STAT-ERROR-BLOCK-COUNT` and :ref:`DTV-STAT-TOTAL-BLOCK-COUNT`)
266 - Those counters measure the number of blocks and block errors after
270 - Due to its nature, those statistics depend on full coding lock
281 struct foo_state *state = fe->demodulator_priv;
282 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
297 if (!(fe->status & FE_HAS_CARRIER))
304 /* Check if pre-BER stats are available */
305 if (!(fe->status & FE_HAS_VITERBI))
312 /* Check if post-BER stats are available */
313 if (!(fe->status & FE_HAS_SYNC))
351 struct foo_state *state = fe->demodulator_priv;
352 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
373 c->pre_bit_error.stat[0].scale = FE_SCALE_COUNTER;
374 c->pre_bit_error.stat[0].uvalue += bit_error;
375 c->pre_bit_count.stat[0].scale = FE_SCALE_COUNTER;
376 c->pre_bit_count.stat[0].uvalue += rc;
402 struct foo_state *state = fe->demodulator_priv;
403 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
408 if (!time_after(jiffies, state->per_jiffies_stats))
412 state->per_jiffies_stats = jiffies + msecs_to_jiffies(1000);
426 c->pre_bit_error.stat[0].scale = FE_SCALE_COUNTER;
427 c->pre_bit_error.stat[0].uvalue += bit_error;
428 c->pre_bit_count.stat[0].scale = FE_SCALE_COUNTER;
429 c->pre_bit_count.stat[0].uvalue += bits;
445 .. kernel-doc:: include/media/dvb_frontend.h