Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Needs to get the SNR value in dB, with dvbtune



Johannes Stezenbach wrote:
Samuel Torton wrote:

In order to get the SNR value, I used the following lines in the
"tune.c" source code:
     ------------------------------------------
     strength=0;
     ioctl(fd_frontend,FE_READ_SNR,&strength);
     fprintf(stderr,"SNR: %d\n",strength);
     ------------------------------------------

My questions are :
- What's the unit of the value FE_READ_SNR to be displayed ?
 Usually, a big number is displayed, but I want to display this value
 in dB, so is there any math formulae to apply, in order to get
 this value in dB ?
 If yes, what is it ? (*)
- Same questions for FE_READ_BER, FE_READ_SIGNAL_STRENGTH

The values SNR and signal strength are whatever the frontend hardware
gives us, possibly stretched into a range of 0..0xffff.
not possibly, they're always scaled into the 0...0xffff range. SNR values and signal strengths of 0 are bad, values of 0xffff are too good to be true.

For the BER, I don't even know...
BER and UNC (uncorrected packet count) is measured in absolute bit errors between 2 measurements. 0xffffffff means a counter overflow.


(*) For example, if I install this DVB card on a Windows box, with
WinTV software tools on Windows, I can see the SNR level in a color bar,
and the value expressed in dB, such as in the example provided in this
image: http://www.hauppauge.fr/sup/cap/nexus2.jpg

We don't know how to convert the values from the hardware into dB,
because a) we don't have enough information about the hardware,
That's not really true, some frontend vendors provide fomulas to perform the calculations, but not all. And for those ones who provide it you have to be really carefully -- the results are not very consistent.

So we decided a while ago to remove the absolute scale and just pass the values to user space we get from the hardware.

And be honest: no end user really needs absolute values, they usually want to see a good-bad indicator between 0 and 100%.


b) we don't have time to do it by experimentation.

Patches are probably welcome, check with Holger.
no. Absolute values make no sense without calibration, why should we keep an API which is impossible to implement?

I also doubt that the values that WinTV displays are calibrated, they
might be off by some considerable amount. After all the DVB cards are
not made for signal measurements.
agreed.

Holger



--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index