Merge "[Feature][T106][task-view-107] sometimes qser_nw_get_reg_status value error in 3g"
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 c6ae463..65c7e3c 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
@@ -916,6 +916,174 @@
/* yu.dong@20240627 [T106BUG-615]CODEC 8311 using voice_demo to set codec volume has no effect end */
+//l.yang modify for bug id T106BUG-337 2023/11/9 start
+#elif defined _USE_CODEC_TI3104
+
+static struct audio_para_conf init_default_para[] = { //¿¿¿¿¿¿¿
+
+};
+
+static struct audio_para_conf common_out_para_audio[] = { //¿¿¿¿¿¿
+ //{"DAC Soft Mute Control", {"0"}},
+};
+
+
+static struct audio_para_conf common_in_para_audio[] = { //¿¿¿¿¿¿
+ //{"Mic Gain Control", {"0"}},
+};
+
+static struct audio_para_conf hp_outpath_para_audio[] = { //¿¿¿Hp¿¿¿¿
+ {"Line Playback Switch", {"1","1"}},
+ {"PCM Playback Volume", {"110","110"}},
+ {"Line Playback Volume", {"8","8"}},
+ {"Line DAC Playback Volume", {"110","110"}},
+};
+
+static struct audio_para_conf spk_outpath_para_audio[] = { //¿¿¿Spk¿¿¿¿
+ {"Line Playback Switch", {"1","1"}},
+ {"PCM Playback Volume", {"110","110"}},
+ {"Line Playback Volume", {"8","8"}},
+ {"Line DAC Playback Volume", {"110","110"}},
+};
+
+static struct audio_para_conf main_mic_inpath_para_audio[] = { //¿¿¿Mic1lp_Mic1lm¿¿¿¿
+ {"MicBias VG", {"1"}},
+ {"PGA Capture Volume", {"50","50"}}, //yu.dong@20240821 [AUDIO] Fix audio return tone problem on speakerphone
+ {"PGA Capture Switch", {"1","1"}},
+ {"ADC HPF Cut-off", {"1","1"}},
+
+ {"Left PGA Mixer Mic2L Switch",{"1"}},
+ {"Left PGA Mixer Mic2R Switch",{"1"}},
+ {"Right PGA Mixer Mic2L Switch",{"1"}},
+ {"Right PGA Mixer Mic2R Switch",{"1"}},
+};
+
+static struct audio_para_conf aux_mic_inpath_para_audio[] = {//¿¿¿Mic1rp¿¿¿¿
+ {"MicBias VG", {"1"}},
+ {"PGA Capture Volume", {"50","50"}}, //yu.dong@20240821 [AUDIO] Fix audio return tone problem on speakerphone
+ {"PGA Capture Switch", {"1","1"}},
+ {"ADC HPF Cut-off", {"1","1"}},
+
+ {"Left PGA Mixer Mic2L Switch",{"1"}},
+ {"Left PGA Mixer Mic2R Switch",{"1"}},
+ {"Right PGA Mixer Mic2L Switch",{"1"}},
+ {"Right PGA Mixer Mic2R Switch",{"1"}},
+};
+
+static struct audio_para_conf handset_inoutpath_para_voice[] = { //¿¿¿Hp¿¿¿¿Mic1lp_Mic1lm¿¿¿¿
+ //in
+ //#0x2d b6 pga mute
+ {"MicBias VG", {"1"}},
+ {"PGA Capture Volume", {"50","50"}}, //yu.dong@20240821 [AUDIO] Fix audio return tone problem on speakerphone
+ {"PGA Capture Switch", {"1","1"}},
+ {"ADC HPF Cut-off", {"1","1"}},
+
+ {"Left PGA Mixer Mic2L Switch",{"1"}},
+ {"Left PGA Mixer Mic2R Switch",{"1"}},
+ {"Right PGA Mixer Mic2L Switch",{"1"}},
+ {"Right PGA Mixer Mic2R Switch",{"1"}},
+
+ //out
+ {"Line Playback Switch", {"1","1"}},
+ {"PCM Playback Volume", {"110","110"}},
+ {"Line Playback Volume", {"8","8"}},
+ {"Line DAC Playback Volume", {"110","110"}},
+
+ //voice
+ #ifndef USE_CAP_SUPPORT
+ {"voice processing path select", {"handset"}}, // handset speak headset bluetooth
+ #endif
+};
+
+static struct audio_para_conf headset_inoutpath_para_voice[] = { //¿¿¿Hp¿¿¿¿ Mic1rp¿¿¿¿
+ //in
+ //#0x2d b6 pga mute
+ {"MicBias VG", {"1"}},
+ {"PGA Capture Volume", {"50","50"}}, //yu.dong@20240821 [AUDIO] Fix audio return tone problem on speakerphone
+ {"PGA Capture Switch", {"1","1"}},
+ {"ADC HPF Cut-off", {"1","1"}},
+
+ {"Left PGA Mixer Mic2L Switch",{"1"}},
+ {"Left PGA Mixer Mic2R Switch",{"1"}},
+ {"Right PGA Mixer Mic2L Switch",{"1"}},
+ {"Right PGA Mixer Mic2R Switch",{"1"}},
+
+ //out
+ {"Line Playback Switch", {"1","1"}},
+ {"PCM Playback Volume", {"110","110"}},
+ {"Line Playback Volume", {"8","8"}},
+ {"Line DAC Playback Volume", {"110","110"}},
+
+ //voice
+ #ifndef USE_CAP_SUPPORT
+ {"voice processing select", {"headset"}}, // handset speak headset bluetooth
+ #endif
+};
+
+static struct audio_para_conf spk_inoutpath_para_voice[] = { //¿¿¿Spk¿¿¿¿Mic1lp_Mic1lm¿¿¿¿
+ //in
+ //#0x2d b6 pga mute
+ {"MicBias VG", {"1"}},
+ {"PGA Capture Volume", {"50","50"}}, //yu.dong@20240821 [AUDIO] Fix audio return tone problem on speakerphone
+ {"PGA Capture Switch", {"1","1"}},
+ {"ADC HPF Cut-off", {"1","1"}},
+
+ {"Left PGA Mixer Mic2L Switch",{"1"}},
+ {"Left PGA Mixer Mic2R Switch",{"1"}},
+ {"Right PGA Mixer Mic2L Switch",{"1"}},
+ {"Right PGA Mixer Mic2R Switch",{"1"}},
+
+ //out
+ {"Line Playback Switch", {"1","1"}},
+ {"PCM Playback Volume", {"110","110"}},
+ {"Line Playback Volume", {"8","8"}},
+ {"Line DAC Playback Volume", {"110","110"}},
+ //voice
+
+ #ifndef USE_CAP_SUPPORT
+ {"voice processing path select", {"speak"}}, // handset speak headset bluetooth
+ #endif
+};
+
+static struct audio_para_conf output_dac_vol = {
+ {"PCM Playback Volume", {"110","110"}},
+};
+
+static struct audio_para_conf input_adc_vol = {
+ {"PGA Capture Volume", {"50","50"}}, //yu.dong@20240821 [AUDIO] Fix audio return tone problem on speakerphone
+};
+
+static struct audio_para_conf dac_mute = {
+ "Line Playback Switch", {"0","0"}
+};
+
+static struct audio_para_conf adc_mute = {
+ "MicBias VG", {"0"}
+};
+
+static struct audio_para_conf spk_path_onoff[] = {
+ {"Mono Mixer PCM Playback Switch", {"0"}},
+};
+
+static struct audio_para_conf rcv_path_onoff[] = {
+ {"Mono Mixer PCM Playback Switch", {"0"}},
+};
+
+static struct audio_para_conf earp_path_onoff[] = {
+ {"Speaker Mixer PCM Playback Switch", {"0"}},
+};
+
+static int output_vol_conversion(int vol)
+{
+ return 120;
+}
+
+static int input_vol_conversion(int vol)
+{
+ return 100;
+}
+//l.yang modify for bug id T106BUG-337 2023/11/9 end
+
#elif defined _USE_CODEC_ES8374
@@ -1976,7 +2144,7 @@
}
-#if (defined _USE_CODEC_TI3100)||(defined _USE_CODEC_AK4940)||(defined _USE_CODEC_NAU8810)||(defined _USE_CODEC_ES8311)
+#if (defined _USE_CODEC_TI3100)||(defined _USE_CODEC_AK4940)||(defined _USE_CODEC_NAU8810)||(defined _USE_CODEC_ES8311)||(defined _USE_CODEC_TI3104)
/*
int mix_set_input_vol(struct mixer *mixer, int volume)
{