From 7a055400514f48174129227f1a3aaa45537ee409 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Wed, 7 Sep 2005 05:13:09 +0000 Subject: * bttv-cards.c: (bttv_init_card1), (bttv_init_card2): * bttv-driver.c: - don't enable gpioirq until after card probe. - Pinnacle PCTV-Sat fifo overrun error fix. gpioirq is enabled pretty early during the initialization (bttv_probe) and later turned off when a card with no_gpioirq=1 is detected (bttv_init_card2). But that causes gpio irqs being enabled for a while - in my case there are between some hundred and some thousand (false) irqs delivered before the gpioirq is disabled. The patch just changes the default. gpio irqs are disabled while probing and later enable when a card with no_gpioirq=0 is found. The status whether a card gets gpio irqs or not stays the same. Thanks to: Edgar Toernig Signed-off-by: Michael Krufky --- linux/drivers/media/video/bttv-cards.c | 16 +++++++--------- linux/drivers/media/video/bttv-driver.c | 13 ++++++------- 2 files changed, 13 insertions(+), 16 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/bttv-cards.c b/linux/drivers/media/video/bttv-cards.c index 67d70b54d..18ee1129f 100644 --- a/linux/drivers/media/video/bttv-cards.c +++ b/linux/drivers/media/video/bttv-cards.c @@ -1,5 +1,5 @@ /* - $Id: bttv-cards.c,v 1.72 2005/09/07 04:03:15 mkrufky Exp $ + $Id: bttv-cards.c,v 1.73 2005/09/07 05:13:09 mkrufky Exp $ bttv-cards.c @@ -1766,10 +1766,7 @@ struct tvcard bttv_tvcards[] = { .no_msp34xx = 1, .no_tda9875 = 1, .no_tda7432 = 1, - .gpiomask = 0x01, - .audiomux = { 0, 0, 0, 0, 1 }, .muxsel = { 3, 0, 1, 2}, - .needs_tvaudio = 0, .pll = PLL_28, .no_gpioirq = 1, .has_dvb = 1, @@ -2861,11 +2858,12 @@ void __devinit bttv_init_card1(struct bttv *btv) break; case BTTV_TWINHAN_DST: case BTTV_AVDVBT_771: + case BTTV_PINNACLESAT: btv->use_i2c_hw = 1; break; - case BTTV_ADLINK_RTV24: - init_RTV24( btv ); - break; + case BTTV_ADLINK_RTV24: + init_RTV24( btv ); + break; } if (!bttv_tvcards[btv->c.type].has_dvb) @@ -3050,8 +3048,8 @@ void __devinit bttv_init_card2(struct bttv *btv) btv->has_radio=1; if (bttv_tvcards[btv->c.type].has_remote) btv->has_remote=1; - if (bttv_tvcards[btv->c.type].no_gpioirq) - btv->gpioirq=0; + if (!bttv_tvcards[btv->c.type].no_gpioirq) + btv->gpioirq=1; if (bttv_tvcards[btv->c.type].audio_hook) btv->audio_hook=bttv_tvcards[btv->c.type].audio_hook; diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c index 15b34f95d..b89803a67 100644 --- a/linux/drivers/media/video/bttv-driver.c +++ b/linux/drivers/media/video/bttv-driver.c @@ -1,5 +1,5 @@ /* - $Id: bttv-driver.c,v 1.55 2005/08/30 15:01:48 mchehab Exp $ + $Id: bttv-driver.c,v 1.56 2005/09/07 05:13:09 mkrufky Exp $ bttv - Bt848 frame grabber driver @@ -3917,18 +3917,17 @@ static int __devinit bttv_probe(struct pci_dev *dev, btv->timeout.function = bttv_irq_timeout; btv->timeout.data = (unsigned long)btv; - btv->i2c_rc = -1; - btv->tuner_type = UNSET; - btv->pinnacle_id = UNSET; + btv->i2c_rc = -1; + btv->tuner_type = UNSET; + btv->pinnacle_id = UNSET; btv->new_input = UNSET; - btv->gpioirq = 1; btv->has_radio=radio[btv->c.nr]; /* pci stuff (init, get irq/mmio, ... */ btv->c.pci = dev; - btv->id = dev->device; + btv->id = dev->device; if (pci_enable_device(dev)) { - printk(KERN_WARNING "bttv%d: Can't enable device.\n", + printk(KERN_WARNING "bttv%d: Can't enable device.\n", btv->c.nr); return -EIO; } -- cgit v1.2.3