I believe we’re limiting microphone gain a bit because of distortion that seems to be caused by
There’s an audio production technique for making audio that is soft sometimes and loud other times more uniform called compression (not to be confused with audio codec compression). Limiting, a special case of compression is specifically used to limit the peak amplitude. It’s mostly used in mastering, but it basically increases the perceived volume of audio while reducing the impacts of distortion/clipping.
Here’s an article explaining the concept. There are several open source plugins for limiting available for GNU/Linux, but I don’t know how practical they would be to run inline with the phone audio. Here’s some code as an example.
This doesn’t help with the underlying issue, but maybe someone can find a way to route quiet audio through a limiter to increase the perceived volume while reducing the possibility for clipping.