[Nexus 5 Android Development] chdloc:
Camcorder audio with spatial sound (Android 5.0 only)

Good news: presenting "stereo" camcorder recording! I'm referring to stereo in quotes here as the stereo image is not as defined and stable as it would be in a "professional" recording. The reason is that the spacing of the two microphones, which corresponds to the length of the phone, is significantly shorter than suggested for traditional A/B stereophony. What does help, though, is the diffraction effect around the phone's body. The sound definitely exhibits a spatial quality.

For those of you who know how to push files to your phone's system partition, take a look at the attached archive, camcorder_audio_fix_lollipop_stereo_lrx21o_v0.tar.gz. The files to be replaced are the usual suspects. Note that all of them differ from the previous mod, so you need to copy all of them. Note also that I only included 6 dB of noise suppression for now. As always, (at a minimum) make a backup of the files you are replacing.

One caveat for now is that there is some irregular (low-level) noise in the channel that corresponds to the top microphone (near the headphone jack). I have not yet been able to figure out whether there is a way to remove that noise and where exactly it comes from.

As a demonstration, I made a quick recording while my laptop was playing some music.

While the music was playing I rotated the phone around its horizontal axis.

Note that the phone was very close to the laptop so the spatial effect is pretty strong.

I only saved the audio and attached it (compressed) to this post as stereo_demo.wav.gz

As a tip for those of you running this mod, hold your phone horizontally with the USB port pointing to the left. Otherwise the audio image does not correspond to the video.

Update (11/25/2014): I created new audio samples comparing a mono recording with the corresponding stereo recording. In both cases I was using 6 dB of noise suppression. I played music out of a loudspeaker to the left and male speech out of a loudspeaker to the right. I held the phone in between the two loudspeakers at a distance of around 50 cm, the loudspeakers themselves were spaced about 50 cm apart.

Update (11/27/2014): Uploaded new version, camcorder_audio_fix_lollipop_stereo_lrx21o_v1.tar.gz. The only difference to the previous version (v0) is that there are now two mixer_paths.xml files, i.e. mixer_paths_left.xml and mixer_paths_right.xml. If you typically hold your phone such that the shutter button is on the left, choose mixer_paths_left.xml (and rename to mixer_paths.xml). Similarly, if the shutter button is typically on your right choose mixer_paths_right.xml (and rename to mixer_paths.xml)

Update (11/28/2014): At this point I'm guessing that the irregular noise in one of the channels is introduced by one or more digital components on the circuit board close to the top microphone. In other words I suspect the noise is a result of poor hardware design. In trying to track down this problem I found that, for example, the app "Easy Voice Recorder Pro" (paid app) is capable of recording high-quality audio in stereo, but only with my mod in place. Better yet, the irregular noise is virtually gone when the screen is on. Very cool! The noise returns, though, when the screen is turned off, albeit at a lower level. What this tells me is that the noise seems to get modulated by a digital component that is the most active during camcorder activity and when the screen is turned off.

The corresponding Aroma installer is available here