Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: nova budget / vdr breaks the driver..
On Tuesday 23 March 2004 22:23, Andrew de Quincey wrote:
> > Unfortunately, as I don't have the grundig 29504-401 or the LSI L64781
> > datasheets (anyone?), so I can only guess... depending on the results of
> > the above, probably an extra delay in the init code of the driver will
> > sort it.
>
> Actually, thats wrong! I've just found the L64781 datasheet in my
> collection of docs (I have _LOTS_ of docs). Cool, hopefully have something
> soon.
Right, can you try out this patch (against CVS HEAD). It should add a 200ms
delay when the tuner is first initialised.
Index: grundig_29504-401.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/frontends/grundig_29504-401.c,v
retrieving revision 1.23
diff -a -u -r1.23 grundig_29504-401.c
--- grundig_29504-401.c 12 Mar 2004 13:06:31 -0000 1.23
+++ grundig_29504-401.c 23 Mar 2004 22:52:38 -0000
@@ -35,6 +35,9 @@
#define dprintk if (debug) printk
+struct grundig_state {
+ int first:1;
+};
struct dvb_frontend_info grundig_29504_401_info = {
.name = "Grundig 29504-401",
@@ -334,6 +337,9 @@
unsigned int cmd, void *arg)
{
struct dvb_i2c_bus *i2c = fe->i2c;
+ int res;
+ struct grundig_state* state = (struct grundig_state*) fe->data;
+
switch (cmd) {
case FE_GET_INFO:
memcpy (arg, &grundig_29504_401_info,
@@ -420,7 +426,12 @@
return l64781_writereg (i2c, 0x3e, 0x5a);
case FE_INIT:
- return init (i2c);
+ res = init (i2c);
+ if ((res == 0) && (state->first)) {
+ state->first = 0;
+ dvb_delay(200);
+ }
+ return res;
case FE_GET_TUNE_SETTINGS:
{
@@ -447,6 +458,7 @@
u8 b1 [] = { 0x00 };
struct i2c_msg msg [] = { { .addr = 0x55, .flags = 0, .buf = b0, .len = 1 },
{ .addr = 0x55, .flags = I2C_M_RD, .buf = b1, .len = 1 } };
+ struct grundig_state* state;
/**
* the L64781 won't show up before we send the reset_and_configure()
@@ -489,8 +501,13 @@
dprintk("Read 2 returned unexpcted value\n");
goto bailout;
}
+
+ state = kmalloc(sizeof(struct grundig_state), GFP_KERNEL);
+ if (state == NULL) goto bailout;
+ *data = state;
+ state->first = 1;
- return dvb_register_frontend (grundig_29504_401_ioctl, i2c, NULL,
+ return dvb_register_frontend (grundig_29504_401_ioctl, i2c, state,
&grundig_29504_401_info);
bailout:
@@ -502,6 +519,7 @@
static void l64781_detach (struct dvb_i2c_bus *i2c, void *data)
{
+ kfree(data);
dvb_unregister_frontend (grundig_29504_401_ioctl, i2c);
}
Home |
Main Index |
Thread Index