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

Johannes Stezenbach js at linuxtv.org
Thu Feb 17 20:07:25 CET 2005


Gerd Knorr wrote:
> Johannes Stezenbach <js at linuxtv.org> writes:
> > You might wat to add this to dvb_suspend_frontend() (and maybe call
> > dvb_suspend_frontend() then from the dvb_frontend_thread()).
> 
> Calling from the thread isn't an option I think (see above).

I just mean to avoid code duplication call dvb_suspend_frontend() at the
end of dvb_frontend_thread().

> > > +	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,
> 
> Yes, there I've taken it from ;)
> 
> > 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.
> 
> Maybe also move that into a small helper function called from both
> places then?

Yeah, makes sense.

Johannes




More information about the linux-dvb mailing list