Hi, On Monday, June 20, 2011 6:35:24 PM UTC+2, Diego wrote: > > Hello, > > I'm porting Android on a platform that doesn't support suspend-to-ram (echo > > mem >/sys/power/state) but just standby (echo standby >/sys/power/state). I > > ended up hacking my kernel so that every call to suspend-to-ram becomes a > standby request, but I'm wondering how the thing is managed on the Android > side. I tried looking in: > frameworks/base/services/java/com/android/server/PowerManagerService.java > hardware/libhardware_legacy/power/power.c > and several other places, but didn't found a clear point where > suspend-to-RAM > is specified instead of standby (I'm using donut). > Have a look at http://www.kandroid.org/online-pdk/guide/power_management.html
The kernel will enter suspend as soon as there are no wakelocks present of type SUSPEND. The PowerManagerService holds such a lock(s) so releasing the lock will cause suspend to happen by itself. I think this is why you will not find "echo mem > /sys/power/state" I had a quick look at the PowerManagerService but did not find where this might happen Greetings -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
