power: Add new power hints

 * New hint to support CPU boosting with a duration.

libhardware: Add audio power hint

libhardware: Add power hint to set profile

 * A PowerHAL can implement support for this hint to receive
   power profile changes from the framework.

libhardware: Add POWER_HINT_LAUNCH_BOOST for PowerHAL

hardware: Add new getFeature() function to Power HAL

 * The current use case for this is to query the power HAL for
   the number of supported profiles.

hardware: Add definition for launch boost info
diff --git a/include/hardware/power.h b/include/hardware/power.h
index bd8216e..e0a3a5f 100644
--- a/include/hardware/power.h
+++ b/include/hardware/power.h
@@ -65,11 +65,18 @@
     POWER_HINT_SUSTAINED_PERFORMANCE = 0x00000006,
     POWER_HINT_VR_MODE = 0x00000007,
     POWER_HINT_LAUNCH = 0x00000008,
-    POWER_HINT_DISABLE_TOUCH = 0x00000009
+    POWER_HINT_DISABLE_TOUCH = 0x00000009,
+
+    // CM hints
+    POWER_HINT_CPU_BOOST    = 0x00000110,
+    POWER_HINT_LAUNCH_BOOST = 0x00000111,
+    POWER_HINT_AUDIO        = 0x00000112,
+    POWER_HINT_SET_PROFILE  = 0x00000113
 } power_hint_t;
 
 typedef enum {
-    POWER_FEATURE_DOUBLE_TAP_TO_WAKE = 0x00000001
+    POWER_FEATURE_DOUBLE_TAP_TO_WAKE = 0x00000001,
+    POWER_FEATURE_SUPPORTED_PROFILES = 0x00001000
 } feature_t;
 
 /*
@@ -158,6 +165,15 @@
 } power_state_platform_sleep_state_t;
 
 /**
+ * Process info, passed as an opaque handle when
+ * using POWER_HINT_LAUNCH_BOOST.
+ */
+typedef struct launch_boost_info {
+    pid_t pid;
+    const char* packageName;
+} launch_boost_info_t;
+
+/**
  * Every hardware module must have a data structure named HAL_MODULE_INFO_SYM
  * and the fields of this data structure must begin with hw_module_t
  * followed by module specific information.
@@ -257,6 +273,12 @@
      *     The data parameter is non-zero when touch could be disabled, and zero
      *     when touch needs to be re-enabled.
      *
+     * POWER_HINT_CPU_BOOST
+     *
+     *     An operation is happening where it would be ideal for the CPU to
+     *     be boosted for a specific duration. The data parameter is an
+     *     integer value of the boost duration in microseconds.
+     *
      * A particular platform may choose to ignore any hint.
      *
      * availability: version 0.2
@@ -280,6 +302,12 @@
     void (*setFeature)(struct power_module *module, feature_t feature, int state);
 
     /*
+     * (*getFeature) is called to get the current value of a particular
+     * feature or capability from the hardware or PowerHAL
+     */
+    int (*getFeature)(struct power_module *module, feature_t feature);
+
+    /*
      * Platform-level sleep state stats:
      * Report cumulative info on the statistics on platform-level sleep states since boot.
      *
@@ -337,7 +365,6 @@
 
 } power_module_t;
 
-
 __END_DECLS
 
 #endif  // ANDROID_INCLUDE_HARDWARE_POWER_H