FreeCalypso > hg > fc-tourmaline
comparison src/condat/com/src/driver/audio.c @ 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 | 4e78acac3d88 |
children | ee16d57b32b2 |
comparison
equal
deleted
inserted
replaced
284:bba917c3b510 | 285:59dff9a18e2a |
---|---|
30 | that an application may copy a sound image into its local | 30 | that an application may copy a sound image into its local |
31 | buffer, modify it and let it play by the driver. In this | 31 | buffer, modify it and let it play by the driver. In this |
32 | case the application has to have the knowledge about the | 32 | case the application has to have the knowledge about the |
33 | sound image format. | 33 | sound image format. |
34 +----------------------------------------------------------------------------- | 34 +----------------------------------------------------------------------------- |
35 | History : | 35 | History : |
36 | Apr 04, 2005 REF: ENH 30063 xdeepadh | 36 | Apr 04, 2005 REF: ENH 30063 xdeepadh |
37 | Description: Buzzer removal activity for Locosto MMI | 37 | Description: Buzzer removal activity for Locosto MMI |
38 | Fix:All the Buzzer related calls are under the compilation flag FF_BUZZER. | 38 | Fix:All the Buzzer related calls are under the compilation flag FF_BUZZER. |
39 | The GSM tones which were playing in the buzzer are now routed to the speaker(Audio). | 39 | The GSM tones which were playing in the buzzer are now routed to the speaker(Audio). |
40 +----------------------------------------------------------------------------- | 40 +----------------------------------------------------------------------------- |
41 $History: | 41 $History: |
42 | 42 |
43 | 43 |
44 xpradipg - GSM-ENH-32494 : 23 June 2005 | 44 xpradipg - GSM-ENH-32494 : 23 June 2005 |
45 Description: Support for various audio profiles | 45 Description: Support for various audio profiles |
46 Solution: The support for audio device's carkit/headset/loudspeaker/handheld. | 46 Solution: The support for audio device's carkit/headset/loudspeaker/handheld. |
47 The audio device is enabled as per the user actions. | 47 The audio device is enabled as per the user actions. |
48 | 48 |
49 June 13, 2005 REF : GSM_ENH_32062 - xpradipg | 49 June 13, 2005 REF : GSM_ENH_32062 - xpradipg |
50 Description:The audio uplink not working in the connected call | 50 Description:The audio uplink not working in the connected call |
51 Solution: The audio uplink was configured to mute state at initialization | 51 Solution: The audio uplink was configured to mute state at initialization |
52 The configuration is changed to be in unmute state | 52 The configuration is changed to be in unmute state |
53 | 53 |
54 Apr 26, 2005 REF : CRR 30627 xpradipg | 54 Apr 26, 2005 REF : CRR 30627 xpradipg |
55 Bug : Replace the ABB APIs with Audio Service APIs | 55 Bug : Replace the ABB APIs with Audio Service APIs |
56 Fix : The ABB APIs are used in muting/unmuting and setting the volume of | 56 Fix : The ABB APIs are used in muting/unmuting and setting the volume of |
57 the speaker and microphone. These ABB APIs are replaced with the | 57 the speaker and microphone. These ABB APIs are replaced with the |
58 audio serivce APIs | 58 audio serivce APIs |
59 ******************************************************************************/ | 59 ******************************************************************************/ |
60 | 60 |
61 #ifndef DRV_AUDIO_C | 61 #ifndef DRV_AUDIO_C |
62 #define DRV_AUDIO_C | 62 #define DRV_AUDIO_C |
63 #endif | 63 #endif |
232 LOCAL void audio_dyn_load_return (void *result); | 232 LOCAL void audio_dyn_load_return (void *result); |
233 #endif | 233 #endif |
234 | 234 |
235 // xpradipg - GSM-ENH-32494 : 23 June 2005 | 235 // xpradipg - GSM-ENH-32494 : 23 June 2005 |
236 #ifdef FF_MMI_AUDIO_PROFILE | 236 #ifdef FF_MMI_AUDIO_PROFILE |
237 typedef struct | 237 typedef struct |
238 { | 238 { |
239 int status; | 239 int status; |
240 }T_AUDIO_MODE_LOAD_DONE; | 240 }T_AUDIO_MODE_LOAD_DONE; |
241 EXTERN T_AUDIO_RET audio_mode_load (T_AUDIO_MODE_LOAD *p_parameter, T_RV_RETURN_PATH return_path); | 241 EXTERN T_AUDIO_RET audio_mode_load (T_AUDIO_MODE_LOAD *p_parameter, T_RV_RETURN_PATH return_path); |
242 #endif | 242 #endif |
300 #define F_852 (( 201 << 8) + 67) | 300 #define F_852 (( 201 << 8) + 67) |
301 #define F_941 (( 189 << 8) + 73) | 301 #define F_941 (( 189 << 8) + 73) |
302 #define F_1209 (( 149 << 8) + 111) | 302 #define F_1209 (( 149 << 8) + 111) |
303 #define F_1336 (( 128 << 8) + 118) | 303 #define F_1336 (( 128 << 8) + 118) |
304 #define F_1477 (( 102 << 8) + 125) | 304 #define F_1477 (( 102 << 8) + 125) |
305 #define F_1633 (( 73 << 8) + 130) | 305 #define F_1633 (( 73 << 8) + 130) |
306 | 306 |
307 #else | 307 #else |
308 | 308 |
309 /* | 309 /* |
310 * unit is milliseconds | 310 * unit is milliseconds |
574 * Tone Description Table | 574 * Tone Description Table |
575 This table will have the ringing tones and the gsm tones. | 575 This table will have the ringing tones and the gsm tones. |
576 When the buzzer is not available, the ringing tones will be played with midi ringer | 576 When the buzzer is not available, the ringing tones will be played with midi ringer |
577 */ | 577 */ |
578 static const T_DESCR * const TONE_DESCR [] = | 578 static const T_DESCR * const TONE_DESCR [] = |
579 { | 579 { |
580 #ifndef FF_MMI_NO_BUZZER | 580 #ifndef FF_MMI_NO_BUZZER |
581 ct_ring, /* ringing tone 0 */ | 581 ct_ring, /* ringing tone 0 */ |
582 ct_ring, /* ringing tone 1 */ | 582 ct_ring, /* ringing tone 1 */ |
583 ct_ring, /* ringing tone 2 */ | 583 ct_ring, /* ringing tone 2 */ |
584 ct_ring, /* ringing tone 3 */ | 584 ct_ring, /* ringing tone 3 */ |
585 ct_ring, /* ringing tone 4 */ | 585 ct_ring, /* ringing tone 4 */ |
586 ct_ring, /* ringing tone 5 */ | 586 ct_ring, /* ringing tone 5 */ |
701 | 701 |
702 /******************************************************************************* | 702 /******************************************************************************* |
703 $Function: audio_set_path() | 703 $Function: audio_set_path() |
704 | 704 |
705 $Description: sets the audio speaker path to the current audio device and also either to voice or | 705 $Description: sets the audio speaker path to the current audio device and also either to voice or |
706 stereo | 706 stereo |
707 | 707 |
708 $Returns: none | 708 $Returns: none |
709 | 709 |
710 $Arguments: | 710 $Arguments: |
711 audioDevice - Indicates the device to which the path has to be set | 711 audioDevice - Indicates the device to which the path has to be set |
712 stereo - If false the path is for voice | 712 stereo - If false the path is for voice |
713 If true the path is for stereo | 713 If true the path is for stereo |
714 *******************************************************************************/ | 714 *******************************************************************************/ |
715 | 715 |
716 void audio_set_path(int audioDevice,int stereo) | 716 void audio_set_path(int audioDevice,int stereo) |
717 { | 717 { |
718 T_RV_RETURN_PATH return_path = {0,audio_full_access_write_cb}; | 718 T_RV_RETURN_PATH return_path = {0,audio_full_access_write_cb}; |
719 T_AUDIO_FULL_ACCESS_WRITE p_parameter; | 719 T_AUDIO_FULL_ACCESS_WRITE p_parameter; |
720 int status; | 720 int status; |
721 if( stereo) | 721 if( stereo) |
722 p_parameter.variable_indentifier = AUDIO_STEREO_SPEAKER_MODE; | 722 p_parameter.variable_indentifier = AUDIO_STEREO_SPEAKER_MODE; |
723 else | 723 else |
724 p_parameter.variable_indentifier = AUDIO_SPEAKER_MODE; | 724 p_parameter.variable_indentifier = AUDIO_SPEAKER_MODE; |
725 p_parameter.data = (void*)&audioDevice; | 725 p_parameter.data = (void*)&audioDevice; |
742 failure, which means the that the driver cannot be used, | 742 failure, which means the that the driver cannot be used, |
743 the function returns DRV_INITFAILURE. | 743 the function returns DRV_INITFAILURE. |
744 | 744 |
745 */ | 745 */ |
746 // xpradipg - GSM-ENH-32494 : 23 June 2005 | 746 // xpradipg - GSM-ENH-32494 : 23 June 2005 |
747 // the interface for the audio profiles has changed, it accepts an array of | 747 // the interface for the audio profiles has changed, it accepts an array of |
748 // type T_ACCESSORY_CALLBACK | 748 // type T_ACCESSORY_CALLBACK |
749 #ifdef FF_MMI_AUDIO_PROFILE | 749 #ifdef FF_MMI_AUDIO_PROFILE |
750 GLOBAL UBYTE audio_Init(T_ACCESSORY_CALLBACK *audioConfig) | 750 GLOBAL UBYTE audio_Init(T_ACCESSORY_CALLBACK *audioConfig) |
751 #else | 751 #else |
752 GLOBAL UBYTE audio_Init (drv_SignalCB_Type in_SignalCBPtr) | 752 GLOBAL UBYTE audio_Init (drv_SignalCB_Type in_SignalCBPtr) |
753 #endif | 753 #endif |
754 { | 754 { |
755 // Apr 26, 2005 REF : CRR 30627 xpradipg | 755 // Apr 26, 2005 REF : CRR 30627 xpradipg |
756 // local variable declarations | 756 // local variable declarations |
757 #ifdef FF_MMI_SERVICES_MIGRATION | 757 #ifdef FF_MMI_SERVICES_MIGRATION |
758 T_AUDIO_FULL_ACCESS_WRITE side_tone_cfg; | 758 T_AUDIO_FULL_ACCESS_WRITE side_tone_cfg; |
759 T_RV_RETURN_PATH return_path = {0, NULL}; | 759 T_RV_RETURN_PATH return_path = {0, NULL}; |
760 T_AUDIO_RET result; | 760 T_AUDIO_RET result; |
761 INT8 side_tone = AUDIO_SIDE_TONE; | 761 INT8 side_tone = AUDIO_SIDE_TONE; |
762 #endif | 762 #endif |
763 // xpradipg - GSM-ENH-32494 : 23 June 2005 | 763 // xpradipg - GSM-ENH-32494 : 23 June 2005 |
764 #ifdef FF_MMI_AUDIO_PROFILE | 764 #ifdef FF_MMI_AUDIO_PROFILE |
765 T_AUDIO_RET status; | 765 T_AUDIO_RET status; |
766 T_AUDIO_MODE_LOAD handheld= {"handheld"}; | 766 T_AUDIO_MODE_LOAD handheld= {"handheld"}; |
767 #endif | 767 #endif |
768 | 768 |
769 // xpradipg - GSM-ENH-32494 : 23 June 2005 | 769 // xpradipg - GSM-ENH-32494 : 23 June 2005 |
770 // the callback functions for the headset and carkit indication are registered | 770 // the callback functions for the headset and carkit indication are registered |
771 // and the defualt mode handheld is loaded | 771 // and the defualt mode handheld is loaded |
772 #ifdef FF_MMI_AUDIO_PROFILE | 772 #ifdef FF_MMI_AUDIO_PROFILE |
773 #if 0 | 773 #if 0 |
774 status = audio_accessory_register_notification(audioConfig[CALLBACK_HEADSET],AUDIO_ACCESSORY_HEADSET); | 774 status = audio_accessory_register_notification(audioConfig[CALLBACK_HEADSET],AUDIO_ACCESSORY_HEADSET); |
775 if( status != AUDIO_OK) | 775 if( status != AUDIO_OK) |
776 { | 776 { |
777 AUDIO_TRC_FUNC("Error - registering the callback for headset"); | 777 AUDIO_TRC_FUNC("Error - registering the callback for headset"); |
778 } | 778 } |
779 | 779 |
780 status = audio_accessory_register_notification(audioConfig[CALLBACK_CARKIT],AUDIO_ACCESSORY_CARKIT); | 780 status = audio_accessory_register_notification(audioConfig[CALLBACK_CARKIT],AUDIO_ACCESSORY_CARKIT); |
781 if(status != AUDIO_OK) | 781 if(status != AUDIO_OK) |
782 { | 782 { |
783 AUDIO_TRC_FUNC("Error - registering the callback for carkit"); | 783 AUDIO_TRC_FUNC("Error - registering the callback for carkit"); |
784 } | 784 } |
798 | 798 |
799 if (audio_handle < VSI_OK) | 799 if (audio_handle < VSI_OK) |
800 return DRV_INITFAILURE; | 800 return DRV_INITFAILURE; |
801 #endif | 801 #endif |
802 //Apr 04, 2005 REF: ENH 30063 xdeepadh | 802 //Apr 04, 2005 REF: ENH 30063 xdeepadh |
803 //For Buzzer init | 803 //For Buzzer init |
804 #ifndef FF_MMI_NO_BUZZER | 804 #ifndef FF_MMI_NO_BUZZER |
805 BZ_Init (); /* initialize buzzer */ | 805 BZ_Init (); /* initialize buzzer */ |
806 #endif | 806 #endif |
807 audio_SetMute ( AUDIO_SPEAKER, AUDIO_MUTING_OFF ); | 807 audio_SetMute ( AUDIO_SPEAKER, AUDIO_MUTING_OFF ); |
808 audio_SetMute ( AUDIO_MICROPHONE, AUDIO_MUTING_OFF ); | 808 audio_SetMute ( AUDIO_MICROPHONE, AUDIO_MUTING_OFF ); |
820 #ifdef FF_TTY | 820 #ifdef FF_TTY |
821 if (!tty_state) | 821 if (!tty_state) |
822 #endif | 822 #endif |
823 { | 823 { |
824 // Apr 26, 2005 REF : CRR 30627 xpradipg | 824 // Apr 26, 2005 REF : CRR 30627 xpradipg |
825 // set the sidetone value to 175 this is the optimum value | 825 // set the sidetone value to 175 this is the optimum value |
826 #ifdef FF_MMI_SERVICES_MIGRATION | 826 #ifdef FF_MMI_SERVICES_MIGRATION |
827 side_tone_cfg.variable_indentifier = AUDIO_MICROPHONE_SPEAKER_LOOP_SIDETONE; | 827 side_tone_cfg.variable_indentifier = AUDIO_MICROPHONE_SPEAKER_LOOP_SIDETONE; |
828 side_tone_cfg.data = (void*)&side_tone; | 828 side_tone_cfg.data = (void*)&side_tone; |
829 result = audio_full_access_write(&side_tone_cfg, return_path); | 829 result = audio_full_access_write(&side_tone_cfg, return_path); |
830 #else | 830 #else |
831 ABB_SideTone (175); | 831 ABB_SideTone (175); |
832 #endif | 832 #endif |
833 } | 833 } |
834 #else | 834 #else |
835 VG_SideTone (175); | 835 VG_SideTone (175); |
836 #endif | 836 #endif |
837 | 837 |
838 | 838 |
839 return DRV_OK; | 839 return DRV_OK; |
840 } | 840 } |
884 // Apr 26, 2005 REF : CRR 30627 xpradipg | 884 // Apr 26, 2005 REF : CRR 30627 xpradipg |
885 // local variable declarations | 885 // local variable declarations |
886 #ifdef FF_MMI_SERVICES_MIGRATION | 886 #ifdef FF_MMI_SERVICES_MIGRATION |
887 T_AUDIO_FULL_ACCESS_WRITE p_parameter; | 887 T_AUDIO_FULL_ACCESS_WRITE p_parameter; |
888 T_AUDIO_FULL_ACCESS_READ p_parameter1; | 888 T_AUDIO_FULL_ACCESS_READ p_parameter1; |
889 T_RV_RETURN_PATH return_path = {0, NULL}; | 889 T_RV_RETURN_PATH return_path = {0, NULL}; |
890 T_AUDIO_RET result; | 890 T_AUDIO_RET result; |
891 static INT8 speaker_volume = 0; | 891 static INT8 speaker_volume = 0; |
892 INT8 setvolume = AUDIO_SPEAKER_VOLUME_MUTE; | 892 INT8 setvolume = AUDIO_SPEAKER_VOLUME_MUTE; |
893 #endif | 893 #endif |
894 | 894 |
895 if (in_DeviceID EQ AUDIO_SPEAKER) | 895 if (in_DeviceID EQ AUDIO_SPEAKER) |
896 { | 896 { |
897 if (in_Mode AND audio_is_free) | 897 if (in_Mode AND audio_is_free) |
898 { | 898 { |
899 TRACE_EVENT ("No speaker muting"); | 899 TRACE_EVENT ("No speaker muting"); |
907 result = audio_full_access_write(&p_parameter,return_path); | 907 result = audio_full_access_write(&p_parameter,return_path); |
908 if(result != 0) | 908 if(result != 0) |
909 TRACE_FUNCTION("error - setting speaker volume"); | 909 TRACE_FUNCTION("error - setting speaker volume"); |
910 #else | 910 #else |
911 ABB_DlMute (0); | 911 ABB_DlMute (0); |
912 #endif | 912 #endif |
913 #else | 913 #else |
914 VG_DlMute (0); | 914 VG_DlMute (0); |
915 #endif | 915 #endif |
916 act_speakerMute = AUDIO_MUTING_OFF; | 916 act_speakerMute = AUDIO_MUTING_OFF; |
917 } | 917 } |
928 p_parameter.variable_indentifier = AUDIO_SPEAKER_VOLUME_MUTE; | 928 p_parameter.variable_indentifier = AUDIO_SPEAKER_VOLUME_MUTE; |
929 p_parameter.data = (void*)&setvolume; | 929 p_parameter.data = (void*)&setvolume; |
930 result = audio_full_access_write(&p_parameter,return_path); | 930 result = audio_full_access_write(&p_parameter,return_path); |
931 #else | 931 #else |
932 ABB_DlMute (1); | 932 ABB_DlMute (1); |
933 #endif | 933 #endif |
934 #else | 934 #else |
935 VG_DlMute (1); | 935 VG_DlMute (1); |
936 #endif | 936 #endif |
937 act_speakerMute = AUDIO_MUTING_ON; | 937 act_speakerMute = AUDIO_MUTING_ON; |
938 } | 938 } |
1092 */ | 1092 */ |
1093 | 1093 |
1094 GLOBAL UBYTE audio_SetAmplf (UBYTE in_DeviceID, UBYTE in_Amplf) | 1094 GLOBAL UBYTE audio_SetAmplf (UBYTE in_DeviceID, UBYTE in_Amplf) |
1095 { | 1095 { |
1096 // Apr 26, 2005 REF : CRR 30627 xpradipg | 1096 // Apr 26, 2005 REF : CRR 30627 xpradipg |
1097 // local variable | 1097 // local variable |
1098 #ifdef FF_MMI_SERVICES_MIGRATION | 1098 #ifdef FF_MMI_SERVICES_MIGRATION |
1099 T_AUDIO_FULL_ACCESS_WRITE p_parameter; | 1099 T_AUDIO_FULL_ACCESS_WRITE p_parameter; |
1100 T_RV_RETURN_PATH return_path = {0, NULL}; | 1100 T_RV_RETURN_PATH return_path = {0, NULL}; |
1101 T_AUDIO_RET result; | 1101 T_AUDIO_RET result; |
1102 INT8 volume; | 1102 INT8 volume; |
1103 #endif | 1103 #endif |
1104 if (in_DeviceID EQ AUDIO_MICROPHONE) | 1104 if (in_DeviceID EQ AUDIO_MICROPHONE) |
1105 { | 1105 { |
1106 act_micVolume = 75; /* voice quality is best at this microphone volume */ | 1106 act_micVolume = 75; /* voice quality is best at this microphone volume */ |
1107 #ifdef ALR | 1107 #ifdef ALR |
1108 #else | 1108 #else |
1252 * switch off current tone | 1252 * switch off current tone |
1253 */ | 1253 */ |
1254 switch (act_tone.status) | 1254 switch (act_tone.status) |
1255 { | 1255 { |
1256 | 1256 |
1257 //Apr 04, 2005 REF: ENH 30063 xdeepadh | 1257 //Apr 04, 2005 REF: ENH 30063 xdeepadh |
1258 //If Buzzer is available, disable the buzzer | 1258 //If Buzzer is available, disable the buzzer |
1259 #ifndef FF_MMI_NO_BUZZER | 1259 #ifndef FF_MMI_NO_BUZZER |
1260 case BUZZER_ON: | 1260 case BUZZER_ON: |
1261 BZ_Disable (); | 1261 BZ_Disable (); |
1262 case BUZZER_SILENT: | 1262 case BUZZER_SILENT: |
1307 } | 1307 } |
1308 else | 1308 else |
1309 { | 1309 { |
1310 act_tone.call_tone = in_SoundID; | 1310 act_tone.call_tone = in_SoundID; |
1311 //Apr 04, 2005 REF: ENH 30063 xdeepadh | 1311 //Apr 04, 2005 REF: ENH 30063 xdeepadh |
1312 //Before playing the tone, set the status and the tone type . | 1312 //Before playing the tone, set the status and the tone type . |
1313 #ifndef FF_MMI_NO_BUZZER //If Buzzer is available | 1313 #ifndef FF_MMI_NO_BUZZER //If Buzzer is available |
1314 act_tone.status = BUZZER_SILENT; | 1314 act_tone.status = BUZZER_SILENT; |
1315 act_tone.type = (UBYTE)TONE_TYPE[in_SoundID]; | 1315 act_tone.type = (UBYTE)TONE_TYPE[in_SoundID]; |
1316 #else //If Buzzer is not available | 1316 #else //If Buzzer is not available |
1317 act_tone.status = TONE_SILENT; | 1317 act_tone.status = TONE_SILENT; |
1383 /* | 1383 /* |
1384 * switch off current tone | 1384 * switch off current tone |
1385 */ | 1385 */ |
1386 switch (act_tone.status) | 1386 switch (act_tone.status) |
1387 { | 1387 { |
1388 //Apr 04, 2005 REF: ENH 30063 xdeepadh | 1388 //Apr 04, 2005 REF: ENH 30063 xdeepadh |
1389 //If Buzzer is available, disable it. | 1389 //If Buzzer is available, disable it. |
1390 #ifndef FF_MMI_NO_BUZZER | 1390 #ifndef FF_MMI_NO_BUZZER |
1391 case BUZZER_ON: | 1391 case BUZZER_ON: |
1392 BZ_Disable (); | 1392 BZ_Disable (); |
1393 case BUZZER_SILENT: | 1393 case BUZZER_SILENT: |
1775 // Apr 26, 2005 REF : CRR 30627 xpradipg | 1775 // Apr 26, 2005 REF : CRR 30627 xpradipg |
1776 // local variable definition | 1776 // local variable definition |
1777 #ifdef FF_MMI_SERVICES_MIGRATION | 1777 #ifdef FF_MMI_SERVICES_MIGRATION |
1778 T_AUDIO_FULL_ACCESS_WRITE p_parameter; | 1778 T_AUDIO_FULL_ACCESS_WRITE p_parameter; |
1779 T_AUDIO_FULL_ACCESS_READ p_parameter1; | 1779 T_AUDIO_FULL_ACCESS_READ p_parameter1; |
1780 T_RV_RETURN_PATH return_path = {0, NULL}; | 1780 T_RV_RETURN_PATH return_path = {0, NULL}; |
1781 T_AUDIO_RET result; | 1781 T_AUDIO_RET result; |
1782 // June 13, 2005 REF : GSM_ENH_32062 - xpradipg | 1782 // June 13, 2005 REF : GSM_ENH_32062 - xpradipg |
1783 // the default value is assigned to AUDIO_MICROPHONE_OUTPUT_BIAS_2_0V | 1783 // the default value is assigned to AUDIO_MICROPHONE_OUTPUT_BIAS_2_0V |
1784 static INT8 microphone_gain = AUDIO_MICROPHONE_OUTPUT_BIAS_2_0V; | 1784 static INT8 microphone_gain = AUDIO_MICROPHONE_OUTPUT_BIAS_2_0V; |
1785 INT8 setgain = AUDIO_MICROPHONE_MUTE; | 1785 INT8 setgain = AUDIO_MICROPHONE_MUTE; |
1786 #endif | 1786 #endif |
1787 if (mute) | 1787 if (mute) |
1788 { | 1788 { |
1789 #ifdef ALR | 1789 #ifdef ALR |
1790 // June 13, 2005 REF : GSM_ENH_32062 - xpradipg | 1790 // June 13, 2005 REF : GSM_ENH_32062 - xpradipg |
1791 // the audio is unmuted for the variable "mute" with value greater than "0" | 1791 // the audio is unmuted for the variable "mute" with value greater than "0" |
1792 // Apr 26, 2005 REF : CRR 30627 xpradipg | 1792 // Apr 26, 2005 REF : CRR 30627 xpradipg |
1793 // read the microphone gain, store it and mute the microphone | 1793 // read the microphone gain, store it and mute the microphone |
1794 #ifdef FF_MMI_SERVICES_MIGRATION | 1794 #ifdef FF_MMI_SERVICES_MIGRATION |
1795 p_parameter1.variable_indentifier = AUDIO_MICROPHONE_GAIN; | 1795 p_parameter1.variable_indentifier = AUDIO_MICROPHONE_GAIN; |
1796 p_parameter1.data = (void*)µphone_gain; | 1796 p_parameter1.data = (void*)µphone_gain; |
1797 result = audio_full_access_read(&p_parameter1); | 1797 result = audio_full_access_read(&p_parameter1); |
1798 if(result != 0) | 1798 if(result != 0) |
1799 { | 1799 { |
1800 TRACE_EVENT("error reading the handeld parameters"); | 1800 TRACE_EVENT("error reading the handeld parameters"); |
1801 } | 1801 } |
1802 p_parameter.variable_indentifier = AUDIO_MICROPHONE_GAIN; | 1802 p_parameter.variable_indentifier = AUDIO_MICROPHONE_GAIN; |
1803 setgain = AUDIO_MICROPHONE_MUTE; | 1803 setgain = AUDIO_MICROPHONE_MUTE; |
1804 p_parameter.data = (void*)&setgain; | 1804 p_parameter.data = (void*)&setgain; |
1805 result = audio_full_access_write(&p_parameter, return_path); | 1805 result = audio_full_access_write(&p_parameter, return_path); |
1806 if(result != 0) | 1806 if(result != 0) |
1807 TRACE_EVENT("ERROR - not written1"); | 1807 TRACE_EVENT("ERROR - not written1"); |
1808 #else | 1808 #else |
1809 ABB_UlMute (1); | 1809 ABB_UlMute (1); |
1810 #endif | 1810 #endif |
1811 #else | 1811 #else |
1812 VG_UlVolume (0); | 1812 VG_UlVolume (0); |
1813 #endif | 1813 #endif |
1814 } | 1814 } |
1815 else | 1815 else |
1817 #ifdef ALR | 1817 #ifdef ALR |
1818 // June 13, 2005 REF : GSM_ENH_32062 - xpradipg | 1818 // June 13, 2005 REF : GSM_ENH_32062 - xpradipg |
1819 // the audio is muted for the variable "mute" with value <= to "0" | 1819 // the audio is muted for the variable "mute" with value <= to "0" |
1820 // Apr 26, 2005 REF : CRR 30627 xpradipg | 1820 // Apr 26, 2005 REF : CRR 30627 xpradipg |
1821 // restore the volume back once the unmuting is done | 1821 // restore the volume back once the unmuting is done |
1822 #ifdef FF_MMI_SERVICES_MIGRATION | 1822 #ifdef FF_MMI_SERVICES_MIGRATION |
1823 p_parameter.variable_indentifier = (UINT8)AUDIO_MICROPHONE_GAIN ; | 1823 p_parameter.variable_indentifier = (UINT8)AUDIO_MICROPHONE_GAIN ; |
1824 p_parameter.data = (void*)µphone_gain; | 1824 p_parameter.data = (void*)µphone_gain; |
1825 result = audio_full_access_write(&p_parameter, return_path); | 1825 result = audio_full_access_write(&p_parameter, return_path); |
1826 if(result != 0) | 1826 if(result != 0) |
1827 TRACE_EVENT("ERROR - not written"); | 1827 TRACE_EVENT("ERROR - not written"); |
1828 #else | 1828 #else |
1829 ABB_UlMute (0); | 1829 ABB_UlMute (0); |
1830 #endif | 1830 #endif |
1831 #else | 1831 #else |
1832 VG_UlVolume (act_micVolume); | 1832 VG_UlVolume (act_micVolume); |
1833 #endif | 1833 #endif |
1834 } | 1834 } |
1835 } | 1835 } |
1930 if (tty < TTY_OFF OR tty > TTY_ALL) | 1930 if (tty < TTY_OFF OR tty > TTY_ALL) |
1931 { | 1931 { |
1932 TRACE_EVENT_P1 ("TTY invalid parameter: %d", tty); | 1932 TRACE_EVENT_P1 ("TTY invalid parameter: %d", tty); |
1933 return; | 1933 return; |
1934 } | 1934 } |
1935 | 1935 |
1936 #if defined (RIV_AUDIO) && !defined (_TTY_SIMU) | 1936 #if defined (RIV_AUDIO) && !defined (_TTY_SIMU) |
1937 | 1937 |
1938 cmd = (UBYTE)tty; | 1938 cmd = (UBYTE)tty; |
1939 if (tty_state) | 1939 if (tty_state) |
1940 { | 1940 { |