summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorOliver Endriss <o.endriss@gmx.de>2007-10-31 05:57:58 +0100
committerOliver Endriss <o.endriss@gmx.de>2007-10-31 05:57:58 +0100
commitf5d1f46b23c95589967bec81e4e60ff51b56b4d7 (patch)
treec31af9da2bfde144341faf3211ea9a3fd4f0f3dd /linux/drivers/media/dvb/frontends
parent49b0c68c88ca349c8b1282e8e7d1efa9526af866 (diff)
downloadmediapointer-dvb-s2-f5d1f46b23c95589967bec81e4e60ff51b56b4d7.tar.gz
mediapointer-dvb-s2-f5d1f46b23c95589967bec81e4e60ff51b56b4d7.tar.bz2
tda10021: Fix reported signal strength
From: Hartmut Birr <e9hack@googlemail.com> Fix reported signal strength value (higher value = higher signal strength). Signed-off-by: Hartmut Birr <e9hack@googlemail.com> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Diffstat (limited to 'linux/drivers/media/dvb/frontends')
-rw-r--r--linux/drivers/media/dvb/frontends/tda10021.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda10021.c b/linux/drivers/media/dvb/frontends/tda10021.c
index 832817a30..68a1103c9 100644
--- a/linux/drivers/media/dvb/frontends/tda10021.c
+++ b/linux/drivers/media/dvb/frontends/tda10021.c
@@ -312,7 +312,11 @@ static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength)
{
struct tda10021_state* state = fe->demodulator_priv;
+ u8 config = tda10021_readreg(state, 0x02);
u8 gain = tda10021_readreg(state, 0x17);
+ if (config & 0x02)
+ /* the agc value is inverted */
+ gain = ~gain;
*strength = (gain << 8) | gain;
return 0;