On Fri, 2003-01-31 at 13:30, Alex Holden wrote: > On Fri, 2003-01-31 at 12:35, Gerd Knorr wrote: > > msp3400 reloaded? With something listening on 0x88 the module should > > at least complain if it isn't a msp3400 ... > Yes, definitely. I tried it both with the bttv loading it automatically, > then by manually rmmoding and insmodding it with "debug=1". All it says > is: > i2c-core.o: driver i2c msp3400 driver registered. I finally got the chance to look deeper into this problem, and discovered that changing the value of I2C_MSP3400C in msp3400.c wasn't enough because that constant isn't actually used- a "magic number" was used for the address of the chip instead of calculating it at compile time from the value of the I2C_MSP3400C constant. After fixing that it's all working fine now. I think it's even decoding stereo properly. I'm not sure how to make this change in such a way that the I2C address of the MSP3400C is only different for this particular card. Anyway, I've attached a quick patch against bttv-0.7.103 that makes the AVerMedia TVCapture98 with a MSP3410 daughterboard work (and presumably breaks all other cards that have MSP3400 chips on them). In brief, it toggles GPIO pin 11 on boot to reset the MSP3410, and then looks for the MSP3410 at I2C address 0x88 instead of 0x80. Next problem: there isn't actually anything on the TV worth watching ;) -- ------------ Alex Holden - http://www.linuxhacker.org ------------ If it doesn't work, you're not hitting it with a big enough hammer
diff -ur bttv-0.7.103/driver/bttv-cards.c bttv-0.7.103.modified/driver/bttv-cards.c --- bttv-0.7.103/driver/bttv-cards.c 2003-01-16 14:15:57.000000000 +0000 +++ bttv-0.7.103.modified/driver/bttv-cards.c 2003-01-30 08:12:23.000000000 +0000 @@ -1923,6 +1923,8 @@ case BTTV_HAUPPAUGEPVR: pvr_boot(btv); break; + case BTTV_AVERMEDIA98: + boot_msp34xx(btv,11); } } Only in bttv-0.7.103.modified/driver: bttv-cards.o Only in bttv-0.7.103.modified/driver: bttv-driver.o Only in bttv-0.7.103.modified/driver: bttv-if.o diff -ur bttv-0.7.103/driver/bttv.h bttv-0.7.103.modified/driver/bttv.h --- bttv-0.7.103/driver/bttv.h 2003-01-16 13:50:49.000000000 +0000 +++ bttv-0.7.103.modified/driver/bttv.h 2003-01-29 23:11:57.000000000 +0000 @@ -123,7 +123,7 @@ #define I2C_HAUPEE 0xa0 #define I2C_STBEE 0xae #define I2C_VHX 0xc0 -#define I2C_MSP3400 0x80 +#define I2C_MSP3400 0x88 #define I2C_TEA6300 0x80 #define I2C_DPL3518 0x84 #define I2C_TDA9887 0x86 diff -ur bttv-0.7.103/driver/msp3400.c bttv-0.7.103.modified/driver/msp3400.c --- bttv-0.7.103/driver/msp3400.c 2003-01-27 12:08:09.000000000 +0000 +++ bttv-0.7.103.modified/driver/msp3400.c 2003-02-02 14:09:07.000000000 +0000 @@ -59,9 +59,18 @@ #include "audiochip.h" #include "msp3400.h" +/* ---------------------------------------------------------------------- */ + +#define I2C_MSP3400C 0x88 +#define I2C_MSP3400C_DEM 0x10 +#define I2C_MSP3400C_DFP 0x12 + +/* ---------------------------------------------------------------------- */ + /* Addresses to scan */ static unsigned short normal_i2c[] = {I2C_CLIENT_END}; -static unsigned short normal_i2c_range[] = {0x40,0x40,I2C_CLIENT_END}; +static unsigned short normal_i2c_range[] = { I2C_MSP3400C >> 1, + I2C_MSP3400C >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; /* insmod parameters */ @@ -131,12 +140,6 @@ MODULE_AUTHOR("Gerd Knorr"); MODULE_LICENSE("GPL"); -/* ---------------------------------------------------------------------- */ - -#define I2C_MSP3400C 0x80 -#define I2C_MSP3400C_DEM 0x10 -#define I2C_MSP3400C_DFP 0x12 - /* ----------------------------------------------------------------------- */ /* functions for talking to the MSP3400C Sound processor */