The patch number 8044 was added via Michael Krufky <[EMAIL PROTECTED]> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel If anyone has any objections, please let us know by sending a message to: [EMAIL PROTECTED] ------ From: Michael Krufky <[EMAIL PROTECTED]> au8522: tuning optimizations If the current modulation and frequency is already set to the desired parameters, then don't re-tune. Don't store current frequency until after we've tuned successfully. Force a re-tune after resume from standby. Signed-off-by: Michael Krufky <[EMAIL PROTECTED]> --- linux/drivers/media/dvb/frontends/au8522.c | 23 +++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff -r 9986678f3de2 -r 3a52ee8c545b linux/drivers/media/dvb/frontends/au8522.c --- a/linux/drivers/media/dvb/frontends/au8522.c Thu Jun 12 23:29:43 2008 -0400 +++ b/linux/drivers/media/dvb/frontends/au8522.c Fri Jun 13 16:33:23 2008 -0400 @@ -462,10 +462,13 @@ static int au8522_set_frontend(struct dv struct dvb_frontend_parameters *p) { struct au8522_state *state = fe->demodulator_priv; + int ret = -EINVAL; dprintk("%s(frequency=%d)\n", __func__, p->frequency); - state->current_frequency = p->frequency; + if ((state->current_frequency == p->frequency) && + (state->current_modulation == p->u.vsb.modulation)) + return 0; au8522_enable_modulation(fe, p->u.vsb.modulation); @@ -475,11 +478,16 @@ static int au8522_set_frontend(struct dv if (fe->ops.tuner_ops.set_params) { if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); - fe->ops.tuner_ops.set_params(fe, p); + ret = fe->ops.tuner_ops.set_params(fe, p); if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); } + if (ret < 0) + return ret; + + state->current_frequency = p->frequency; + return 0; } @@ -493,6 +501,16 @@ static int au8522_init(struct dvb_fronte au8522_writereg(state, 0xa4, 1 << 5); au8522_i2c_gate_ctrl(fe, 1); + + return 0; +} + +static int au8522_sleep(struct dvb_frontend *fe) +{ + struct au8522_state *state = fe->demodulator_priv; + dprintk("%s()\n", __func__); + + state->current_frequency = 0; return 0; } @@ -677,6 +695,7 @@ static struct dvb_frontend_ops au8522_op }, .init = au8522_init, + .sleep = au8522_sleep, .i2c_gate_ctrl = au8522_i2c_gate_ctrl, .set_frontend = au8522_set_frontend, .get_frontend = au8522_get_frontend, --- Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/3a52ee8c545bc2dce488104d3cbc4432e16b48a6 _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits