[linux-dvb] Typhoon (KNC1 ?) COLD BOOT problem

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

 



Johannes Stezenbach wrote:
> On Mon, Dec 05, 2005, Michael Rickmann wrote:
> > I have an old Typhoon DVB-S card which has the same cold boot problem as the 
> > KNC1 which Chris Dietrich reported about in November  
> > ( http://www.linuxtv.org/pipermail/linux-dvb/2005-November/005804.html ).
> ...
> > The explanation for my problem seems relatively straightforward. After a cold 
> > boot as defined above the stv0299 does not respond at the 
> > SAA7146_I2C_BUS_BIT_RATE_120 used by the current driver.
> > When I use SAA7146_I2C_BUS_BIT_RATE_3200 as the Metzler driver does the 
> > frontend loads correctly but szap does not get a lock. I have also tried 
> > SAA7146_I2C_BUS_BIT_RATE_240 and SAA7146_I2C_BUS_BIT_RATE_480.
> > With these the Typhoon cold boots correctly and works properly.
> > 
> > It would be valuable to know wether this is a general problem of KNC1-S and 
> > old Typhoon-S cards or wether Chris and I have some odd problems.
> > To find out wether my measure works replace SAA7146_I2C_BUS_BIT_RATE_120 in
> > ../linux/drivers/media/dvb/ttpci/budget-core.c, line 384 by e.g. 
> > SAA7146_I2C_BUS_BIT_RATE_480 or apply attached patch.
> 
> The stv0299 data sheet says that while the device is in standby mode,
> the I2C bus speed has to be limited to F_CLK_IN/10, which usually is
> 400kHz. SAA7146_I2C_BUS_BIT_RATE_120 is PCI_CLK/120 = 275kHz. So it
> should work.
> The stv0299 normally starts up in normal mode, but can
> be made to start up in standby by a strap pin.
> 
> Can you try if it is sufficient to lower the I2C bus speed
> just for probing, and increase it later?
> 
> e.g. in budget_av_attach():
> 	saa7146_i2c_adapter_prepare(dev, NULL, SAA7146_I2C_BUS_BIT_RATE_480);
> 	frontend_init(budget_av);
> 	saa7146_i2c_adapter_prepare(dev, NULL, SAA7146_I2C_BUS_BIT_RATE_120);
> 
> (slightly hackish, but OK for testing; if it works we should add a
> saa7146_i2c_set_speed() API; maybe need also handle wakeup after
> stv0299_sleep())
> 
> But I'm not sure if this kind of optimization is worth it, maybe I
> should just merge your patch. Opinions?

I don't like adding another parameter.

Either add a new field i2c_speed to struct budget,
or use this simple patch:

--- budget-core.c.old	Sat Dec 10 21:48:13 2005
+++ budget-core.c	Sat Dec 10 22:02:23 2005
@@ -381,7 +381,11 @@ int ttpci_budget_init(struct budget *bud
 
 	strlcpy(budget->i2c_adap.name, budget->card->name, sizeof(budget->i2c_adap.name));
 
-	saa7146_i2c_adapter_prepare(dev, &budget->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120);
+	if (bi->type == BUDGET_KNC1S)
+		saa7146_i2c_adapter_prepare(dev, &budget->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_480);
+	else
+		saa7146_i2c_adapter_prepare(dev, &budget->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120);
+
 	strcpy(budget->i2c_adap.name, budget->card->name);
 
 	if (i2c_add_adapter(&budget->i2c_adap) < 0) {

Anyway, this card seems to behave somewhat strange.
Some people reported that enabling the master reset in saa7146-core.c
fixed their problems...

Oliver

-- 
--------------------------------------------------------
VDR Remote Plugin available at
http://www.escape-edv.de/endriss/vdr/
--------------------------------------------------------


[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux