Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,210 Members 49,448 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] How to change speaker or microphone gain manually

Tip us?
 
ectv96
Old
(Last edited by ectv96; 10th June 2014 at 08:25 AM.)
#1  
ectv96's Avatar
Junior Member - OP
Thanks Meter 1
Posts: 6
Join Date: Sep 2012
Location: Surabaya
Thumbs up [GUIDE] How to change speaker or microphone gain manually

Quote:
WARNING
i'm not responsible for any damage to your speakerphone, headset, or anything else. try this method with your own risk.
hello, this is my first thread on XDA and i will explain how to change audio input/output configuration on galaxy note 2 (based on my experience, and it works perfectly!)

YOU ONLY NEED:
1. a rooted note2
2. root explorer

Let's get started!
1. open root explorer
2. search 'default_gain.conf' at root /system/etc/
3. mount R/W
4. hold the file until there's an option 'open in Text Editor', click
5. here you will see a tons of audio configuration

TO HEAR THE DIFFERENCE, YOU'LL NEED TO REBOOT YOUR PHONE! (not soft reboot)

#Output Modifier Stage
output i mean speaker, headphone, etc
There's 4 mode configuration for output audio gain
Normal, Incall, Ringtone, Incommunication

Incall is audio config while you in call
Ringtone is audio config for ringtones
Normal is all media sounds that plays on your device (except above)
Incommunication --> dunno

this is audio config for earpiece in normal mode
Code:
Select Code
#Output Modifier Stage
#Normal, Incall, Ringtone, Incommunication

#Modifier: Normal

Modifier "Normal" {
	SupportedDevice {
		"Earpiece"
	}
	Enable {
"Earpiece" for Earpiece
"Speaker" for Loudspeaker
"Headset Out" for Headphone

if you wan't to increase or decrease the gain volume, just change the "..... Volume", ... },

Example, i want to increase my speaker volume, change that number (followed with blue color):
Code:
Select Code
Modifier "Normal" {
	SupportedDevice {
		"Speaker"
	}
	Enable {
		{ "AIF1DAC1 Volume", 96 },
		{ "AIF1 Boost Volume", 0 },
		{ "DAC1 Volume", 96 },
		{ "SPKL DAC1 Volume", 1 },
		{ "SPKR DAC1 Volume", 1 },
		{ "Speaker Mixer Volume", 3 },
		{ "Speaker Boost Volume", 4 },
		{ "Speaker Volume", 58},
	}
if you want to increase your headset volume, just find "Headphone Volume" and change it.
if you want to increase your earpiece volume, just find "Earpiece Volume" and change it.


#Input Modifier Stage
input i mean microphone
you need to scroll down almost half of the page to find the microphone configuration until you find this:
Code:
Select Code
#INPUT Modifier Stage
#Voice, Camcorder, Recognition, Communication,

Modifier "Voice" {
	SupportedDevice {
		"Builtin Mic"
	}
	Enable {
There's 4 mode for input modifier stage
Voice is for recording voice
Camcorder is for recording videos
Recognition is for voice recognition like google now, voice search, etc
Communication is config while you in call

"Builtin Mic" is microphone that located on the bottom of the phone
"Back Mic" is microphone that located on the top of the phone
"Headset In" is microphone from your headset

What is this?
Code:
Select Code
{ "AIF1ADC1 HPF Mode", 2 },
{ "AIF1ADC1 HPF Switch", 1 },
HPF is High Pass Filter that will filter your audio

HPF Switch
0 = disable (and of course it will no differences if you change the mode)
1 = enable

HPF Mode
change this mode between 0-2, you will notice the different.
as my experience changing this mode,
0 = low frequency strong, high frequency poor
1 = low frequency and high frequency balanced
2 = low frequency poor, high frequency strong

now, to change the gain, you only need to change this:
"IN2L Volume" or "IN2R Volume"

example, i want to decrease the audio gain of my builtin microphone for recording audio, change the number that follows with blue color:
Code:
Select Code
Modifier "Voice" {
	SupportedDevice {
		"Builtin Mic"
	}
	Enable {
		{ "AIF1ADC1 HPF Mode", 2 },
		{ "AIF1ADC1 HPF Switch", 1 },
		{ "IN2L Volume", 16 },
		{ "MIXINL IN2L Volume", 0 },
		{ "AIF1ADC1 Volume", 96 },
	}
if you want to change the audio gain for recording videos, scroll down again until you find the "#Camcorder" section. It's same method with the "Voice".



after you finished editing, press back and 'YES' to save it. it will automaticaly backup the older 'default_gain.conf' with ".bak" file.
so if you accidentialy forget the default configuration, just delete the 'default_gain.conf' and rename the 'default_gain.conf.bak' to 'default_gain.conf'
don't forget to reboot your phone to notice the different! (not soft reboot)


good luck!
The Following User Says Thank You to ectv96 For This Useful Post: [ Click to Expand ]
 
droid8622
Old
#2  
Junior Member
Thanks Meter 2
Posts: 24
Join Date: Sep 2006
another possibility is to use a kernel with boeffla sound, agni kernel for example
 
ectv96
Old
#3  
ectv96's Avatar
Junior Member - OP
Thanks Meter 1
Posts: 6
Join Date: Sep 2012
Location: Surabaya
Quote:
Originally Posted by droid8622 View Post
another possibility is to use a kernel with boeffla sound, agni kernel for example
yeah i've tested agni kernel but some tweaks can't be changed with agni. example they say "microphone sensitivity" and it only change the headset input gain.
so i edit the 'default_gain.conf' and trying to change the builtin mic gain, and it perfectly works
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes