aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorHartmut Birr <e9hack@googlemail.com>2007-10-31 00:57:58 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-04 18:41:25 -0500
commit7cccccc33aa9ab7171ca05c0b59c62912509b23e (patch)
tree1f2fc8be2d4e5e7c76172df335cdf32acbf7aef8 /drivers/media/dvb
parent3de0e18b3a5860a296bcff3d94400f3b30b02c86 (diff)
V4L/DVB (6500): tda10021: Fix reported signal strength
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/frontends/tda10021.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c
index 5ee729846a9f..45137d2ebfb9 100644
--- a/drivers/media/dvb/frontends/tda10021.c
+++ b/drivers/media/dvb/frontends/tda10021.c
@@ -312,7 +312,11 @@ static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength)
312{ 312{
313 struct tda10021_state* state = fe->demodulator_priv; 313 struct tda10021_state* state = fe->demodulator_priv;
314 314
315 u8 config = tda10021_readreg(state, 0x02);
315 u8 gain = tda10021_readreg(state, 0x17); 316 u8 gain = tda10021_readreg(state, 0x17);
317 if (config & 0x02)
318 /* the agc value is inverted */
319 gain = ~gain;
316 *strength = (gain << 8) | gain; 320 *strength = (gain << 8) | gain;
317 321
318 return 0; 322 return 0;