On Sat, 7 Aug 2010, Mark Brown wrote:I recognise that #1 is essentially what Android is already doing. I'm asking the question, "Is this what Linux should be doing? Personally, I think that suspend should be treated much more like a low-power state and much less like hibernation than it currently is (I believe that Linus has also voiced this opinion). And I think that the situation with Android suspending while audio is playing between busts of CPU activity is a perfect example. for the moment, forget the problem of other apps that may be running, and consider a system that's just running a media player. the media player needs bursts of CPU to decode the media so that the output device can access it (via DMA or something like that) the media player needs bursts of I/O to read the encoded program source from storage. What we want to have happen in an ideal world is when the storage isn't needed (between reads) the storage should shutdown to as low a power state as possible. when the CPU isn't needed (between decoding bursts) the CPU and as much of the system as possible (potentially including some banks of RAM) should shutdown to as low a power state as possible. today there are two ways of this happening, via the idle approach (on everything except Android), or via suspend (on Android) Given that many platforms cannot go to into suspend while still playing audio, the idle approach is not going to be able to be eliminated (and in fact will be the most common approach to be used/deugged in terms of the types of platforms), it seems to me that there may be a significant amount of value in seeing if there is a way to change Android to use this approach as well instead of having two different systems competing to do the same job. David Lang --
