From 9482af64902c6c5b7e30225a15163f10d8484547 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 29 Oct 2006 11:35:39 -0500 Subject: lgdt330x: SNR and signal strength reporting From: Trent Piepho Update the SNR calculations to use the new dvb_math log function, and add SNR calculations for all supported modulations for both lg dt3302 and dt3303. The QAM equations don't appear in the dt3302 datasheet, so the ones from the dt3303 datasheet were used. SNR returned is the actual value in dB as 8.8 fixed point. Reporting of real signal strength isn't supported, so rather than return 0, which confuses some software and users, a re-scaled SNR value is returned. Code originally by Rusty Scott. Signed-off-by: Trent Piepho Signed-off-by: Rusty Scott Signed-off-by: Michael Krufky --- linux/drivers/media/dvb/frontends/lgdt330x_priv.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'linux/drivers/media/dvb/frontends/lgdt330x_priv.h') diff --git a/linux/drivers/media/dvb/frontends/lgdt330x_priv.h b/linux/drivers/media/dvb/frontends/lgdt330x_priv.h index 59b7c5b90..38c76695a 100644 --- a/linux/drivers/media/dvb/frontends/lgdt330x_priv.h +++ b/linux/drivers/media/dvb/frontends/lgdt330x_priv.h @@ -51,14 +51,19 @@ enum I2C_REG { AGC_RFIF_ACC2= 0x3b, AGC_STATUS= 0x3f, SYNC_STATUS_VSB= 0x43, - EQPH_ERR0= 0x47, - EQ_ERR1= 0x48, - EQ_ERR2= 0x49, - PH_ERR1= 0x4a, - PH_ERR2= 0x4b, DEMUX_CONTROL= 0x66, + LGDT3302_EQPH_ERR0= 0x47, + LGDT3302_EQ_ERR1= 0x48, + LGDT3302_EQ_ERR2= 0x49, + LGDT3302_PH_ERR1= 0x4a, + LGDT3302_PH_ERR2= 0x4b, LGDT3302_PACKET_ERR_COUNTER1= 0x6a, LGDT3302_PACKET_ERR_COUNTER2= 0x6b, + LGDT3303_EQPH_ERR0= 0x6e, + LGDT3303_EQ_ERR1= 0x6f, + LGDT3303_EQ_ERR2= 0x70, + LGDT3303_PH_ERR1= 0x71, + LGDT3303_PH_ERR2= 0x72, LGDT3303_PACKET_ERR_COUNTER1= 0x8b, LGDT3303_PACKET_ERR_COUNTER2= 0x8c, }; -- cgit v1.2.3