Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-22 Thread Sascha Silbe
Sascha Silbe si...@activitycentral.com writes: [...] 1. UPower API UPower has a D-Bus API to set latency requirements [1,2]. The UPower back-end code uses the kernel PM QoS interface [3] to set the requested CPU (DMA) latency (in µs, up to ~35 minutes) and network throughput (in

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-21 Thread Sascha Silbe
[CC'ing devel@l.l.o because it touches operation of low-level software components on OLPC OS] Paul Fox p...@laptop.org writes: the problem is that there's no good operating system mechanism that powerd can use to know that audio is truly in use. it's possible to know that the audio device

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-21 Thread Sascha Silbe
Gonzalo Odiard godi...@sugarlabs.org writes: [...] That is a complete nonsense to me. [...] I'm not going to reply to your mail in detail because it wasn't constructive in any way; I even felt it to be slightly ad-hominem. See my other mails (including a patch, and maybe another one later

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-18 Thread Simon Schampijer
On 05/09/2012 05:56 PM, Paul Fox wrote: gonzalo wrote: On Wed, May 9, 2012 at 12:42 PM, Paul Foxp...@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

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-18 Thread Simon Schampijer
Ok, so I am still not clear on the whys. Why does the machine suspend when there is audio being played back? That sounds wrong to me. It would be the same as suspending why I am moving the mouse. Can someone provide some background information on this? Regards, Simon On 05/17/2012 08:08

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-18 Thread Samuel Greenfeld
Powerd (/usr/sbin/powerd) itself is not that hard to read; it is just a shell script. On XOs, powerd is willing to aggressively suspend the system (and enable the DCON) if certain criteria are met which seem to indicate that the XO is not in use. These criteria include: - CPU usage below a

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-18 Thread Simon Schampijer
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 Foxp...@laptop.org wrote: i would much prefer that we

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-17 Thread Anish Mangal
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday 16 May 2012 01:21 AM, Sascha Silbe wrote: Gonzalo Odiard godi...@sugarlabs.org writes: Using powerd-inhibit-suspend directory is how ALL the activities are working today, Quantity isn't the same as quality. That everybody is

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-17 Thread Gonzalo Odiard
On Tue, May 15, 2012 at 4:51 PM, Sascha Silbe si...@activitycentral.comwrote: Gonzalo Odiard godi...@sugarlabs.org writes: Using powerd-inhibit-suspend directory is how ALL the activities are working today, Quantity isn't the same as quality. That everybody is doing it doesn't make it

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-15 Thread Gonzalo Odiard
Using powerd-inhibit-suspend directory is how ALL the activities are working today, and how powerd is used. We can work in a new feature to sugar 0.98, to have a more generic power management communication, in fact, would be great no need to copy/paste similar code in a lot of activities, but I

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-15 Thread Sascha Silbe
Gonzalo Odiard godi...@sugarlabs.org writes: Using powerd-inhibit-suspend directory is how ALL the activities are working today, Quantity isn't the same as quality. That everybody is doing it doesn't make it suddenly a good idea. Quite the contrary, as platform developers we have the

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-14 Thread Sascha Silbe
godi...@sugarlabs.org writes: To avoid stoping playing the text when the xo go to sleep. This patch creates a file in /var/run/powerd-inhibit-suspend/ and remove it when finish. /var/run/powerd-* is an implementation detail of a particular downstream implementation of power management (namely

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-10 Thread Gonzalo Odiard
On Thu, May 10, 2012 at 12:58 AM, James Cameron qu...@laptop.org wrote: Regarding your general approach, this is okay for the moment, since nothing else in the Sugar shell process will use it, but watch out in future. /var/run/powerd-inhibit-suspend/%s is unique by process id only. See

[Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-10 Thread godiard
From: Gonzalo Odiard godi...@gmail.com To avoid stoping playing the text when the xo go to sleep. This patch creates a file in /var/run/powerd-inhibit-suspend/ and remove it when finish. Is the same technique used in activities (the code is copied from Distance activity) but we need decide if is

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-10 Thread James Cameron
Reviewed-by: James Cameron qu...@laptop.org -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel

[Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-09 Thread godiard
From: Gonzalo Odiard godi...@gmail.com To avoid stoping playing the text when the xo go to sleep. This patch creates a file in /var/run/powerd-inhibit-suspend/ and remove it when finish. Is the same technique used in activities (the code is copied from Distance activity) but we need decide if is

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-09 Thread Paul Fox
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. that being said, you can eliminate any of the code below that deals with the ohm keystore. if we move away from powerd, it likely won't be

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-09 Thread Gonzalo Odiard
On Wed, May 9, 2012 at 12:42 PM, Paul Fox p...@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? that being said, you

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-09 Thread Paul Fox
gonzalo wrote: On Wed, May 9, 2012 at 12:42 PM, Paul Fox p...@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,

[Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-09 Thread godiard
From: Gonzalo Odiard godi...@gmail.com To avoid stoping playing the text when the xo go to sleep. This patch creates a file in /var/run/powerd-inhibit-suspend/ and remove it when finish. Is the same technique used in activities (the code is copied from Distance activity) but we need decide if is

Re: [Sugar-devel] [PATCH Sugar] Inhibit power suspend while playing text to speech - OLPC #11830

2012-05-09 Thread James Cameron
Regarding your general approach, this is okay for the moment, since nothing else in the Sugar shell process will use it, but watch out in future. /var/run/powerd-inhibit-suspend/%s is unique by process id only. See stopwatch.git/powerd.py for a reference counted implementation that would avoid