# HG changeset patch # User Mychaela Falconia # Date 1627549725 0 # Node ID 0f9606d1f8b861b769d7ffe912054d7288231a97 # Parent c7514c8b5b41f396f9e7ab2e59343d2a03a00fcb pirelli/aec: results of investigation into Pirelli's AEC config diff -r c7514c8b5b41 -r 0f9606d1f8b8 pirelli/aec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pirelli/aec Thu Jul 29 09:08:45 2021 +0000 @@ -0,0 +1,37 @@ +Reverse eng question: what does Pirelli's fw do with the AEC feature +of Calypso DSP? + +Seeking an answer to this question, I sent an aur 12 command to Pirelli's fw +via fc-tmsh. The response came back with 48 bytes of data, consistent +with our reference TCS211 code with L1_NEW_AEC enabled. Here is the raw +response in non-loudspeaker-call state: + +aur 12: 48 bytes +offset 00: 02 00 01 00 14 00 CC 0C AD 59 00 40 32 00 00 10 +offset 10: 00 10 00 00 04 00 00 00 9E FE 43 06 E5 16 34 36 +offset 20: E5 16 43 06 9E FE B4 FC BA FE 0F 01 40 00 C7 FF + +In an active loudspeaker call, two settings change: + +aur 12: 48 bytes +offset 00: 02 00 01 00 14 00 CC 0C FF 0F 00 40 32 00 00 10 +offset 10: 00 10 00 00 04 00 60 00 9E FE 43 06 E5 16 34 36 +offset 20: E5 16 43 06 9E FE B4 FC BA FE 0F 01 40 00 C7 FF + +Due to a misdesign in ETM (apparently unchanged between reference TCS211 and +Pirelli's fw), the 48 bytes that come back are actually just 24 bytes of real +data (new AEC config is 12 16-bit words) followed by 24 bytes of garbage +padding. Decoding the returned 12 words of new AEC config, we get: + +aec_enable = 0x0002 +continuous_filtering = 0x0001 +granularity_attenuation = 0x0014 +smoothing_coefficient = 0x0CCC +max_echo_suppression_level = 0x59AD (handheld mode) or 0x0FFF (loudspeaker) +vad_factor = 0x4000 +absolute_threshold = 0x0032 +factor_asd_filtering = 0x1000 +factor_asd_muting = 0x1000 +aec_visibility = 0 +noise_suppression_enable = 0x0004 +noise_suppression_level = 0 (handheld mode) or 0x0060 (loudspeaker)