Hi Gerd, 1) this patch always prints GPIO for the saa7134 driver. I think this is needed urgently to assist tuner autodetect ! 2) It removes #ifdef 0 from flyvideo autodetect as I think this first approach is fine. Regards, Gunther P.S At the other place in saa7134 there is this comment: /* rising SAA7134_GPIO_GPRESCAN reads the status */ As datasheet/app notes are not available, can you tell if this is really needed ??? diff -Nur saa7134-0.2.7/saa7134-cards.c saa7134-027/saa7134-cards.c --- saa7134-0.2.7/saa7134-cards.c Wed Apr 9 16:20:40 2003 +++ saa7134-027/saa7134-cards.c Fri May 30 17:59:56 2003 @@ -588,24 +588,23 @@ u32 value; int index; - saa_writel(SAA7134_GPIO_GPMODE0 >> 2, 0); - value = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2); -#if 0 + value = dev->gpio_value; index = (value & 0x1f00) >> 8; printk(KERN_INFO "%s: flyvideo: gpio is 0x%x [model=%s,tuner=%d]\n", dev->name, value, fly_list[index].model, fly_list[index].tuner_type); dev->tuner_type = fly_list[index].tuner_type; -#else - printk(KERN_INFO "%s: flyvideo: gpio is 0x%x\n", - dev->name, value); -#endif } /* ----------------------------------------------------------- */ int saa7134_board_init(struct saa7134_dev *dev) { + // Always print gpio, often manufacturers encode tuner type and other info. + saa_writel(SAA7134_GPIO_GPMODE0 >> 2, 0); + dev->gpio_value = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2); + printk(KERN_INFO "%s: gpio is %x\n", dev->name, dev->gpio_value); + switch (dev->board) { case SAA7134_BOARD_FLYVIDEO2000: case SAA7134_BOARD_FLYVIDEO3000: diff -Nur saa7134-0.2.7/saa7134.h saa7134-027/saa7134.h --- saa7134-0.2.7/saa7134.h Thu Apr 3 15:41:04 2003 +++ saa7134-027/saa7134.h Fri May 30 17:53:15 2003 @@ -324,6 +324,7 @@ /* config info */ unsigned int board; unsigned int tuner_type; + unsigned int gpio_value; /* i2c i/o */ struct i2c_adapter i2c_adap;
diff -Nur saa7134-0.2.7/saa7134-cards.c saa7134-027/saa7134-cards.c --- saa7134-0.2.7/saa7134-cards.c Wed Apr 9 16:20:40 2003 +++ saa7134-027/saa7134-cards.c Fri May 30 17:59:56 2003 @@ -588,24 +588,23 @@ u32 value; int index; - saa_writel(SAA7134_GPIO_GPMODE0 >> 2, 0); - value = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2); -#if 0 + value = dev->gpio_value; index = (value & 0x1f00) >> 8; printk(KERN_INFO "%s: flyvideo: gpio is 0x%x [model=%s,tuner=%d]\n", dev->name, value, fly_list[index].model, fly_list[index].tuner_type); dev->tuner_type = fly_list[index].tuner_type; -#else - printk(KERN_INFO "%s: flyvideo: gpio is 0x%x\n", - dev->name, value); -#endif } /* ----------------------------------------------------------- */ int saa7134_board_init(struct saa7134_dev *dev) { + // Always print gpio, often manufacturers encode tuner type and other info. + saa_writel(SAA7134_GPIO_GPMODE0 >> 2, 0); + dev->gpio_value = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2); + printk(KERN_INFO "%s: gpio is %x\n", dev->name, dev->gpio_value); + switch (dev->board) { case SAA7134_BOARD_FLYVIDEO2000: case SAA7134_BOARD_FLYVIDEO3000: diff -Nur saa7134-0.2.7/saa7134.h saa7134-027/saa7134.h --- saa7134-0.2.7/saa7134.h Thu Apr 3 15:41:04 2003 +++ saa7134-027/saa7134.h Fri May 30 17:53:15 2003 @@ -324,6 +324,7 @@ /* config info */ unsigned int board; unsigned int tuner_type; + unsigned int gpio_value; /* i2c i/o */ struct i2c_adapter i2c_adap;