diff options
author | Andrew de Quincy <devnull@localhost> | 2004-11-12 17:30:07 +0000 |
---|---|---|
committer | Andrew de Quincy <devnull@localhost> | 2004-11-12 17:30:07 +0000 |
commit | 0f191893b127c16c0a9ccfc3557ddf4dbae2f1a9 (patch) | |
tree | d43ab2a49c06c0f98080aa61b059a91c218abc2b /linux/drivers/media/dvb/ttpci/av7110.c | |
parent | ff1fec5eac165d66fb5693c745a8ab7930d09fd2 (diff) | |
download | mediapointer-dvb-s2-0f191893b127c16c0a9ccfc3557ddf4dbae2f1a9.tar.gz mediapointer-dvb-s2-0f191893b127c16c0a9ccfc3557ddf4dbae2f1a9.tar.bz2 |
Updated to fix problems with some CAMs on KNC1 cards
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110.c')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 053ac9c66..9185b0aef 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -582,7 +582,7 @@ static void gpioirq (unsigned long data) wake_up(&cibuf->queue); iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2); iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2); - saa7146_wait_for_debi_done(av7110->dev); + saa7146_wait_for_debi_done(av7110->dev, 1); saa7146_write(av7110->dev, IER, saa7146_read(av7110->dev, IER) | MASK_19); if (len < 5) @@ -620,7 +620,7 @@ static void gpioirq (unsigned long data) dprintk(8, "GPIO0 PES_PLAY len=%04x\n", len); iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2); iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2); - saa7146_wait_for_debi_done(av7110->dev); + saa7146_wait_for_debi_done(av7110->dev, 1); saa7146_write(av7110->dev, IER, saa7146_read(av7110->dev, IER) | MASK_19); @@ -647,7 +647,7 @@ static void gpioirq (unsigned long data) memcpy(av7110->debi_virt, av7110->bmpbuf+av7110->bmpp, len); av7110->bmpp += len; av7110->bmplen -= len; - saa7146_wait_for_debi_done(av7110->dev); + saa7146_wait_for_debi_done(av7110->dev, 1); saa7146_write(av7110->dev, IER, saa7146_read(av7110->dev, IER) | MASK_19); if (len < 5) @@ -669,7 +669,7 @@ static void gpioirq (unsigned long data) case DATA_TS_RECORD: case DATA_PES_RECORD: - saa7146_wait_for_debi_done(av7110->dev); + saa7146_wait_for_debi_done(av7110->dev, 1); saa7146_write(av7110->dev, IER, saa7146_read(av7110->dev, IER) | MASK_19); irdebi(av7110, DEBISWAB, DPRAM_BASE+rxbuf, 0, len); @@ -677,7 +677,7 @@ static void gpioirq (unsigned long data) return; case DATA_DEBUG_MESSAGE: - saa7146_wait_for_debi_done(av7110->dev); + saa7146_wait_for_debi_done(av7110->dev, 1); if (!len || len > 0xff) { iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); break; @@ -1401,7 +1401,7 @@ static int alps_bsrv2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param // NOTE: since we're using a prescaler of 2, we set the // divisor frequency to 62.5kHz and divide by 125 above - if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) + if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO; return 0; } @@ -1654,13 +1654,13 @@ static int nexusca_stv0297_pll_set(struct dvb_frontend* fe, struct dvb_frontend_ int i; // this calculation does not match the TDA6405TS datasheet! - div = (params->frequency + 36150000) / 62500; + div = (params->frequency + 36150000 + 31250) / 62500; data[0] = (div >> 8) & 0x7f; data[1] = div & 0xff; data[2] = 0xce; // this value does not match the TDA6405TS datasheet! - if (params->frequency < 45000000) + if (params->frequency < 45000000) return -EINVAL; else if (params->frequency < 137000000) data[3] = 0x01; @@ -1701,13 +1701,13 @@ static void av7110_fe_lock_fix(struct av7110* av7110, fe_status_t status) msleep (50); av7110->fe_synced = (status & FE_HAS_LOCK) ? 1 : 0; - + if (av7110->playing) return; if (down_interruptible(&av7110->pid_mutex)) return; - + if (av7110->fe_synced) { SetPIDs(av7110, av7110->pids[DMX_PES_VIDEO], av7110->pids[DMX_PES_AUDIO], @@ -1763,7 +1763,7 @@ static int av7110_fe_diseqc_send_master_cmd(struct dvb_frontend* fe, struct dvb_ av7110_fe_lock_fix(av7110, 0); return av7110->fe_diseqc_send_master_cmd(fe, cmd); } - + static int av7110_fe_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t minicmd) { struct av7110* av7110 = (struct av7110*) fe->dvb->priv; @@ -1815,7 +1815,7 @@ static void frontend_init(struct av7110 *av7110) switch(av7110->dev->pci->subsystem_device) { case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??)) av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap, read_pwm(av7110)); - if (av7110->fe) + if (av7110->fe) break; break; } @@ -1858,14 +1858,14 @@ static void frontend_init(struct av7110 *av7110) // ALPS TDLB7 av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap); - if (av7110->fe) + if (av7110->fe) break; break; case 0x0002: // Hauppauge/TT DVB-C premium rev2.X av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); - if (av7110->fe) + if (av7110->fe) break; break; @@ -1929,7 +1929,7 @@ static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_d } dvb_register_adapter(&av7110->dvb_adapter, av7110->card_name, THIS_MODULE); - + /* the Siemens DVB needs this if you want to have the i2c chips get recognized before the main driver is fully loaded */ saa7146_write(dev, GPIO_CTRL, 0x500000); |