Mailing List archive

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

[linux-dvb] Re: Siemens DVB-C, MSP3400 I2C adressing problem



Anders Gunnarsson wrote:
> Anders Gunnarsson wrote:
> >Since my my siemens analog module is one of those who don't like to be 
> >recognised i decided to give some time to check why.
...
> As I suspected earlier the analog-module works fine the first time the 
> the computer is started after beeing out of power for a while. After the 
> driver modules are removed and the inserted again it's not recognised.
> The MSP3400 must be left in some state where it's not accessible over 
> the I2C-bus anymore when the driver modules are removed and/or reloaded. 
> Since the power-off needs to be long for the MSP (or whichever component 
> that causes this) to reset I havn't been able to try more.
> 
> Any ideas to what might happen that causes this? Does anyone know if the 
> MSP standby-pin is hardwired or controllable from another component?

I have no real clue what happens, but could you try the patch below?
Could you also report your MSP3400 version (obviously you might have
to try after a cold boot if the patch doesn't work)? I get:
  dvb-ttpci: DVB-C analog module @ card 0: MSP3400 version 0x0303 0x0008

If it doesn't work, please have a look at msp3400c_reset() in
linux/drivers/media/video/msp3400.c for further ideas. Note however that
the saa7146 i2c code does not implement the I2C_M_IGNORE_NAK flag, we
might have to look into that if all else fails.

Johannes


Index: linux/drivers/media/dvb/ttpci/av7110.h
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/ttpci/av7110.h,v
retrieving revision 1.36
diff -u -p -r1.36 av7110.h
--- linux/drivers/media/dvb/ttpci/av7110.h	8 Jan 2005 19:34:29 -0000	1.36
+++ linux/drivers/media/dvb/ttpci/av7110.h	5 Feb 2005 00:40:29 -0000
@@ -267,6 +267,7 @@ extern int av7110_ir_init (void);
 extern void av7110_ir_exit (void);
 
 /* msp3400 i2c subaddresses */
+#define MSP_RESET  0x00
 #define MSP_WR_DEM 0x10
 #define MSP_RD_DEM 0x11
 #define MSP_WR_DSP 0x12
Index: linux/drivers/media/dvb/ttpci/av7110_v4l.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/ttpci/av7110_v4l.c,v
retrieving revision 1.20
diff -u -p -r1.20 av7110_v4l.c
--- linux/drivers/media/dvb/ttpci/av7110_v4l.c	21 Dec 2004 02:44:05 -0000	1.20
+++ linux/drivers/media/dvb/ttpci/av7110_v4l.c	5 Feb 2005 00:40:29 -0000
@@ -547,17 +547,17 @@ int av7110_init_analog_module(struct av7
 {
 	u16 version1, version2;
 
-	if (i2c_writereg(av7110, 0x80, 0x0, 0x80) != 1
-	    || i2c_writereg(av7110, 0x80, 0x0, 0) != 1)
+	msp_writereg(av7110, MSP_RESET, 0x80, 0);
+	msp_writereg(av7110, MSP_RESET,    0, 0);
+	//msleep(10); // FIXME: necessary?
+	if (msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1))
 		return -ENODEV;
 
 	printk("dvb-ttpci: DVB-C analog module @ card %d detected, initializing MSP3400\n",
 		av7110->dvb_adapter->num);
 	av7110->adac_type = DVB_ADAC_MSP;
-	msleep(100); // the probing above resets the msp...
-	msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1);
 	msp_readreg(av7110, MSP_RD_DSP, 0x001f, &version2);
-	dprintk(1, "dvb-ttpci: @ card %d MSP3400 version 0x%04x 0x%04x\n",
+	printk("dvb-ttpci: DVB-C analog module @ card %d: MSP3400 version 0x%04x 0x%04x\n",
 		av7110->dvb_adapter->num, version1, version2);
 	msp_writereg(av7110, MSP_WR_DSP, 0x0013, 0x0c00);
 	msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone




Home | Main Index | Thread Index