ECNO patcher

  • file path ; ** /home/workspace/echo/hardware/qcom/audio/hal/msm8916/platform.c **
  • Message : [Scorpio][Audio][NA][Spec] ** enable voip echo cancellation reference **
    • 网络语音电话业务噪音消除参考

修改函数
void platform_set_echo_reference(struct audio_device *adev, bool enable, audio_devices_t out_device )

主要代码:

if (enable) // true 需要消除
{
//if (adev->snd_dev_ref_cnt[out_device] > 0)
{
if(usecase->id == USECASE_AUDIO_RECORD) {
ALOGD(" USECASE_AUDIO_RECORD ");
strcpy(my_data->ec_ref_mixer_path,"echo-reference-audio-record"); //根据 id 选择不同的pathname ,在 /home/workspace/echo/device/qcom/msm8937_32/mixer_paths_mtp_EU_ZC551KL.xml 修改
}
else if(usecase->id == USECASE_AUDIO_RECORD_LOW_LATENCY) {
ALOGD(" USECASE_AUDIO_RECORD_LOW_LATENCY ");
strcpy(my_data->ec_ref_mixer_path,"echo-reference-low-latency-record");
}
//}
if (out_device == AUDIO_DEVICE_OUT_SPEAKER) //为speaker的
{
if(usecase->id == USECASE_AUDIO_RECORD) {
strlcat(my_data->ec_ref_mixer_path," speaker",sizeof(my_data->ec_ref_mixer_path));
// mydata->ec_ref_mixer_path = echo-reference-audio-record speaker
}
else if(usecase->id == USECASE_AUDIO_RECORD_LOW_LATENCY) {
strlcat(my_data->ec_ref_mixer_path," speaker",sizeof(my_data->ec_ref_mixer_path));
// echo-reference-audio-record speaker
}
}
ALOGD("%s: enabling %s", func, my_data->ec_ref_mixer_path);
audio_route_apply_and_update_path(adev->audio_route, my_data->ec_ref_mixer_path);
}
}


xml 文件修改的地方 /home/workspace/echo/device/qcom/msm8937_32/mixer_paths_mtp_EU_ZC551KL.xml

> 
+    
+        
+    
+    
+        
+    
 *****
+    
+        
+    
+    
+        
+    

audio_route_apply_and_update_path(adev->audio_route, my_data->ec_ref_mixer_path);



你可能感兴趣的:(ECNO patcher)