Re: [PATCH] Fix Hauppauge Win/TV sound

Erik Andersen (andersen@inconnect.com)
Sat, 2 Jan 1999 00:13:09 -0700


Oops. I sent that patch reversed. Try this instead...

-Erik

--
Erik B. Andersen   Web:    http://www.inconnect.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--

--- linux-2.1.132.virgin/drivers/char/bttv.c Mon Dec 28 18:28:41 1998 +++ linux/drivers/char/bttv.c Fri Jan 1 12:11:17 1999 @@ -73,6 +73,7 @@ static int find_vga(void); static void bt848_set_risc_jmps(struct bttv *btv); +static void hauppauge_msp_reset(struct bttv *btv); /* Anybody who uses more than four? */ #define BTTV_MAX 4 @@ -401,6 +402,18 @@ /* ----------------------------------------------------------------------- */ +static void +hauppauge_msp_reset(struct bttv *btv) +{ + /* Reset the MSP on some Hauppauge cards */ + /* Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)! */ + /* Can this hurt cards without one? What about Miros with MSP? */ + btaor(32, ~32, BT848_GPIO_OUT_EN); + btaor(0, ~32, BT848_GPIO_DATA); + udelay(2500); + btaor(32, ~32, BT848_GPIO_DATA); + /* btaor(0, ~32, BT848_GPIO_OUT_EN); */ +} struct tvcard { @@ -2434,6 +2447,13 @@ btv->tuner_type=((btread(BT848_GPIO_DATA)>>10)-1)&7; } } + + /* Make the Hauppauge cards do sound -- otherwise they stay + * deathly silent. This makes things work much better + */ + if (btv->type == BTTV_HAUPPAUGE || btv->type == BTTV_HAUPPAUGE878) { + hauppauge_msp_reset(btv); + } if (I2CRead(&(btv->i2c), I2C_TDA9850) >=0) { @@ -2572,17 +2592,6 @@ /* reset the bt848 */ btwrite(0, BT848_SRESET); DEBUG(printk(KERN_DEBUG "bttv%d: bt848_mem: 0x%08x\n",i,(unsigned int) btv->bt848_mem)); - -#ifdef RESET_MSP_HAUPPAUGE - /* Reset the MSP on some Hauppauge cards */ - /* Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)! */ - /* Can this hurt cards without one? What about Miros with MSP? */ - btaor(32, ~32, BT848_GPIO_OUT_EN); - btaor(0, ~32, BT848_GPIO_DATA); - udelay(2500); - btaor(32, ~32, BT848_GPIO_DATA); - btaor(0, ~32, BT848_GPIO_OUT_EN); -#endif /* default setup for max. PAL size in a 1024xXXX hicolor framebuffer */

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/