From 6f3fda3e6daf09650b9a5639f4bf8d692243c46a Mon Sep 17 00:00:00 2001 From: Anurag Singh Date: Tue, 28 Aug 2012 10:49:00 -0700 Subject: power: Extend power module definition. Add member function pointers to the power module header. The new function pointers are to enable applications to indicate that video encoding has started or stopped. Change-Id: Ic71ec1f4e159673bcb14f7e32b6058da1bce3ba5 --- include/hardware/power.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/hardware/power.h b/include/hardware/power.h index 6c55061..39b066c 100644 --- a/include/hardware/power.h +++ b/include/hardware/power.h @@ -41,6 +41,7 @@ __BEGIN_DECLS typedef enum { POWER_HINT_VSYNC = 0x00000001, POWER_HINT_INTERACTION = 0x00000002, + POWER_HINT_VIDEO_ENCODE = 0x00000003, } power_hint_t; /** @@ -108,6 +109,17 @@ typedef struct power_module { * and it may be appropriate to raise speeds of CPU, memory bus, * etc. The data parameter is unused. * + * POWER_HINT_VIDEO_ENCODE + * + * The user just started or stopped recording video. When encode + * begins, large writes to the SD card will be done and this may + * cause CPU frequency to increase. The data parameter is a string + * with semicolon-separated 'key:value' pairs. The most common key is + * 'state', which takes 0 or 1 as its value. For instance, To + * indicate that recording is beginning, the string "state:1" would + * need to be used. More keys can be provided depending on the data + * that is to be passed. + * * A particular platform may choose to ignore any hint. * * availability: version 0.2 -- cgit v1.1