Merge "[Bugfix][T106BUG-615]Abnormal whistling tone heard on the side of the phone when dialing in 3G network start"
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libtinyalsa/audio_mixer_ctrl.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libtinyalsa/audio_mixer_ctrl.c
index 0ff24e3..c6ae463 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libtinyalsa/audio_mixer_ctrl.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libtinyalsa/audio_mixer_ctrl.c
@@ -788,19 +788,69 @@
/* yu.dong@20240627 [T106BUG-615]CODEC 8311 using voice_demo to set codec volume has no effect start */
-/*
-static int output_vol_conversion(int vol)
-{
- return 255;
-
-}
-*/
+/* yu.dong@20240716 [T106BUG-615]Abnormal whistling tone heard on the side of the phone when dialing in 3G network start */
+enum t_input_vol {
+ T_INPUT_VOL_MINUS_96DB = 0,
+ T_INPUT_VOL_MINUS_95DB = 2,
+ T_INPUT_VOL_MINUS_90DB = 12,
+ T_INPUT_VOL_MINUS_85DB = 22,
+ T_INPUT_VOL_MINUS_80DB = 32,
+ T_INPUT_VOL_MINUS_75DB = 42,
+ T_INPUT_VOL_MINUS_70DB = 52,
+ T_INPUT_VOL_MINUS_65DB = 62,
+ T_INPUT_VOL_MINUS_60DB = 72,
+ T_INPUT_VOL_MINUS_55DB = 82,
+ T_INPUT_VOL_MINUS_50DB = 92,
+ T_INPUT_VOL_MINUS_45DB = 102,
+ T_INPUT_VOL_MINUS_40DB = 112,
+ T_INPUT_VOL_MINUS_35DB = 122,
+ T_INPUT_VOL_MINUS_30DB = 132,
+ T_INPUT_VOL_MINUS_25DB = 142,
+ T_INPUT_VOL_MINUS_20DB = 152,
+ T_INPUT_VOL_MINUS_15DB = 162,
+ T_INPUT_VOL_MINUS_10DB = 172,
+ T_INPUT_VOL_MINUS_7DB = 178,
+ T_INPUT_VOL_MINUS_6DB = 180,
+ T_INPUT_VOL_MINUS_5DB = 182,
+ T_INPUT_VOL_MINUS_4DB = 184,
+ T_INPUT_VOL_MINUS_3DB = 186,
+ T_INPUT_VOL_MINUS_2DB = 188,
+ T_INPUT_VOL_MINUS_1DB = 190,
+ T_INPUT_VOL_0DB = 192
+};
static int input_vol_conversion(int vol)
{
- return 255;
-
+ switch(vol) {
+ case T_AUDIO_INPUT_VOL_LEVEL_0:
+ return T_INPUT_VOL_MINUS_96DB;
+ case T_AUDIO_INPUT_VOL_LEVEL_1:
+ return T_INPUT_VOL_MINUS_30DB;
+ case T_AUDIO_INPUT_VOL_LEVEL_2:
+ return T_INPUT_VOL_MINUS_25DB;
+ case T_AUDIO_INPUT_VOL_LEVEL_3:
+ return T_INPUT_VOL_MINUS_20DB;
+ case T_AUDIO_INPUT_VOL_LEVEL_4:
+ return T_INPUT_VOL_MINUS_15DB;
+ case T_AUDIO_INPUT_VOL_LEVEL_5:
+ return T_INPUT_VOL_MINUS_10DB;
+ case T_AUDIO_INPUT_VOL_LEVEL_6:
+ return T_INPUT_VOL_MINUS_7DB;
+ case T_AUDIO_INPUT_VOL_LEVEL_7:
+ return T_INPUT_VOL_MINUS_4DB;
+ case T_AUDIO_INPUT_VOL_LEVEL_8:
+ return T_INPUT_VOL_MINUS_3DB;
+ case T_AUDIO_INPUT_VOL_LEVEL_9:
+ return T_INPUT_VOL_MINUS_2DB;
+ case T_AUDIO_INPUT_VOL_LEVEL_10:
+ return T_INPUT_VOL_MINUS_1DB;
+ case T_AUDIO_INPUT_VOL_LEVEL_11:
+ return T_INPUT_VOL_0DB;
+ default:
+ return T_INPUT_VOL_MINUS_30DB;
+ }
}
+/* yu.dong@20240716 [T106BUG-615]Abnormal whistling tone heard on the side of the phone when dialing in 3G network end */
enum t_output_vol {
T_OUTPUT_VOL_MINUS_96DB = 0,