summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-02-14 00:06:35 -0500
committerMichael Krufky <mkrufky@linuxtv.org>2008-02-14 00:06:35 -0500
commitdfb32c854e17815d590d30adbe10c3c303e7f57c (patch)
tree46fe3483d790e4981e76d8f1aad31ded32389ce2 /linux
parent2ac7d509228d821c5949b801ade814005e270366 (diff)
downloadmediapointer-dvb-s2-dfb32c854e17815d590d30adbe10c3c303e7f57c.tar.gz
mediapointer-dvb-s2-dfb32c854e17815d590d30adbe10c3c303e7f57c.tar.bz2
tda18271: remove duplicated channel configuration code from tda18271c1_tune
From: Michael Krufky <mkrufky@linuxtv.org> remove duplicated channel configuration code from tda18271c1_tune, instead call function tda18271_channel_configuration Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/frontends/tda18271-fe.c48
1 files changed, 1 insertions, 47 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda18271-fe.c b/linux/drivers/media/dvb/frontends/tda18271-fe.c
index 0e14552d0..c144a4a23 100644
--- a/linux/drivers/media/dvb/frontends/tda18271-fe.c
+++ b/linux/drivers/media/dvb/frontends/tda18271-fe.c
@@ -776,54 +776,8 @@ static int tda18271c1_tune(struct dvb_frontend *fe,
if (0 == tda18271_calc_rf_cal(fe, &freq))
tda18271_write_regs(fe, R_EB14, 1);
- /* Channel Configuration */
-
- switch (priv->mode) {
- case TDA18271_ANALOG:
- regs[R_EB22] = 0x2c;
- break;
- case TDA18271_DIGITAL:
- regs[R_EB22] = 0x37;
- break;
- }
- tda18271_write_regs(fe, R_EB22, 1);
-
- regs[R_EP1] |= 0x40; /* set dis power level on */
-
- /* set standard */
- regs[R_EP3] &= ~0x1f; /* clear std bits */
-
- /* see table 22 */
- regs[R_EP3] |= std;
-
- regs[R_EP4] &= ~0x03; /* set cal mode to normal */
-
- regs[R_EP4] &= ~0x1c; /* clear if level bits */
- switch (priv->mode) {
- case TDA18271_ANALOG:
- regs[R_MPD] &= ~0x80; /* IF notch = 0 */
- break;
- case TDA18271_DIGITAL:
- regs[R_EP4] |= 0x04;
- regs[R_MPD] |= 0x80;
- break;
- }
-
- if (radio)
- regs[R_EP4] |= 0x80;
- else
- regs[R_EP4] &= ~0x80;
-
- /* image rejection validity */
- tda18271_calc_ir_measure(fe, &freq);
-
- /* calculate MAIN PLL */
- N = freq + ifc;
-
- tda18271_calc_main_pll(fe, N);
+ tda18271_channel_configuration(fe, ifc, freq, bw, std, radio);
- tda18271_write_regs(fe, R_TM, 15);
- msleep(5);
mutex_unlock(&priv->lock);
return 0;