Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] CX88 i2c issue w/ DVB tuners



Tum te tum, another small issue with cx88 - the i2c_adap class was always set 
to I2C_CLASS_TV_ANALOG. Which meant if you happened to have the tda9887 
analogue tuner loaded, it (incorrectly) grabbed the i2c device that the 
cx22702 uses.

Attached patch sets the cx88 i2c bus class to I2C_CLASS_TV_DIGITAL if the 
"dvb" flag is set.

Incidentally, shouldn't all the DVB tuners check the bus class is definitely 
I2C_CLASS_TV_DIGITAL? Otherwise you might end up with the reverse problem 
(cx22702 etc taking over the tda9887's i2c device on analogue cards).

Just hope there isn't a card out there with both DVB AND analogue tuners on 
it....
--- video4linux-20040907-143054.orig/cx88-i2c.c	2004-08-31 13:07:00.000000000 +0100
+++ video4linux-20040907-143054/cx88-i2c.c	2004-09-09 15:21:16.543373136 +0100
@@ -186,6 +186,11 @@
 {
 	memcpy(&core->i2c_adap, &cx8800_i2c_adap_template,
 	       sizeof(core->i2c_adap));
+#ifdef I2C_CLASS_TV_DIGITAL
+        if (cx88_boards[core->board].dvb) {
+		core->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
+	}
+#endif
 	memcpy(&core->i2c_algo, &cx8800_i2c_algo_template,
 	       sizeof(core->i2c_algo));
 	memcpy(&core->i2c_client, &cx8800_i2c_client_template,

Home | Main Index | Thread Index