Presenting a simple method to tweak phone volume for following devices
Speaker
Earpiece
Headphones
Some of you might be familiar with this method.
Procedure is simple and easy to follow.
TESTED ON
LG Optimus G Pro F240L running CM 11
DISCLAIMER
I am not responsible for any kind of damage. All precuations are mentioned.
REQUIREMENTS
Rooted Phone
File Manager with ROOT Access
Note: I will be using Root Explorer file manager for demonstrating the procedure.
COMMON STEPS
Video Tutorial : http://youtu.be/YtoouAUbvWQ
1. Open root directory '/' using File Manager with ROOT access.
\2. Navigate to /system/etc/
3. Scroll down to file mixer_paths.xml
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
4. Change mixer_paths.xml permissions to R/W
5. Open mixer_paths.xml in text editor.
6. Make required changes in mixer_paths.xml for a particular device
Speaker Post # 2
Earpiece Post # 3
Headphones Post # 4
7. Save changes.
8. Change mixer_paths.xml permissions to R (read-only)
9. Reboot either soft or normal.
ENJOY
CHANGE SPEAKER VOLUME
Boost your speaker/loud-speaker volume and enjoy louder music.
1. In mixer_paths.xml find <path name="speaker">
2. Change value of <ctl name="RX3 Digital Volume" value="your_value" />
In general this value can vary from 0 - 100
Too high value can cause distortion and damage.
On G Pro avoid going above 70.
3. Move to step-7 in Post # 1.
CHANGE EARPIECE VOLUME
Increase earpiece volume if you have problem listening to phone calls.
1. In mixer_paths.xml find <path name="handset">
2. Change value of <ctl name="RX1 Digital Volume" value="your_value" />
In general this value can vary from 0 - 100
Too high value can cause distortion and damage.
On G Pro 60 is suitable.
3. Move to step-7 in Post # 1.
CHANGE HEADPHONES VOLUME
1. In mixer_paths.xml find <path name="headphones">
2. Change value of following
<ctl name="RX1 Digital Volume" value="your_value" />
<ctl name="RX2 Digital Volume" value="your_value" />
Note: Keep both values same.
In general this value can vary from 0 - 100
Too high value can cause distortion and damage.
On G Pro 65 is suitable.
3. Move to step-7 in Post # 1.
hey man i have problem with my G Pro , when i speak the partner can't hear anything what i say . in snd_soc_msm_2x_Fusion3 file,where i can increase my voice (when making phone calls, the recipients can hardly hear the my voice.) THANKS ^^
vip991988 said:
hey man i have problem with my G Pro , when i speak the partner can't hear anything what i say . in snd_soc_msm_2x_Fusion3 file,where i can increase my voice (when making phone calls, the recipients can hardly hear the my voice.) THANKS ^^
Click to expand...
Click to collapse
Sorry buddy I don;t have this file in system folder.
mohsin.android said:
Sorry buddy I don;t have this file in system folder.
Click to expand...
Click to collapse
ok man ^^ this file in path : system/etc/snd_sos_msm.
May you help me ? THANKS !!!
vip991988 said:
ok man ^^ this file in path : system/etc/snd_sos_msm.
May you help me ? THANKS !!!
Click to expand...
Click to collapse
Yes that is the point I don't have the folder you mentioned. All audio configurations are controlled by mixer_paths.xml
I'm running CM11 right now.
Does anyone have the config changes need for the STOCK 4.2.1 G Pro? (to increase speaker volume).
store2edu said:
mohsin.android, I wish you and other people would be UP FRONT and State what version Android Stock ( + Version ) or Cyanogenmod ( + Version ) or Other , this post applies to !
Many People are doing things which cause wasted time and frustration for others ( posting in wrong forums, needlessly quoting prior posts). I personally was brought here by someone incorrectly posting G2 config info in a G forum.
Click to expand...
Click to collapse
If you read the OP, then you will see for WHAT version this mod is.
Very cool thanks for finding this. I plan to use.
Any idea how to boost microphone volume, especially when phone is on speakerphone? For some reason it must be set low because nobody can hear me unless I hold the phone next to my mouth.
I tried few setting in mixer_paths.xml to change microphone volume but didn't succeeded.
I'll update if I find any method..
Thanks
any idea on where is the bluetooth media path (i.e play music with bluetooth) is located ??
Awesome , I did it ! Thanks man , you're great !
Elements1984 said:
Hello xda community
Today I am sharing my knowledge related to the sound modding in android as a way of saying thank you for all the support I received from the xda members in the forums
About myself: I have been working as professional DJ and sound engineer for serious gigs since 15 years.
Goals: This is a general guide to help you understand the fundamentals of sound output in android and how to edit it, then you have to do some research specific to your phone/tablet or experiment on your sound file to have the desired levels. Theorically, this applies to any android phone or tablet, although the values to input will differ from one device to another and from one manufacturer to another. Here I am describing how I boosted the sound in my Xperia Z1, so be aware that applying the same values on a different phone might get different results.
Why I wrote this: Most of the sound mods will not work if you have a different android version than the one of the modder because the architecture of the sound paths might differ from one android version to another, even if it's exactly the same device, so it's vital to be able to boost your sound on your own if all the mods didn't work for you or no mod exists for your device. Sometimes also, a modder wishes to create a sound boost mod but doesn't know how to get the maximum loudness without losing quality. This will no more happen if you read and understand this guide
Note: I am not responsible if you cause any damage to your device or your sound stops working, you are the only one responsible for what you do with what is described in this guide.
Requirements: rooted phone, file explorer and note editor (I use Es File Explorer as it has both)
I wrote this guide to clarify what needs to be edited to get a louder sound without losing quality, so here are the facts:
To get started, use a file explorer and navigate to /system/etc and locate a file named mixer_paths.XML
I recommend that you make a copy of this file in case you need to restore it later if you get undesirable results with your experiements.
Open it using a note editor and locate the sections of your interest, usually there is a title for each section with the values coming right under it, e.g "Headset volume" or "microphone volume"
Starting from here you will have to find out the values specific to your device either by finding them in the forums (if you are lucky) or experimenting by editing the values I am about to explain.
HPH (amplifier/electric output) vs RX (digital/signal):
HPH: Basically, the best way to get a volume boost without decreasing the sound quality is to increase the amount of electric power that your device outputs, this will have the effect of feeding your headphones with more power which will generate more acoustic pressure (DeciBels/db) without degrading the quality (provided you didn't reach the limits of your headset). To do this, just set your HPHR and HPHL to as high as your device allows.
Rx: This is somehow the input signal of your sound, increasing this value will boost the source signal which will create distortion and saturation, this will result in a sound that will feel louder because of the generated compression, but the cost is a loss in dynamics and quality, the loss is proportional to the increase in the signal. In other words, increasing the RX value will distort and saturate the sound, you will have a louder but poor sound quality with a huge loss of bass and a flat sound, with the possibility that this will fry/damage your phone sound card and/or headphones at high volumes because of the saturation generating constant electric current which could overheat the wires/transistors beyond what they were designed to take. Add to this a higher risk to internal ear damages.
My advice is to start increasing the HPH value to the highest possible value first, save the file, reboot and see if the sound boost is high enough for you. If that was not loud enough, then try increasing the RX value by +3, save, restart and try again.
Facts: The loudness doubles at every +3 db, which means RX 85 should be 2 times louder than RX 82
Conclusion: The first step to boosting your sound is to increase the HPHR and HPHL. If more loudness is needed, increase the RX value gradually by +2 or +3 until you reach the desired loudness (try to find a good balance, I wouldn't recommend going more than +3 beyond your current RX value). Keep in mind that too much increase in RX will make you lose bass and sound quality, at that point don't expect the equalizer (EQ) of your music player to give you more bass or improve your sound quality because you have saturated/damaged the sound at its origins.
I hope this will help you set your sound at the desired levels without damaging your sound quality or devices or headphones or ears.
Note: I am using these settings on my Xperia Z1 with my Sony MH1C headset, these values should work for the Xperia Z1 Compact because it has a similar hardware. Theorically, this guide is universal and can be adapted to work with any android device, the values in mixer_paths.xml might be different on other devices but the boosting principle is the same.
More infos:
HPHR = Right output
HPHL = Left output
People with impaired hearing can set up these 2 values differently. E.g: HPH? 20 should be for the weak ear, set the value for the strong ear at anything below 20 until you reach the balance between the 2 ears.
Edit for some CyanogenMod Based ROMs: On my S4 mini running a Resurrection Remix Marshmallow ROM, which is based on CM, I didn't find the mixer_paths.xml file, instead I found a file which contained similar settings for the sound.
The file is named snd_soc_msm_2x and is situated in : system/etc/snd_soc_msm
If you found this useful, please click on the "thanks" button below to thank me That will make my day
Click to expand...
Click to collapse
i tried to change all the RXs to "95" but barely notice any difference from my phone speaker. But thing's work for my Bluetooth and headphone though, almost blow my f ing ears.
Related
Hello, I am studiominal from Korea. I’m going to explain what ‘Voodoo sound by supercurio’, and ‘Galaxy Tuner by dowkim10’ actually are, plus how to use these solutions to brighten your music life for users using Galaxy S as their MP3 playback device. Please be sure that I’m not an expert in this area, but I managed to get pieces of information regarding sound stuff, so I’d like your patience and also welcome your criticism (plus my English).
What are ‘Voodoo sound’ and ‘Galaxy Tuner’?
First of all, two of them both have the same goal to improve the sound quality of Galaxy S by tuning some systematic parameters within Wolfson WM8994 chip. Before describing differences between them, I’d like you to have a look at this.
1/ Mic sensitivity
2/ True line-out
3/ Headphone amplifier gain
4/ 5-band Hardware Parametric EQ
5/ Radio Noise
6/ iPhone headset support
7/ Call through headphones
8/ General sound quality
9/ Bluetooth gain & A2DP streaming issues
10/ Specialization effect for headphones & Crossfeed
11/ Multi-track recording support and VOIP fixes
Yes. These are the small objectives that supercurio mentioned which will be available on final Voodoo sound solution. It seems that overall progress doesn’t go exactly in the order of the list above, but I think it’s definitely going in the right way. As most of you might have noticed, the first release of voodoo sound has feature #3 and #5, and #1 and #8 are expected to be coming in the next version.
Let’s take another look at Galaxy Tuner by dowkim10 then. In this app, feature #4 and #10 are available, which means you can alter the native equalizer as you wish. (The most-wanted feature for me yay ) This app, however, doesn’t have full features of * parametric EQ because the developer didn’t have the proper datasheet for WM8994. Nothing to worry though, a full parametric EQ will be available in supercurio’s release. So today I’m going to let you know how to set your EQ using Galaxy Tuner. What if supercurio releases it so fast? Hmm.. let me think about it later then
* What is Parametric EQ?
Equalizers in poweramp, or default Samsung music player are called band Equalizers. It has several bars with fixed frequencies tagged, and the only control we can have is called ‘gain’, which we can alter in the direction of plus or minus. Parametric EQ is literally an EQ with several parameters: Center frequency, Bandwidth(Q-factor), and Gain.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Center frequency : The center of frequency you would like to emphasize or diminish. By adding some gains, you’ll see a peak formed at the center frequency. Of course you can change this center frequency in parametric EQ in an allowed range.
Bandwidth(Q-factor) : There comes a slope when you alter the gain of a band, and this parameter determines whether the slope should be steep or gentle.
‘Gain’ is just what you know already. (Degree to which a band is emphasized or diminished)
It is said that the more number of bands, the better the EQ is. With 5-band parametric EQ, however, I don’t think that’s always true. You can make a bunch of graphs by changing 3 parameters of each band. OK. These were for people who might not know what the parametric EQ is, and let’s get the real deal started.
Prerequisites
1. You must have ‘voodoo sound kernel’ and ‘voodoo app’ installed.
2. Your device must be rooted.
3. You also must have ‘Galaxy Tuner’ installed.
How to set Voodoo sound : Headphone Amplifier Analog Gain
Underneath is a screenshot of VoodoApp by supercurio. As many of you may have noticed, all the settings are reset upon rebooting. So the bar you see now is the default gain of headphone amplifier on Galaxy S.
You don’t have to think for a single second in this dialog, which means dragging it to the right means you’ll get louder volume, and left will result in quieter volume. I think I read a tip from supercurio and would like to let you know what that was by announcing in this post. (Cannot exactly remember where your tip was at, sorry supercurio )
1. Lower your amplification level in VoodooApp below the default level.
2. Maximize the volume bar in your music player (Android system)
3. Finally change the amplification level in VoodooApp again to fit your ears.
“By performing these procedures, you’ll get both lower noise and satisfactory volume.” I think this is similar to what supercurio said. However, there’s one major caution when using this technique I think, which might blow your ears. PLEASE KEEP IN MIND THAT HARDWARE AMPLIFICATION LEVEL WILL BE RESET WHEN THE DEVICE IS REBOOTED AND MEDIA VOLUME WILL NOT. Maybe there will be a solution coming automatically when ‘set on boot’ option becomes available.
So I won’t recommend this method for all of you, but only a few who are using receivers with low impedance(16ohms) or receivers of high sensitivity. This is because not only the volume but also the noise level will increase by increasing analog amplification gain. Of course, the SNR is very good for a phone in this class, and you might not notice a big difference of noise level though you have altered it a bit to the right. And for those who are using receivers with 32 ohms of impedance or higher, it’ll be of no problem.
In addition, I’m one of those who think that quantitative ways won’t always work, so I’d recommend you alter it without any annoying figures or formula
How to set Galaxy Tuner : Sound (3D, HW EQ)
Finally we’re here. You can see 6 bars after you launch Galaxy Tuner. Let me start with the one in the top, the 3D effecter. By turning this feature on you will feel as if the stereo sound is expanded wide. Be sure that if you set it too high, it’ll result in a lot of distortion. Personally I set it at the maximum of 7.
5 bars are the bands for hardware equalization(B1~B5), each of which has a 100, 300, 875, 2400, and 6900 label. These correspond to the notion of center frequency I mentioned above. (100Hz and 6900Hz are called cut-off frequencies, not center frequencies)
The picture above is describing the results I recently measured with RMAA with ALC889A codec. (I’ve got a PCI one, but there seems to be a problem especially in line-in jack) Here you can see each graph drawn when each band was altered by 3 dB. See the peaks around 20Hz, 300Hz, 800Hz, 2500Hz, and 17000Hz? And some of you (including me in the past) might notice that it’s different from what is displayed in the Galaxy Tuner application. (like “What happened to 100Hz and 6900Hz?!”) I thought the datasheet was wrong, but I came to know that I was wrong. (How shame )
Now that we have an idea how the graph is altered when using this app, we want to know how to set it! Seeing many people who love listening to music, I thought some of them prefer the FLAT graph and others prefer their own tastes. Of course I’m one of the latter, so that’s why I’m writing this. It is said that most men can sound from 100Hz up to around 8000Hz, and women/children 200~9000Hz. Instruments, of course, have much wider a range of frequency bandwidth. Looking at the graph I posted right above, the peak for B1 forms around 20Hz, which is very hard to hear for a human, and the shape is so gradual that it might have a negative effect on other frequency bands. I think 50~60Hz will be just fine for people who seek for dense and powerful bass. (And this will come true with supercurio’s awesome next release I suppose)
Personally I love strong deep bass and emphasis on string instruments, which leads to a V-shaped eq setting. So mine is like +4, 0, +1, +1, +3 from B1 with Sony EX-600 earphone. The results are shown in the pic right up there (the one in the bottom, green)
~130Hz : MEGA BOOST!
~5000Hz : nothing special
5000Hz~ : Boost
That’s what I’ve done for my taste. Of course you might have your own tastes that might be different from mine. For example, if you wish to hear the vocal more clearly, just alter B2, B3, and B4 and you’ll notice the voices got boost. And for special cases like Triple fi used with Galaxy S which is known to be a mismatch because of attenuation in high frequencies, Galaxy Tuner will do the work
Thanks to ‘Voodoo sound’ and ‘Galaxy Tuner’ anyway, I came to convince that every user of galaxy S has a potentially good MP3 player. For those who seek for frequency bandwidth of other instruments, please refer to the address below.
http://www.independentrecording.net/irn/resources/freqchart/main_display.htm
Galaxy Tuner *unlocked version for GT-I9000* by dowkim10
http://forum.xda-developers.com/showthread.php?t=909801
Thanks for this big explanation...
Unfortunately I never got Galaxy Tuner to run on my phone, it seems to think my phone is not a galaxy s... (Not even with stock roms).
http://forum.xda-developers.com/showthread.php?t=909801
Here's the URL you need now. The unlocked galaxy tuner!
Both apps can really use apply settings on boot!
Does it work for GT I9000 europeen version?
Yes! It is an unlocked version so it should work on GT-I9000. Remember that I'm not the dev. All thanks to dowkim10, I had a chance to experience how superbly the sound can change so early.
Hi studiominal
Thank you for sharing this knowledge!
I would add an important note about the EQ usage.
For correction purpose and best result, an equalizer is supposed to be used by attenuating some frequencies and not boosting other.
Actually, Galaxy Tuner EQ implementation miss dynamic range compression and you can easily create distortions, this is why it's even more useful to correct by reducing and not increasing gains
Absolutely hehe. I don't know why, but I just love massive bass Always looking forward to your awesome work! I heard you're going for an interview. Good luck!
It seems very useful article.
but, It is difficult to understand
I am novice about sound.
Excellent guide! Thanks for explaining thoroughly. Lol dowkim10 is just being humble.
hello freakfingers12
The first user of my app except korean.
but, It is true that I am novice.
Thank you.
As I wrote in the original Voodoo Sound Thread,
its easy to hardcode the amplifier level all you need is root explorer.
Just write this: " echo 62 > /sys/devices/virtual/misc/voodoo_sound/headphone_amplifier_level" (you can insert any value from 1 to 62 for max gain) into one of the init scripts at /etc/init.d.
@Supercurio: Maybe you could use some of Xan's code (he has made the source of his voltage control app public) to implement a
"apply settings on boot" feature
I heard from lot of people that the sound quality is a big inprovement
I have all requirements exept of galaxy tuner i am going to try it on and report back here
Sent from my GT-I9000 using XDA App
Thanks. I'll consider editing my init.d
Sent from my SHW-M110S using XDA App
i've been waiting for someone to post this, and thank you for this useful guide. thumbs up for the explanation.
Why isnt galaxy tuner supported in darky rom. 8.0? Im not able to launch the app
Sent from my GT-I9000 using Tapatalk
galaxy tuner has 2 dependency to run.
(but, basically, there is no dependency about custom rom)
check below
1. froyo(kernel 2.6.32.9) 2. rooted phone.
I have managed to get it running but when listening to 'tunes' and the notification goes off, the eq is reset to flat. On going back into the app, my settings are still there and all I have to do is hit apply.
Is this a bug or am I missing something?
Sent from my GT-I9000 using XDA App
MarkyG82 said:
I have managed to get it running but when listening to 'tunes' and the notification goes off, the eq is reset to flat. On going back into the app, my settings are still there and all I have to do is hit apply.
Is this a bug or am I missing something?
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
What is your kernel and Galaxy tuner version?
voodoo 5.2?
@dowkim
Kernel is hardcore k12p and tuner is 1.4.
Sent from my GT-I9000 using XDA App
[01/10] [DEV] [FIXED] Low Speakerphone Mic Gain & High Background Noise ONE CLICK FIX
01/10 Update: New Tytung R12.4 Kernel is attached at the bottom. initrd.gz is removed so you can use it with your magldr + cm7/miui/aosp rom. THIS IS ALL THAT IS NEEDED FOR MIC GAIN AND VOICE ECHO FIX.
---------older stuff ------------
Flash THIS FILE from CWM Recovery. (For MAGLDR AOSP, CM7 and MIUI ROMS. NOT for SENSE ROMS) This contains the tytung r12beta1 kernel.
More information: http://forum.xda-developers.com/showpost.php?p=17207745&postcount=268
For sense roms check post 308:
http://forum.xda-developers.com/showpost.php?p=17537327&postcount=308
Check the libaudio.so & acdb file information below. Also you may need to copy default.acdb as htcleo.acdb because current version of sense kernel may bootloop without it.
For MIUI if there is miui_default.acdb exists in/etc/firmware, you should overwrite it with the default.acdb version below.
VOICE ECHO:If the "remote" party have echo reduce "your in-call" volume with the side vol keys on your hd2.
More info: http://forum.xda-developers.com/showpost.php?p=17233906&postcount=279
Please check this post, try the acdb file there and give feedback here please whether it fixes echo or not:
http://forum.xda-developers.com/showpost.php?p=17997557&postcount=330
ALWAYS MAKE A FULL BACKUP FROM CWM, JUST IN CASE!
Thanks to mdebeljuh and jdivic for fixing the kernel code and tytung for releasing a new version of his kernel with the new code and all the others I forgot to mention.
HD2 MIC CONTROL APP:This app can easily adjust mic gain in realtime inside a call and also set it permanently. Get it FROM MARKET.Thanks to windroidHD
For CLK, try this: http://forum.xda-developers.com/showpost.php?p=17230125&postcount=278
IF YOU DON'T HAVE ENOUGH GAIN EVEN WITH 400 GAIN CHECK THE TWO FILES BELOW. YOU SHOULD HAVE ENOUGH VOICE VOLUME AT THE REMOTE SIDE WITH 400 GAIN!
-----ANYTHING BELOW IS FOR THE CURIOUS OR FOR DEVELOPMENT-----
libaudio.so
This fix is libaudio.so dependent! It is known not to work with "older" drizztje libaudio.so. Working one is THIS. I think this is the iamgpc version. You may get bizzare force closes or slowdowns with "older" drizztje libaudio. The included iamgpc version has robot voice fix and volume level fix, so it works well. New compatible libaudio is included with tytung r12.3 kernel, see above.
default.acdb
This fix includes 122,442 bytes (119,57K) default.acdb. Other sizes may or may not work well, THIS one works. It is from the aosp 2.3.4 nexushd2 rom. It seems 2.3.5 has different acdb file.
It is possible that the 122,442 bytes default.acdb file may be causing voice echo. Try the one below, if there is enough feedback I will update the update zip files.
Alternative ACDB file:
Please check this post, try the acdb file there and give feedback here please whether it fixes echo or not:
http://forum.xda-developers.com/showpost.php?p=17997557&postcount=330
KERNEL DEVELOPERS:
- Here is the "latest" diff file: diff_mic_gain.txt
- Please make sure your kernel code ignores htcleo.acdb. The diff does not have the code to ignore htcleo.acdb. Chefs, you can also just rename/delete htcleo.acdb
- You MUST include the above iamgpc libaudio.so and default.acdb along with 10mic_level script in your kernel zip update file.
HOW IT WORKS:
The new kernel code adjusts mic gain levels from /proc/mic_level
Use a Terminal Emulator or Gscript with the below commands to set gain in REALTIME (even while inside a call)
You can also use the HD2 MIC CONTROL app in Market for easier adjusting.
To set normal mode (handset) gain:
echo '0 350' > /proc/mic_level
To set speakerphone mode gain:
echo '1 600' > /proc/mic_level
More than 600 gives background noise, less than 200 is too quiet.
If you want to set the levels permanently, edit the mic_level init script in /etc/init.d
LeTama's previous method of fixing the high background noise (caused by extreme mic gain) was modifying the acdb file with values from winmo. It worked well for the normal speaking but made speakerphone unusuable and overall audio playback low. Modifying acdb file is difficult, the above fix uses the default.acdb file and modify the values in realtime while inside a call.
While the post states FIXED, there is always room for tweaking or implementing better solutions. Currently the problem is fixed but can also be considered "under development"
----------Anything below is OLD STUFF----------
28/08 EDIT: THE PROBLEM IS FIXED! Thanks to respected developers mdebeljuh and jdivic we are now able to set mic gain level for normal mode and speakerphone mode seperately.
THAT MEANS you will have crystal clear voice with no high background noise while doing normal talking AND you will have working speakerphone mode AND you will have properly high audio playback volume ALL AT THE SAME TIME.
I have tested the test kernel mdebeljuh sent me and I confirm it is working. There will be more testing with values, different roms and file versions.
THIS THREAD IS "NOT" SIMPLY JUST ABOUT HIGH BACKGROUND NOISE PROBLEM. It's already been fixed with LeTama's htcleo.acdb file (but it has side effects, check post 8) This thread is about MIC GAIN LEVELS BEING THE SAME between normal and speakerphone mode. (So you either have high background noise OR not usable speakerphone mode)
--------
Hello everyone,
THIS IS THE LAST "MAJOR" PROBLEM WITH THE HD2 ANDROID PROJECT. It is present in every rom available today.
Since this is almost a year of development, here is the description and history of the problem:
Description of the problem:
With LeTama's 113910 bytes htcleo.acdb file that is included in many roms: Everybody are getting complaints that people can't hear them properly when they are on speakerphone mode, I found out that if you enable speakerphone the mic does not get more sensitive. Normally android has to change mic gain when speakerphone is enabled. Mic gain levels are the same when normal talking, and in speakerphone mode. (I am talking about what volume the remote party hears your voice.
With no htcleo.acdb file or with android's default.acdb file or htcleo.acdb file that is not LeTama's. (same as the default default.acdb): This time the complaints are that the remote party hears too much background noice and can't understand the hd2 caller properly. This is because the mic gain is set to speakerphone levels even when in normal mode.
If you remove LeTama's htcleo.adcb in /etc/firmware (which forces android to use default.acdb instead) the mic becomes too sensitive in both normal and speakerphone mode.
WITH LeTama's htcleo.acdb present mic gain is normal in both normal and speakerphone mode.
WITHOUT LeTama's htcleo.acdb present mic gain high in both normal and speakerphone mode.
That means mic gain is either always in speakerphone mode or always in normal mode depending on acdb file used.
But actually mic gain has to be low in normal mode and high in speakerphone mode. This has to be fixed because you either can't use speakerphone or you get too much backgorund noise and people complain.
I tried with a samsung native android phone and with winmo hd2 and mic gain gets higher (mic gets more sensitive) when speakerphone is enabled. This is not about the speaker on your phone. It is about the microphone in your phone and its gain adjustment by android.
Some ROM chefs include LeTama's htcleo.acdb, some of them don't include any htcleo.acdb file, and some of them just make another copy of default default.acdb file as htcleo.acdb. All files are in /etc/firmware Android's original default.acdb file is 129346 bytes. I don't know if any other different size versions are available.
Here is how I test: I call another phone which I hold to my ear with my hd2. I mute mic of the phone in my ear and put hd2 on the table. I talk or have some audio in the background such as tv or I hit my fingernails on the table or something. I turn speakerphone on the hd2 on and off and see if what I hear on the other phone on my ear get higher or not. OR you can call someone and ask them of course
History:
Normally Android uses default.acdb for audio/mic gain levels. htcleo.acdb is made by LeTama and newer kernels first look for htcleo.acdb and if it is not found fallback to default.acdb. This was made because mic gain is unacceptably high and prevents proper conversation with hd2 android. So many modern hd2 android roms use htcleo.acdb But I don't think every hd2 android rom chef knows about this. File sizes should always be checked. There is also a htcleo.acdb file made by iamgpc (125868 bytes) but it is always in high mic gain mode so you can't talk properly with it. I do not know why he created it.
LeTama says: (Author of the htcleo.acdb file that enables proper understandable conversation, but not properly functioning speakerphone)
The way I did htcleo.acdb was quite complex:
- I patched kernel audio driver to:
1) kill acdb switches in audio driver to avoid interference while extracting values
2) expose a sysfs variable to userland with acdb values.
- I wrote a userspace tool that:
1) Parse a template android acdb to get android acdb channels/bitrates.
2) loops on all acdb entries and get associated winmo values with sysfs kernel variable.
2) reconstruct htcleo.acdb by merging channels/bitrates/values.
With all these, I boot android from haret on SD, get winmo values and generates the acdb with the tools.
As you can see, it's a bit tricky, I can provide you patches and source code, but it's a bit rough and patch is against an old kernel, not sure it will go smoothly.
If you want only to patch htcleo.acdb with android values for some channels, I'd suggest writing a specific tool for that, it's far more easier. The android acdb file structure is quite straightforward if you don't have to interpret audio values and just want to copy entries.
But first, you'll need to identify which entry is used when going speaker mode, you probably need to add few traces in kernel audio driver.
.............
Frankly, I don't know if this can be fixed from htcleo.acdb by adjusting the values, or does kernel need modification, it would require traces to see if the kernel is using same acdb entries or separated ones. If it's separated, you could get speaker mode entries from android and patch them into htcleo.acdb. If it's not, kernel modification is probably required.
.............
I have thought also about not enabling speakerphone once leading to missing data. It could be, however Cotulla told me that the acdb in winmo is initialized completely by spl, so values should be there. But who knows... Anyway, if you need advices on how to patch the acdb, let me know. I'll dig in my archive for the acdb rebuild userspace tool source, it could give you a good base to build a patch tool.
OP Note: LeTama doesn't have time for this matter, but he is willing to share what he did before.
iamgpc says:
MIC gain is not controlled by libaudio.so It is the part of kernel
-----------------
What needs to be done:
First we should find out if the kernel or the acdb file is the culprit. Does the LeTama's current acdb file have different gain values for normal and speakerphone, or are they the same? Does the kernel look for two different values for normal and speakerphone, or erraneously look for a single value?
What I think: Since the original default.acdb file comes with android and also does have equal levels with speakerphone and normal mode then I think current kernels must be wrongfully looking at the normal mode value for speakerphone?
Then fixing the kernel or acdb file whichever is needed.
I believe that finding where the speakerphone mic gain entry is in the acdb file and modifying the kernel code to make it look for this correct value for speakerphone mode, and using LeTama's htcleo.acdb file is the key. Better way would be disabling htcleo.acdb file in kernel and making kernel lower the value it reads from the default.acdb file when in normal mode. This way no rom chef knowledge would be required. (I am sure many chefs will forget/don't know the htcleo.acdb and use default.acdb file)
Note: I do not know if android has AGC (auto gain control) thing in kernel. It is possible that it is interfering with actual mic gain settings.
Unfortunately acdb file also affects audio playback volume, so while fixing background noise with LeTama's acdb file, you may be unhappy with the audio output volume, though it can be fixed with dsp manager or volume+ apps.
Note: LeTama's shared his tools on post 3.
The problem is fixed by mdebeljuh and jdivic. Check the opening sentences of this post.
For as long as I am using Android on my HD2, I suffer from high mic gain in normale mode (not speakerphone). This is really annoying, so I'd definitely love to see that last glitch to be fixed!
Hi there!
Here are the files, I included the kernel patch and the resulting q6audio.c. The patch has other crap in it, the only modification required is in q6audio.c. It was against a very old kernel, I'm not sure you can use it "as-is".
You also have the user space tool source and my script to compile it.
To dump values, you have to flash a working WinMo 6.5 to have winmo values in memory and launch android with Haret .
To use it, compile the kernel with the modification. It will somehow kill your audio as it won't set acdb to be able to dump acdb in memory untouched. The userspace tools expect to find a pure android default.acdb in the directory where it's launched, it will query kernel values, and remap it to a proper htcleo.acdb in /sdcard/acdb_out.acdb.
Good luck!
LeTama
Thanks for the support LeTama
Sent from my HTC HD2 using XDA App
+1 for this issue.
With or without htcleo file its way too loud.
Would love to have that fixed.
This issue deserves more attention. Bump.
+1
My wife's killing me after every call
Guys, if you have the high mic gain problem that means your rom doesn't include "LeTama's" htcleo.acdb file. (113910 bytes, check the file size, your rom chef might have just copied original default.acdb as htcleo.acdb)
Just download the attachment below and extract it. Copy the htcleo.acdb file you just extracted to /etc/firmware with rootexplorer or similar file manager and reboot.
Your calls will be OK by then and people won't complain. But speakerphone mode will also be low gain from now on. But since most of the time you are calling in normal mode, it is better to have htcleo.acdb in /etc/firmware
What about /system/etc/firmware? I saw this path in other threads about this problem?
I have that file in /etc/firmware and /system/etc/firmware but still mic is too loud.
Edit:
OK, overwrote your file with the existing one. Mic seems better now, thanks!
But for me, its still about 25% to loud
I am a bit curios... is this file in somehow involved in bluetooth playback or music output at all?
Trough all the testing I made the last days I am unsure if at least the bluetooth playback is a little bit worse now?
I would be glad if that were not confirmed
Thanks soooo much dude yeah.. love it. kool. i love ya =)
I think /etc/firmware and /system/etc/firmware are the same.
I am not sure about bluetooth or audio playback. acdb may possibly affect it but can you try reverting back to see and give feedback?
We really need to make this thread attract attention.
Its really hard to tell if you have to reboot your phone and have no real comparison.
I would need a second hd2
But more imported to me is that the mic is still about 25% too loud
Is there a way to tweak the file a bit more?
I have no programming knowledge.
I am really disappointed that no one cares about this problem
Sent from my HTC HD2 using XDA App
memin1857 said:
I am really disappointed that no one cares about this problem
Sent from my HTC HD2 using XDA App
Click to expand...
Click to collapse
ONE CARES? ONE CARES!?
I'm not the developer and my english is badly too. So I keep only my fingers crossed to make this perfect. I can not much do
codiak said:
What about /system/etc/firmware? I saw this path in other threads about this problem?
I have that file in /etc/firmware and /system/etc/firmware but still mic is too loud.
Edit:
OK, overwrote your file with the existing one. Mic seems better now, thanks!
But for me, its still about 25% to loud
I am a bit curios... is this file in somehow involved in bluetooth playback or music output at all?
Trough all the testing I made the last days I am unsure if at least the bluetooth playback is a little bit worse now?
I would be glad if that were not confirmed
Click to expand...
Click to collapse
on Android boot, /system partition is mounted and merged with "/" (root) which already contains the initramfs (the ramdisk provided with your kernel).
so just replacing the file in /system/etc/firmware and rebooting should remove and overwrite any clones thereof.
I'm really hoping for a fix on this as well!
Not a dev, but out of pure interest - is this the reason that voice commands seem to be so shaky? The wave form when using voice search looks like static half of the time, and it just doesn't hear anything the other half.
This happens on all Gingerbread Sense builds.
Why is this thread pinned it is completely rediclious.
I can make a thread to
[DEV] Fixing camera bugs
[DEV] Fixing PPP data on clk
[DEV] Fixing I2C code
etc...
This are bugs that are annoying for you and you try to track attention of the developers. Let the developers fix whatever they want what they find annoying. They are not here to fix your problem.
Thanks for doing this OP good luck!
jan-willem3 said:
Why is this thread pinned it is completely rediclious.
I can make a thread to
[DEV] Fixing camera bugs
[DEV] Fixing PPP data on clk
[DEV] Fixing I2C code
etc...
This are bugs that are annoying for you and you try to track attention of the developers. Let the developers fix whatever they want what they find annoying. They are not here to fix your problem.
Click to expand...
Click to collapse
WOW, you just prove that you’re not a developer that belongs to XDA. XDA is about helping others and not being selfish. I do hope you will change your attitude.
It is pinned (stickied) because this is last "major" problem left that happens on every rom. All other problems can be considered minor. Please stay on topic and don't discuss about things unrelated to the problem mentioned in first of this thread. This is not only my problem, every hd2 user has it. This is the best way to get a developers attention, it is the "developers" forum.
I asked noellenchris to make this sticky for some time to see if it will get attention from a developer. I thank him here for that since I believe he shares my belief that this thread is important for the hd2 android project. Sticky making is a decision of a forum moderator.
I edited the opening post to be more detailed and specific btw.
Which rx value to change in mixer path to increase in call volume?
I have tried to increase volume through mtweaks and Franco kernel however value don't stick and change back to default after some time.
Please help.
145 views and no help???
sanjay.2704 said:
145 views and no help
Click to expand...
Click to collapse
Hey Sanjay,
No idea whether you have solved the issue on your own since May but felt bad when I saw your post. The same thing had happened when I had problems with a Motorola Atrix 4G on this forum.....many views but no reply.
Anyways, this seems to be fairly common across, and this is from another post
To increase speaker volume "RX7 DIGITAL VOLUME" - change value from 84 to 87 or more.
To increase earpiece volume "RX0 DIGITAL VOLUME" - change it's value from 84 to 95 or more
To increase headphones volume - HPHL and HPHR - change values from 12 to 15.
Reboot and check.
Hope this helps. Cheers!
Charismagic said:
Hey Sanjay,
No idea whether you have solved the issue on your own since May but felt bad when I saw your post. The same thing had happened when I had problems with a Motorola Atrix 4G on this forum.....many views but no reply.
Anyways, this seems to be fairly common across, and this is from another post
To increase speaker volume "RX7 DIGITAL VOLUME" - change value from 84 to 87 or more.
To increase earpiece volume "RX0 DIGITAL VOLUME" - change it's value from 84 to 95 or more
To increase headphones volume - HPHL and HPHR - change values from 12 to 15.
Reboot and check.
Hope this helps. Cheers!
Click to expand...
Click to collapse
Thanks for response.. I solved my problem by changing the phone..
sanjay.2704 said:
Thanks for response.. I solved my problem by changing the phone..
Click to expand...
Click to collapse
:good: :laugh: Expected, after a point, I guess.
Hey all of you,
I have the [official] Lineage 17.1 flashed to my xz2 compact.
I want to increase the maximum volume for my headphones. Therefore I made changes in the mixer_paths....xml files, but nothing changed. So my questions are:
1. As there are 4 mixer_paths files (mixer_paths_i2s.xml, mixer_paths_qvr.xml, mixer_paths_skuk.xml, mixer_paths_tavil.xml), in which of them should I apply my changes?
2. Which changes do I have to apply? And where exactly?
I tried to increase values RX.. Digital Volume as well as DE.. Volume to 92, brought no changes. Also changes in <path name="headphones"> (also RX.. Digital Volume to 92) didn't change anything (all of the last things were tried in mixer_paths_tavil.xml).
Thanks for helping out
I found the volume to be to loud on my device. So I made this module. It just replaces the lineage OS mixer paths tavil file with one that has RX0 decreased from 84 to 70.
Just copy the file to your device, and use the install modules from storage option.
If you want your in-call volume to louder or quieter you can edit the number to your preferences.
I think RX0 is on line 418 in the mixer file.
No guarantee this will not break your phone. I'm just sharing my solution with the community in case someone else has the same issue I did.
This might work on other ROMs and devices, but I have not tested it on any. Post your experiences if you decide to give it a try.
If you decided to edit the file, I suggest changing the value by small increments and testing. I wouldn't increase it by more than 5 at a time. There is a real chance you could damage your speakers if you increase it to much. So don't say you weren't warned.
Mods: If this thread violates something, just delete it.
Credit to the Lineage OS team and Tech Karan for his youtube video on creating modules.