Remove All Ads from XDA

4.3-4.4 AOSP Camera app with Auto-gain audio

233 posts
Thanks Meter: 45
By stevey500, Senior Member on 3rd February 2014, 10:28 PM
Post Reply Email Thread
Anyone here used a Motorola device with stock camera app using "Concert" mode and been able to record crystal-clear audio in a noisy environment without distortion? Whether you have or not, it works very well an I am trying to figure out how to get similar results with my Qualcomm based AT&T branded Galaxy S4 running Cyanogenmod 11 latest nightlies. It'd be great to find out if any solutions will work for other devices as well. I know very well that iOS devices can record video in noisy environments flawlessly without having to change any microphone settings at all.

To begin, the stock touchwiz configuration and AOSP-based rom configurations currently capture extremely distorted audio when you are in loud environment on the Galaxy S4, quite certain most all of the other Galaxy devices as well. In a quiet environment, the audio capture is awesome and in 2 channel stereo.

Digging into the audio configuration file, I've found many parameters that can be adjusted, changed, replaced, etc.

The file /system/etc/snd_soc_msm/snd_soc_msm_2x_Fusion3 is the audio configuration file.
It can be open and edited directly on the device using any text editor.

Here is the settings for the "camcorder" profile when recording video in the camera app:

    Name "Camcorder Tx"
    Comment "Camcorder Tx device"

        'SLIM_0_TX Channels':0:Two
        'SLIM TX7 MUX':0:DEC3
        'DEC3 MUX':0:ADC4
        'ADC4 Volume':2:91.7%
        'DEC3 Volume':2:84%
        'SLIM TX8 MUX':0:DEC4
        'DEC4 MUX':0:ADC3
        'ADC3 Volume':2:91.7%
        'DEC4 Volume':2:84%
        'MICBIAS3 CAPLESS Switch':1:1

        'SLIM TX7 MUX':0:ZERO
        'DEC3 MUX':0:ZERO
        'ADC4 Volume':1:0
        'DEC3 Volume':1:67%
        'SLIM TX8 MUX':0:ZERO
        'DEC4 MUX':0:ZERO
        'ADC3 Volume':1:0
        'DEC4 Volume':1:67%
        'MICBIAS3 CAPLESS Switch':1:0

    ACDBID  56:2

Adjusting volume percentages does result in differences in recording levels of the left/right channel, but what I am really looking for is the possibility of using Auto-gain control. I have read over and over that the audio hardware of these qualcomm processors do have auto-gain control in the audio processing. Does anyone know the perimeters here that enable it?

Apps like Tapemachine (a very awesome audio recording and editing app ) has an option for Auto-gain control. Is this app using a hardware based auto-gain control or is it rendering within the app? Either way, any information leading towards the development of auto-gain control in video/audio recording in AOSP android would be great help. I'm not much of a programmer but I'm willing to dig into putting work into the AOSP camera app to enable this feature.

Thanks for reading.
5th February 2014, 06:12 PM |#2  
OP Senior Member
Thanks Meter: 45
Changing the volume sensitivities in the lines above to something lower, ~54ish percent dramatically improved the audio recording in loud environments. The audio in my vehicle is really loud, figured it was a good place to test it. Before modifying the file, the sound was entirely inaudible distortion.

This works very well, it's just a drag to have to edit the file manually, reboot, and then go back to camera app and then record to get different levels of audio capture sensitivity.

Anyone want to help out with being able to control audio gain in video recording?
6th November 2014, 07:11 AM |#3  
tomurbanowicz's Avatar
Senior Member
Flag Staszów
Thanks Meter: 139
I'm looking for that too...

Do You compare gain and quality audio in video in Stock (Galaxy S4) and AOSP camera?
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes