Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7cccccc33aa9ab7171ca05c0b59c62912509b23e
Commit:     7cccccc33aa9ab7171ca05c0b59c62912509b23e
Parent:     3de0e18b3a5860a296bcff3d94400f3b30b02c86
Author:     Hartmut Birr <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 31 01:57:58 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Sun Nov 4 21:41:25 2007 -0200

    V4L/DVB (6500): tda10021: Fix reported signal strength
    
    Fix reported signal strength value (higher value = higher signal strength).
    
    Signed-off-by: Hartmut Birr <[EMAIL PROTECTED]>
    Signed-off-by: Oliver Endriss <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/dvb/frontends/tda10021.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/tda10021.c 
b/drivers/media/dvb/frontends/tda10021.c
index 5ee7298..45137d2 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)
 {
        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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to