comparison src/condat/com/src/driver/audio.c @ 286:ee16d57b32b2

Condat audio_Init(): rm setting of sidetone level The default sidetone level in the absence of audio mode loading is just that, a basic default without any promises of good tuning. In the original TCS211 code this default sidetone level was set in two places: first in L1 init of ABB-via-DSP registers (set to -17 dB), and then initialized again in Condat audio_Init(), this time set to -5 dB. The present change removes the redundant second initialization. The default sidetone level is now -17 dB instead of -5 dB with this change, but again it is just the default; all serious users are now expected to use audio mode config files.
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 09 Nov 2021 02:16:59 +0000
parents 59dff9a18e2a
children 25d3ee009d19
comparison
equal deleted inserted replaced
285:59dff9a18e2a 286:ee16d57b32b2
242 #endif 242 #endif
243 /*==== CONSTANTS ==================================================*/ 243 /*==== CONSTANTS ==================================================*/
244 244
245 #define BUZZER 0 245 #define BUZZER 0
246 #define AUDIO 1 246 #define AUDIO 1
247 // Apr 26, 2005 REF : CRR 30627 xpradipg
248 #ifdef FF_MMI_SERVICES_MIGRATION
249 #define AUDIO_SIDE_TONE 175
250 #endif
251 247
252 #if defined (RIV_AUDIO) 248 #if defined (RIV_AUDIO)
253 249
254 #define TDMA_12 12 250 #define TDMA_12 12
255 #define TDMA_23 23 251 #define TDMA_23 23
750 GLOBAL UBYTE audio_Init(T_ACCESSORY_CALLBACK *audioConfig) 746 GLOBAL UBYTE audio_Init(T_ACCESSORY_CALLBACK *audioConfig)
751 #else 747 #else
752 GLOBAL UBYTE audio_Init (drv_SignalCB_Type in_SignalCBPtr) 748 GLOBAL UBYTE audio_Init (drv_SignalCB_Type in_SignalCBPtr)
753 #endif 749 #endif
754 { 750 {
755 // Apr 26, 2005 REF : CRR 30627 xpradipg
756 // local variable declarations
757 #ifdef FF_MMI_SERVICES_MIGRATION
758 T_AUDIO_FULL_ACCESS_WRITE side_tone_cfg;
759 T_RV_RETURN_PATH return_path = {0, NULL};
760 T_AUDIO_RET result;
761 INT8 side_tone = AUDIO_SIDE_TONE;
762 #endif
763 // xpradipg - GSM-ENH-32494 : 23 June 2005 751 // xpradipg - GSM-ENH-32494 : 23 June 2005
764 #ifdef FF_MMI_AUDIO_PROFILE 752 #ifdef FF_MMI_AUDIO_PROFILE
765 T_AUDIO_RET status; 753 T_AUDIO_RET status;
766 T_AUDIO_MODE_LOAD handheld= {"handheld"}; 754 T_AUDIO_MODE_LOAD handheld= {"handheld"};
767 #endif 755 #endif
812 //Apr 04, 2005 REF: ENH 30063 xdeepadh 800 //Apr 04, 2005 REF: ENH 30063 xdeepadh
813 //Set volume for Buzzer 801 //Set volume for Buzzer
814 #ifndef FF_MMI_NO_BUZZER 802 #ifndef FF_MMI_NO_BUZZER
815 audio_SetAmplf ( AUDIO_BUZZER, 175 ); 803 audio_SetAmplf ( AUDIO_BUZZER, 175 );
816 #endif 804 #endif
817
818 /* Setting the Side Tone has been moved from audio_SetAmplf CQ21055*/
819 #ifdef ALR
820 #ifdef FF_TTY
821 if (!tty_state)
822 #endif
823 {
824 // Apr 26, 2005 REF : CRR 30627 xpradipg
825 // set the sidetone value to 175 this is the optimum value
826 #ifdef FF_MMI_SERVICES_MIGRATION
827 side_tone_cfg.variable_indentifier = AUDIO_MICROPHONE_SPEAKER_LOOP_SIDETONE;
828 side_tone_cfg.data = (void*)&side_tone;
829 result = audio_full_access_write(&side_tone_cfg, return_path);
830 #else
831 ABB_SideTone (175);
832 #endif
833 }
834 #else
835 VG_SideTone (175);
836 #endif
837
838 805
839 return DRV_OK; 806 return DRV_OK;
840 } 807 }
841 808
842 /* 809 /*
1144 if( result != 0) 1111 if( result != 0)
1145 TRACE_FUNCTION("set volume failed"); 1112 TRACE_FUNCTION("set volume failed");
1146 #else 1113 #else
1147 ABB_DlVolume (in_Amplf); /* output volume */ 1114 ABB_DlVolume (in_Amplf); /* output volume */
1148 #endif 1115 #endif
1149 #ifdef FF_TTY
1150 if (!tty_state)
1151 #endif
1152 {
1153 /* ABB_SideTone (175); */ /* To avoid the side tone reseting */
1154 }
1155 #else 1116 #else
1156 VG_DlVolume (in_Amplf); /* output volume */ 1117 VG_DlVolume (in_Amplf); /* output volume */
1157 /* VG_SideTone (175); */ /* To avoid the side tone reseting */
1158 #endif 1118 #endif
1159 act_speakerVolume = in_Amplf; 1119 act_speakerVolume = in_Amplf;
1160 } 1120 }
1161 //Apr 04, 2005 REF: ENH 30063 xdeepadh 1121 //Apr 04, 2005 REF: ENH 30063 xdeepadh
1162 //If Buzzer is available , set the volume 1122 //If Buzzer is available , set the volume