Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,808,261 Members 37,928 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; 4th August 2014 at 02:08 PM.)
#1  
ectv96's Avatar
Junior Member - OP
Thanks Meter 6
Posts: 9
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/ (if you can't find this file, sorry, i don't know anymore )
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:
#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:
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:
#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:
{ "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:
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!
hit the THANKS button if you found this useful!
The Following 5 Users Say Thank You to ectv96 For This Useful Post: [ Click to Expand ]
 
droid8622
Old
#2  
Junior Member
Thanks Meter 2
Posts: 25
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 6
Posts: 9
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
 
Leotronick
Old
#4  
Member
Thanks Meter 0
Posts: 60
Join Date: Jun 2010
Location: Munich
Default File missing

Hi,

My GN2 runs latest PA with stock PA kernel and I cannot find the default_gain.conf file. Do I have to use some specific kernel or what could be the problem?
Thanks

Leo
 
ectv96
Old
#5  
ectv96's Avatar
Junior Member - OP
Thanks Meter 6
Posts: 9
Join Date: Sep 2012
Location: Surabaya
Quote:
Originally Posted by Leotronick View Post
Hi,

My GN2 runs latest PA with stock PA kernel and I cannot find the default_gain.conf file. Do I have to use some specific kernel or what could be the problem?
Thanks

Leo
hmmm, sorry. i don't know anymore if you can't find the file.
because i'm running on stock TW rom 4.4.2
maybe you should try another rom
 
yusuf_adsas
Old
#6  
Senior Member
Thanks Meter 87
Posts: 247
Join Date: Aug 2013
Location: di Bumi Pertiwi
Quote:
Originally Posted by ectv96 View Post
hmmm, sorry. i don't know anymore if you can't find the file.
because i'm running on stock TW rom 4.4.2
maybe you should try another rom
Hi
Do you know how to make 'privacy mode' so when you plug in your headset the speakers are off (ringtone/notifications etc) without flashing Agni kernel?

Thanks

Y
 
ectv96
Old
#7  
ectv96's Avatar
Junior Member - OP
Thanks Meter 6
Posts: 9
Join Date: Sep 2012
Location: Surabaya
Quote:
Originally Posted by yusuf_adsas View Post
Hi
Do you know how to make 'privacy mode' so when you plug in your headset the speakers are off (ringtone/notifications etc) without flashing Agni kernel?

Thanks

Y
dunno, sorry
The Following User Says Thank You to ectv96 For This Useful Post: [ Click to Expand ]
 
yusuf_adsas
Old
#8  
Senior Member
Thanks Meter 87
Posts: 247
Join Date: Aug 2013
Location: di Bumi Pertiwi
Quote:
Originally Posted by ectv96 View Post
dunno, sorry
Thanks for your reply anyway and good work!
Matur suwun

Y
 
immyrock
Old
#9  
Junior Member
Thanks Meter 1
Posts: 19
Join Date: Jun 2012
Location: Gujrat
Nice Work Bro

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes