[linux-dvb] How do I turn the signal/noise, siganl strength into meaningful values?

Johannes Stezenbach js at linuxtv.org
Mon Jun 20 17:00:36 CEST 2005


Please do not top-post!

On Mon, Jun 20, 2005 at 09:13:06AM -0500, Mac Michaels wrote:
> On Monday 20 June 2005 06:13 am, Barry Scott wrote:
> > Using the FE_READ_SIGNAL_STRENGTH, FE_READ_SNR and
> > FE_READ_BER I get numbers but need to understand how to
> > turn them into useful to humans values.
> >
> > I'm using AverMedia 771 DVB-T card and Pinnacle PCTV-SAT
> > on 2.6.11 for FC3.
> >
> > First observation is that FE_READ_SIGNAL_STRENGTH values
> > seen to be smaller for larger signals.
> > Second observation use that FE_READ_SNR always duplicates
> > bits 0-7 in 8-15, why?

That's a bug in the frontend driver (which one?) then.
Greater values mean higher signal strength. (The hardware
usually supplied an AGC (automatic gain control) value,
where a higher value means more gain in the input amplifier
and thus a lower signal strength.

So far we chose not to implement a logarithm function to convert
the value from the hardware into dB. The value from the hardware
(usually an 8bit unsigned) is just scaled to fit the
16bit allowed by the API (multiply by 257, which is
equivalent to (val << 8 | val).

I think the author of the OREN frontend drivers implemented
a logarithm function, if someone would put some work into
it it could be factored out and made usable for other
frontend drivers.

You won't get an absolute value (e.g. dBuV) without
calibrating the implementation with expensive measurement
equipment, though...

> In my question concerned FE_READ_SNR. My driver computes the 
> SNR in db and returns that. Since the data type was signed 
> I assumed that was the expected value. I return negative 
> numbers for no signal and small positive numbers i.e. 18+ 
> for reasonable signals. The actual SNR value is computed 
> from raw data supplied by the demod chip.

The DVB API uses unsigned data types.

> The v4l2 specification might be amended to include more 
> information in the info struct. Applications can then know 
> the units of the various signal conditions reported by the 
> driver. This could be decibels, tenths of decibels, 
> microvolts, raw data, percent full scale, errors per 
> second, etc.

Most frontend specs don't give clear indication what
units the provided values are in.

Live with it.

Johannes




More information about the linux-dvb mailing list