[linux-dvb] snr on Airstar HD5000?

Mike Krufky mkrufky at linuxtv.org
Mon Sep 26 16:32:42 CEST 2005


Geoffrey Hausheer wrote:

>Is there any way to get the SNR with the current drivers for an HD5000?
>I applied Taylor's patch to 2.6.13.2, and had no real problem getting
>my HD5000 up and running.  azap returns that a channel lock has
>occurred, and I can record just fine, but azap always reports snr as
>'ffff'.  I know that my signal is marginal (I initially set the card
>up in windows, and was only able to squeak out a SNR of ~17 on PBS,
>but this was good enough to get reliable picture and sound).  I need
>to go outside and re-aim my antenna (for some reason, I can only get a
>strong signal when my directional all-band is pointed backwards at the
>transmitter), but I'd like to have the SNR available before I do that.
>azap normally shows signal=00000, snr=ffff. ber=00000, unc=000000,
>status=0x1f and flags=FE_HAS_LOCK
>though I'll occasionally see unc jump up a bit.
>
>I don't want to seem impatient, I am very happy that the card works in
>linux as is, but I'm just wondering if I did something wrong or
>whether these stats aren't available with this card yet.
>  
>
The issue that you're describing is with the frontend driver, not the 
card driver.  Mac has written an explanation of why this feature hasn't 
been implemented:

Mac Michaels wrote:

>This whole thing is kind of ugly for the lgdt330x chips. 
>They do not provide signal strength directly. Thus I do not 
>provide a signal strength. It is always set to 0.
>
>An Equalizer/Phase Tracker Mean Square Error value is 
>available VSB. Only Phase Tracker MSE is available for QAM. 
>This can be converted to signal to noise ratio (SNR) in db 
>with the formula:
>
>SNR=10 log(25600/MSE)
>
>where log is base 10 and MSE is either of the two readings. 
>For the lgdt3303 one reading is 19 bits long and the other 
>is 20 bits long. For the lgdt3302 both values are 19 bits 
>long, but the formulas are different from that above.
>
>Unfortunately the variable used to return the result is 
>unsigned 16 bits long so the values must be truncated.
>lgdt330x driver returns the truncated raw MSE value.
>
>If the variable were longer the full value could be returned 
>without arbitrary truncation.
>
>If the variable were signed the driver could return the SNR 
>value in db. It must be signed because the formula returns 
>a negative value when the signal is less than the noise or 
>a positive value when the signal is greater than the noise. 
>The calculation is made using lookup tables since floating 
>point math is not allowed in kernel drivers.
>
...so I don't know if that's gonna happen anytime soon.  At least it 
works!  ;-)

-- 
Michael Krufky





More information about the linux-dvb mailing list