[Xiaomi Mi A2 Lite Themes, Apps, and Mods] pexxie:
Basic Disclaimer:

Please use at your own risk, even though there is no risk. I can't guarantee this will work for you, but can do my best to help you if it doesn't. Please let me know if you have any troubles, or know a better way of making these mods.

This was made for the stock Android Pie ROM, so results may vary with other ROMs.

This module was made to work with the latest Magisk v20.4

Tweaks are made to the file /system/vendor/etc/mixer_paths_mtp_global.xml

--------------------------------------------------------------------------------------------------

Mic Volume Booster

The default values are arguably too low. I applied this v1 fix to our mixer_paths XML: https://xdaforums.com/mi-a1/themes/magisk-mic-low-volume-fix-custom-roms-t3910753

Thanks very much to [MENTION=5996589]Ahmed Kassem[/MENTION]

What does this do?

It restores the adjusted input volumes from the Tissot (Mi A1) device's mixer path XML.

Original Code:

<ctl name="RX1 Digital Volume" value="84" />
<ctl name="RX2 Digital Volume" value="84" />
<ctl name="RX3 Digital Volume" value="84" />
<ctl name="IIR1 INP1 Volume" value="53" />
<ctl name="IIR1 INP2 Volume" value="53" />
<ctl name="IIR1 INP3 Volume" value="53" />
<ctl name="IIR1 INP4 Volume" value="53" />
<ctl name="ADC1 Volume" value="4" />
<ctl name="ADC2 Volume" value="4" />
<ctl name="ADC3 Volume" value="4" />
<ctl name="DEC1 Volume" value="84" />
<ctl name="DEC2 Volume" value="84" />

Vol Booster Code:

<ctl name="RX1 Digital Volume" value="84" />
<ctl name="RX2 Digital Volume" value="84" />
<ctl name="RX3 Digital Volume" value="[COLOR="Red"]78[/COLOR]" />
<ctl name="IIR1 INP1 Volume" value="53" />
<ctl name="IIR1 INP2 Volume" value="[COLOR="red"]84[/COLOR]" />
<ctl name="IIR1 INP3 Volume" value="[COLOR="red"]84[/COLOR]" />
<ctl name="IIR1 INP4 Volume" value="[COLOR="red"]84[/COLOR]" />
<ctl name="ADC1 Volume" value="4" />
<ctl name="ADC2 Volume" value="4" />
<ctl name="ADC3 Volume" value="4" />
<ctl name="DEC1 Volume" value="[COLOR="red"]91[/COLOR]" />
<ctl name="DEC2 Volume" value="84" />

--------------------------------------------------------------------------------------------------

Left/Right Stereo Input Swap

I made a mod like this with my Redmi 2 but never quite got it right. I think this one is good - it surely sounds good to me.

What does this do?

Well, when holding the phone landscape; the left and right mic inputs are based on the volume buttons being underneath, but I find it more comfortable holding it with the volume buttons being on top, although this always left the left/right channels inverted in videos. So this mod inverts them back.

Original Code:

<!-- Dual MIC devices -->
<path name="speaker-dmic-endfire">
<path name="adc1" />
<ctl name="ADC3 Volume" value="6" />
<ctl name="DEC2 MUX" value="ADC2" />
<ctl name="MI2S_TX Channels" value="Two" />
<ctl name="ADC2 MUX" value="INP3" />
</path>

Inverted Left/Right Code:

<!-- Dual MIC devices -->
<path name="speaker-dmic-endfire">
<path name="adc1" />
<ctl name="ADC[COLOR="Red"]2[/COLOR] Volume" value="6" />
<ctl name="DEC2 MUX" value="ADC[COLOR="red"]1[/COLOR]" />
[COLOR="red"]<ctl name="DEC1 MUX" value="ADC2" />[/COLOR]
<ctl name="MI2S_TX Channels" value="Two" />
<ctl name="ADC2 MUX" value="INP3" />
</path>

--------------------------------------------------------------------------------------------------

Please feel free to unzip, make your own edits, re-zip, and flash over mine attached here. Also let me know if you want any variations of this, and I will do my best to provide it.

Thanks for reading/using. :)

--------------------------------------------------------------------------------------------------

Update notes

1. Added the volume booster only (i.e. without the left/right swap) - Mic_VolBoost_A2L.zip

2. Updated main module with change from ADC3 to ADC2 volume (restores spectral balance, fixes buzzing) - Mic_VolBoost_Swap_A2L.zip

--------------------------------------------------------------------------------------------------