Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aaeccba68a60eedee5fe90f9e1478367b1f97345
Commit:     aaeccba68a60eedee5fe90f9e1478367b1f97345
Parent:     293da0ec468addf891856e9ffee88af2fd00e25a
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Sun Dec 2 11:03:57 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:03:13 2008 -0200

    V4L/DVB (6726): tda18271: set image rejection validity
    
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/dvb/frontends/tda18271-fe.c     |   11 ++++++++++-
 drivers/media/dvb/frontends/tda18271-priv.h   |    1 +
 drivers/media/dvb/frontends/tda18271-tables.c |    8 ++++++++
 3 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/frontends/tda18271-fe.c 
b/drivers/media/dvb/frontends/tda18271-fe.c
index 01de75e..fee38c1 100644
--- a/drivers/media/dvb/frontends/tda18271-fe.c
+++ b/drivers/media/dvb/frontends/tda18271-fe.c
@@ -578,7 +578,16 @@ static int tda18271_tune(struct dvb_frontend *fe,
 
        regs[R_EP4]  &= ~0x80; /* turn this bit on only for fm */
 
-       /* FIXME: image rejection validity EP5[2:0] */
+       /* image rejection validity EP5[2:0] */
+       i = 0;
+       while ((tda18271_ir_measure[i].rfmax * 1000) < freq) {
+               if (tda18271_ir_measure[i].rfmax == 0)
+                       break;
+               i++;
+       }
+       dbg_map("ir measure, i = %d\n", i);
+       regs[R_EP5] &= ~0x07;
+       regs[R_EP5] |= tda18271_ir_measure[i].val;
 
        /* calculate MAIN PLL */
        N = freq + ifc;
diff --git a/drivers/media/dvb/frontends/tda18271-priv.h 
b/drivers/media/dvb/frontends/tda18271-priv.h
index 71b4d79..a3158eb 100644
--- a/drivers/media/dvb/frontends/tda18271-priv.h
+++ b/drivers/media/dvb/frontends/tda18271-priv.h
@@ -84,6 +84,7 @@ extern struct tda18271_map tda18271_km[];
 extern struct tda18271_map tda18271_rf_band[];
 extern struct tda18271_map tda18271_gain_taper[];
 extern struct tda18271_map tda18271_rf_cal[];
+extern struct tda18271_map tda18271_ir_measure[];
 
 #endif /* __TDA18271_PRIV_H__ */
 
diff --git a/drivers/media/dvb/frontends/tda18271-tables.c 
b/drivers/media/dvb/frontends/tda18271-tables.c
index a018b51..d65d341 100644
--- a/drivers/media/dvb/frontends/tda18271-tables.c
+++ b/drivers/media/dvb/frontends/tda18271-tables.c
@@ -244,6 +244,14 @@ struct tda18271_map tda18271_rf_cal[] = {
        { .rfmax =     0, .val = 0x00 }, /* end */
 };
 
+struct tda18271_map tda18271_ir_measure[] = {
+       { .rfmax =  30000, .val = 4},
+       { .rfmax = 200000, .val = 5},
+       { .rfmax = 600000, .val = 6},
+       { .rfmax = 865000, .val = 7},
+       { .rfmax =      0, .val = 0}, /* end */
+};
+
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * ---------------------------------------------------------------------------
-
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