From aaeccba68a60eedee5fe90f9e1478367b1f97345 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sun, 2 Dec 2007 11:03:57 -0300 Subject: V4L/DVB (6726): tda18271: set image rejection validity Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/tda18271-fe.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'drivers/media/dvb/frontends/tda18271-fe.c') diff --git a/drivers/media/dvb/frontends/tda18271-fe.c b/drivers/media/dvb/frontends/tda18271-fe.c index 01de75e369ed..fee38c1657e1 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; -- cgit v1.2.2