Android: Making primary microphone the default when calling with loud speaker (ROOT)

My phone is getting old and some components are starting to stop working.

So it turns out my android phone has two microphones:

  • Primary: used for calls (without loud-speaker).
  • Secondary: used for video recording, loud-speaker calls.

My phone's secondary microphone stopped working, so whenever I turned on the loud speaker in calls, my voice was gone.

I had to find a way to make the phone use the primary microphone instead of the secondary microphone in loud-speaker calls.

So in the same config as in the last blog post /vendor/etc/mixer_paths_tasha.xml, the config for microphones can be found.

In my case I want to switch the loud-speaker microphone to use the primary microphone.

And after reading a little, I found the config for the handset-mic (call without loud-speaker) and the config for speaker-mic (call with loud-speaker)

    <path name="handset-mic">
        <path name="dmic1" />
        <path name="dmic1-adj-gain" />
    </path>

    <path name="speaker-mic">
        <path name="dmic4" />
        <path name="dmic2-adj-gain" />
    </path>

Now all we have to do is just to replace the speaker-mic config with the handset-mic config like so.

    <path name="handset-mic">
        <path name="dmic1" />
        <path name="dmic1-adj-gain" />
    </path>

    <path name="speaker-mic">
        <path name="dmic1" />
        <path name="dmic1-adj-gain" />
    </path>

Save and restart the device and now you should be heard when using loud-speaker :)