mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 16:58:53 +00:00
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>
This commit is contained in:
parent
3de0e18b3a
commit
7cccccc33a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user