Hi,

I'm working with a fairly old version of the Linux kernel (v3.0) on
the Android platform (4.1.1_r4).

>From my understanding, it should be possible to wake the system from 
suspend so as long as I can
request an alarm from ANDROID_ALARM_ELAPSED_REALTIME

I'm trying to look at the Android platform AlarmManager code; both
Java and native, to try and figure out exactly how I'm supposed to use
this interface. 

So far, after looking at 
frameworks/base/services/jni/com_android_server_AlarmManagerService.cpp
frameworks/base/services/java/com/android/server/AlarmManagerService.java

I'm now trying to set an alarm using something like
struct timespec ts;
ts.tv_nsec     = 0;
ts.tv_sec       = 15;

int alarm_fd = open("/dev/alarm", O_RDWR);
int result = ioctl(alarm_fd,
ANDROID_ALARM_SET(ANDROID_
ALARM_ELAPSED_REALTIME), &ts);


However, upon execution, kmsg shows me the following
[  430.304171] alarm_release: clear alarm, pending 0


I've also confirmed that the device does not wake up from suspend
using the above snippet.

I'm not sure what I'm doing wrong..I've tried to replicate most of what the 
AlarmMAnagerService.cpp is doing..


I would greatly appreciate it if someone could help me with the Android 
alarm interface


Thanks

-- 
-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel
--- 
You received this message because you are subscribed to the Google Groups 
"Android Linux Kernel Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-kernel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to