New SHAI contributions for Power Management
authorarunabha
Sat, 10 Oct 2009 12:57:00 +0100
changeset 3 89965ac1daf8
parent 2 ea09f30a96a5
child 4 acd095fadba0
New SHAI contributions for Power Management
Audio HW Control/audio_hw_control_chipset_api.h
Power Management/pm_definitions_chipset_api.h
Power Management/pm_policy_chipset_api.h
Power Management/pm_services_chipset_api.h
--- a/Audio HW Control/audio_hw_control_chipset_api.h	Sat Oct 10 12:43:55 2009 +0100
+++ b/Audio HW Control/audio_hw_control_chipset_api.h	Sat Oct 10 12:57:00 2009 +0100
@@ -1,7 +1,7 @@
 /*
-  audio_hw_control_chipset_api.h
+  audio_hwctrl_chipset_api.h
 
-  Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
+  Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
   All rights reserved.
 
   This program and the accompanying materials are made available 
@@ -13,7 +13,7 @@
   Nokia Corporation - initial contribution.
 
   Contributors:
-*/
+*/
 
 #ifndef AUDIO_HWCTRL_CHIPSET_API_H
 #define AUDIO_HWCTRL_CHIPSET_API_H
@@ -22,7 +22,6 @@
 extern "C" {
 #endif /* __cplusplus */
 
-
 /* Each OMX header must include all required header files to allow the
  * header to compile without errors.  The includes below are required
  * for this header file to compile successfully 
@@ -31,177 +30,168 @@
 #include <OMX_Audio.h>
 
 
-/* structures and enums used by OMX interface */
-
- typedef enum OMX_AUDIO_HWREGISTERTYPE { 
-     OMX_AUDIO_IO = 0,
-     OMX_AUDIO_I2C,
-     OMX_AUDIO_SLIMBUS,
-     OMX_AUDIO_CBUS = 0xFFFF     
- } OMX_AUDIO_HWREGISTERTYPE;
- 
- typedef struct OMX_AUDIO_REGBANKDESCRIPTORTYPE { 
-     OMX_U32 nSize;                                    
-     OMX_VERSIONTYPE nVersion;                   
-     OMX_U32 nRegBankIndex;   
-     OMX_U32 nLogicalStartAddr;
-     OMX_U32 nLogicalEndAddr;
-     OMX_AUDIO_HWREGISTERTYPE eRegBankType;
-       
- } OMX_AUDIO_REGBANKDESCRIPTORTYPE;
-
- typedef enum OMX_AUDIO_HWLOOPSTYPE { 
-     OMX_AUDIO_NOLOOP = 0,
-     OMX_AUDIO_SIDETONE_LOOP = 0xFFFF
-     /* rest of HW loops are to be defined on a vendor specific basis */
-     
- } OMX_AUDIO_HWLOOPSTYPE;
+/** Audio power control.
+*/
+typedef struct OMX_AUDIO_CONFIG_POWERTYPE  { 
+    OMX_U32 nSize;                                    
+    OMX_VERSIONTYPE nVersion;                   
+    OMX_U32 nPortIndex;            
+    OMX_U32 nChannel;
+    OMX_BOOL bPower;
+} OMX_AUDIO_CONFIG_POWERTYPE;
 
- typedef enum OMX_AUDIO_HWOPERATIONTYPE { 
-     OMX_AUDIO_NOOP = 0,
-     OMX_AUDIO_16BIT_SINGLE_READ,
-     OMX_AUDIO_16BIT_SINGLE_WRITE,
-     OMX_AUDIO_32BIT_SINGLE_READ,
-     OMX_AUDIO_32BIT_SINGLE_WRITE,
-     OMX_AUDIO_16BIT_MULTI_READ,
-     OMX_AUDIO_16BIT_MULTI_WRITE,
-     OMX_AUDIO_32BIT_MULTI_READ,
-     OMX_AUDIO_32BIT_MULTI_WRITE,
-     OMX_AUDIO_16BIT_BURST_MULTI_READ,
-     OMX_AUDIO_16BIT_BURST_MULTI_WRITE,
-     OMX_AUDIO_32BIT_BURST_MULTI_READ,
-     OMX_AUDIO_32BIT_BURST_MULTI_WRITE = 0xFFFF     
- } OMX_AUDIO_HWOPERATIONTYPE;
+/** Audio volume ramp control.
+*/
+typedef struct OMX_AUDIO_CONFIG_VOLUMERAMPTYPE  { 
+    OMX_U32 nSize;                                    
+    OMX_VERSIONTYPE nVersion;                   
+    OMX_U32 nPortIndex;            
+    OMX_U32 nChannel;
+    OMX_BOOL bLinear;
+    OMX_BS32 sStartVolume;
+    OMX_BS32 sEndVolume;
+    OMX_TICKS nRampDuration;
+    OMX_BOOL bRampTerminate;
+    OMX_BS32 sCurrentVolume;
+    OMX_TICKS nRampCurrentTime;
+    OMX_TICKS nRampMinDuration;
+    OMX_TICKS nRampMaxDuration;
+    OMX_U32 nVolumeStep;
+} OMX_AUDIO_CONFIG_VOLUMERAMPTYPE;
 
- 
- typedef enum OMX_AUDIO_HWCTRL_STATUSTYPE { 
-     OMX_AUDIO_OK = 0,
-     OMX_AUDIO_FAIL,
-     /* if callback facility is somehow solved in OpenMAX IL for 
-        getconfig/setconfig parameter calls, it is expected */
-     /* to have here extra status information that can be returned 
-        for e.g. multi-read/write commands */
-     OMX_AUDIO_NOT_SUPPORTED = 0xFFFF     
- } OMX_AUDIO_HWCTRL_STATUSTYPE;
+/** Settings burst control.
+*/
+typedef struct OMX_AUDIO_CONFIG_BURSTCONTROLTYPE  { 
+    OMX_U32 nSize;                                    
+    OMX_VERSIONTYPE nVersion;                   
+    OMX_U32 nPortIndex;            
+    OMX_BOOL bBurstControl;
+    OMX_BOOL bStatus;
+} OMX_AUDIO_CONFIG_BURSTCONTROLTYPE;
+
+/** Audio register bank query.
+*/
+typedef struct OMX_AUDIO_CONFIG_REGISTERBANKQUERYTYPE  { 
+    OMX_U32 nSize;                                    
+    OMX_VERSIONTYPE nVersion;                   
+    OMX_U32 nPortIndex;   
+    OMX_U16 nNumRegisterBanks;           
+} OMX_AUDIO_CONFIG_REGISTERBANKQUERYTYPE;
 
 
-
-/* Configuration parameters */
-
-typedef struct OMX_AUDIO_CONFIG_POWERTYPE  { 
-     OMX_U32 nSize;                                    
-     OMX_VERSIONTYPE nVersion;                   
-     OMX_U32 nPortIndex;            
-     OMX_U32 nChannel;
-     OMX_BOOL bPower;
-} OMX_AUDIO_CONFIG_POWERTYPE;
-
+typedef enum OMX_AUDIO_HWREGISTERTYPE { 
+    OMX_AUDIO_IO = 0,
+    OMX_AUDIO_I2C,
+    OMX_AUDIO_SLIMBUS,
+    OMX_AUDIO_CBUS = 0xFFFF     
+} OMX_AUDIO_HWREGISTERTYPE;
+ 
+typedef struct OMX_AUDIO_REGBANKDESCRIPTORTYPE { 
+    OMX_U32 nSize;                                    
+    OMX_VERSIONTYPE nVersion;                   
+    OMX_U32 nRegBankIndex;   
+    OMX_U32 nLogicalStartAddr;
+    OMX_U32 nLogicalEndAddr;
+    OMX_AUDIO_HWREGISTERTYPE eRegBankType;
+} OMX_AUDIO_REGBANKDESCRIPTORTYPE;
 
-typedef struct OMX_AUDIO_CONFIG_VOLUMERAMPTYPE  { 
-     OMX_U32 nSize;                                    
-     OMX_VERSIONTYPE nVersion;                   
-     OMX_U32 nPortIndex;            
-     OMX_U32 nChannel;
-     OMX_BOOL bLinear;
-     OMX_BS32 sStartVolume;
-     OMX_BS32 sEndVolume;
-     OMX_TICKS nRampDuration;
-     OMX_BOOL bRampTerminate;
-     OMX_BS32 sCurrentVolume;
-     OMX_TICKS nRampCurrentTime;
-     OMX_TICKS nRampMinDuration;
-     OMX_TICKS nRampMaxDuration;
-     OMX_U32 nVolumeStep;
- } OMX_AUDIO_CONFIG_VOLUMERAMPTYPE;
+/** Audio register bank table control.
+*/
+typedef struct OMX_AUDIO_CONFIG_REGISTERBANKTABLETYPE  { 
+    OMX_U32 nSize;                                    
+    OMX_VERSIONTYPE nVersion;                   
+    OMX_U32 nPortIndex;   
+    OMX_U16 nNumRegisterBanks; 
+    OMX_AUDIO_REGBANKDESCRIPTORTYPE RegBankDescriptorTable;     
+} OMX_AUDIO_CONFIG_REGISTERBANKTABLETYPE;
 
 
- typedef struct OMX_AUDIO_CONFIG_BURSTCONTROLTYPE  { 
-     OMX_U32 nSize;                                    
-     OMX_VERSIONTYPE nVersion;                   
-     OMX_U32 nPortIndex;            
-     OMX_BOOL bBurstControl;
-     OMX_BOOL bStatus;
- } OMX_AUDIO_CONFIG_BURSTCONTROLTYPE;
-
- typedef struct OMX_AUDIO_CONFIG_REGISTERBANKQUERYTYPE  { 
-     OMX_U32 nSize;                                    
-     OMX_VERSIONTYPE nVersion;                   
-     OMX_U32 nPortIndex;   
-     OMX_U16 nNumRegisterBanks;           
- } OMX_AUDIO_CONFIG_REGISTERBANKQUERYTYPE;
-
+typedef enum OMX_AUDIO_HWCTRL_STATUSTYPE { 
+    OMX_AUDIO_OK = 0,
+    OMX_AUDIO_FAIL,
+    /* if callback facility is somehow solved in OpenMAX IL for getconfig/setconfig parameter calls, it is expected */
+    /* to have here extra status information that can be returned for e.g. multi-read/write commands */
+    OMX_AUDIO_NOT_SUPPORTED = 0xFFFF     
+} OMX_AUDIO_HWCTRL_STATUSTYPE;
 
- typedef enum OMX_AUDIO_HWREGISTERTYPE { 
-     OMX_AUDIO_IO = 0,
-     OMX_AUDIO_I2C,
-     OMX_AUDIO_SLIMBUS,
-     OMX_AUDIO_CBUS = 0xFFFF     
- } OMX_AUDIO_HWREGISTERTYPE;
- 
- 
- typedef struct OMX_AUDIO_REGBANKDESCRIPTORTYPE { 
-     OMX_U32 nSize;                                    
-     OMX_VERSIONTYPE nVersion;                   
-     OMX_U32 nRegBankIndex;   
-     OMX_U32 nLogicalStartAddr;
-     OMX_U32 nLogicalEndAddr;
-     OMX_AUDIO_HWREGISTERTYPE eRegBankType;
-       
- } OMX_AUDIO_REGBANKDESCRIPTORTYPE;
+typedef enum OMX_AUDIO_HWOPERATIONTYPE { 
+    OMX_AUDIO_NOOP = 0,
+    OMX_AUDIO_16BIT_SINGLE_READ,
+    OMX_AUDIO_16BIT_SINGLE_WRITE,
+    OMX_AUDIO_32BIT_SINGLE_READ,
+    OMX_AUDIO_32BIT_SINGLE_WRITE,
+    OMX_AUDIO_16BIT_MULTI_READ,
+    OMX_AUDIO_16BIT_MULTI_WRITE,
+    OMX_AUDIO_32BIT_MULTI_READ,
+    OMX_AUDIO_32BIT_MULTI_WRITE,
+    OMX_AUDIO_16BIT_BURST_MULTI_READ,
+    OMX_AUDIO_16BIT_BURST_MULTI_WRITE,
+    OMX_AUDIO_32BIT_BURST_MULTI_READ,
+    OMX_AUDIO_32BIT_BURST_MULTI_WRITE = 0xFFFF     
+} OMX_AUDIO_HWOPERATIONTYPE;
 
- typedef struct OMX_AUDIO_CONFIG_REGISTERBANKTABLETYPE  { 
-     OMX_U32 nSize;                                    
-     OMX_VERSIONTYPE nVersion;                   
-     OMX_U32 nPortIndex;   
-     OMX_U16 nNumRegisterBanks; 
-     OMX_AUDIO_REGBANKDESCRIPTORTYPE RegBankDescriptorTable;     
- } OMX_AUDIO_CONFIG_REGISTERBANKTABLETYPE;
+/** Custom audio HW control.
+*/
+typedef struct OMX_AUDIO_CONFIG_CUSTOMHWCONTROLTYPE  { 
+    OMX_U32 nSize;                                    
+    OMX_VERSIONTYPE nVersion;                   
+    OMX_U32 nPortIndex;   
+    OMX_AUDIO_HWCTRL_STATUSTYPE eStatus;
+    OMX_AUDIO_HWOPERATIONTYPE eHwOperation;
+    OMX_AUDIO_HWREGISTERTYPE eRegisterType;
+    OMX_U16 nDataCount;
+    OMX_U32 nLogicalAddress;
+    OMX_U16 nData;     
+} OMX_AUDIO_CONFIG_CUSTOMHWCONTROLTYPE;
 
 
- typedef struct OMX_AUDIO_CONFIG_CUSTOMHWCONTROLTYPE  { 
-     OMX_U32 nSize;                                    
-     OMX_VERSIONTYPE nVersion;                   
-     OMX_U32 nPortIndex;   
-     OMX_AUDIO_HWCTRL_STATUSTYPE eStatus;
-     OMX_AUDIO_HWOPERATIONTYPE eHwOperation;
-     OMX_AUDIO_HWREGISTERTYPE eRegisterType;
-     OMX_U16 nDataCount;
-     OMX_U32 nLogicalAddress;
-     OMX_U16 nData;     
- } OMX_AUDIO_CONFIG_CUSTOMHWCONTROLTYPE;
+typedef enum OMX_AUDIO_HWLOOPSTYPE { 
+    OMX_AUDIO_NOLOOP = 0,
+    OMX_AUDIO_SIDETONE_LOOP = 0xFFFF
+    /* rest of HW loops are to be defined on a vendor specific basis */
+} OMX_AUDIO_HWLOOPSTYPE;
 
+/** Audio HW loop support query.
+*/
 typedef struct OMX_AUDIO_CONFIG_HWLOOPSUPPORTTYPE  { 
-     OMX_U32 nSize;                                    
-     OMX_VERSIONTYPE nVersion;                   
-     OMX_U32 nPortIndex;
-     OMX_U32 nSupportedLoops;    
-     OMX_AUDIO_HWLOOPSTYPE eLoopIndex;
-         
- } OMX_AUDIO_CONFIG_HWLOOPSUPPORTTYPE;
+    OMX_U32 nSize;                                    
+    OMX_VERSIONTYPE nVersion;                   
+    OMX_U32 nPortIndex;
+    OMX_U32 nSupportedLoops;    
+    OMX_AUDIO_HWLOOPSTYPE eLoopIndex;
+} OMX_AUDIO_CONFIG_HWLOOPSUPPORTTYPE;
 
+/** Audio HW loop control.
+*/
 typedef struct OMX_AUDIO_CONFIG_HWLOOPCONTROLTYPE  { 
-     OMX_U32 nSize;                                    
-     OMX_VERSIONTYPE nVersion;                   
-     OMX_U32 nPortIndex;   
-     OMX_AUDIO_HWLOOPSTYPE eLoopIndex;
-     OMX_U32 nChannel;
-     OMX_BOOL bControlSwitch;
-     OMX_BOOL bLinear;
-     OMX_BS32 sLoopVolume;
-     
- } OMX_AUDIO_CONFIG_HWLOOPCONTROLTYPE;
+    OMX_U32 nSize;                                    
+    OMX_VERSIONTYPE nVersion;                   
+    OMX_U32 nPortIndex;   
+    OMX_AUDIO_HWLOOPSTYPE eLoopIndex;
+    OMX_U32 nChannel;
+    OMX_BOOL bControlSwitch;
+    OMX_BOOL bLinear;
+    OMX_BS32 sLoopVolume;
+} OMX_AUDIO_CONFIG_HWLOOPCONTROLTYPE;
 
 
+/** Non-OpenMAX API layers */
+/***************************/
 
-/* End of OMX part */
+/* channel ID denoting special case of all channels being selected where possible */       
+#define AUDIO_COMMON_CHANNEL_ALL	0x7FFFFFFF
 
-/************  non-OMX interface definition **************/  
+/** 16 bit unsigned quantity that is 16 bit word aligned */
+typedef unsigned short uint16;
 
-/* types and constants used by non-OMX APIs */
+/** 16 bit signed quantity that is 16 bit word aligned */
+typedef signed short int16;
 
-/* channel ID denoting special case of all channels being selected 
-   where possible */       
-#define AUDIO_COMMON_CHANNEL_ALL	0x7FFFFFFF
+/** 32 bit unsigned quantity that is 32 bit word aligned */
+typedef unsigned long uint32;
+
+/** signed quantity that is 32 bit word aligned */
+typedef signed long int32;
 
 typedef enum AUDIO_COMMON_SWITCH { 
      AUDIO_COMMON_OFF = 0,
@@ -213,7 +203,7 @@
 typedef enum AUDIO_COMMON_STATUS { 
      AUDIO_COMMON_OK = 0,
      AUDIO_COMMON_FAIL,  
-     AUDIO_COMMON_UNSUPPORTED = 0xFFFF     
+     AUDIO_COMMON_ALLCHANNELS_UNSUPPORTED = 0xFFFF     
 } AUDIO_COMMON_STATUS;
         
 typedef enum AUDIO_HAL_HW_LOOPS { 
@@ -240,25 +230,12 @@
 } AUDIO_HAL_HW_OPERATION;
 
 typedef enum AUDIO_HAL_HW_REGISTER_TYPE { 
-     OMX_AUDIO_IO = 0,
-     OMX_AUDIO_I2C,
-     OMX_AUDIO_SLIMBUS,
-     OMX_AUDIO_CBUS = 0xFFFF     
+     AUDIO_HAL_IO = 0,
+     AUDIO_HAL_I2C,
+     AUDIO_HAL_SLIMBUS,
+     AUDIO_HAL_CBUS = 0xFFFF     
 } AUDIO_HAL_HW_REGISTER_TYPE;
 
-
-/** 16 bit unsigned quantity that is 16 bit word aligned */
-typedef unsigned short uint16;
-
-/** 16 bit signed quantity that is 16 bit word aligned */
-typedef signed short int16;
-
-/** 32 bit unsigned quantity that is 32 bit word aligned */
-typedef unsigned long uint32;
-
-/** signed quantity that is 32 bit word aligned */
-typedef signed long int32;
-
 typedef struct AUDIO_HAL_REGBANK_DESCRIPTOR{ 
      uint32 reg_bank_index;   
      uint32 logical_start_addr;
@@ -279,7 +256,7 @@
 
 typedef struct AUDIO_TIMED_RAMP_INFO  { 
 
-      uint32 linear,
+      uint32 linear;
       int32 ramp_start_volume;
       int32 ramp_end_volume;
       int32 current_volume;
@@ -295,21 +272,17 @@
      
 } AUDIO_TIMED_RAMP_INFO;
 
-
-/* API functions */
-
-/* The convention for the functions will be:       */
-/* <supplier>_<component>_<API function name(...)>    */
+// Function prototypes
 
 /* HAL layer */
 
-void audio_hal_mute_control (void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status), 
+void audio_hal_mute_control (void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status, uint32 channel_index, uint32 extra_status_info), 
                              uint32 channel_index, 
                              AUDIO_COMMON_SWITCH mute_control);
 
 AUDIO_COMMON_SWITCH audio_hal_mute_status (uint32 channel_index);
 
-void audio_hal_power_control (void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status), 
+void audio_hal_power_control (void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status, uint32 channel_index, uint32 extra_status_info), 
                              uint32 channel_index, AUDIO_COMMON_SWITCH power_control);
 
 AUDIO_COMMON_SWITCH audio_hal_power_status(uint32 channel_index);
@@ -318,20 +291,23 @@
 
 void audio_hal_gains_descriptor_query(AUDIO_HAL_GAIN_DESCRIPTOR* gain_descriptor_table);
 
-void audio_hal_loop_gain_capabilities_query(AUDIO_HAL_HW_LOOPS* num_loops, uint16* max_num_gains);
+void audio_hal_loop_gain_capabilities_query(uint16* num_loops, uint16* max_num_gains);
 
 void audio_hal_supported_loops_query (uint16* supported_loop_indexes);
 
 void audio_hal_loop_gains_descriptor_query (AUDIO_HAL_HW_LOOPS loop_index,
                                     AUDIO_HAL_GAIN_DESCRIPTOR* gain_descriptor_table);
 
-AUDIO_COMMON_STATUS audio_hal_gain_control (uint32 channel_index, uint16 gain_index,
+AUDIO_COMMON_STATUS audio_hal_gain_control (void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status, uint32 channel_index, uint32 extra_status_info), 
+                                    uint32 channel_index, uint16 gain_index,
                                     uint32 linear, int32 gain_value);
 
 AUDIO_COMMON_STATUS audio_hal_gain_query (uint32 channel_index, uint16 gain_index,
                                     uint32 linear, int32* gain_value);
 
-AUDIO_COMMON_STATUS audio_hal_loop_control(AUDIO_HAL_HW_LOOPS loop_index, AUDIO_COMMON_SWITCH loop_switch,
+AUDIO_COMMON_STATUS audio_hal_loop_control(void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status, uint32 channel_index, 
+                                                  AUDIO_HAL_HW_LOOPS loop_index, uint32 extra_status_info), 
+                                    AUDIO_HAL_HW_LOOPS loop_index, AUDIO_COMMON_SWITCH loop_switch,
                                     uint16 channel_index, uint16 gain_index, uint32 linear,
                                     int32 loop_gain_value);
 
@@ -346,26 +322,25 @@
 
                                  
 /* Sequencer layer */
-void audio_sequencer_mute_control(void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status), 
+void audio_sequencer_mute_control(void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status, uint32 channel_index, uint32 extra_status_info), 
                                   uint32 channel_index, AUDIO_COMMON_SWITCH mute_control);
 
-void audio_sequencer_power_control(void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status), 
+void audio_sequencer_power_control(void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status, uint32 channel_index, uint32 extra_status_info), 
                                   uint32 channel_index, AUDIO_COMMON_SWITCH power_control);
                                   
-AUDIO_COMMON_STATUS audio_sequencer_burst_control(void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status), 
+AUDIO_COMMON_STATUS audio_sequencer_burst_control(void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status, uint32 extra_status_info), 
                                                   AUDIO_COMMON_SWITCH burst_control);
 
-void audio_sequencer_volume_control(void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status), 
+void audio_sequencer_volume_control(void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status, uint32 channel_index, uint32 extra_status_info), 
                                      uint32 channel_index, uint32 linear, int32 volume);
 
-void audio_sequencer_volume_query(uint32 channel_index, uint32 linear, int32* min_volume,
-                                   int32* max_volume, int32* current_volume);
+void audio_sequencer_volume_query(uint32 channel_index, uint32 linear, int32* min_volume, int32* max_volume, int32* current_volume);
 
 /* Timing critical layer */
-void audio_timed_mute_control(void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status), 
+void audio_timed_mute_control(void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status, uint32 channel_index, uint32 extra_status_info), 
                               uint32 channel_index, AUDIO_COMMON_SWITCH mute_control);
                               
-void audio_timed_volume_ramp_control (void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status), 
+void audio_timed_volume_ramp_control (void (*call_back_fn_ptr)(AUDIO_COMMON_STATUS status, uint32 channel_index, uint32 extra_status_info), 
                              uint32 channel_index, uint32 linear, int32 start_volume,
                              int32 end_volume, uint32 ramp_duration_hi, uint32 ram_duration_lo,
                              AUDIO_COMMON_SWITCH ramp_terminate);
@@ -373,10 +348,8 @@
 void audio_timed_volume_ramp_query (uint32 channel_index, AUDIO_TIMED_RAMP_INFO* volume_ramp_info);
 
 
-                                     
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
 
-#endif
\ No newline at end of file
+#endif /* OMX_Nokia_AudioExt_h */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Power Management/pm_definitions_chipset_api.h	Sat Oct 10 12:57:00 2009 +0100
@@ -0,0 +1,300 @@
+/*
+  pm_definitions_chipset_api.h
+
+  Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+  All rights reserved.
+
+  This program and the accompanying materials are made available 
+  under the terms of the Eclipse Public License v1.0 which accompanies 
+  this distribution, and is available at 
+  http://www.eclipse.org/legal/epl-v10.html
+
+  Initial Contributors:
+  Nokia Corporation - initial contribution.
+
+  Contributors:
+*/
+
+/** @file
+@brief PM Definitions Chipset API H
+
+Purpose of this header is to describe the protocol that should be followed by
+Nokia and chipset vendor regarding some of the parameters used in power
+management chipset API specifications. The aim of this definition is to specify
+platform specific entities in an abstract way and at the same time, providing an
+option for some level of granularity for possible performance optimizations.
+Definition of the following parameters is included in this document.
+
+@publishedDeviceAbstraction
+*/
+
+#ifndef PM_DEFINITIONS_CHIPSET_API_H
+#define PM_DEFINITIONS_CHIPSET_API_H
+
+
+// Include files
+
+#include <kern_priv.h>
+
+
+// Constants
+
+/**
+Latency resource minimum value
+*/
+const TInt KMinLatency = 0;
+
+/**
+Latency resource maximum values
+*/
+const TInt KMaxLatency = KMaxTInt32;
+
+/**
+Maximum level of any performance resource
+*/
+const TInt KPerfMax = 100;
+
+/**
+CPU normal performance level
+*/
+const TInt KPerfNormalCpu = 100;
+
+/**
+Memory normal performance level
+*/
+const TInt KPerfNormalMemory = 100;
+
+/**
+Bus normal performance level
+*/
+const TInt KPerfNormalBus = 100;
+
+/**
+Audio HWA normal performance level
+*/
+const TInt KPerfNormalHwaAudio = 100;
+
+/**
+Graphics HWA normal performance level
+*/
+const TInt KPerfNormalHwaGfx = 100;
+
+/**
+Imaging HWA normal performance level
+*/
+const TInt KPerfNormalHwaImg = 100;
+
+/**
+Video HWA normal performance level
+*/
+const TInt KPerfNormalHwaVideo = 100;
+
+/**
+Modem normal performance level
+*/
+const TInt KPerfNormalModem = 100;
+
+/**
+Minimum level of any performance level
+*/
+const TInt KPerfMin = 0;
+
+// Data types
+
+/**
+Symbian power resource IDs
+*/
+enum TPowerRes
+    {
+    EPwrResLatency      = 0,            /**< latency                        */
+    EPwrResAnalogAcc    = 0,            /**< analog accessory               */
+    EPwrResBT           = 0,            /**< bluetooth                      */
+    EPwrResCamera1      = 0,            /**< camera#1                       */
+    EPwrResCamera2      = 0,            /**< camera#2                       */
+    EPwrResDBR          = 0,            /**< DBR                            */
+    EPwrResDigMic       = 0,            /**< digital mic                    */
+    EPwrResDisplay1     = 0,            /**< display#1                      */
+    EPwrResDisplay2     = 0,            /**< display#2                      */
+    EPwrResEAR          = 0,            /**< EAR                            */
+    EPwrRes_eMMC        = 0,            /**< eMMC                           */
+    EPwrResFMRadioTx    = 0,            /**< FM radio transmitter           */
+    EPwrResFMRadioRx    = 0,            /**< FM radio receiver              */
+    EPwrResGPS          = 0,            /**< GPS                            */
+    EPwrResHSUSB        = 0,            /**< HS-USB                         */
+    EPwrResIHF          = 0,            /**< IHF                            */
+    EPwrResIrDA         = 0,            /**< IrDA                           */
+    EPwrResKeypad       = 0,            /**< keypad                         */
+    EPwrResMassStorage  = 0,            /**< mass storage                   */
+    EPwrResMemCard      = 0,            /**< memory card                    */
+    EPwrResMic          = 0,            /**< mic                            */
+    EPwrResNFC          = 0,            /**< NFC                            */
+    EPwrResSIMIF        = 0,            /**< SIM IF                         */
+    EPwrResTouchScreen  = 0,            /**< touch screen                   */
+    EPwrResTVOut        = 0,            /**< TV out                         */
+    EPwrResULP          = 0,            /**< ULP                            */
+    EPwrResUSBOTG       = 0,            /**< USB OTG                        */
+    EPwrResUWB          = 0,            /**< UWB                            */
+    EPwrResVibra        = 0,            /**< vibra                          */
+    EPwrResWiMax        = 0,            /**< WiMax                          */
+    EPwrResWLAN         = 0,            /**< WLAN                           */
+    EPwrResHDMI         = 0,            /**< HDMI                           */
+    EPwrResUSB_UICC_IF  = 0,            /**< USB UICC IF                    */
+    EPwrResExtClk1      = 0,            /**< External clock 1               */
+    EPwrResExtClk2      = 0,            /**< External clock 2               */
+    EPwrResExtClk3      = 0,            /**< External clock 3               */
+    EPwrResExtClk4      = 0,            /**< External clock 4               */
+    EPwrResExtClk5      = 0,            /**< External clock 5               */
+    EPwrResExtClk6      = 0,            /**< External clock 6               */
+    EPwrResExtClk7      = 0,            /**< External clock 7               */
+    EPwrResExtClk8      = 0,            /**< External clock 8               */
+    EPwrResExtClk9      = 0,            /**< External clock 9               */
+    EPwrResExtClk10     = 0,            /**< External clock 10              */
+    EPwrResExtVoltage1  = 0,            /**< External voltage 1             */
+    EPwrResExtVoltage2  = 0,            /**< External voltage 2             */
+    EPwrResExtVoltage3  = 0,            /**< External voltage 3             */
+    EPwrResExtVoltage4  = 0,            /**< External voltage 4             */
+    EPwrResExtVoltage5  = 0,            /**< External voltage 5             */
+    EPwrResExtVoltage6  = 0,            /**< External voltage 6             */
+    EPwrResExtVoltage7  = 0,            /**< External voltage 7             */
+    EPwrResExtVoltage8  = 0,            /**< External voltage 8             */
+    EPwrResExtVoltage9  = 0,            /**< External voltage 9             */
+    EPwrResExtVoltage10 = 0,            /**< External voltage 10            */
+    };
+
+/**
+Symbian performance resource IDs
+*/
+enum TPerfRes
+    {
+    EPwrResPerfCpu      = 0,            /**< CPU performance                */
+    EPwrResPerfMemory   = 0,            /**< Main memory                    */
+    EPwrResPerfBus      = 0,            /**< Main interconnect bus          */
+    EPwrResPerfHwaAudio = 0,            /**< Audio HW accelerator           */
+    EPwrResPerfHwaGfx   = 0,            /**< Graphics HW accelerator        */
+    EPwrResPerfHwaImg   = 0,            /**< Imaging HW accelerator         */
+    EPwrResPerfHwaVideo = 0,            /**< Video HW accelerator           */
+    EPwrResPerfModem    = 0             /**< Modem                          */
+    };
+
+/**
+Possible resource levels
+*/
+enum TDevState
+    {
+    EDevD0  = 0xf,                      /**< (fixed) highest power state    */
+    EDevD1  = 0xe,                      /**< (fixed)                        */
+    EDevD2  = 0xd,                      /**< (fixed)                        */
+    EDevD3  = 0xc,                      /**< (fixed)                        */
+    EDevD4  = 0xb,                      /**< (fixed)                        */
+    EDevD5  = 0xa,                      /**< (fixed)                        */
+    EDevD6  = 0x9,                      /**< (fixed)                        */
+    EDevD7  = 0x8,                      /**< (fixed)                        */
+    EDevD8  = 0x7,                      /**< (fixed)                        */
+    EDevD9  = 0x6,                      /**< (fixed)                        */
+    EDevD10 = 0x5,                      /**< (fixed)                        */
+    EDevD11 = 0x4,                      /**< (fixed)                        */
+    EDevD12 = 0x3,                      /**< (fixed)                        */
+    EDevD13 = 0x2,                      /**< (fixed)                        */
+    EDevD14 = 0x1,                      /**< (fixed)                        */
+    EDevD15 = 0x0                       /**< (fixed) lowest power state     */
+    };
+
+/**
+Power is fully off. Least power consuming state.
+*/
+const TInt KDevOff = EDevD15;
+
+/**
+Device is in reset state.
+*/
+const TInt KDevReset = EDevD14;
+
+/**
+Device is in retention state
+*/
+const TInt KDevRetention = EDevD13;
+
+/**
+Device is in sleep state.
+An intermediate state whose definition varies by device.
+*/
+const TInt KDevSleep = EDevD12;
+
+/**
+Device is in idle state.
+An intermediate state whose definition varies by device.
+*/
+const TInt KDevIdle = EDevD2;
+
+/**
+Device is capable itself to control power states.
+*/
+const TInt KDevAuto = EDevD1;
+
+/**
+Power is fully on.
+*/
+const TInt KDevOn = EDevD0;
+
+/**
+The set of HW blocks whose load is monitored by the DVFS algorithms. Each
+scalable domain may consist of one or more of such blocks.
+*/
+enum TDvfsMonitor
+    {
+    EDvfsMonCpu1     = 0,               /**< General purpose CPU 1          */
+    EDvfsMonCpu2     = 0,               /**< General purpose CPU 2          */
+    EDvfsMonMemory   = 0,               /**< Main program memory (RAM)      */
+    EDvfsMonBus      = 0,               /**< Main bus                       */
+    EDvfsMonDma      = 0,               /**< System DMA                     */
+    EDvfsMonAudio    = 0,               /**< Audio HW accelerator           */
+    EDvfsMonHwaGfx   = 0,               /**< Graphics HW accelerator        */
+    EDvfsMonHwaImg   = 0,               /**< Imaging HW accelerator         */
+    EDvfsMonHwaVideo = 0,               /**< Video HW accelerator           */
+    EDvfsMonModem    = 0,               /**< Modem                          */
+    EDvfsMonResv0    = 0,               /**< Reserved                       */
+    EDvfsMonResv1    = 0,               /**< Reserved                       */
+    EDvfsMonResv2    = 0,               /**< Reserved                       */
+    EDvfsMonResv3    = 0,               /**< Reserved                       */
+    EDvfsMonResv4    = 0,               /**< Reserved                       */
+    EDvfsMonResv5    = 0,               /**< Reserved                       */
+    EDvfsMonResv6    = 0,               /**< Reserved                       */
+    };
+
+/**
+Global (system wide) sleep states from a software point of view. The system
+shall have up to 16 different sleep states. EGblG0 is the most power consuming
+and EGblG1S15 is the least power consuming states.
+*/
+enum TGlobalState
+    {
+    EGblG0    = 0xf,                    /**< (fixed) highest power state    */
+    EGblG1S1  = 0xe,                    /**< (fixed)                        */
+    EGblG1S2  = 0xd,                    /**< (fixed)                        */
+    EGblG1S3  = 0xc,                    /**< (fixed)                        */
+    EGblG1S4  = 0xb,                    /**< (fixed)                        */
+    EGblG1S5  = 0xa,                    /**< (fixed)                        */
+    EGblG1S6  = 0x9,                    /**< (fixed)                        */
+    EGblG1S7  = 0x8,                    /**< (fixed)                        */
+    EGblG1S8  = 0x7,                    /**< (fixed)                        */
+    EGblG1S9  = 0x6,                    /**< (fixed)                        */
+    EGblG1S10 = 0x5,                    /**< (fixed)                        */
+    EGblG1S11 = 0x4,                    /**< (fixed)                        */
+    EGblG1S12 = 0x3,                    /**< (fixed)                        */
+    EGblG1S13 = 0x2,                    /**< (fixed)                        */
+    EGblG1S14 = 0x1,                    /**< (fixed)                        */
+    EGblG1S15 = 0x0                     /**< (fixed) lowest power state     */
+    };
+
+/**
+The least power consuming mode of the chipset (also called the deep sleep).
+*/
+const TInt KGblDeepSleep = EGblG1S15;   /**< (fixed)                        */
+
+/**
+Power state when at least one of the generic CPUs are active (not in WFI state).
+This is the most power consuming mode of the chipset.
+*/
+const TInt KGblActive    = EGblG0;      /**< (fixed)                        */
+
+#endif // PM_DEFINITIONS_CHIPSET_API_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Power Management/pm_policy_chipset_api.h	Sat Oct 10 12:57:00 2009 +0100
@@ -0,0 +1,355 @@
+/*
+  pm_policy_chipset_api.h
+
+  Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+  All rights reserved.
+
+  This program and the accompanying materials are made available 
+  under the terms of the Eclipse Public License v1.0 which accompanies 
+  this distribution, and is available at 
+  http://www.eclipse.org/legal/epl-v10.html
+
+  Initial Contributors:
+  Nokia Corporation - initial contribution.
+
+  Contributors:
+*/
+
+/** @file
+@brief PM Policy Chipset API H
+
+The purpose of this interface is to enable Nokia to affect power management
+functionalities implemented below the Chipset API.
+This interface is meant to be used only by Symbian kernel side clients.
+
+@publishedDeviceAbstraction
+*/
+
+#ifndef PM_POLICY_CHIPSET_API_H
+#define PM_POLICY_CHIPSET_API_H
+
+
+// Include files
+
+#include <kern_priv.h>
+#include "pm_definitions_chipset_api.h"
+
+
+// Class declaration
+
+/**
+@brief Class description
+
+This class contains static methods to set and get certain power management
+policy parameters. There are no data members.
+*/
+class PMPolicy
+    {
+    public:
+        /**
+        This enumeration is purposed to include the list of known load
+        prediction algorithms. It is mainly used for enquiring about current
+        algorithm and for setting and getting their parameters if applicable.
+        */
+        enum TAlgorithm
+            {
+            EAlgoAll,       /**< Any algorithm that is in use   */
+            EAlgoAVGn,      /**< Weighted average of past loads */
+            EAlgoMAW,       /**< Moving average workload        */
+            EAlgoLMS,       /**< Least mean square              */
+            EAlgoUnknown    /**< Any other algorithm            */
+            };
+
+        /**
+        The purpose of this enumeration is to specify the type of parameters
+        that can be changed for one or more of the load prediction algorithms.
+        */
+        enum TParam
+            {
+            EParamSampleCount = 1   /**< number of history samples  */
+            };
+
+        /**
+        Method to set the load prediction trigger delay. When the predicted load
+        is changed, it waits the specific amount of time before triggering the
+        OPP change. If the load changes back to the previous OPP window during
+        the wait period, then no OPP change will be done.
+
+        @param aRes The performance resource
+        @param aDelayInc Delay to be applied when the load is increasing
+        @param aDelayDec Delay to be applied when the load is decreasing
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt SetLoadPredTrigDelay(TPerfRes aRes, TInt aDelayInc,
+            TInt aDelayDec);
+
+        /**
+        Method to get the current trigger delay setting value of a particular
+        load monitor.
+
+        @param aRes The performance resource
+        @param aDelayInc Current delay setting when the load is increasing
+        @param aDelayDec Current delay setting when the load is decreasing
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt GetLoadPredTrigDelay(TPerfRes aRes,
+            TInt& aDelayInc, TInt& aDelayDec);
+
+        /**
+        Method to lock the load monitor trigger delay. If it is already in
+        locked state, this call is ignored.
+
+        @param aRes The performance resource
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt LockLoadPredTrigDelay(TPerfRes aRes);
+
+        /**
+        Method to unlock the load monitor trigger delay. If it is not in locked
+        state, this call is ignored.
+
+        @param aRes The performance resource
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt UnlockLoadPredTrigDelay(TPerfRes aRes);
+
+        /**
+        Method to set the WP tick period
+        @param aMon Monitor id
+        @param aPeriod New period value to be set (in milliseconds)
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification
+        */
+        IMPORT_C static TInt SetWpTickPeriod(TDvfsMonitor aMon, TUint aPeriod);
+
+        /**
+        Method to get the WP tick period
+        @param aMon Monitor id
+        @param aPeriod [Out] Current period value
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification
+        */
+        IMPORT_C static TInt GetWpTickPeriod(TDvfsMonitor aMon, TUint& aPeriod);
+
+        /**
+        Method to lock the WP tick period setting. If it is already locked, this
+        call is ignored
+        @param aMon Monitor id
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification
+        */
+        IMPORT_C static TInt LockWpTickPeriod(TDvfsMonitor aMon);
+
+        /**
+        Method to unlock the WP tick period setting. If it is not locked, this
+        call is ignored
+        @param aMon Monitor id
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification
+        */
+        IMPORT_C static TInt UnlockWpTickPeriod(TDvfsMonitor aMon);
+
+        /**
+        Method to set the WP window width
+        @param aMon Monitor id
+        @param aWidth The WP window width to set (in number of prediction ticks)
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification
+        */
+        IMPORT_C static TInt SetWpWindowWidth(TDvfsMonitor aMon, TUint aWidth);
+
+        /**
+        Method to get the WP window width
+        @param aMon Monitor id
+        @param aWidth [Out] The WP window width to get (in number of prediction ticks)
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification
+        */
+        IMPORT_C static TInt GetWpWindowWidth(TDvfsMonitor aMon, TUint& aWidth);
+
+        /**
+        Method to lock the WP window width. Does nothing if it is already locked
+        @param aMon Monitor id
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification
+        */
+        IMPORT_C static TInt LockWpWindowWidth(TDvfsMonitor aMon);
+
+        /**
+        Method to unlock the WP window width. Does nothing if it is not locked
+        @param aMon Monitor id
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification
+        */
+        IMPORT_C static TInt UnlockWpWindowWidth(TDvfsMonitor aMon);
+
+        /**
+        Method to get the current load prediction algorithm.
+
+        @param aMon The DVFS monitor
+        @param aAlgo Current algorithm returned to the caller (out parameter)
+        @param aCustom Any additional information (optional parameter).
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt GetCurrentAlgorithm(TDvfsMonitor aMon,
+            TAlgorithm& aAlgo, TInt* aCustom = 0);
+
+        /**
+        Method to set parameters to load monitor algorithm.
+
+        @param aMon The DVFS monitor
+        @param aAlgo Algorithm whose parameter has to be changed.
+        @param aParam Algorithm parameter name.
+        @param aArg The parameter value.
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt SetLoadMonitorParam(TDvfsMonitor aMon,
+            TAlgorithm aAlgo, TParam aParam, TAny* aArg);
+
+        /**
+        Method to retrieve existing parameters from load monitor algorithms.
+
+        @param aMon The DVFS monitor
+        @param aAlgo Algorithm whose parameter has to be retrieved.
+        @param aParam Algorithm parameter name.
+        @param aArg Pointer to a location where the value must be stored. This
+        can not be null (passing null value results in returning error code).
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt GetLoadMonitorParam(TDvfsMonitor aMon,
+            TAlgorithm aAlgo, TParam aParam, TAny* aArg);
+
+        /**
+        Locks the load monitor parameters. This lock should apply only to known
+        parameters of known algorithms – those that are enumerated in this
+        specification.
+
+        @param aMon The DVFS monitor
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt LockLoadMonitorParam(TDvfsMonitor aMon);
+
+        /**
+        Unlocks the load monitor parameters.
+
+        @param aMon The DVFS monitor
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt UnlockLoadMonitorParam(TDvfsMonitor aMon);
+
+        /**
+        Method to enable or disable a particular operation point.
+
+        @param aPerfRes Performance resource ID.
+        @param aOPP The operation point that is to be enable or disabled
+        @param aEnable If ETrue is specified, the OPP is enabled and if EFalse
+        is specified, then the OPP is disabled.
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt SetOPPState(TPerfRes aPerfRes, TInt aOPP,
+            TBool aEnable);
+
+        /**
+        Method to set the status of a list of operation points.
+
+        @param aPerfRes Performance resource ID.
+        @param aOppState Array containing the operation point status to be set.
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt SetOPPState(TPerfRes aPerfRes,
+            RArray<TBool>& aOppState);
+
+        /**
+        Method to get the current enabled/disabled status of a particular
+        operation point. OPPs are specified in the same way as mentioned
+        earlier.
+        Argument:
+        @param aPerfRes Performance resource ID.
+        @param aOPP The operation point that is to be checked.
+        @param aEnable Status of the operation point returned to the caller.
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt GetOPPState(TPerfRes aPerfRes, TInt aOPP,
+            TBool& aEnable);
+
+        /**
+        Method to get the full list of operation point enabled status.
+        Argument:
+        @param aPerfRes Performance resource ID.
+        @param aOppState Array containing the operation point enabled status
+        indexed by the operation point enumeration.
+
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt GetOPPState(TPerfRes aPerfRes,
+            RArray<TBool>& aOppState);
+
+        /**
+        Method to pass context inputs to the vendor software.
+        Argument:
+        @param aArg0 Argument 0
+        @param aArg1 Argument 1
+        @param aArg2 Argument 2
+        @param aArg3 Argument 3
+
+        @return None.
+
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static void SetInput(TUint32 aArg0, TUint32 aArg1,
+            TUint32 aArg2, TUint32 aArg3);
+    };
+
+
+#endif // PM_POLICY_CHIPSET_API_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Power Management/pm_services_chipset_api.h	Sat Oct 10 12:57:00 2009 +0100
@@ -0,0 +1,283 @@
+/*
+  pm_services_chipset_api.h
+
+  Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+  All rights reserved.
+
+  This program and the accompanying materials are made available
+  under the terms of the Eclipse Public License v1.0 which accompanies
+  this distribution, and is available at
+  http://www.eclipse.org/legal/epl-v10.html
+
+  Initial Contributors:
+  Nokia Corporation - initial contribution.
+
+  Contributors:
+*/
+
+/** @file
+@brief PM Services Chipset API H
+
+The purpose of this interface is to enable Nokia to test power management
+functionalities implemented below the Chipset API. This interface is meant to be
+used only by Symbian kernel side clients.
+
+@publishedDeviceAbstraction
+*/
+
+#ifndef PM_SERVICES_CHIPSET_API_H
+#define PM_SERVICES_CHIPSET_API_H
+
+// Include files
+
+#include <kern_priv.h>
+#include "pm_definitions_chipset_api.h"
+
+// Data types
+
+/**
+Dvfs monitor callback function
+@param aMonitor monitor id
+@param aLoad load (casted in case of non-integer types)
+*/
+typedef void (*TDvfsMonitorCbFn)(TDvfsMonitor aMonitor, TUint32 aLoad);
+
+/**
+Idle entry callback function
+@param aMode Target sleep mode
+@param aPtr Client parameter
+*/
+typedef void (*TIdleEntryCbFn)(TInt aMode, TAny* aPtr);
+
+/**
+Idle exit callback function
+@param aMode Sleep mode just exited
+@param aPtr Client parameter
+*/
+typedef void (*TIdleExitCbFn)(TInt aMode, TUint32 aIdleTime, TAny* aPtr);
+
+// Class declaration
+
+/**
+@brief Class description
+
+This class contains static methods to set and get certain power management
+services parameters. There are no data members.
+*/
+class PMServices
+    {
+    public:
+        /**
+        The integer aLevel will be passed and this will represent the forced
+        OPP.
+        @param aRes The ID for a power resource(CPU, DMA) that will be forced to
+        an OPP.
+        @param aLevel An integer, which represents the forced OPP level.
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt ForceSystemOPP(TPerfRes aRes, TInt aLevel);
+
+        /**
+        A resource is no longer forced to a particular OPP.  The OPP will now be
+        based on the DVFS algorithms.  If the system was not forced then no
+        action need take place.
+        @param aRes resource id.
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt UnForceSystemOPP(TPerfRes aRes);
+
+        /**
+        Gets the number of supported global sleep states.
+        @return Number of sleep states supported
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt GetNumSleepStates();
+
+        /**
+        Blocks a certain sleep state.
+        @param aSleepState The Sleep state to be blocked..
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt BlockSleepState(TInt aSleepState);
+
+        /**
+        Un-blocks a certain sleep state.
+        @param aSleepState The Sleep state to be un-blocked..
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt UnBlockSleepState(TInt aSleepState);
+
+        /**
+        Starts the monitoring and load prediction algorithms but does nothing to
+        the OPP.
+        @param aRes The ID for a power resource(CPU, DMA) that will now start to
+        use the DVFS algorithms.
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt EnableDVFS(TPerfRes aRes);
+
+        /**
+        Stops the monitoring and load prediction algorithms.  This API will not
+        change the OPP.  The OPP will remain the same as it was before this API
+        was called
+        @param aRes The ID for a power resource(CPU, DMA) that will no longer
+        use the DVFS algorithms.
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt DisableDVFS(TPerfRes aRes);
+
+        /**
+        Finds out if the DVFS algorithms are currently running for a given power
+        resource.
+        @param aRes Find out if the DVFS algorithms are working for this
+        particular power resource ID .
+        @return ETrue if DVFS enabled, EFalse otherwise.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TBool IsDVFSEnabled(TPerfRes aRes);
+
+        /**
+        Gets the current load of a given HW block.
+        @param aMon Monitor id
+        @param aLoad Load value (casted into TUint32 in case of non-integer
+        types)
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt GetCurrentLoad(TDvfsMonitor aMon, TUint32 aLoad);
+
+        /**
+        Register to receive notifications of a change in load for a given
+        monitor.
+        @param aCb callback function pointer
+        @param aMon monitor id.
+        @param aGranuality The percentage change at which notifications will be
+        sent.  Zero will mean that notifications will be sent straight away.
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.  The preferable
+        way to call this function is from a thread context with interrupts
+        enabled after all the kernel extensions have been initialized in the
+        boot up.
+        */
+        IMPORT_C static TInt RegisterForLoadObservations(TDvfsMonitorCbFn aCb,
+            TDvfsMonitor aMon, TInt aGranuality);
+        /**
+        Method to cancel any load observation callback.
+        @param aCb callback function pointer
+        @param aMon monitor id.
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt DeRegisterForLoadObservations(TDvfsMonitorCbFn
+            aCb, TDvfsMonitor aMon);
+
+        /**
+        Method to get the number of supported OPPs for a given performance
+        resource.
+        @param aRes performance resource id.
+        @return The resource’s available OPPs.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt GetNumOPPs(TPerfRes aRes);
+
+        /**
+        Get the workload prediction window buffer pointer (Symbian kernel data).
+        @return The window buffer pointer (casted into TUint32 type)
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TUint32 GetWpWindowBuf();
+
+        /**
+        Request for idle entry callback.
+        @param aCbFn Callback function
+        @param aPtr A pointer to be passed to the callback function when called
+        @param aCore Core number. If -1, API applies to system idle
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt RequestIdleEntryCallback(TIdleEntryCbFn aCbFn,
+            TAny* aPtr, TInt aCore = -1);
+
+        /**
+        Request for idle exit callback
+        @param aCbFn Callback function
+        @param aPtr A pointer to be passed to the callback function when called
+        @param aCore Core number. If -1, API applies to system idle
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt RequestIdleExitCallback(TIdleExitCbFn aCbFn,
+            TAny* aPtr, TInt aCore = -1);
+
+        /**
+        Cancel idle entry callback
+        @param aCbFn Callback function
+        @param aCore Core number. If -1, API applies to system idle
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt CancelIdleEntryCallback(TIdleEntryCbFn aCbFn,
+            TInt aCore);
+
+        /**
+        Cancel idle exit callback
+        @param aCbFn Callback function
+        @param aCore Core number. If -1, API applies to system idle
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt CancelIdleExitCallback(TIdleExitCbFn aCbFn,
+            TInt aCore);
+
+        /**
+        Method to get the hardware time based on a real time clock.
+        @return Hardware time in microseconds.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TUint32 HwTime();
+
+        /**
+        Retire a given number of cores. It is possible that no cores can be
+        retired because all remaining running cores have features not available
+        on any other core; and so may not allow any to be retired ( even if
+        there are no threads in the ready list that may require those features);
+        when that happens this API will fail (and return as error code).
+        @param aCount number of cores to retire
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt RetireCore(TInt aCount);
+
+        /**
+        Enables any retired cores.  If no cores can be engaged due to all cores
+        being on or for some other   reason then this API returns an error.
+        @param aEngage The number of cores to Engage.
+        @return One of the system wide Symbian error codes according to the API
+        error handling specification.
+        @pre Called from thread context with interrupts enabled.
+        */
+        IMPORT_C static TInt EngageCore(TInt aEngage);
+    };
+
+
+#endif // PM_SERVICES_CHIPSET_API_H