[Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830
Simon Schampijer
simon at schampijer.de
Fri May 18 09:31:09 EDT 2012
Hi Paul,
thanks again for getting back on this!
On 05/18/2012 03:10 PM, Paul Fox wrote:
> simon wrote:
> > On 05/09/2012 05:56 PM, Paul Fox wrote:
> > > gonzalo wrote:
> > > > On Wed, May 9, 2012 at 12:42 PM, Paul Fox<pgf at laptop.org> wrote:
> > > >
> > > > > i would much prefer that we could prevent suspend during any
> > > > > audio playback, rather than have to have anyone that wants
> > > > > to make noise do it individually.
> > > > >
> > > > >
> > > > But this should be done at a lower level, right?
> > >
> > > yes, sorry -- that comment wasn't really directed at sugar.
> >
> > Hi Paul,
> >
> > can you give some background information here, why preventing the XO to
> > fall asleep when there is audio playback is not happening as of today?
> > And what are the steps to make this happen at a lower level than Sugar?
>
> the problem is that there's no good operating system mechanism that
> powerd can use to know that audio is truly in use.
Ok, I see.
> it's possible to know that the audio device has been opened, and i
> have tried using that in the past. but most applications that use
> audio open the device once, and then leave it open. so even when
> they're playing nothing but silence, the device appears to be in use.
OK.
> the solution would be to either change all the activities to close the
> device when it's not in use (unlikely), or create a mechanism where
> one can find out whether the driver is producing audible energy. (or
> even better -- how long it has been since it produced audible energy)
> i think this would be difficult. on the other hand, this issue always
> comes up late in a release cycle, where we don't really have time for
> new kernel work, and then attention fades. perhaps we can really
> pursue it this time.
Yes, I think it would be great to analyze the low-level situation and
see what is possible to sense audible energy. That would be the perfect
thing to have. But of course you know better what is possible there.
Agreed, there are some issues where we always do workarounds since we
are late in the cycle. In general I think it is ok to do workarounds if
there is as well a path forward. So even if we include a patch in 12.1.0
from Gonzalo to inhibit suspend when using tts we should have a look at
the real issue and if we can not fix it in 12.1.0 try to do so in 12.2.0.
Regards,
Simon
More information about the Sugar-devel
mailing list