Commit 7cccccc3 authored by Hartmut Birr's avatar Hartmut Birr Committed by Mauro Carvalho Chehab

V4L/DVB (6500): tda10021: Fix reported signal strength

Fix reported signal strength value (higher value = higher signal strength).
Signed-off-by: default avatarHartmut Birr <e9hack@googlemail.com>
Signed-off-by: default avatarOliver Endriss <o.endriss@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 3de0e18b
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment