[linux-dvb] [patch/rfc] frontend powermanagement

Johannes Stezenbach js at linuxtv.org
Wed Feb 16 21:15:06 CET 2005


Gerd Knorr wrote:
> +void dvb_suspend_frontend(struct dvb_frontend* fe)
> +{
> +	if (fe->ops->sleep)
> +		fe->ops->sleep(fe);
> +}

Does the PM core allow us to call this after the dvb_frontend_thread
has been put in the refridgerator? If not we might have to
add a FESTATE_FREEZER.

I also see the follwoing:
                if (dvb_powerdown_on_sleep)
                        if (fe->ops->set_voltage)
                                fe->ops->set_voltage(fe, SEC_VOLTAGE_OFF);

You might wat to add this to dvb_suspend_frontend() (and maybe call
dvb_suspend_frontend() then from the dvb_frontend_thread()).

One problem is of course that it won't work with DiSEqC (the app
would have to resend the DiSEqC sequence after wakeup; since DiSEqC
sequences can be arbitrarily complex the drivers make no effort to
remember them for automatic re-send.) We could add a flag to
enum fe_status to signal this condition to the app after wakeup.
Or we don't power down the LNB, but that's lousy power management then.

> +void dvb_resume_frontend(struct dvb_frontend* fe)
> +{
> +	struct dvb_frontend_private *fepriv = fe->frontend_priv;
> +
> +	if (fe->ops->init)
> +		fe->ops->init(fe);

dvb_frontend_init();

> +	fepriv->state = FESTATE_RETUNE;
> +	dvb_frontend_wakeup(fe);
> +	dvb_frontend_add_event (fe, 0);	    
> +	fepriv->status = 0;

I see this is the same sequence as in FE_SET_FRONTEND, but
I wonder if it should be (in both places):

	fepriv->state = FESTATE_RETUNE;
	fepriv->status = 0;
	dvb_frontend_add_event (fe, 0);
	dvb_frontend_wakeup(fe);

since dvb_frontend_thread() can change fepriv->status and generate
events after wakeup.

Johannes




More information about the linux-dvb mailing list