diff options
author | Andrew de Quincy <devnull@localhost> | 2004-11-09 19:07:14 +0000 |
---|---|---|
committer | Andrew de Quincy <devnull@localhost> | 2004-11-09 19:07:14 +0000 |
commit | 3079b3cb678cc5659d52dbac48c93ee406f38df6 (patch) | |
tree | e5f932d732dd11ee6c30b19a257fcdba8c55bd28 /linux/drivers/media/dvb | |
parent | 6a7a1d7aaa0944f9257553fdc67c571c13d588aa (diff) | |
download | mediapointer-dvb-s2-3079b3cb678cc5659d52dbac48c93ee406f38df6.tar.gz mediapointer-dvb-s2-3079b3cb678cc5659d52dbac48c93ee406f38df6.tar.bz2 |
Added delay loop
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index cc646721d..418fc6438 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -1650,6 +1650,8 @@ static int nexusca_stv0297_pll_set(struct dvb_frontend* fe, struct dvb_frontend_ u32 div; u8 data[4]; struct i2c_msg msg = { .addr = 0x63, .flags = 0, .buf = data, .len = sizeof(data) }; + struct i2c_msg readmsg = { .addr = 0x63, .flags = I2C_M_RD, .buf = data, .len = 1 }; + int i; // this calculation does not match the TDA6405TS datasheet! div = (params->frequency + 36150000) / 62500; @@ -1675,7 +1677,15 @@ static int nexusca_stv0297_pll_set(struct dvb_frontend* fe, struct dvb_frontend_ return -EIO; } - msleep(20); + // wait for PLL lock + for(i=0; i< 20; i++) { + + stv0297_enable_plli2c(fe); + if (i2c_transfer (&av7110->i2c_adap, &readmsg, 1) == 1) + if (data[0] & 0x40) break; + msleep(10); + } + return 0; } |