Modern mobile phones (actually in past 10 years or so) have at least two microphones, sometimes even 4 or more for ANS (active noise suppression), ANC (active noise cancellation) and AEC (active echo cancellation).
In a more typical setup (for example X10 II), both microphones are exposed and the top one is used for ANS and ANC during calls and for (stereo) video recording.
All of these are available even on AOSP but specific vendors have more advanced libraries.
If you look at your /vendor/etc/
directory on SFOS you will notice couple of xml files - these are related to audio subsystem on android (which is exposed to SFOS, and if I’m not mistaken, handled by pulseaudio through various sinks).
Two files are of particual interest: mixer_paths.xml
(contains various configurations for inputs and outputs, you can think of this like a static audio mixer) and audio_effects.xml
For example you can clearly see configuration for AEC and NS in audio_effects.xml:
<effects>
...
<effect name="aec" library="qcom_pre_processing" uuid="0f8d0d2a-59e5-45fe-b6e4-248c8a799109"/>
<effect name="ns" library="qcom_pre_processing" uuid="1d97bb0b-9e2f-4403-9ae3-58c2554306f8"/>
</effects>
<preprocess>
<stream type="voice_communication">
<apply effect="aec"/>
<apply effect="ns"/>
</stream>
</preprocess>