aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-06-09 01:03:31 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-06-26 14:58:49 -0400
commit51858d13612a06494beb08616f8a93bdb2688e4c (patch)
tree76fd21614dcd82db676305276f42b241ffa84b98 /drivers/media/common
parent119a7c7e34b5e5fa65051960ca05000a19dbce85 (diff)
V4L/DVB (8036): tda18271: toggle rf agc speed mode on TDA18271HD/C2 only
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/tuners/tda18271-fe.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/media/common/tuners/tda18271-fe.c b/drivers/media/common/tuners/tda18271-fe.c
index 98acd588739a..1ebf95d6770f 100644
--- a/drivers/media/common/tuners/tda18271-fe.c
+++ b/drivers/media/common/tuners/tda18271-fe.c
@@ -75,8 +75,10 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
75 regs[R_EP3] &= ~0x1f; /* clear std bits */ 75 regs[R_EP3] &= ~0x1f; /* clear std bits */
76 regs[R_EP3] |= (map->agc_mode << 3) | map->std; 76 regs[R_EP3] |= (map->agc_mode << 3) | map->std;
77 77
78 /* set rfagc to high speed mode */ 78 if (priv->id == TDA18271HDC2) {
79 regs[R_EP3] &= ~0x04; 79 /* set rfagc to high speed mode */
80 regs[R_EP3] &= ~0x04;
81 }
80 82
81 /* set cal mode to normal */ 83 /* set cal mode to normal */
82 regs[R_EP4] &= ~0x03; 84 regs[R_EP4] &= ~0x03;
@@ -168,12 +170,14 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
168 170
169 msleep(20); 171 msleep(20);
170 172
171 /* set rfagc to normal speed mode */ 173 if (priv->id == TDA18271HDC2) {
172 if (map->fm_rfn) 174 /* set rfagc to normal speed mode */
173 regs[R_EP3] &= ~0x04; 175 if (map->fm_rfn)
174 else 176 regs[R_EP3] &= ~0x04;
175 regs[R_EP3] |= 0x04; 177 else
176 ret = tda18271_write_regs(fe, R_EP3, 1); 178 regs[R_EP3] |= 0x04;
179 ret = tda18271_write_regs(fe, R_EP3, 1);
180 }
177fail: 181fail:
178 return ret; 182 return ret;
179} 183}