changeset 285:59dff9a18e2a

Condat audio.c: white space readability fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 08 Nov 2021 23:53:22 +0000
parents bba917c3b510
children ee16d57b32b2
files src/condat/com/src/driver/audio.c
diffstat 1 files changed, 56 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/src/condat/com/src/driver/audio.c	Mon Nov 08 21:52:29 2021 +0000
+++ b/src/condat/com/src/driver/audio.c	Mon Nov 08 23:53:22 2021 +0000
@@ -32,30 +32,30 @@
 |             case the application has to have the knowledge about the
 |             sound image format.
 +-----------------------------------------------------------------------------
-|  History :  
+|  History :
 |		  Apr 04, 2005    REF: ENH 30063 xdeepadh
 |		  Description: Buzzer removal activity for Locosto MMI
 |		  Fix:All the Buzzer related calls are under the  compilation flag FF_BUZZER.
-|			The GSM tones which were playing in the buzzer are now routed to the speaker(Audio).     
+|		The GSM tones which were playing in the buzzer are now routed to the speaker(Audio).
 +-----------------------------------------------------------------------------
-	$History: 
+	$History:
 
-   	              
+
  	xpradipg - GSM-ENH-32494 : 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.	
+ 			The audio device is enabled as per the user actions.
 
 	June 13, 2005	REF : GSM_ENH_32062 - xpradipg
 	Description:The audio uplink not working in the connected call
 	Solution:	The audio uplink was configured to mute state at initialization
-				The configuration is changed to be in unmute state
+			The configuration is changed to be in unmute state
 
 	Apr 26, 2005   REF : CRR 30627 xpradipg
 	Bug :	Replace the ABB APIs with Audio Service APIs
 	Fix :	The ABB APIs are used in muting/unmuting and setting the volume of
-			the speaker and microphone. These ABB APIs are replaced with the 
-			audio serivce APIs	
+		the speaker and microphone. These ABB APIs are replaced with the
+		audio serivce APIs
 ******************************************************************************/
 
 #ifndef DRV_AUDIO_C
@@ -234,7 +234,7 @@
 
 // 	xpradipg - GSM-ENH-32494 : 23 June 2005
 #ifdef FF_MMI_AUDIO_PROFILE
-typedef struct 
+typedef struct
 {
 	int status;
 }T_AUDIO_MODE_LOAD_DONE;
@@ -302,7 +302,7 @@
 #define F_1209 (( 149 << 8) + 111)
 #define F_1336 (( 128 << 8) + 118)
 #define F_1477 (( 102 << 8) + 125)
-#define F_1633 (( 73  << 8) +  130)
+#define F_1633 ((  73 << 8) + 130)
 
 #else
 
@@ -576,9 +576,9 @@
     When the buzzer is not available, the ringing tones will be played with midi ringer
  */
 static const T_DESCR * const TONE_DESCR [] =
-                       { 
+                       {
 #ifndef FF_MMI_NO_BUZZER
-			    ct_ring,    /* ringing tone 0             */
+			 ct_ring,    /* ringing tone 0             */
                          ct_ring,    /* ringing tone 1             */
                          ct_ring,    /* ringing tone 2             */
                          ct_ring,    /* ringing tone 3             */
@@ -703,21 +703,21 @@
  $Function:    	audio_set_path()
 
  $Description: sets the audio speaker path to the current audio device and also either to voice or
- 			stereo 
+		stereo
 
  $Returns:    	none
 
- $Arguments:  
- 			audioDevice - Indicates the device to which the path has to be set
- 			stereo - If false the path is for voice 
- 				      If true the path is for stereo
+ $Arguments:
+		audioDevice - Indicates the device to which the path has to be set
+		stereo - If false the path is for voice
+		      If true the path is for stereo
 *******************************************************************************/
 
 void audio_set_path(int audioDevice,int stereo)
 {
 	T_RV_RETURN_PATH return_path = {0,audio_full_access_write_cb};
 	T_AUDIO_FULL_ACCESS_WRITE	p_parameter;
-	int status;	
+	int status;
 	if( stereo)
 		p_parameter.variable_indentifier = AUDIO_STEREO_SPEAKER_MODE;
 	else
@@ -744,7 +744,7 @@
 
 */
 // 	xpradipg - GSM-ENH-32494 : 23 June 2005
-//	the interface for the audio profiles has changed, it accepts an array of 
+//	the interface for the audio profiles has changed, it accepts an array of
 //   type T_ACCESSORY_CALLBACK
 #ifdef FF_MMI_AUDIO_PROFILE
 GLOBAL UBYTE audio_Init(T_ACCESSORY_CALLBACK *audioConfig)
@@ -753,13 +753,13 @@
 #endif
 {
 //	Apr 26, 2005   REF : CRR 30627 xpradipg
-//	local variable declarations 
+//	local variable declarations
 #ifdef FF_MMI_SERVICES_MIGRATION
 	T_AUDIO_FULL_ACCESS_WRITE side_tone_cfg;
 	T_RV_RETURN_PATH return_path = {0, NULL};
 	T_AUDIO_RET result;
 	INT8 side_tone = AUDIO_SIDE_TONE;
-#endif	
+#endif
 // 	xpradipg - GSM-ENH-32494 : 23 June 2005
 #ifdef FF_MMI_AUDIO_PROFILE
 T_AUDIO_RET status;
@@ -767,7 +767,7 @@
 #endif
 
 // 	xpradipg - GSM-ENH-32494 : 23 June 2005
-//	the callback functions for the headset and carkit indication are registered 
+//	the callback functions for the headset and carkit indication are registered
 //	and the defualt mode handheld is loaded
 #ifdef FF_MMI_AUDIO_PROFILE
 #if 0
@@ -776,7 +776,7 @@
 	{
 		AUDIO_TRC_FUNC("Error - registering the callback for headset");
 	}
-	
+
 	status = audio_accessory_register_notification(audioConfig[CALLBACK_CARKIT],AUDIO_ACCESSORY_CARKIT);
 	if(status != AUDIO_OK)
 	{
@@ -800,7 +800,7 @@
     return DRV_INITFAILURE;
 #endif
 //Apr 04, 2005    REF: ENH 30063 xdeepadh
-//For Buzzer init 
+//For Buzzer init
 #ifndef FF_MMI_NO_BUZZER
   BZ_Init ();             /* initialize buzzer */
 #endif
@@ -822,17 +822,17 @@
  #endif
     {
 //	Apr 26, 2005   REF : CRR 30627 xpradipg
-//	set the sidetone value to 175 this is the optimum value    
+//	set the sidetone value to 175 this is the optimum value
 #ifdef FF_MMI_SERVICES_MIGRATION
     	side_tone_cfg.variable_indentifier = AUDIO_MICROPHONE_SPEAKER_LOOP_SIDETONE;
     	side_tone_cfg.data = (void*)&side_tone;
     	result = audio_full_access_write(&side_tone_cfg, return_path);
-#else    	
+#else
 	    ABB_SideTone (175);
-#endif	    
+#endif
     }
 #else
-     VG_SideTone (175); 
+     VG_SideTone (175);
 #endif
 
 
@@ -886,12 +886,12 @@
 #ifdef FF_MMI_SERVICES_MIGRATION
 	T_AUDIO_FULL_ACCESS_WRITE	p_parameter;
 	T_AUDIO_FULL_ACCESS_READ	p_parameter1;
-	T_RV_RETURN_PATH            return_path = {0, NULL};
-	T_AUDIO_RET					result;
-	static INT8					speaker_volume = 0;
-	INT8						setvolume = AUDIO_SPEAKER_VOLUME_MUTE;
-#endif	
-	
+	T_RV_RETURN_PATH		return_path = {0, NULL};
+	T_AUDIO_RET			result;
+	static INT8			speaker_volume = 0;
+	INT8				setvolume = AUDIO_SPEAKER_VOLUME_MUTE;
+#endif
+
   if (in_DeviceID EQ AUDIO_SPEAKER)
   {
     if (in_Mode AND audio_is_free)
@@ -909,7 +909,7 @@
 			TRACE_FUNCTION("error -  setting speaker volume");
 #else
       ABB_DlMute (0);
-#endif      
+#endif
 #else
       VG_DlMute (0);
 #endif
@@ -930,7 +930,7 @@
 		result = audio_full_access_write(&p_parameter,return_path);
 #else
       ABB_DlMute (1);
-#endif      
+#endif
 #else
       VG_DlMute (1);
 #endif
@@ -1094,13 +1094,13 @@
 GLOBAL UBYTE audio_SetAmplf (UBYTE in_DeviceID, UBYTE in_Amplf)
 {
 //	Apr 26, 2005   REF : CRR 30627 xpradipg
-//	local variable 
+//	local variable
 #ifdef FF_MMI_SERVICES_MIGRATION
 	T_AUDIO_FULL_ACCESS_WRITE	p_parameter;
 	T_RV_RETURN_PATH          	return_path = {0, NULL};
-	T_AUDIO_RET					result;
-	INT8						volume;
-#endif	
+	T_AUDIO_RET			result;
+	INT8				volume;
+#endif
   if (in_DeviceID EQ AUDIO_MICROPHONE)
   {
     act_micVolume = 75;         /* voice quality is best at this microphone volume */
@@ -1254,7 +1254,7 @@
   switch (act_tone.status)
   {
 
-//Apr 04, 2005    REF: ENH 30063 xdeepadh  
+//Apr 04, 2005    REF: ENH 30063 xdeepadh
 //If Buzzer is available, disable the buzzer
 #ifndef FF_MMI_NO_BUZZER
     case BUZZER_ON:
@@ -1309,7 +1309,7 @@
   {
     act_tone.call_tone   = in_SoundID;
 //Apr 04, 2005    REF: ENH 30063 xdeepadh
-//Before playing the tone, set the status and the tone type . 
+//Before playing the tone, set the status and the tone type .
 #ifndef FF_MMI_NO_BUZZER	 //If Buzzer is available
     act_tone.status      = BUZZER_SILENT;
     act_tone.type        = (UBYTE)TONE_TYPE[in_SoundID];
@@ -1385,7 +1385,7 @@
    */
   switch (act_tone.status)
   {
-//Apr 04, 2005    REF: ENH 30063 xdeepadh   
+//Apr 04, 2005    REF: ENH 30063 xdeepadh
 //If Buzzer is available, disable it.
 #ifndef FF_MMI_NO_BUZZER
     case BUZZER_ON:
@@ -1777,12 +1777,12 @@
 #ifdef FF_MMI_SERVICES_MIGRATION
 	T_AUDIO_FULL_ACCESS_WRITE	p_parameter;
 	T_AUDIO_FULL_ACCESS_READ	p_parameter1;
-	T_RV_RETURN_PATH            return_path = {0, NULL};
-	T_AUDIO_RET					result;
+	T_RV_RETURN_PATH		return_path = {0, NULL};
+	T_AUDIO_RET			result;
 //	June 13, 2005	REF : GSM_ENH_32062 - xpradipg
-//	the default value is assigned to AUDIO_MICROPHONE_OUTPUT_BIAS_2_0V	
-	static INT8					microphone_gain = AUDIO_MICROPHONE_OUTPUT_BIAS_2_0V;
-	INT8						setgain = AUDIO_MICROPHONE_MUTE;
+//	the default value is assigned to AUDIO_MICROPHONE_OUTPUT_BIAS_2_0V
+	static INT8			microphone_gain = AUDIO_MICROPHONE_OUTPUT_BIAS_2_0V;
+	INT8				setgain = AUDIO_MICROPHONE_MUTE;
 #endif
   if (mute)
   {
@@ -1791,7 +1791,7 @@
 //	the audio is unmuted for the variable "mute" with value greater than "0"
 //	Apr 26, 2005   REF : CRR 30627 xpradipg
 //	read the microphone gain, store it and mute the microphone
-#ifdef FF_MMI_SERVICES_MIGRATION		
+#ifdef FF_MMI_SERVICES_MIGRATION
 		p_parameter1.variable_indentifier = AUDIO_MICROPHONE_GAIN;
 		p_parameter1.data = (void*)&microphone_gain;
 		result = audio_full_access_read(&p_parameter1);
@@ -1802,12 +1802,12 @@
 		p_parameter.variable_indentifier = AUDIO_MICROPHONE_GAIN;
 		setgain = AUDIO_MICROPHONE_MUTE;
 		p_parameter.data = (void*)&setgain;
-		result = audio_full_access_write(&p_parameter, return_path); 	
+		result = audio_full_access_write(&p_parameter, return_path);
 		if(result != 0)
 			TRACE_EVENT("ERROR - not written1");
 #else
     ABB_UlMute (1);
-#endif    
+#endif
 #else
     VG_UlVolume (0);
 #endif
@@ -1819,15 +1819,15 @@
 //	the audio is muted for the variable "mute" with value <= to "0"
 //	Apr 26, 2005   REF : CRR 30627 xpradipg
 //	restore the volume back once the unmuting is done
-#ifdef FF_MMI_SERVICES_MIGRATION	
+#ifdef FF_MMI_SERVICES_MIGRATION
 		p_parameter.variable_indentifier = (UINT8)AUDIO_MICROPHONE_GAIN ;
-		p_parameter.data				=  (void*)&microphone_gain;
-		result = audio_full_access_write(&p_parameter, return_path); 	
+		p_parameter.data		=  (void*)&microphone_gain;
+		result = audio_full_access_write(&p_parameter, return_path);
 		if(result != 0)
 			TRACE_EVENT("ERROR - not written");
 #else
     ABB_UlMute (0);
-#endif    
+#endif
 #else
     VG_UlVolume (act_micVolume);
 #endif
@@ -1932,7 +1932,7 @@
     TRACE_EVENT_P1 ("TTY invalid parameter: %d", tty);
     return;
   }
-  
+
 #if defined (RIV_AUDIO) && !defined (_TTY_SIMU)
 
     cmd = (UBYTE)tty;