summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/av7110.c
diff options
context:
space:
mode:
authorAndrew de Quincy <devnull@localhost>2004-11-09 18:25:47 +0000
committerAndrew de Quincy <devnull@localhost>2004-11-09 18:25:47 +0000
commit47d424bcc8bed15d42714e6767541b8092a28127 (patch)
tree0dd67fa057b0c0bb56498bb67b9d1230607e2293 /linux/drivers/media/dvb/ttpci/av7110.c
parent4fb65bcb7c8e3cb2138f9fc18f39c114aeecda94 (diff)
downloadmediapointer-dvb-s2-47d424bcc8bed15d42714e6767541b8092a28127.tar.gz
mediapointer-dvb-s2-47d424bcc8bed15d42714e6767541b8092a28127.tar.bz2
Fix up tuner i2c problems
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 013148ca1..cc646721d 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -1649,7 +1649,7 @@ static int nexusca_stv0297_pll_set(struct dvb_frontend* fe, struct dvb_frontend_
struct av7110* av7110 = (struct av7110*) fe->dvb->priv;
u32 div;
u8 data[4];
- struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) };
+ struct i2c_msg msg = { .addr = 0x63, .flags = 0, .buf = data, .len = sizeof(data) };
// this calculation does not match the TDA6405TS datasheet!
div = (params->frequency + 36150000) / 62500;
@@ -1668,12 +1668,14 @@ static int nexusca_stv0297_pll_set(struct dvb_frontend* fe, struct dvb_frontend_
data[3] = 0x04;
else
return -EINVAL;
-
+
stv0297_enable_plli2c(fe);
- if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1)
+ if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) {
+ dprintk("nexusca: pll transfer failed!\n");
return -EIO;
- msleep(20);
+ }
+ msleep(20);
return 0;
}
@@ -1860,8 +1862,11 @@ static void frontend_init(struct av7110 *av7110)
case 0x000A: // Hauppauge/TT Nexus-CA rev1.X
av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap, 0x7b);
- if (av7110->fe)
+ if (av7110->fe) {
+ /* tuner on this needs a slower i2c bus speed */
+ av7110->dev->i2c_bitrate = SAA7146_I2C_BUS_BIT_RATE_240;
break;
+ }
}
}