aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-04-22 13:46:22 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:55 -0400
commit40194b2b1bdd01358c1e9b5a9b8dd78390cc05f7 (patch)
treee1694da299044bb296ef998baf2875444f89f4af /drivers/media
parente7809a07663f868f596b5f08a63db9a32240502c (diff)
V4L/DVB (7434): tda18271: set rfagc modes during channel configuration
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/frontends/tda18271-fe.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/tda18271-fe.c b/drivers/media/dvb/frontends/tda18271-fe.c
index 4a025849a327..b3b0425dbbed 100644
--- a/drivers/media/dvb/frontends/tda18271-fe.c
+++ b/drivers/media/dvb/frontends/tda18271-fe.c
@@ -50,6 +50,9 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
50 regs[R_EP3] &= ~0x1f; /* clear std bits */ 50 regs[R_EP3] &= ~0x1f; /* clear std bits */
51 regs[R_EP3] |= (map->agc_mode << 3) | map->std; 51 regs[R_EP3] |= (map->agc_mode << 3) | map->std;
52 52
53 /* set rfagc to high speed mode */
54 regs[R_EP3] &= ~0x04;
55
53 /* set cal mode to normal */ 56 /* set cal mode to normal */
54 regs[R_EP4] &= ~0x03; 57 regs[R_EP4] &= ~0x03;
55 58
@@ -125,7 +128,14 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
125 regs[R_EB4] &= ~0x20; 128 regs[R_EB4] &= ~0x20;
126 tda18271_write_regs(fe, R_EB4, 1); 129 tda18271_write_regs(fe, R_EB4, 1);
127 130
128 msleep(5); 131 msleep(20);
132
133 /* set rfagc to normal speed mode */
134 if (map->fm_rfn)
135 regs[R_EP3] &= ~0x04;
136 else
137 regs[R_EP3] |= 0x04;
138 tda18271_write_regs(fe, R_EP3, 1);
129 139
130 return 0; 140 return 0;
131} 141}