[Q] Turning off microphone AGC?

Pierrot Lunaire

Senior Member
Jul 15, 2009
109
1
0
Does anyone know of an app for Android that can turn off the microphone AGC (Auto-Gain Control)? It's impossible to do through the system settings.
I've only encountered one audio recording software called "TapeMachine" that can do it. But it only works within the software. It would be great to be able to record videos with the camera while the AGC is off.
 

Pierrot Lunaire

Senior Member
Jul 15, 2009
109
1
0
Well, I have some technical information, but I can't do much with it because I'm not a programmer.
The programmer of an app called "Break Speed" uses a code in his app to disable AGC and he wrote me what the code he uses is.
Maybe someone can use this information to create an app that can disable AGC. This is what he wrote me:

I found that in Android 2.2 (and higher), they introduced an undocumented flag in the AudioRecord() class, called “VoiceRecogntionQuality”. In the code, there is a note to expose and document that flag (it just hasn’t been done yet.) So I expect that it is supported (and will continue to be.) My guess is that AGC was added to 2.2 and this is the flag that disables it.

Here’s the code I used to adjust my recordings for it:

// We use our version to attempt "VoiceRecogntionQuality" recordings (to disable AGC)
int version = Integer.parseInt(android.os.Build.VERSION.SDK);

// Try to get the audio record for Android 2.2 and greater using 'voice recognition quality'
if (version >= 7)
{
recordInstance = new AudioRecord(6, m_frequency, m_channelConfiguration, m_audioEncoding, bufferSizeBytes * m_bufferCount);
}

// For older versions of Android (or failed attempts of the voice recognition quality recordings)
if (version < 7 || recordInstance.getState() == AudioRecord.STATE_UNINITIALIZED)
{
recordInstance = new AudioRecord(MediaRecorder.AudioSource.MIC, m_frequency, m_channelConfiguration, m_audioEncoding, bufferSizeBytes * m_bufferCount);
}