Mailing List archive

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

[linux-dvb] Re: reload grundig_29504-401 patch IMPROVED



On Mon, 2003-01-06 at 22:48, Gavin Hamill wrote:
> On Monday 06 January 2003 10:42 pm, Andrew de Quincey wrote:
> > Hi, I noticed that (on a Hauppague WinTV Nova-T) if you unload and
> > reload the grundig_29504-401 module, it fails to detect the frontend
> > after the first detection.
> 
> I'm just curious...
> 
> Is this a fix for the 'Frontend reported frequency too large' error I often 
> see from dvbtune the first time after loading the driver?
> 
> I know those aren't the exact words of the error, but it's something like 
> that =)

Ah no, but I get that problem as well (as you know :)... I was just
starting to look into it (as it is the last major problem I have with
this driver), and I ran into this reloading problem.

Actually, here's a better patch... I found out that my previous one only
works some of the time.. you have to power up and reset the chip before
detection to get reliable results.

If someone has the docs for the LSI Logic L64781 I'd _really_ appreciate
them; I would like to have a better detection system if possible.


diff -Naur dvb-kernel.ORIGINAL/linux/drivers/media/dvb/frontends/grundig_29504-401.c dvb-kernel/linux/drivers/media/dvb/frontends/grundig_29504-401.c
--- dvb-kernel.ORIGINAL/linux/drivers/media/dvb/frontends/grundig_29504-401.c	2002-12-29 22:15:54.000000000 +0000
+++ dvb-kernel/linux/drivers/media/dvb/frontends/grundig_29504-401.c	2003-01-07 00:13:29.000000000 +0000
@@ -271,6 +271,13 @@
 	u8 buf [] = { 0x06 };
 	struct i2c_msg msg = { addr: 0x00, flags: 0, buf: buf, len: 1 };
 
+	/* Power up */
+	l64781_writereg (i2c, 0x3e, 0xa5);
+
+	/* Reset hard */
+	l64781_writereg (i2c, 0x2a, 0x04);
+	l64781_writereg (i2c, 0x2a, 0x00);
+
 	i2c->xfer (i2c, &msg, 1);
 }
 
@@ -423,9 +430,6 @@
 	struct i2c_msg msg [] = { { addr: 0x55, flags: 0, buf: b0, len: 1 },
 			   { addr: 0x55, flags: I2C_M_RD, buf: b1, len: 1 } };
 
-	if (i2c->xfer (i2c, msg, 2) == 2)   /*  probably an EEPROM... */
-		return -ENODEV;
-
 	reset_and_configure (i2c);
 
 	if (i2c->xfer (i2c, msg, 2) != 2)   /*  nothing... */

Home | Main Index | Thread Index