Commit aaeccba6 authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab

V4L/DVB (6726): tda18271: set image rejection validity

Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 293da0ec
......@@ -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;
......
......@@ -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__ */
......
......@@ -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.
* ---------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment