diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-02 09:03:57 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-02 09:03:57 -0500 |
commit | f4fea806a1d15163ee19b12a8755446d076c25fb (patch) | |
tree | 866aaebad92162051c5ff15f5af4383a569bfe48 | |
parent | a5fdd04aa2921408778fc074e2af92ff3a9a409b (diff) | |
download | mediapointer-dvb-s2-f4fea806a1d15163ee19b12a8755446d076c25fb.tar.gz mediapointer-dvb-s2-f4fea806a1d15163ee19b12a8755446d076c25fb.tar.bz2 |
tda18271: set image rejection validity
From: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda18271-fe.c | 11 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda18271-priv.h | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda18271-tables.c | 8 |
3 files changed, 19 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda18271-fe.c b/linux/drivers/media/dvb/frontends/tda18271-fe.c index 981596371..b2baff34c 100644 --- a/linux/drivers/media/dvb/frontends/tda18271-fe.c +++ b/linux/drivers/media/dvb/frontends/tda18271-fe.c @@ -584,7 +584,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/linux/drivers/media/dvb/frontends/tda18271-priv.h b/linux/drivers/media/dvb/frontends/tda18271-priv.h index 71b4d7963..a3158eb25 100644 --- a/linux/drivers/media/dvb/frontends/tda18271-priv.h +++ b/linux/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/linux/drivers/media/dvb/frontends/tda18271-tables.c b/linux/drivers/media/dvb/frontends/tda18271-tables.c index a018b5140..d65d3411e 100644 --- a/linux/drivers/media/dvb/frontends/tda18271-tables.c +++ b/linux/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. * --------------------------------------------------------------------------- |