[linux-dvb] [FIX] v4l-algo: tuning broken in dvb_frontend where
get_tune_settings is NULL
Aki Parviainen
aki.parviainen at iki.fi
Sun Jun 25 11:48:39 CEST 2006
>
> In your v4l-algo tree, changeset b0079105846d does indeed fix the oops,
> however tuning is still broken.
Based on the comments I tried the current head and it doesn't oops anymore
but cannot tune.. I first created a patch for my frontend based on
> - lgdt330x: create get_frontend_algo to fix tuning
Here it is:
diff -r a564bb874da5 linux/drivers/media/dvb/frontends/stv0299.c
--- a/linux/drivers/media/dvb/frontends/stv0299.c Sun Jun 25 01:22:36 2006 -0300
+++ b/linux/drivers/media/dvb/frontends/stv0299.c Sun Jun 25 12:35:56 2006 +0300
@@ -598,10 +598,15 @@ static int stv0299_sleep(struct dvb_fron
return 0;
}
+static int stv0299_get_tuning_algo(struct dvb_frontend *fe)
+{
+ return 0;
+}
+
static int stv0299_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
{
struct stv0299_state* state = fe->demodulator_priv;
-
+
if (enable) {
stv0299_writeregI(state, 0x05, 0xb5);
} else {
@@ -698,6 +703,7 @@ static struct dvb_frontend_ops stv0299_o
.set_frontend = stv0299_set_frontend,
.get_frontend = stv0299_get_frontend,
+ .get_frontend_algo = stv0299_get_tuning_algo,
.get_tune_settings = stv0299_get_tune_settings,
.read_status = stv0299_read_status,
However the tuning didn't start to work until I changed the general frontend with this patch:
diff -r a564bb874da5 linux/drivers/media/dvb/dvb-core/dvb_frontend.c
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c Sun Jun 25 01:22:36 2006 -0300
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c Sun Jun 25 12:36:51 2006 +0300
@@ -576,9 +576,10 @@ static int dvb_frontend_thread(void *dat
dvb_frontend_add_event(fe, s);
fepriv->status = s;
}
- } else {
- dvb_frontend_swzigzag(fe);
}
+ } else {
+ dvb_frontend_swzigzag(fe);
+
}
}
With this patch tuning works just fine for me, and everything else
works too for the first time ever with a 2.6.17 kernel!
Thank you all for fast help & great drivers!
-Aki
More information about the linux-dvb
mailing list