[Nexus 5 Android Development] zoomass07:
I believe I have found a solution to a problem that I have found with the Nexus 5 that I never experienced with my GNex before.

https://productforums.google.com/forum/#!category-topic/nexus/calls-and-voicemail/nexus-5/5G5LXC8XHeI

The above link captures a summary of the problem, but I will restate it here. When plugging headphones or an AUX cable into the phone, the phone seems to utilize standard microphone gain settings (that is - you need to practically hold the phone to your face for the other party to hear you well). I primarily use an AUX cable when I'm in my car and have the phone sitting in my center console or on my lap. When I do this, people cannot hear me. BUT when I enable speakerphone mode, the other party can hear me fine (even without unplugging the AUX cable - though no sound would be going through it). Ah-hah, I believe that this must be a software setting issue and not a hardware issue (even though Google offered to do an RMA).

After some research I came across a system file called mixer_paths.xml which has been used by other devs here (thanks folks!) to improve the performance of the audio OUTPUT of the device (that is increasing the volume we hear on our end). But I had seen no mods fixing the audio input / microphone issues I was having.

I tested my theory today by modifying the mixer_paths.xml file to override the default values under <path name="headset-mic"> and <path name="voice-headset-mic"> to mirror those of <path name="voice-speaker-mic">. Initial testing (a simple phone call to my fiancee) seems to indicate that the receiving party cannot tell the difference between my voice whether speaker is on or off when I have headphones plugged in.

In order to perform this mod/fix you will need to be rooted.

WARNINGS:

Make sure to make a backup of your existing mixer_paths.xml file.

This may cause issues if your headset or AUX cable have their own microphone (I don't have one to test with, so I don't know if it causes issues).

I am not guaranteeing results - I am hoping that this fix works for others and others might be able to test and confirm that this does work. I am not a developer - I am just a somewhat tech savvy guy who was trying to resolve an issue I thought was software related. Hopefully someone who is more savvy will come along and implement these changes into an existing app or program for simplicity!

+

Props to Drummerjed

for creating the thread for audio output http://xdaforums.com/showthread.php?t=2532788 which inspired my exploring around for this fix. I hope you don't mind I stole some of your directions for ease of posting. :)

DIRECTIONS

Before you start modifying you need grant ES File Explorer root access. To do this press the icon in the top left corner then scroll down and select Root Explorer, then select Mount R/W, then select RW for both / and /system.

Open ES File Explorer and navigate to /system/etc and find the file "mixer_paths.xml"

Tap on the file and select ES Note Editor

Press the menu button in the top right corner and select Edit

Find: <path name="headset-mic">

You will see this string just below it:

<path name="adc2" />

<ctl name="ADC2 Volume" value="16" />

<ctl name="DEC5 Volume" value="90" />

Change <path name="adc2" /> to <path name="adc3" />

Change <ctl name="ADC2 Volume" value="16" /> to <ctl name="ADC3 Volume" value="14" />

Change <ctl name="DEC5 Volume" value="90" /> to <ctl name="DEC4 Volume" value="97" />

Find: <path name="voice-headset-mic">

You will see this string just below it:

<path name="adc2" />

<ctl name="ADC2 Volume" value="17" />

<ctl name="DEC5 Volume" value="96" />

Change <path name="adc2" /> to <path name="adc3" />

Change <ctl name="ADC2 Volume" value="17" /> to <ctl name="ADC3 Volume" value="14" />

Change <ctl name="DEC5 Volume" value="96" /> to <ctl name="DEC4 Volume" value="97" />

You will notice we are overwriting the default settings from <path name="voice-speaker-mic"> for both. I found this has worked. This may be more modification than necessary to accomplish the same goal. Please feel free to respond if we can further minimize the amount of changes needed in this file to resolve this issue. I'm happy to make edits and adjustments as needed!