Double Tap to Wake on the Nexus 6 Without Root

A few weeks ago, we featured an app which allowed the Nexus 6 to regain the double tap to wake … more

Make Your Own Heat Sink for the LG Optimus 4X HD

Its not a rare occurrence that performing a resource heavy task on your Android device (e.g. … more

Learn How to Create an Old School Dialer

XDA is not only a great source for custom ROMs, kernels, and various modifications for numerous … more

USB Desktop Charger Roundup – XDA TV

Sometimes you learn one way to do something, and that’s the way you do it forever. You never … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[GUIDE] How to change speaker or microphone gain manually

OP ectv96

9th June 2014, 11:46 AM   |  #1  
ectv96's Avatar
OP Junior Member
Flag Surabaya
Thanks Meter: 6
 
16 posts
Join Date:Joined: Sep 2012
More
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!
Last edited by ectv96; 4th August 2014 at 03:08 PM.
The Following 5 Users Say Thank You to ectv96 For This Useful Post: [ View ]
9th June 2014, 06:17 PM   |  #2  
Junior Member
Thanks Meter: 2
 
25 posts
Join Date:Joined: Sep 2006
More
another possibility is to use a kernel with boeffla sound, agni kernel for example
9th June 2014, 06:24 PM   |  #3  
ectv96's Avatar
OP Junior Member
Flag Surabaya
Thanks Meter: 6
 
16 posts
Join Date:Joined: Sep 2012
More
Quote:
Originally Posted by droid8622

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
3rd August 2014, 11:23 AM   |  #4  
Member
Flag Munich
Thanks Meter: 0
 
60 posts
Join Date:Joined: Jun 2010
More
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
4th August 2014, 10:25 AM   |  #5  
ectv96's Avatar
OP Junior Member
Flag Surabaya
Thanks Meter: 6
 
16 posts
Join Date:Joined: Sep 2012
More
Quote:
Originally Posted by Leotronick

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
5th September 2014, 05:56 PM   |  #6  
Senior Member
di Bumi Pertiwi
Thanks Meter: 369
 
763 posts
Join Date:Joined: Aug 2013
Quote:
Originally Posted by ectv96

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
5th September 2014, 06:56 PM   |  #7  
ectv96's Avatar
OP Junior Member
Flag Surabaya
Thanks Meter: 6
 
16 posts
Join Date:Joined: Sep 2012
More
Quote:
Originally Posted by yusuf_adsas

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: [ View ]
5th September 2014, 07:58 PM   |  #8  
Senior Member
di Bumi Pertiwi
Thanks Meter: 369
 
763 posts
Join Date:Joined: Aug 2013
Quote:
Originally Posted by ectv96

dunno, sorry

Thanks for your reply anyway and good work!
Matur suwun

Y
5th September 2014, 08:35 PM   |  #9  
Junior Member
Flag Gujrat
Thanks Meter: 2
 
29 posts
Join Date:Joined: Jun 2012
More
Nice Work Bro

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes