提交 7cccccc3 编写于 作者: H Hartmut Birr 提交者: Mauro Carvalho Chehab

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

Fix reported signal strength value (higher value = higher signal strength).
Signed-off-by: NHartmut Birr <e9hack@googlemail.com>
Signed-off-by: NOliver Endriss <o.endriss@gmx.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 3de0e18b
...@@ -312,7 +312,11 @@ static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength) ...@@ -312,7 +312,11 @@ static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength)
{ {
struct tda10021_state* state = fe->demodulator_priv; struct tda10021_state* state = fe->demodulator_priv;
u8 config = tda10021_readreg(state, 0x02);
u8 gain = tda10021_readreg(state, 0x17); u8 gain = tda10021_readreg(state, 0x17);
if (config & 0x02)
/* the agc value is inverted */
gain = ~gain;
*strength = (gain << 8) | gain; *strength = (gain << 8) | gain;
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册