SL808x, echo cancellation and external PCM codec

Hello,

we´re using a SL808x module with an external PCM codec (TI LM49352), where a MEMS microphone and an external speaker is connected for a Hands-free phone system.

The codec doesn´t apply any audio effects to the sound path, it is just used as ADC/DAC.

At high speaker volume the echo cancellation doesn´t work well. I think it might be caused by nonlinearities since the speaker sounds distorted, but maybe you could have also a look at our echo cancellation configuration, if we´re doing something wrong basically:

action = 1
algoid = 1
echomode = 3
nlpp_limit = 32767
nlpp_gain = 1024
af_limit = 32767
ecmodenew = 5247
tuning_mode = 0
echo_path_delay = 2
outputgain = 16261
inputgain = 2048
af_twoalpha = 8192
af_erl = 320
af_taps = 200
af_preset_coef = 1
af_offset = 400
af_erl_bg = 32
af_taps_bg = 32
pcd_threshold = 14000
minimum_erl = 64
erl_step = 16800
max_noise_floor = 2048
det_threshold = 99
spdet_far = 1000
spdet_mic = 1000
spdet_xclip = 1
dens_tail_alpha = 25000
dens_tail_portion = 8704
dens_gamma_e_alpha = 0
dens_gamma_e_dt = 120
dens_gamma_d_low = 400
dens_gamma_e_rescue = 7680
dens_gamma_e_high = 450
dens_spdet_near = 128
dens_spdet_act = 768
dens_gamma_n = 600
dens_nfe_blocksize = 200
dens_limit_ns = 5193
dens_nl_atten = 896
dens_cni_level = 8000
wb_echo_ratio = 4000

Many thanks and best regards,
Markus