changeset 63:7c7fe9d0ea7c

mfw_mme.[ch]: white space cleanup (bogotabs and trailing ws)
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 22 Oct 2020 23:57:49 +0000
parents 089c1882788c
children 6724664925c9
files src/ui/mfw/mfw_mme.c src/ui/mfw/mfw_mme.h
diffstat 2 files changed, 567 insertions(+), 567 deletions(-) [+]
line wrap: on
line diff
--- a/src/ui/mfw/mfw_mme.c	Thu Oct 22 22:37:31 2020 +0000
+++ b/src/ui/mfw/mfw_mme.c	Thu Oct 22 23:57:49 2020 +0000
@@ -17,16 +17,16 @@
    $History:: mfw_mme.c                                             $
  ************************************************************************
 
-	Sep 26, 2007    Configuration of Drives for SBuild 2.3.0 Migration  x0080701 (Bharat)
-	Description:   Support from MMI to configure drives (NOR, NORMS, NAND, TFLASH)
-	                    is added as part of SBuild 2.3.0 Migration
+    Sep 26, 2007    Configuration of Drives for SBuild 2.3.0 Migration  x0080701 (Bharat)
+    Description:   Support from MMI to configure drives (NOR, NORMS, NAND, TFLASH)
+                        is added as part of SBuild 2.3.0 Migration
 
     May 30, 2007  DR: OMAPS00132483 x0pleela
     Description: MM: While playing an AAC, unplug USB freezes the audio
     Solution: 1. Added the prototype to get the phone lock status
-    		    2. Replaced the function call mfw_get_phlock_status with mfw_get_Phlock_status
-	    		    to get the phone lock status
-	
+                2. Replaced the function call mfw_get_phlock_status with mfw_get_Phlock_status
+                    to get the phone lock status
+
     Apr 03, 2007    ER: OMAPS00122561  x0pleela
     Description:   [ACI] Phone lock feature has to be supported by ACI
     Solution: Phone Lock ER implementation
@@ -34,52 +34,52 @@
 
     Mar 22, 2007  DVT: OMAPS00121916  x0039928(sumanth)
     Description: T-Flash hot swap.
-    
+
     Oct 30 2006, OMAPS00098881 x0039928(sumanth)
     Removal of power variant
-      
+
     Oct 05, 2006    ER: OMAPS00094496 x0061088(Prachi)
     Description:Enhance RSSI to 3 parameters: Strength, quality, min-access-level
-    Solution:To solve the ER OMAPS0094496,mmeInit() is not calling rx_Init(). 
+    Solution:To solve the ER OMAPS0094496,mmeInit() is not calling rx_Init().
 
 
- 	xashmic 27 Sep 2006, OMAPS00096389 
-	ENH - a) Providing static menu for re-selection of enum options for enumeration
-	b) Popup menu displayed on connect event, can be enabled or disabled via menu option
+    xashmic 27 Sep 2006, OMAPS00096389
+    ENH - a) Providing static menu for re-selection of enum options for enumeration
+    b) Popup menu displayed on connect event, can be enabled or disabled via menu option
 
-	xashmic 21 Sep 2006, OMAPS00095831
- 	Description: USB enumeration does not happen in PIN/PUK/Insert SIM scenarios
- 	Solution: When booting up without SIM card, or prompting for PIN/PUK/SIMP entry, 
- 	enumerate all the USB ports automatically 
+    xashmic 21 Sep 2006, OMAPS00095831
+    Description: USB enumeration does not happen in PIN/PUK/Insert SIM scenarios
+    Solution: When booting up without SIM card, or prompting for PIN/PUK/SIMP entry,
+    enumerate all the USB ports automatically
 
-	xashmic 9 Sep 2006, OMAPS00092732
-	USBMS ER
- *   
- *	Jun 02, 2006  DRT OMAPS00079213   x0039928(sumanth)
- *	Description: Triton PG2.2 impacts on Locosto program
- *	Solution: Software workaround is done to register headset-hook dynamically 
- *	during/before call is established and unregister it after the call is ended/disconnected.
+    xashmic 9 Sep 2006, OMAPS00092732
+    USBMS ER
+ *
+ *  Jun 02, 2006  DRT OMAPS00079213   x0039928(sumanth)
+ *  Description: Triton PG2.2 impacts on Locosto program
+ *  Solution: Software workaround is done to register headset-hook dynamically
+ *  during/before call is established and unregister it after the call is ended/disconnected.
  *
  *    xdeepadh, nekkareb - OMAPS00076996: 05 May 2006
- * 	Description: MO TTY call works only for the first time
- *	Solution: For the Loocsto-lite variant, when a TTY call is initiated, the 
- *     current audio profile is identified and when the TTY call is ended, this 
+ *  Description: MO TTY call works only for the first time
+ *  Solution: For the Loocsto-lite variant, when a TTY call is initiated, the
+ *     current audio profile is identified and when the TTY call is ended, this
  *    profile is loaded.
  *
- *   	nekkareb - OMAPS00057367: 8 Dec 2005
- * 	Description: Fix build problems for fix of OMAPS00057367
- *	Solution: Included OMAPS00057367 changes under a flag ISAMPLE
+ *      nekkareb - OMAPS00057367: 8 Dec 2005
+ *  Description: Fix build problems for fix of OMAPS00057367
+ *  Solution: Included OMAPS00057367 changes under a flag ISAMPLE
  *
- *  	nekkareb - OMAPS00057367: 3 Dec 2005
- * 	Description: Locosto: TTY MT call does not work
- *	Solution: Extra TTY command added so as to initiate the AUDIO entity to send the 
- *	              TTY_START request to L1 only after the Vocoder enable is sent.
+ *      nekkareb - OMAPS00057367: 3 Dec 2005
+ *  Description: Locosto: TTY MT call does not work
+ *  Solution: Extra TTY command added so as to initiate the AUDIO entity to send the
+ *                TTY_START request to L1 only after the Vocoder enable is sent.
  *                  Current audio device is read from audio service entity functions.
  *
- *  	xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
- * 	Description:	Support for various audio profiles
- *	Solution:	The support for audio device's carkit/headset/loudspeaker/handheld.
- *			The audio device is enabled as per the user actions.
+ *      xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
+ *  Description:    Support for various audio profiles
+ *  Solution:   The support for audio device's carkit/headset/loudspeaker/handheld.
+ *          The audio device is enabled as per the user actions.
  *
  * *****************  Version 5  ********************************************
  * User: Kk           Date: 3.03.00    Time: 17:52
@@ -142,7 +142,7 @@
 #include "mfw_mme.h"
 #include "mfw_win.h"
 #include "mfw_ffs.h" /*OMAPS00098881 x0039928(sumanth)*/
-//xashmic 9 Sep 2006, OMAPS00092732	
+//xashmic 9 Sep 2006, OMAPS00092732
 #ifdef FF_MMI_USBMS
 #include "usb/usb_api.h"
 #endif
@@ -178,7 +178,7 @@
 
 static U8 battLevel = 0;                /* battery level            */
 static U8 battState = 0;                /* state of power supply    */
-static U16 hdsPresence = 0;				/* headset presence         */
+static U16 hdsPresence = 0;             /* headset presence         */
 
 
 static int mmeCommand (U32 cmd, void *h);
@@ -190,42 +190,42 @@
 
 /* Added to remove warning Aug - 11 */
 EXTERN UBYTE dspl_Enable (UBYTE   in_Enable);
-/* End - remove warning Aug - 11 */ 
+/* End - remove warning Aug - 11 */
 
 static BOOL mmePrimHandler (USHORT opc, void *data);
 static int pSlot;                       /* primitive handler slot   */
 #ifndef FF_MMI_AUDIO_PROFILE /*a0393213 warnings removal*/
 static void hdsCb (drv_SignalID_Type *signal_params);
 #endif
-//  	xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
+//      xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
 #ifdef FF_MMI_AUDIO_PROFILE
-#define HANDHELD		"handheld" //0
-#define LOUDSPEAKER		"handfree" // 1
-#define HEADSET			"headset"    // 2
-#define CARKIT			"carkit"   // 3
+#define HANDHELD        "handheld" //0
+#define LOUDSPEAKER     "handfree" // 1
+#define HEADSET         "headset"    // 2
+#define CARKIT          "carkit"   // 3
 static UBYTE currAudioDevice = MFW_AUD_HANDHELD;
 
-UBYTE headsetInserted = FALSE;	//indicates if the headset is inserted or not
-UBYTE carkitInserted = FALSE;		//indicates if the carkit is inserted or not
-UBYTE mfwAudPlay = FALSE;		//indicates if any other audio media is being played or not
+UBYTE headsetInserted = FALSE;  //indicates if the headset is inserted or not
+UBYTE carkitInserted = FALSE;       //indicates if the carkit is inserted or not
+UBYTE mfwAudPlay = FALSE;       //indicates if any other audio media is being played or not
 extern audio_set_device(char* mode);
 // Jun 02, 2006  DRT OMAPS00079213   x0039928(sumanth)
 // Fix: A callback function is added that is registered for hook.
-void mfw_audio_hook_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, 
+void mfw_audio_hook_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
 ACCESSORY_CALLBACK_PARAM callbackparam );
-void mfw_audio_headSet_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, 
+void mfw_audio_headSet_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
 ACCESSORY_CALLBACK_PARAM callbackparam );
-void mfw_audio_carKit_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, 
+void mfw_audio_carKit_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
 ACCESSORY_CALLBACK_PARAM callbackparam );
 #endif
 
 /* Mar 22, 2007  DVT: OMAPS00121916  x0039928 */
-/* Sep 26, 2007	Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
+/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
 #ifdef FF_MMI_TFLASH
 void tflash_notify_register(void);
 typedef void (*T_MC_EVENT_CALLBACK)(T_MC_EVENT mcEvent, void *ctx);
 #endif
-/* Sep 26, 2007	Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
+/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
 
 void mfw_audio_set_device(int type);
 //xdeepadh, nekkareb - OMAPS00076996: 05 May 2006
@@ -240,18 +240,18 @@
 #endif // FF_PHONE_LOCK
 
 /* Mar 22, 2007  DVT: OMAPS00121916  x0039928 */
-/* Sep 26, 2007	Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
+/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
 #ifdef FF_MMI_TFLASH
 void tflash_cb(T_MC_EVENT mcEvent, void *ctx)
 {
-	PALLOC(tflash_mmi_ind, TFLASH_MMI_IND);
-	tflash_mmi_ind->mc_status = mcEvent;
-	PSENDX(ACI,tflash_mmi_ind);
+    PALLOC(tflash_mmi_ind, TFLASH_MMI_IND);
+    tflash_mmi_ind->mc_status = mcEvent;
+    PSENDX(ACI,tflash_mmi_ind);
 }
 #endif
-/* Sep 26, 2007	Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
+/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
 
-//xashmic 9 Sep 2006, OMAPS00092732	
+//xashmic 9 Sep 2006, OMAPS00092732
 #ifdef FF_MMI_USBMS
 /*
 +--------------------------------------------------------------------+
@@ -259,15 +259,15 @@
 | STATE   : code                        ROUTINE : usbms_cb            |
 +--------------------------------------------------------------------+
 
-  PURPOSE : Posts the USB events to the MMI task 
+  PURPOSE : Posts the USB events to the MMI task
 
 */
 
 void usbms_cb (T_USB_EVENT usbEvent, void *ctx)
 {
-	PALLOC(usbms_mmi_ind,USBMS_MMI_IND);
-	usbms_mmi_ind->usb_status = (U8)usbEvent;
-	PSENDX(ACI,usbms_mmi_ind);
+    PALLOC(usbms_mmi_ind,USBMS_MMI_IND);
+    usbms_mmi_ind->usb_status = (U8)usbEvent;
+    PSENDX(ACI,usbms_mmi_ind);
 }
 
 
@@ -284,24 +284,24 @@
 */
 void mfw_usbms_init(void)
 {
-	T_USB_RETURN ret;
-	TRACE_FUNCTION("mfw_usbms_init");
-	ret = usb_register_notifcation( (T_USB_EVENT_CALLBACK)usbms_cb,NULL);
-	switch(ret)
-	{
-		case USB_NOT_SUPPORTED	:
-			TRACE_ERROR("USB registeration unsuccessful- Not supported");
-			break;
-		case USB_MEMORY_ERR:
-			TRACE_ERROR("USB registeration unsuccessful - Memeory error");
-			break;
-		case USB_INTERNAL_ERR:
-			TRACE_ERROR("USB registeration unsuccessful - Internal error");
-			break;
-		case USB_OK:
-			TRACE_EVENT("USB registeration successful");
-			break;
-	}		
+    T_USB_RETURN ret;
+    TRACE_FUNCTION("mfw_usbms_init");
+    ret = usb_register_notifcation( (T_USB_EVENT_CALLBACK)usbms_cb,NULL);
+    switch(ret)
+    {
+        case USB_NOT_SUPPORTED  :
+            TRACE_ERROR("USB registeration unsuccessful- Not supported");
+            break;
+        case USB_MEMORY_ERR:
+            TRACE_ERROR("USB registeration unsuccessful - Memeory error");
+            break;
+        case USB_INTERNAL_ERR:
+            TRACE_ERROR("USB registeration unsuccessful - Internal error");
+            break;
+        case USB_OK:
+            TRACE_EVENT("USB registeration successful");
+            break;
+    }
 }
 
 /*
@@ -315,83 +315,83 @@
 */
 void mfw_usbms_enum_control(T_MFW_USB_ENUM_CONTROL usbms_enum_status, T_MFW_USB_ENUM_TYPE usb_enum_type)
 {
-	T_USB_ENUM_INFO  enumInfo;
-	T_USB_RETURN ret;
-	TRACE_FUNCTION("mfw_usbms_enum_control");
-	switch(usb_enum_type)
-	{
-		case MFW_USB_TYPE_MS:
-			enumInfo.info=USB_MS;
-			break;
-		case MFW_USB_TYPE_AT:
-			enumInfo.info=USB_AT;
-			break;
-		case MFW_USB_TYPE_TRACE:
-			enumInfo.info=USB_TRACE;
-			break;
-		case MFW_USB_TYPE_AT_MS://xashmic 27 Sep 2006, OMAPS00096389 
-			enumInfo.info=USB_AT|USB_MS;
-			break;
-		case MFW_USB_TYPE_AT_TRACE://xashmic 27 Sep 2006, OMAPS00096389 
-			enumInfo.info=USB_AT|USB_TRACE;
-			break;
-		case MFW_USB_TYPE_MS_TRACE://xashmic 27 Sep 2006, OMAPS00096389 
-			enumInfo.info=USB_MS|USB_TRACE;
-			break;
-		case MFW_USB_TYPE_ALL:
-			enumInfo.info=USB_MS| USB_AT|USB_TRACE;
-			break;
-		default:
-			TRACE_ERROR("mfw_usbms_enum_control():Invalid type");
-			return;
-	}
-	TRACE_EVENT_P1("Ports %x",enumInfo.info);
-	switch(usbms_enum_status)
-	{
-		case MFW_USB_ENUM:
-			ret=usb_enum_control(USB_ENUM,&enumInfo);
-			TRACE_EVENT_P1("mfw_usbms_enum_control:ret:%d", ret);
-			switch(ret)
-			{
-				case USB_NOT_SUPPORTED	:
-					TRACE_ERROR("USB enumeration unsuccessful- Not supported");
-					break;
-				case USB_MEMORY_ERR:
-					TRACE_ERROR("USB enumeration unsuccessful - Memeory error");
-					break;
-				case USB_INTERNAL_ERR:
-					TRACE_ERROR("USB enumeration unsuccessful - Internal error");
-					break;
-				case USB_OK:
-					TRACE_EVENT("USB enumeration successful");
-					break;
-				default:
-					TRACE_ERROR("USB enumeration unsuccessful - Invalid return");
-					break;
-			}	
-			break;
-		case MFW_USB_NO_ENUM:
-			ret=usb_enum_control(USB_NO_ENUM,&enumInfo);
-			switch(ret)
-			{
-				case USB_NOT_SUPPORTED	:
-					TRACE_ERROR("USB no enumeration unsuccessful- Not supported");
-					break;
-				case USB_MEMORY_ERR:
-					TRACE_ERROR("USB no enumeration unsuccessful - Memeory error");
-					break;
-				case USB_INTERNAL_ERR:
-					TRACE_ERROR("USB no enumeration unsuccessful - Internal error");
-					break;
-				case USB_OK:
-					TRACE_EVENT("USB no enumeration successful");
-					break;
-				default:
-					TRACE_ERROR("USB enumeration successful - Invalid return");
-					break;
-			}		
-			break;
-	}
+    T_USB_ENUM_INFO  enumInfo;
+    T_USB_RETURN ret;
+    TRACE_FUNCTION("mfw_usbms_enum_control");
+    switch(usb_enum_type)
+    {
+        case MFW_USB_TYPE_MS:
+            enumInfo.info=USB_MS;
+            break;
+        case MFW_USB_TYPE_AT:
+            enumInfo.info=USB_AT;
+            break;
+        case MFW_USB_TYPE_TRACE:
+            enumInfo.info=USB_TRACE;
+            break;
+        case MFW_USB_TYPE_AT_MS://xashmic 27 Sep 2006, OMAPS00096389
+            enumInfo.info=USB_AT|USB_MS;
+            break;
+        case MFW_USB_TYPE_AT_TRACE://xashmic 27 Sep 2006, OMAPS00096389
+            enumInfo.info=USB_AT|USB_TRACE;
+            break;
+        case MFW_USB_TYPE_MS_TRACE://xashmic 27 Sep 2006, OMAPS00096389
+            enumInfo.info=USB_MS|USB_TRACE;
+            break;
+        case MFW_USB_TYPE_ALL:
+            enumInfo.info=USB_MS| USB_AT|USB_TRACE;
+            break;
+        default:
+            TRACE_ERROR("mfw_usbms_enum_control():Invalid type");
+            return;
+    }
+    TRACE_EVENT_P1("Ports %x",enumInfo.info);
+    switch(usbms_enum_status)
+    {
+        case MFW_USB_ENUM:
+            ret=usb_enum_control(USB_ENUM,&enumInfo);
+            TRACE_EVENT_P1("mfw_usbms_enum_control:ret:%d", ret);
+            switch(ret)
+            {
+                case USB_NOT_SUPPORTED  :
+                    TRACE_ERROR("USB enumeration unsuccessful- Not supported");
+                    break;
+                case USB_MEMORY_ERR:
+                    TRACE_ERROR("USB enumeration unsuccessful - Memeory error");
+                    break;
+                case USB_INTERNAL_ERR:
+                    TRACE_ERROR("USB enumeration unsuccessful - Internal error");
+                    break;
+                case USB_OK:
+                    TRACE_EVENT("USB enumeration successful");
+                    break;
+                default:
+                    TRACE_ERROR("USB enumeration unsuccessful - Invalid return");
+                    break;
+            }
+            break;
+        case MFW_USB_NO_ENUM:
+            ret=usb_enum_control(USB_NO_ENUM,&enumInfo);
+            switch(ret)
+            {
+                case USB_NOT_SUPPORTED  :
+                    TRACE_ERROR("USB no enumeration unsuccessful- Not supported");
+                    break;
+                case USB_MEMORY_ERR:
+                    TRACE_ERROR("USB no enumeration unsuccessful - Memeory error");
+                    break;
+                case USB_INTERNAL_ERR:
+                    TRACE_ERROR("USB no enumeration unsuccessful - Internal error");
+                    break;
+                case USB_OK:
+                    TRACE_EVENT("USB no enumeration successful");
+                    break;
+                default:
+                    TRACE_ERROR("USB enumeration successful - Invalid return");
+                    break;
+            }
+            break;
+    }
 }
 
 #endif
@@ -405,16 +405,16 @@
 */
 MfwRes mmeInit (void)
 {
-//	 xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
-//	the callback registeration variables are populated here and passed as 
-//	argument to audio_init
+//   xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
+//  the callback registeration variables are populated here and passed as
+//  argument to audio_init
 #ifdef FF_MMI_AUDIO_PROFILE
-	T_ACCESSORY_CALLBACK audio_device_config[MAX_EXT_AUD_DEVICE];
-	
-	audio_device_config[CALLBACK_HEADSET].callbackFunc = mfw_audio_headSet_indication;
-	audio_device_config[CALLBACK_HEADSET].callbackVal = NULL;
-	audio_device_config[CALLBACK_CARKIT].callbackFunc = mfw_audio_carKit_indication;
-	audio_device_config[CALLBACK_CARKIT].callbackVal = NULL;
+    T_ACCESSORY_CALLBACK audio_device_config[MAX_EXT_AUD_DEVICE];
+
+    audio_device_config[CALLBACK_HEADSET].callbackFunc = mfw_audio_headSet_indication;
+    audio_device_config[CALLBACK_HEADSET].callbackVal = NULL;
+    audio_device_config[CALLBACK_CARKIT].callbackFunc = mfw_audio_carKit_indication;
+    audio_device_config[CALLBACK_CARKIT].callbackVal = NULL;
 #endif
 
     mfwCommand[MfwTypMme] = (MfwCb) mmeCommand;
@@ -429,53 +429,53 @@
     pwr_Init(pwrCb); //power driver
     rx_Init(rxCb);   //fieldstrength driver
     light_Init();    //light emitting driver
-//  	xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
+//      xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
 #ifdef FF_MMI_AUDIO_PROFILE
     audio_Init(audio_device_config);
 #else
     audio_Init(hdsCb); //audio driver
-#endif    
+#endif
 
     mmeBattInfo ( 10, 0);
 
     mmeRxInfo(5,0);
-	
+
     /* install prim handler     */
     pSlot = aci_create((T_PRIM_HANDLER)mmePrimHandler,NULL);
-	
-//xashmic 9 Sep 2006, OMAPS00092732	
+
+//xashmic 9 Sep 2006, OMAPS00092732
 //Registers a callback for event handling
 #ifdef FF_MMI_USBMS
-	mfw_usbms_init();
+    mfw_usbms_init();
 
 /* Mar 22, 2007  DVT: OMAPS00121916  x0039928 */
-/* Sep 26, 2007	Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
+/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
 #ifdef FF_MMI_TFLASH
-	tflash_notify_register();
+    tflash_notify_register();
 #endif
-/* Sep 26, 2007	Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
+/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
 
 #endif
 
-	return MfwResOk;
+    return MfwResOk;
 }
 
 /* Mar 22, 2007  DVT: OMAPS00121916  x0039928 */
-/* Sep 26, 2007	Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
+/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
 #ifdef FF_MMI_TFLASH
 void tflash_notify_register(void)
 {
-	T_RV_RET result;
+    T_RV_RET result;
 
-	result = (T_RV_RET)mc_register_notifcation((T_MC_EVENT_CALLBACK)tflash_cb, NULL);
+    result = (T_RV_RET)mc_register_notifcation((T_MC_EVENT_CALLBACK)tflash_cb, NULL);
 
-	if(result == RV_OK)
-		TRACE_EVENT("TFLASH callback registration successful");
-	else
-		TRACE_ERROR("TFLASH callback registration failed");
+    if(result == RV_OK)
+        TRACE_EVENT("TFLASH callback registration successful");
+    else
+        TRACE_ERROR("TFLASH callback registration failed");
 }
 #endif
-/* Sep 26, 2007	Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
+/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
 
 
 // Jun 02, 2006  DRT OMAPS00079213   x0039928(sumanth)
@@ -484,19 +484,19 @@
 #ifdef FF_MMI_AUDIO_PROFILE
 void mfw_hook_unregister(void)
 {
-	TRACE_FUNCTION("mfw hook unregister");
-	hook_unregister();	
+    TRACE_FUNCTION("mfw hook unregister");
+    hook_unregister();
 }
 
 void mfw_hook_register(void)
 {
-	T_ACCESSORY_CALLBACK hook_device;
+    T_ACCESSORY_CALLBACK hook_device;
+
+    TRACE_FUNCTION("mfw hook register");
 
-	TRACE_FUNCTION("mfw hook register");
-	
-	hook_device.callbackVal = NULL;
-	hook_device.callbackFunc = mfw_audio_hook_indication;
-	hook_register(hook_device);
+    hook_device.callbackVal = NULL;
+    hook_device.callbackFunc = mfw_audio_hook_indication;
+    hook_register(hook_device);
 }
 #endif
 
@@ -534,19 +534,19 @@
 {
     MfwHdr *hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr));
     MfwMme *mme = (MfwMme *) mfwAlloc(sizeof(MfwMme));
-	MfwHdr *insert_status =0;
-	
+    MfwHdr *insert_status =0;
+
     if (!hdr || !mme)
     {
-    	TRACE_ERROR("ERROR: mmeCreate() Mem Alloc Failed.");
-			
-	   	if(hdr)
-   			mfwFree((U8*)hdr,sizeof(MfwHdr));
-   		if(mme)
-   			mfwFree((U8*)mme,sizeof(MfwMme));	
-   		
-	   	return 0;
-  	}
+        TRACE_ERROR("ERROR: mmeCreate() Mem Alloc Failed.");
+
+        if(hdr)
+            mfwFree((U8*)hdr,sizeof(MfwHdr));
+        if(mme)
+            mfwFree((U8*)mme,sizeof(MfwMme));
+
+        return 0;
+    }
 
     mme->map = e;
     mme->handler = f;
@@ -556,14 +556,14 @@
     hdr->type = MfwTypMme;
 
     insert_status = mfwInsert(w,hdr);
-    
+
     if(!insert_status)
-	{
-  		TRACE_ERROR("ERROR: mmeCreate() Failed to Install Handler. ");
-   		mfwFree((U8*)hdr,sizeof(MfwHdr));
-   		mfwFree((U8*)mme ,sizeof(MfwMme));
-		return 0;
-  	}
+    {
+        TRACE_ERROR("ERROR: mmeCreate() Failed to Install Handler. ");
+        mfwFree((U8*)hdr,sizeof(MfwHdr));
+        mfwFree((U8*)mme ,sizeof(MfwMme));
+        return 0;
+    }
     return insert_status;
 }
 
@@ -620,7 +620,7 @@
 
   PURPOSE : init the RTC and setup the alarm callback handler
 
-extern UBYTE		clk_Init						(USHORT, drv_SignalCB_Type, UBYTE*);
+extern UBYTE        clk_Init                        (USHORT, drv_SignalCB_Type, UBYTE*);
 */
 
 MfwRes mmeRtcInit (USHORT drvHandle, UBYTE *info)
@@ -643,24 +643,24 @@
 */
 void mme_backlightEvent(int event)
 {
-	int light;
-	if ((event >=BL_INIT) && (event <BL_LAST_OPTION))
-	{
-		light  = mme_backlightStatus[event];
-		if (light == BL_SET_IDLE)
-		{
-			light_setBacklightIdle();
-		}
-		else if (light == BL_NO_CHANGE)
-		{
-			//No change
-		}
-		else if ((light >=BL_NO_LIGHT) && (light <=BL_MAX_LIGHT))
-		{
-			mmeBackLight ((U8)light);
-		}	
-	
-	}
+    int light;
+    if ((event >=BL_INIT) && (event <BL_LAST_OPTION))
+    {
+        light  = mme_backlightStatus[event];
+        if (light == BL_SET_IDLE)
+        {
+            light_setBacklightIdle();
+        }
+        else if (light == BL_NO_CHANGE)
+        {
+            //No change
+        }
+        else if ((light >=BL_NO_LIGHT) && (light <=BL_MAX_LIGHT))
+        {
+            mmeBackLight ((U8)light);
+        }
+
+    }
 }
 
 /*
@@ -674,10 +674,10 @@
 */
 void mme_setBacklightEvent(int event, int lightLevel)
 {
-	if ((event >=BL_INIT) && (event <BL_LAST_OPTION))
-	{
-		mme_backlightStatus[event] = lightLevel;
-	}
+    if ((event >=BL_INIT) && (event <BL_LAST_OPTION))
+    {
+        mme_backlightStatus[event] = lightLevel;
+    }
 }
 
 
@@ -738,7 +738,7 @@
     if (audioIn > 255) audioIn = 255;
     if (audioOut > 255) audioOut = 255;
 
-	audio_SetAmplf(AUDIO_MICROPHONE,(U8) audioIn);
+    audio_SetAmplf(AUDIO_MICROPHONE,(U8) audioIn);
     audio_SetAmplf(AUDIO_SPEAKER,(U8) audioOut);
 
     return MfwResOk;
@@ -774,7 +774,7 @@
 +--------------------------------------------------------------------+
 
   PURPOSE : configure battery level information
-            
+
 
 */
 
@@ -850,23 +850,23 @@
   /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
   display is enabled only when lcd refresh is needed*/
   if(FFS_flashData.refresh == 1)
-	temp = dspl_Enable(0);
+    temp = dspl_Enable(0);
 #endif
 if (mfwSignallingMethod EQ 0)
   {
     if (mfwFocus)
         if (sigExec(mfwFocus,evt,value))
-		{
-		#ifndef FF_POWER_MANAGEMENT
-			dspl_Enable(temp);            
-		#else
-		       /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
+        {
+        #ifndef FF_POWER_MANAGEMENT
+            dspl_Enable(temp);
+        #else
+               /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
                    display is enabled only when lcd refresh is needed*/
-		      if(FFS_flashData.refresh == 1)
-				dspl_Enable(temp);
-		#endif
-			return;
-		}
+              if(FFS_flashData.refresh == 1)
+                dspl_Enable(temp);
+        #endif
+            return;
+        }
     if (mfwRoot)
         sigExec(mfwRoot,evt,value);
   }
@@ -897,46 +897,46 @@
          * Signal consumed, then return
          */
         if (sigExec (h, evt, value))
-		{
-		#ifndef FF_POWER_MANAGEMENT
-			dspl_Enable(temp);            
-		#else
-		       /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
+        {
+        #ifndef FF_POWER_MANAGEMENT
+            dspl_Enable(temp);
+        #else
+               /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
                    display is enabled only when lcd refresh is needed*/
-		      if(FFS_flashData.refresh == 1)
-				dspl_Enable(temp);
-		#endif
-			return;
-		}
+              if(FFS_flashData.refresh == 1)
+                dspl_Enable(temp);
+        #endif
+            return;
+        }
 
         /*
          * All windows tried inclusive root
          */
         if (h == mfwRoot)
-		{
-		#ifndef FF_POWER_MANAGEMENT
-			dspl_Enable(temp);            
-		#else
-		       /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
+        {
+        #ifndef FF_POWER_MANAGEMENT
+            dspl_Enable(temp);
+        #else
+               /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
                    display is enabled only when lcd refresh is needed*/
-		      if(FFS_flashData.refresh == 1)
-				dspl_Enable(temp);
-		#endif
-			return;
-		}
+              if(FFS_flashData.refresh == 1)
+                dspl_Enable(temp);
+        #endif
+            return;
+        }
 
         /*
          * get parent window
          */
         h = mfwParent(mfwParent(h));
-		if(h)
-			h = ((MfwWin * )(h->data))->elems;
+        if(h)
+            h = ((MfwWin * )(h->data))->elems;
       }
       sigExec (mfwRoot, evt, value);
 
   }
 #ifndef FF_POWER_MANAGEMENT
-  dspl_Enable(temp);            
+  dspl_Enable(temp);
 #else
   /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
      display is enabled only when lcd refresh is needed*/
@@ -1024,12 +1024,12 @@
 {
     U8 level;
     U8 state;
-//  	xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
+//      xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
 #ifdef FF_MMI_AUDIO_PROFILE
     U8 hdsData;
     U8 cktData;
 #endif
-	
+
 
 //    TRACE_FUNCTION ("mmePrimHandler()");
 
@@ -1053,85 +1053,85 @@
                 mmeSignal(MfwMmeBaState,state);
             }
             return TRUE;                /* processed by MME, delete */
-//  	xpradipg - LOCOSTO-ENH-31895 : 23 June 2005			
-//	the corresponding callback function is called in MMI context
-//	this comment will be removed once the sap for this is available
+//      xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
+//  the corresponding callback function is called in MMI context
+//  this comment will be removed once the sap for this is available
 #ifdef FF_MMI_AUDIO_PROFILE
        case MMI_HEADSET_IND:
-	   	TRACE_EVENT("MMI_HEADSET_IND");
+           TRACE_EVENT("MMI_HEADSET_IND");
            hdsData = ((T_MMI_HEADSET_IND *) data)->headset_status;
            mmeSignal(MfwMmeHeadset,hdsData);
-           return TRUE;                
+           return TRUE;
        case MMI_CARKIT_IND:
-	   	TRACE_EVENT("MMI_CARKIT_IND");
+           TRACE_EVENT("MMI_CARKIT_IND");
            cktData = ((T_MMI_CARKIT_IND *) data)->carkit_status;
-	    mmeSignal(MfwMmeCarkit, cktData);
-           return TRUE;  
+           mmeSignal(MfwMmeCarkit, cktData);
+           return TRUE;
 #endif
-//xashmic 9 Sep 2006, OMAPS00092732	
+//xashmic 9 Sep 2006, OMAPS00092732
 //Handler for USB connect or disconnect events
 #ifdef FF_MMI_USBMS
-	case USBMS_MMI_IND:
-	{
-		T_USBMS_MMI_IND *usbms_mmi_ind=(T_USBMS_MMI_IND *) data;		
-		switch(usbms_mmi_ind->usb_status)
-		{
-			case USB_CABLE_CONNECT_EVENT:
-				TRACE_EVENT("USB_CABLE_CONNECT_EVENT");
-				//xashmic 27 Sep 2006, OMAPS00096389 
-				//xashmic 21 Sep 2006, OMAPS00095831
-				//To enumerate based on user selection
-				if( ( getBootUpState() > 0 ) && ( getUSBMSFlags() & MFW_USBMS_POPUP_ENABLE))
-				{
-					mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT);
-				}
-				//xashmic 21 Sep 2006, OMAPS00095831
-				//To Enumerate automatically
-				else
-				{
+    case USBMS_MMI_IND:
+    {
+        T_USBMS_MMI_IND *usbms_mmi_ind=(T_USBMS_MMI_IND *) data;
+        switch(usbms_mmi_ind->usb_status)
+        {
+            case USB_CABLE_CONNECT_EVENT:
+                TRACE_EVENT("USB_CABLE_CONNECT_EVENT");
+                //xashmic 27 Sep 2006, OMAPS00096389
+                //xashmic 21 Sep 2006, OMAPS00095831
+                //To enumerate based on user selection
+                if( ( getBootUpState() > 0 ) && ( getUSBMSFlags() & MFW_USBMS_POPUP_ENABLE))
+                {
+                    mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT);
+                }
+                //xashmic 21 Sep 2006, OMAPS00095831
+                //To Enumerate automatically
+                else
+                {
 //x0pleela 01 Apr, 2007  ER: OMAPS00122561
-				#ifdef FF_PHONE_LOCK
-					//x0pleela 29 May, 2007  DR: OMAPS00132483
-					//Check the phone lock status
-					if( mfw_get_Phlock_status() )
-						mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT);
-					else
-				#endif //FF_PHONE_LOCK
-					mfw_usbms_enum_control(MFW_USB_ENUM , MFW_USB_TYPE_ALL);
-				}
-				break;
-			case USB_CABLE_DISCONNECT_EVENT:
-				TRACE_EVENT("USB_CABLE_DISCONNECT_EVENT");
-				mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_DISCONNECT_EVENT);
-				mfw_usbms_enum_control(MFW_USB_NO_ENUM , MFW_USB_TYPE_ALL);
-				break;
-		}  		
-		PFREE(usbms_mmi_ind);
-	   	return TRUE;
-	}
+                #ifdef FF_PHONE_LOCK
+                    //x0pleela 29 May, 2007  DR: OMAPS00132483
+                    //Check the phone lock status
+                    if( mfw_get_Phlock_status() )
+                        mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT);
+                    else
+                #endif //FF_PHONE_LOCK
+                    mfw_usbms_enum_control(MFW_USB_ENUM , MFW_USB_TYPE_ALL);
+                }
+                break;
+            case USB_CABLE_DISCONNECT_EVENT:
+                TRACE_EVENT("USB_CABLE_DISCONNECT_EVENT");
+                mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_DISCONNECT_EVENT);
+                mfw_usbms_enum_control(MFW_USB_NO_ENUM , MFW_USB_TYPE_ALL);
+                break;
+        }
+        PFREE(usbms_mmi_ind);
+        return TRUE;
+    }
 
 /* Mar 22, 2007  DVT: OMAPS00121916  x0039928 */
-/* Sep 26, 2007	Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
+/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
 #ifdef FF_MMI_TFLASH
-	case TFLASH_MMI_IND:
-	{
-		T_TFLASH_MMI_IND *tflash_mmi_ind=(T_TFLASH_MMI_IND *) data;
-		switch(tflash_mmi_ind->mc_status)
-		{
-			case MC_INSERT_EVENT:
-				TRACE_EVENT("TFLASH card inserted");
-				mmeSignal(MfwMmeUSBMS , MFW_TFLASH_INSERTED_EVENT);
-				break;
-			case MC_REMOVE_EVENT:
-				TRACE_EVENT("TFLASH card removed");
-				mmeSignal(MfwMmeUSBMS , MFW_TFLASH_REMOVED_EVENT);
-				break;
-		}
-		PFREE(tflash_mmi_ind);
-		return TRUE;
-	}
-#endif	
-/* Sep 26, 2007	Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
+    case TFLASH_MMI_IND:
+    {
+        T_TFLASH_MMI_IND *tflash_mmi_ind=(T_TFLASH_MMI_IND *) data;
+        switch(tflash_mmi_ind->mc_status)
+        {
+            case MC_INSERT_EVENT:
+                TRACE_EVENT("TFLASH card inserted");
+                mmeSignal(MfwMmeUSBMS , MFW_TFLASH_INSERTED_EVENT);
+                break;
+            case MC_REMOVE_EVENT:
+                TRACE_EVENT("TFLASH card removed");
+                mmeSignal(MfwMmeUSBMS , MFW_TFLASH_REMOVED_EVENT);
+                break;
+        }
+        PFREE(tflash_mmi_ind);
+        return TRUE;
+    }
+#endif
+/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
 
 #endif
     }
@@ -1167,8 +1167,8 @@
             mmeSignal(MfwMmeHdsDetect,hdsPresence);
         }
         else if (mfwMmeDrvFlag & MmeFlagIrdaMsg)
-		{
-		}
+        {
+        }
         else
         {
             mfwMmeDrvFlag = 0;
@@ -1257,12 +1257,12 @@
 #ifndef FF_MMI_AUDIO_PROFILE /*a0393213 warnings removal*/
 static void hdsCb (drv_SignalID_Type *signal_params)
 {
-	if (signal_params->SignalType == 1)
-	{
-		hdsPresence = (U16)signal_params->UserData;
-	    mfwMmeDrvFlag |= MmeFlagHdsDetect;
-		vsi_c_awake(VSI_CALLER_SINGLE);
-	}
+    if (signal_params->SignalType == 1)
+    {
+        hdsPresence = (U16)signal_params->UserData;
+        mfwMmeDrvFlag |= MmeFlagHdsDetect;
+        vsi_c_awake(VSI_CALLER_SINGLE);
+    }
 }
 #endif
 
@@ -1279,24 +1279,24 @@
 
 void mfw_set_stereo_path(int device)
 {
-	TRACE_FUNCTION("mfw_set_stereo_path()");
+    TRACE_FUNCTION("mfw_set_stereo_path()");
 
-	TRACE_EVENT_P1("Device === %d", device);
-	 switch(device)
-	 {
-	  case MFW_AUD_HEADSET:
-	  	audio_set_path(AUDIO_STEREO_SPEAKER_HEADPHONE, TRUE);
-	   	break;
-	  case MFW_AUD_HANDHELD:
-	   	audio_set_path(AUDIO_STEREO_SPEAKER_HANDHELD, TRUE);
-	   	break;
-	  case MFW_AUD_CARKIT:
-	   	audio_set_path(AUDIO_STEREO_SPEAKER_CARKIT, TRUE);
-		break;
-	  case MFW_AUD_LOUDSPEAKER:
-		audio_set_path(AUDIO_STEREO_SPEAKER_HANDFREE, TRUE);
-	   	break;
-	  }
+    TRACE_EVENT_P1("Device === %d", device);
+     switch(device)
+     {
+      case MFW_AUD_HEADSET:
+        audio_set_path(AUDIO_STEREO_SPEAKER_HEADPHONE, TRUE);
+        break;
+      case MFW_AUD_HANDHELD:
+        audio_set_path(AUDIO_STEREO_SPEAKER_HANDHELD, TRUE);
+        break;
+      case MFW_AUD_CARKIT:
+        audio_set_path(AUDIO_STEREO_SPEAKER_CARKIT, TRUE);
+        break;
+      case MFW_AUD_LOUDSPEAKER:
+        audio_set_path(AUDIO_STEREO_SPEAKER_HANDFREE, TRUE);
+        break;
+      }
 }
 /*
 +--------------------------------------------------------------------+
@@ -1309,35 +1309,35 @@
 */
 void mfw_unset_stereo_path(int device)
 {
-	TRACE_FUNCTION("mfw_unset_stereo_path()");
+    TRACE_FUNCTION("mfw_unset_stereo_path()");
 
-	TRACE_EVENT_P1("Device === %d", device);
-	switch(device)
-	 {
-	  case MFW_AUD_HEADSET:
-	   	audio_set_path(AUDIO_SPEAKER_HEADSET, FALSE);
-	   	break;
-	  case MFW_AUD_HANDHELD:
-	   	audio_set_path(AUDIO_SPEAKER_HANDHELD, FALSE);
-	   	break;
-	  case MFW_AUD_CARKIT:
-	   	audio_set_path(AUDIO_SPEAKER_CARKIT, FALSE);
-		break;
-	  case MFW_AUD_LOUDSPEAKER:
-		audio_set_path(AUDIO_SPEAKER_HANDFREE, FALSE);
-	   	break;
-	  }
+    TRACE_EVENT_P1("Device === %d", device);
+    switch(device)
+     {
+      case MFW_AUD_HEADSET:
+        audio_set_path(AUDIO_SPEAKER_HEADSET, FALSE);
+        break;
+      case MFW_AUD_HANDHELD:
+        audio_set_path(AUDIO_SPEAKER_HANDHELD, FALSE);
+        break;
+      case MFW_AUD_CARKIT:
+        audio_set_path(AUDIO_SPEAKER_CARKIT, FALSE);
+        break;
+      case MFW_AUD_LOUDSPEAKER:
+        audio_set_path(AUDIO_SPEAKER_HANDFREE, FALSE);
+        break;
+      }
 }
 
 // Jun 02, 2006  DRT OMAPS00079213   x0039928(sumanth)
 // Fix: Callback function called when mfw receives hook detect event from BSP
-void mfw_audio_hook_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, 
+void mfw_audio_hook_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
 ACCESSORY_CALLBACK_PARAM callbackparam )
 {
 
-	PALLOC(hdsData,MMI_HEADSET_IND);
-	hdsData->headset_status = (U8)notify;
-	PSENDX(ACI,hdsData);
+    PALLOC(hdsData,MMI_HEADSET_IND);
+    hdsData->headset_status = (U8)notify;
+    PSENDX(ACI,hdsData);
 
 }
 
@@ -1350,13 +1350,13 @@
   PURPOSE :Callback function for the events related to headset  and create and post a primitive
 
 */
-void mfw_audio_headSet_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, 
+void mfw_audio_headSet_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
 ACCESSORY_CALLBACK_PARAM callbackparam )
 {
 
-	PALLOC(hdsData,MMI_HEADSET_IND);
-	hdsData->headset_status = (U8)notify;
-	PSENDX(ACI,hdsData);
+    PALLOC(hdsData,MMI_HEADSET_IND);
+    hdsData->headset_status = (U8)notify;
+    PSENDX(ACI,hdsData);
 
 }
 /*
@@ -1368,12 +1368,12 @@
   PURPOSE :Callback function for the events related to carkit and create and post a primitive
 
 */
-void mfw_audio_carKit_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify, 
-	ACCESSORY_CALLBACK_PARAM callback_param )
+void mfw_audio_carKit_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
+    ACCESSORY_CALLBACK_PARAM callback_param )
 {
-	PALLOC(cktData,MMI_CARKIT_IND);
-	cktData->carkit_status = (U8)notify;
-	PSENDX(ACI,cktData);
+    PALLOC(cktData,MMI_CARKIT_IND);
+    cktData->carkit_status = (U8)notify;
+    PSENDX(ACI,cktData);
 }
 /*
 +--------------------------------------------------------------------+
@@ -1381,58 +1381,58 @@
 | STATE   : code                        ROUTINE : mfw_audio_headSet_indication              |
 +--------------------------------------------------------------------+
 
-  PURPOSE :handles the request to switch to the respective device from the 
-		    Bmi when the indications of insert and removal are received
+  PURPOSE :handles the request to switch to the respective device from the
+            Bmi when the indications of insert and removal are received
 
 */
 void mfw_audio_device_indication( U8 notify)
-{	
-	TRACE_FUNCTION("mfw_audio_device_indication()");
+{
+    TRACE_FUNCTION("mfw_audio_device_indication()");
+
+    TRACE_EVENT_P1(" Indication Type == %d",notify);
+    switch(notify)
+    {
+        case AUDIO_HEADSET_PLUGGED:
+            if(currAudioDevice != MFW_AUD_HEADSET)
+            {
+                mfw_audio_set_device(MFW_AUD_HEADSET);
+                    headsetInserted = TRUE;
+            }
+            break;
+        case AUDIO_HEADSET_UNPLUGGED:
+            if( currAudioDevice == MFW_AUD_HEADSET)
+            {
+                mfw_audio_set_device(MFW_AUD_HANDHELD );
 
-	TRACE_EVENT_P1(" Indication Type == %d",notify);
-	switch(notify)
-	{	
-		case AUDIO_HEADSET_PLUGGED:
-			if(currAudioDevice != MFW_AUD_HEADSET)
-			{
-				mfw_audio_set_device(MFW_AUD_HEADSET);
-					headsetInserted = TRUE;
-			}
-			break;
-		case AUDIO_HEADSET_UNPLUGGED:
-			if( currAudioDevice == MFW_AUD_HEADSET)
-			{
-				mfw_audio_set_device(MFW_AUD_HANDHELD );
-	
-			}
-			headsetInserted = FALSE;
-			break;
-		case AUDIO_HEADSET_HOOK_DETECT:
-				break;
-		case AUDIO_CARKIT_PLUGGED:
-			if(currAudioDevice != MFW_AUD_CARKIT)
-			{
-				mfw_audio_set_device(MFW_AUD_CARKIT);
-				carkitInserted = TRUE;
-			}
-			break;
-		case AUDIO_CARKIT_UNPLUGGED:
-			if( currAudioDevice == MFW_AUD_CARKIT)
-			{
-				if(headsetInserted == TRUE)
-				{
-					mfw_audio_set_device (MFW_AUD_HEADSET);
-				}
-				else
-				{
-					mfw_audio_set_device (MFW_AUD_HANDHELD);
-				}
-			}
-			carkitInserted = FALSE;
-			break;
-		default:
-			break;
-	}
+            }
+            headsetInserted = FALSE;
+            break;
+        case AUDIO_HEADSET_HOOK_DETECT:
+                break;
+        case AUDIO_CARKIT_PLUGGED:
+            if(currAudioDevice != MFW_AUD_CARKIT)
+            {
+                mfw_audio_set_device(MFW_AUD_CARKIT);
+                carkitInserted = TRUE;
+            }
+            break;
+        case AUDIO_CARKIT_UNPLUGGED:
+            if( currAudioDevice == MFW_AUD_CARKIT)
+            {
+                if(headsetInserted == TRUE)
+                {
+                    mfw_audio_set_device (MFW_AUD_HEADSET);
+                }
+                else
+                {
+                    mfw_audio_set_device (MFW_AUD_HANDHELD);
+                }
+            }
+            carkitInserted = FALSE;
+            break;
+        default:
+            break;
+    }
 }
 /*
 +--------------------------------------------------------------------+
@@ -1440,42 +1440,42 @@
 | STATE   : code                        ROUTINE : mfw_audio_headSet_indication              |
 +--------------------------------------------------------------------+
 
-  PURPOSE :This function handles the switch between the handheld and loudspeaker. 
-		    The type of device to be loaded will be posted from the menu selection
-		    When the profile changes if there is any other media played then the 
-		    speaker should be set to stereo speaker
+  PURPOSE :This function handles the switch between the handheld and loudspeaker.
+            The type of device to be loaded will be posted from the menu selection
+            When the profile changes if there is any other media played then the
+            speaker should be set to stereo speaker
 
 */
 void mfw_audio_set_device(int type)
 {
 /*Description: this array holds the file names on the ffs in which the audio profiles are stored.
 The file names are yet to be confirmed from the audio services group*/
-	//char aud_cg_file[4][15] = {"handheld","loudspeaker","headset","carkit"};
-	TRACE_FUNCTION("mfw_audio_set_device()");
+    //char aud_cg_file[4][15] = {"handheld","loudspeaker","headset","carkit"};
+    TRACE_FUNCTION("mfw_audio_set_device()");
 
-	TRACE_EVENT_P1("type of device = %d",type);
-	switch(type)
-	{
-		case MFW_AUD_HANDHELD:
-			audio_set_device((char*)HANDHELD);// (aud_cg_file[HANDHELD] );
-			currAudioDevice = MFW_AUD_HANDHELD;
-			break;
-		case MFW_AUD_LOUDSPEAKER:
-			audio_set_device((char*) LOUDSPEAKER);//(aud_cg_file[LOUDSPEAKER]);
-			currAudioDevice = MFW_AUD_LOUDSPEAKER;
-			break;
-		case MFW_AUD_HEADSET:
-			audio_set_device((char*)HEADSET);//(aud_cg_file[HEADSET]);
-			currAudioDevice = MFW_AUD_HEADSET;
-			break;
-		case MFW_AUD_CARKIT:
-			audio_set_device((char*)CARKIT);//(aud_cg_file[CARKIT]);
-			currAudioDevice = MFW_AUD_CARKIT;
-		default:
-			break;
-	}
-	if(TRUE == mfwAudPlay)
-  		mfw_set_stereo_path(currAudioDevice);
+    TRACE_EVENT_P1("type of device = %d",type);
+    switch(type)
+    {
+        case MFW_AUD_HANDHELD:
+            audio_set_device((char*)HANDHELD);// (aud_cg_file[HANDHELD] );
+            currAudioDevice = MFW_AUD_HANDHELD;
+            break;
+        case MFW_AUD_LOUDSPEAKER:
+            audio_set_device((char*) LOUDSPEAKER);//(aud_cg_file[LOUDSPEAKER]);
+            currAudioDevice = MFW_AUD_LOUDSPEAKER;
+            break;
+        case MFW_AUD_HEADSET:
+            audio_set_device((char*)HEADSET);//(aud_cg_file[HEADSET]);
+            currAudioDevice = MFW_AUD_HEADSET;
+            break;
+        case MFW_AUD_CARKIT:
+            audio_set_device((char*)CARKIT);//(aud_cg_file[CARKIT]);
+            currAudioDevice = MFW_AUD_CARKIT;
+        default:
+            break;
+    }
+    if(TRUE == mfwAudPlay)
+        mfw_set_stereo_path(currAudioDevice);
 
 }
 
@@ -1485,54 +1485,54 @@
      current audio device using the audio service entity function
      audio_full_access_read. This solves some synchronisation
      problems b/n Audio & MMI for the DR OMAPS00057367 */
-/*returns the current active audio device*/     
+/*returns the current active audio device*/
 int mfw_get_current_audioDevice()
 {
-	T_AUDIO_FULL_ACCESS_READ read;
-	INT8 speaker;
+    T_AUDIO_FULL_ACCESS_READ read;
+    INT8 speaker;
 
-	read.variable_indentifier = AUDIO_SPEAKER_MODE;
-	read.data = &speaker;
-	
-	TRACE_FUNCTION("mfw_get_current_audioDevice()");
-	audio_full_access_read(&read );
+    read.variable_indentifier = AUDIO_SPEAKER_MODE;
+    read.data = &speaker;
+
+    TRACE_FUNCTION("mfw_get_current_audioDevice()");
+    audio_full_access_read(&read );
 
-	switch(speaker)
-	{
-	case AUDIO_SPEAKER_NONE:
-		TRACE_EVENT("mfw_get_current_audioDevice() - SPEAKER PATH NOT CONFIGURED");
-		currAudioDevice = MFW_AUD_HANDHELD; //Need to check the mapping
-		break;
-	case AUDIO_SPEAKER_HANDHELD:
-		currAudioDevice = MFW_AUD_HANDHELD;
-		break;
-	case AUDIO_SPEAKER_HEADSET:
-		currAudioDevice = MFW_AUD_HEADSET;
-		break;
-	case AUDIO_SPEAKER_AUX:
-		currAudioDevice = MFW_AUD_LOUDSPEAKER; //Need to check the mapping
-		break;
-	case AUDIO_SPEAKER_CARKIT:
-		currAudioDevice = MFW_AUD_CARKIT;
-		break;
-	case AUDIO_SPEAKER_HANDFREE:
-	case AUDIO_SPEAKER_HANDFREE_CLASS_D:
-		currAudioDevice = MFW_AUD_LOUDSPEAKER;
-		break;
-	case AUDIO_SPEAKER_INVERTED_VOICE:
-		currAudioDevice = MFW_AUD_HEADSET; //Need to check the mapping
-		break;
-	}
+    switch(speaker)
+    {
+    case AUDIO_SPEAKER_NONE:
+        TRACE_EVENT("mfw_get_current_audioDevice() - SPEAKER PATH NOT CONFIGURED");
+        currAudioDevice = MFW_AUD_HANDHELD; //Need to check the mapping
+        break;
+    case AUDIO_SPEAKER_HANDHELD:
+        currAudioDevice = MFW_AUD_HANDHELD;
+        break;
+    case AUDIO_SPEAKER_HEADSET:
+        currAudioDevice = MFW_AUD_HEADSET;
+        break;
+    case AUDIO_SPEAKER_AUX:
+        currAudioDevice = MFW_AUD_LOUDSPEAKER; //Need to check the mapping
+        break;
+    case AUDIO_SPEAKER_CARKIT:
+        currAudioDevice = MFW_AUD_CARKIT;
+        break;
+    case AUDIO_SPEAKER_HANDFREE:
+    case AUDIO_SPEAKER_HANDFREE_CLASS_D:
+        currAudioDevice = MFW_AUD_LOUDSPEAKER;
+        break;
+    case AUDIO_SPEAKER_INVERTED_VOICE:
+        currAudioDevice = MFW_AUD_HEADSET; //Need to check the mapping
+        break;
+    }
 
-	return currAudioDevice;
+    return currAudioDevice;
 }
 /* OMAPS00057367, 3 Dec 2005, nekkareb : end */
 #else
 /*returns the current active audio device*/
 int mfw_get_current_audioDevice()
 {
-	TRACE_FUNCTION("mfw_get_current_audioDevice()");
-	return currAudioDevice;
+    TRACE_FUNCTION("mfw_get_current_audioDevice()");
+    return currAudioDevice;
 }
 #endif //ISAMPLE
 #endif
--- a/src/ui/mfw/mfw_mme.h	Thu Oct 22 22:37:31 2020 +0000
+++ b/src/ui/mfw/mfw_mme.h	Thu Oct 22 23:57:49 2020 +0000
@@ -19,22 +19,22 @@
 
     Mar 22, 2007  DVT: OMAPS00121916  x0039928(sumanth)
     Description: T-Flash hot swap.
-    
- 	xashmic 27 Sep 2006, OMAPS00096389 
-	ENH - a) Providing static menu for re-selection of enum options for enumeration
-	b) Popup menu displayed on connect event, can be enabled or disabled via menu option
 
-	xashmic 9 Sep 2006, OMAPS00092732
-	USBMS ER
+    xashmic 27 Sep 2006, OMAPS00096389
+    ENH - a) Providing static menu for re-selection of enum options for enumeration
+    b) Popup menu displayed on connect event, can be enabled or disabled via menu option
+
+    xashmic 9 Sep 2006, OMAPS00092732
+    USBMS ER
 
- *	Apr 17, 2006  ER: OMAPS00075178  x0pleela
- *   	Description: When the charger connect to phone(i-sample), the charger driver works, but the MMI and App don't work
- * 	Solution: Defined events for battery charger status
+ *  Apr 17, 2006  ER: OMAPS00075178  x0pleela
+ *      Description: When the charger connect to phone(i-sample), the charger driver works, but the MMI and App don't work
+ *  Solution: Defined events for battery charger status
  *
- *  	xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
- * 	Description:	Support for various audio profiles
- *	Solution:	The support for audio device's carkit/headset/loudspeaker/handheld.
- *			The audio device is enabled as per the user actions.
+ *      xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
+ *  Description:    Support for various audio profiles
+ *  Solution:   The support for audio device's carkit/headset/loudspeaker/handheld.
+ *          The audio device is enabled as per the user actions.
  *
  * *****************  Version 2  *******************************************
  * User: Es           Date: 2.03.00    Time: 16:48
@@ -66,9 +66,9 @@
 #define MfwMmeRtcAlarm      8           /* real time clock alarm    */
 #define MfwMmeHdsDetect    16           /* headset detection        */
 #define MfwMmeIrdaMsg      32           /* IRDA event               */
-//  	xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
+//      xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
 #ifdef FF_MMI_AUDIO_PROFILE
-#define MfwMmeHeadset 64	/* headset event */
+#define MfwMmeHeadset 64		/* headset event */
 #define MfwMmeCarkit 128		/* carkit event */
 #endif
 #ifdef FF_MMI_FILEMANAGER
@@ -76,19 +76,19 @@
 
 typedef enum
 {
-	MC_INSERT_EVENT = 0,	//MC Inserted
-	MC_REMOVE_EVENT		//MC Removed
+    MC_INSERT_EVENT = 0,	//MC Inserted
+    MC_REMOVE_EVENT		//MC Removed
 }T_MC_EVENT;
 
 typedef struct
 {
-  T_MC_EVENT                      mc_status;                  
+  T_MC_EVENT			mc_status;
 } T_TFLASH_MMI_IND;
 #endif
 
 //xashmic 9 Sep 2006, OMAPS00092732
 #ifdef FF_MMI_USBMS
-#define MfwMmeUSBMS	256
+#define MfwMmeUSBMS 256
 
 /*Defining the premitive*/
 #define USBMS_MMI_IND      0x1000   //This value has been set keeping in mind that it would not clash with exisitng IND created via sap editor.
@@ -97,37 +97,37 @@
 
 typedef struct
 {
-  U32                       usb_status;                  
+  U32                       usb_status;
 } T_USBMS_MMI_IND;
 typedef enum
 {
-	MFW_USB_ENUM = 0,	//USB Proceed With ENUM
-	MFW_USB_NO_ENUM		//USB Do not Enumerate
+    MFW_USB_ENUM = 0,   //USB Proceed With ENUM
+    MFW_USB_NO_ENUM     //USB Do not Enumerate
 }T_MFW_USB_ENUM_CONTROL;
 typedef enum
 {
-	MFW_USB_TYPE_MS = 0,	
-	MFW_USB_TYPE_TRACE,
-	MFW_USB_TYPE_AT,
-	MFW_USB_TYPE_AT_TRACE,//xashmic 27 Sep 2006, OMAPS00096389 
-	MFW_USB_TYPE_MS_TRACE,//xashmic 27 Sep 2006, OMAPS00096389 
-	MFW_USB_TYPE_AT_MS,//xashmic 27 Sep 2006, OMAPS00096389 
-	MFW_USB_TYPE_ALL
+    MFW_USB_TYPE_MS = 0,
+    MFW_USB_TYPE_TRACE,
+    MFW_USB_TYPE_AT,
+    MFW_USB_TYPE_AT_TRACE,//xashmic 27 Sep 2006, OMAPS00096389
+    MFW_USB_TYPE_MS_TRACE,//xashmic 27 Sep 2006, OMAPS00096389
+    MFW_USB_TYPE_AT_MS,//xashmic 27 Sep 2006, OMAPS00096389
+    MFW_USB_TYPE_ALL
 }T_MFW_USB_ENUM_TYPE;
 typedef enum
 {
-	MFW_USB_CABLE_CONNECT_EVENT = 0,	//USB Cable Connection Detected
-	MFW_USB_CABLE_DISCONNECT_EVENT,		//USB Cable Removal Detected
-	MFW_USB_ENUM_SUCCESS_EVENT,			//USB Enumeration Successful
-	MFW_USB_ENUM_FAILURE_EVENT			//USB Enumeration Failed
+    MFW_USB_CABLE_CONNECT_EVENT = 0,    //USB Cable Connection Detected
+    MFW_USB_CABLE_DISCONNECT_EVENT,     //USB Cable Removal Detected
+    MFW_USB_ENUM_SUCCESS_EVENT,         //USB Enumeration Successful
+    MFW_USB_ENUM_FAILURE_EVENT          //USB Enumeration Failed
 #ifdef FF_MMI_FILEMANAGER
-	,MFW_TFLASH_INSERTED_EVENT,
-	MFW_TFLASH_REMOVED_EVENT
-#endif	
+    ,MFW_TFLASH_INSERTED_EVENT,
+    MFW_TFLASH_REMOVED_EVENT
+#endif
 }T_MFW_USB_EVENT;
 
 
-//xashmic 27 Sep 2006, OMAPS00096389 
+//xashmic 27 Sep 2006, OMAPS00096389
 #define MFW_USBMS_PS_SHUTDOWN 0x01
 #define MFW_USBMS_PS_NO_SHUTDOWN (~MFW_USBMS_PS_SHUTDOWN)
 #define MFW_USBMS_POPUP_ENABLE 0x02
@@ -137,40 +137,40 @@
 
 #endif
 
-//Light level settings 
+//Light level settings
 #define BL_NO_LIGHT 0
 #define BL_MAX_LIGHT 255
 #define BL_SET_IDLE -1
 #define BL_NO_CHANGE -2
 
-//Events that may affect the backlight 
+//Events that may affect the backlight
 enum {
-	BL_INIT,
-	BL_IDLE_TIMER,
-	BL_KEY_PRESS,
-	BL_INCOMING_SMS,
-	BL_INCOMING_CALL,
-	BL_EXIT,
-	BL_SPARE_OPTION_1,
-	BL_SPARE_OPTION_2,
-	BL_SPARE_OPTION_3,
-	BL_LAST_OPTION
+    BL_INIT,
+    BL_IDLE_TIMER,
+    BL_KEY_PRESS,
+    BL_INCOMING_SMS,
+    BL_INCOMING_CALL,
+    BL_EXIT,
+    BL_SPARE_OPTION_1,
+    BL_SPARE_OPTION_2,
+    BL_SPARE_OPTION_3,
+    BL_LAST_OPTION
 };
-//  	xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
+//      xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
 #ifdef FF_MMI_AUDIO_PROFILE
-#define MFW_AUD_HANDHELD			1
-#define MFW_AUD_LOUDSPEAKER		2
-#define MFW_AUD_HEADSET			3
-#define MFW_AUD_CARKIT			4
+#define MFW_AUD_HANDHELD        1
+#define MFW_AUD_LOUDSPEAKER     2
+#define MFW_AUD_HEADSET         3
+#define MFW_AUD_CARKIT          4
 #endif
 
 //x0pleela 10 Apr, 2006
 //Events for battery charger status
-enum{
-	PWR_CHG_BEGIN= 2,  // charger begin 
-	PWR_CHG_STOP =  3,  // charger end
-	PWR_CHG_PLUG =  4, // charger plug 
-	PWR_CHG_UNPLUG = 5 // charger unplug
+enum {
+    PWR_CHG_BEGIN  = 2,  // charger begin
+    PWR_CHG_STOP   = 3,  // charger end
+    PWR_CHG_PLUG   = 4,  // charger plug
+    PWR_CHG_UNPLUG = 5   // charger unplug
 };
                                         /* PROTOTYPES               */
 MfwRes mmeInit (void);
@@ -188,7 +188,7 @@
 
 void mmeRxInfo (U8 intervalls, U16 level);
 void mmeBattInfo (U8 intervalls, U16 level);
-//  	xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
+//      xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
 #ifdef FF_MMI_AUDIO_PROFILE
 EXTERN void mfw_auido_device_indication(U8 notify);
 EXTERN int mfw_get_current_audioDevice();