summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-03-22 19:25:21 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2008-03-22 19:25:21 -0400
commitc68c670b9d5d12a687768eb4cd2890c5ea6a8074 (patch)
treec3a8099ecab2f2e57645b523c13bf54977796427 /linux/drivers/media/dvb
parent005f54ce72329f452475ee280031b897d9533dcf (diff)
downloadmediapointer-dvb-s2-c68c670b9d5d12a687768eb4cd2890c5ea6a8074.tar.gz
mediapointer-dvb-s2-c68c670b9d5d12a687768eb4cd2890c5ea6a8074.tar.bz2
tda18271: set rfagc modes during channel configuration
From: Michael Krufky <mkrufky@linuxtv.org> Set rfagc to high speed mode before setting the pll. Set rfagc to normal speed mode at the end of the function. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/frontends/tda18271-fe.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda18271-fe.c b/linux/drivers/media/dvb/frontends/tda18271-fe.c
index 66884bb33..e182df32e 100644
--- a/linux/drivers/media/dvb/frontends/tda18271-fe.c
+++ b/linux/drivers/media/dvb/frontends/tda18271-fe.c
@@ -51,6 +51,9 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
regs[R_EP3] &= ~0x1f; /* clear std bits */
regs[R_EP3] |= (map->agc_mode << 3) | map->std;
+ /* set rfagc to high speed mode */
+ regs[R_EP3] &= ~0x04;
+
/* set cal mode to normal */
regs[R_EP4] &= ~0x03;
@@ -145,7 +148,14 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
tda18271_write_regs(fe, R_EB7, 1);
#endif
- msleep(5);
+ msleep(20);
+
+ /* set rfagc to normal speed mode */
+ if (map->fm_rfn)
+ regs[R_EP3] &= ~0x04;
+ else
+ regs[R_EP3] |= 0x04;
+ tda18271_write_regs(fe, R_EP3, 1);
return 0;
}