i now there is software volume limit for 2 reasons
first - when i tried diffrent rom version, the top sound level eas much higher
second- i copy one of the original ringtone to Pc and edit his voice level -- now i can hear my wallaby ringtone from miles
Thanx
all audio files have their own vol lvl
Hello to all,
I recently purchased the Galaxy S2 and flashed CM7 on to it only to find that there is a bug that causes the media volume slider to not behave properly when a headset is plugged in. It has nothing to do with the overall volume (as that is currently a hardware limitation) but rather it has to do with the way the media volume slider works with input from the volume keys.
When a headset is plugged in, the volume keys only respond up to 6/15 and after that there is no increase or decrease within the 6-15/15 range. This is a major inconvenience as you have to bring the volume all the way down to get any control.
Furthermore, the bug isn't only found when input is received from the volume keys but rather any input from the system is non-responsive.
I have been informed that the bug doesn't affect every user and so it makes me think whether or not the bug is caused by a hardware issue.
I ran a logcat and didn't see anything out of the ordinary when volume was being changed and that's where I am stumped!
Correct me if I am wrong but since Android is based off of the Linux Kernel, I assume it has ALSA built-in for audio management? If so, I wanted to see if ALSA has anything that can let me set how the ALSA mixer should scale the volume depending on the keys pressed.
I am new when it comes to development for Android and thought I would take a whack at fixing this issue since I don't want to bother major devs who are right now working on CM9.
So my question to all the developers here is: How does Android handle its audio when receiving commands to scale volume up and down through both hardware keys and software input?
Any help would be appreciated!
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A
If you can, try reflashing your ROM.
ANDROID does use a version of ALSA. Try installing MixGet. It accesses ALSA instead of the android mixer.
Cheers!
-M
XDA member since 2007
REQUIRES PERSEUS KERNEL 34.2 OR ABOVE
Disclaimer: I am not responsible for any damage this app may cause.
This app is now open sourced and is available at:
https://github.com/EternalMelody/HeadphoneAmpControl
This app allows the user to handily change Headphone Amplifier Levels. Root access is required for file permission changes to the following files:
-"/sys/class/misc/wolfson_control/headphone_left"
-"/sys/class/misc/wolfson_control/headphone_right"
Two launchers can be found in the app drawer. One launches the Control app, another launches an overlay dialog for quick amplification level changes.
App Guide:
-Balance L/R toggle: Toggles amplification level balance between the left and right channels. When checked, disables the right channel seekbar and copies the left channel amplification level value to the right channel.
-Main seekbars: Current amplification level values. The top one is left channel's, bottom one is right channel's. The minimum and maximum values are defined by "Min level" and "Max level".
Control App Guide:
-Min level seekbar: Minimum amplification level that is settable by the main seekbars. Cannot be higher than safety level or max level.
-Max level seekbar: Maximum amplification level that is settable by the main seekbars. Cannot be lower than safety level or min level.
-Toggle service (notification bar shortcut): Enables notification shortcut. Must be checked to enable safety level. Notification only appears when headset is currently plugged in.
-Toggle volume button hack: Automatically sets checked volume type to almost max. The volume buttons can then be used to directly adjust amp levels, depending on context. The seekbar determines amp level jump.
-Hack music volume: Enables volume button hack for music, media, video, and games volume
-Hack voice call volume: Enables volume button hack for voice call volume
-Hack ring volume: Enables volume button hack for call ringtone volume
-Safety level: When headset is plugged in the first time, the current amplification level is compared with the safety level. If current level is higher than the safety level, then the current level is lowered to the safety level.
Development made possible by help of:
-AndreiLux
Ok but...
First time that I'm first
Any explanation about what this mod does? Must be based on stock ROMS or AOSP/AOKP works too?
Re: [APP] HeadphoneAmpControl
Thanks for this, one of the handier features I've missed from the Voodoo days.
Memphis_ said:
First time that I'm first
Any explanation about what this mod does? Must be based on stock ROMS or AOSP/AOKP works too?
Click to expand...
Click to collapse
Check the Perseus kernel thread in original dev.
Perseus only works with Samsung-based ROMs, Andreilux just implemented a new audio engine & this app allows for on the fly headphone amp volume changes, either unified or broken down to left/right channels. Stweaks has the same functionality under the audio tab, but also does every other kernel tweak, & it's slow & janky.
Sent from my GT-N7100 using xda premium
Updated first post and app
Memphis_ said:
First time that I'm first
Any explanation about what this mod does? Must be based on stock ROMS or AOSP/AOKP works too?
Click to expand...
Click to collapse
What onslaught86 said. By the way, I see from your sig that you are using NEAK kernel. Would you mind trying whether or not my app works with that kernel? I'd appreciate it. Thanks.
EternalMelody said:
What onslaught86 said. By the way, I see from your sig that you are using NEAK kernel. Would you mind trying whether or not my app works with that kernel? I'd appreciate it. Thanks.
Click to expand...
Click to collapse
Nevermind, I tested it myself and it doesn't work on NEAK. They have different implementations of Boeffla Sound.
Volume button hack added
I've tried using this, but the problem is that I can't find a way to keep both volume notifications from popping up.
On top of that, each time the volume is changed, the system interprets it as if it were a headphone disconnect, and whatever you are playing stops playing. So either you have to disable that setting in all your apps and take the risk of blaring something if your headphones get unplugged, or just never adjust the volume.
Anyone know how to get around these problems? The first one is just an annoyance, but the second one makes it unusable for someone like me (who constantly adjusts the volume).
I use many headphones, so being able to control hiss would be nice. Perhaps it would be better to use profiles that are user selectable, and then use the digital control to make minor modifications?
anishannayya said:
I've tried using this, but the problem is that I can't find a way to keep both volume notifications from popping up.
On top of that, each time the volume is changed, the system interprets it as if it were a headphone disconnect, and whatever you are playing stops playing. So either you have to disable that setting in all your apps and take the risk of blaring something if your headphones get unplugged, or just never adjust the volume.
Anyone know how to get around these problems? The first one is just an annoyance, but the second one makes it unusable for someone like me (who constantly adjusts the volume).
I use many headphones, so being able to control hiss would be nice. Perhaps it would be better to use profiles that are user selectable, and then use the digital control to make minor modifications?
Click to expand...
Click to collapse
Unfortunately there's no easy way that I know of to get around the first problem with the volume button hack. If this functionality were to be embedded in a ROM then its possible but as an app it can only rely on volume change intents.
I can't reproduce the second problem though.
By the way, in the meantime, you can still use the app without the volume button hack.
Interesting. When ASOP is stable on our phone, I'm going to come back to this. If needed, I can make my own mods to make things work the way I want. Will share if that's the case. Hate manufacturer "features". Like stupid WIndows 8 and all the preinstalled Metro apps.
nice work
Awesome job thanks for all the hard work works great...I wish there something like for Bluetooth headsets for phones call I hate the low volume level on the note 2
Rockin it from my Macknote2
EternalMelody said:
Unfortunately there's no easy way that I know of to get around the first problem with the volume button hack. If this functionality were to be embedded in a ROM then its possible but as an app it can only rely on volume change intents.
I can't reproduce the second problem though.
By the way, in the meantime, you can still use the app without the volume button hack.
Click to expand...
Click to collapse
Hey EternalMelody,
First, thanks very much for this nice app. great job!
Regarding the quoted discussion, any chance that the first problem can be solved via an xposed framework module?
The second one can be reproduced if you use youtube and try to adjust the volume. I think it's because adjusting the volume is causing the headphone amp to jump to the foreground and sends youtube to the background so it automatically pauses.
Thanks, and keep up the good work! :good:
First of all, I wanna say thank you for this nice app
But there's one thing which I don't like.. The sliders for the Balance are too big and the circle is not at the end of the line :/ I managed to get rid of the to big circles with resizing them from 64x64 to 32x32. Now everything's fine(except that they're not at the end of the line, but that is hard to notice anyway. )
Would be great if you could fix that one
Great app, have been using it with Perseus for a long time now and it makes my Note2 the primary music player for me now.
Wonder if you'd consider making the app work with the NEAK kernel for Note 2 as well? I'd do it myself but i haven't a clue how to do it. I want to move away from TW roms and NEAK is the only kernel with Boeffla sound on AOSP as far as I know.
This app is now open sourced and is available at:
https://github.com/EternalMelody/HeadphoneAmpControl
Volume control of Blueooth is HELL on my Sony Z5 Compact.
step 2 is too low and step 3 is too loud (ARGHGHGH)
So i was thinking that maybe i could simply disable volume control and control them seperately ?
eg set the phone to eg 50% and then use the volume control on the speaker (Harman Kardon Onyx Studio 3)
if i plug in the phone using Minijack i can do this - but then its not wireless anymore.
what do to ?
any other solutions to the volume bug ?
PS. Ive tried installing a fine-tune volume app and its kind of messed up - works almost but then it doesn't after all ...
Montago said:
Volume control of Blueooth is HELL on my Sony Z5 Compact.
step 2 is too low and step 3 is too loud (ARGHGHGH)
So i was thinking that maybe i could simply disable volume control and control them seperately ?
eg set the phone to eg 50% and then use the volume control on the speaker (Harman Kardon Onyx Studio 3)
if i plug in the phone using Minijack i can do this - but then its not wireless anymore.
what do to ?
any other solutions to the volume bug ?
PS. Ive tried installing a fine-tune volume app and its kind of messed up - works almost but then it doesn't after all ...
Click to expand...
Click to collapse
You can override this without doing anything special in the Developer's Options
Ohhhh, the "disable absolute volume" option!
I will try it.
Thanks!!
I find I can't lower the notification volume and ringtone volume low enough.
Does anyone know how to change the volume steps? I have sound assistant but it only works for media volume...
I'm rooted if it helps and I've tried the AOSP based rom solution of changing the build prop but with no success.
Thanks for any help!
Have you tried "sound assistant" app. It is from Samsung and has function you are looking for.
Chaudhry69 said:
Have you tried "sound assistant" app. It is from Samsung and has function you are looking for.
Click to expand...
Click to collapse
If you check the original post you'll have your answer lol
EmRav said:
If you check the original post you'll have your answer lol
Click to expand...
Click to collapse
Ah my bad, don't know how I missed it. It is possible in two ways:
01- Get a custom kernel with volume modification support. I use a Galaxy S7edge with Surround sound, this makes the sound loud and more immersed but it has a drawback. The low threshold of volume is too high same as yours. I usually have a problem with the in-call earpiece audio which is too loud for me. I use MoroKernel and luckily a recent update brought the feature of MoroSound providing fine control over gains of 2-microphones, earpiece, and main speaker. You can also look for a kernel with such features for your device.
02- Manually modifying the sound configuration files. That is a bit difficult but good research with a bit of experimenting will eventually get you there.
Chaudhry69 said:
Ah my bad, don't know how I missed it. It is possible in two ways:
01- Get a custom kernel with volume modification support. I use a Galaxy S7edge with Surround sound, this makes the sound loud and more immersed but it has a drawback. The low threshold of volume is too high same as yours. I usually have a problem with the in-call earpiece audio which is too loud for me. I use MoroKernel and luckily a recent update brought the feature of MoroSound providing fine control over gains of 2-microphones, earpiece, and main speaker. You can also look for a kernel with such features for your device.
02- Manually modifying the sound configuration files. That is a bit difficult but good research with a bit of experimenting will eventually get you there.
Click to expand...
Click to collapse
Any chance you know how to mod the sound config files on an S21? Unfortunately there are no custom kernels yet for the Exynos version
EmRav said:
Any chance you know how to mod the sound config files on an S21? Unfortunately there are no custom kernels yet for the Exynos version
Click to expand...
Click to collapse
Yes, go to /etc/mixer-gains.xml and edit it. Drawback is your device entire volume range will be affected like for media and stuff. One more way and probably the more practical one just hit me.
Find your ringtone and notification tone from /system/media/audio/ or download them from google and use a software like Audacity or Adobe Audition to reduce their volume.
You reduce your phone's volume to the lowest and match pc's volume with it. Then reduce the audio gain in the software until you feel comfortable with it. Export it and use it.
For anyone interested. My solution ended up being the following, with my end goal being too optimize my audio with Dolby and have the volume still be lower (but optimized) on the phone speaker.
I tried a ton of different apps, a few magisk volume steps modules, ViperFX with Dolby and finally I found a good solution.
Turn off the default Dolby stuff on the phone.
Install Dolby Atmos ZTE A2019 PRO for magisk (google it and find it on GitHub).
Reboot.
Install JamesDSP from ZackPTG5's website.
Reboot.
Install Audio Modification library to use Dolby and JamesDSP at the same time.
Reboot.
Create a custom equalizer in Dolby and try max things out as much as possible with it still sounding great.
Open JamesDSP, go to Speaker, set limiter threshold to -5, go to post gain and set it to -10. Turn on the master switch. Leave everything else unless you want to change any Bluetooth or headphone settings. Hide the persistent JamesDSP notification.
Reboot.
Install Audio Compatibility module with all the recommended settings.
Reboot.
Result, Dolby Atmos handles all the audio, increases the volume, applies optimizations system wide. However because volume steps are tricky to change on this phone we are stuck with the phone speaker volume being too loud even on the lowest setting. JamesDSP lowers the volume to the built-in speakers but we still get the Atmos experience we want. Everything else I assume you want to be louder anyway, like Bluetooth and headphones.
Audio Modification Library makes James and Dolby work together.
Audio Compatibility Patch fixes some issues with certain apps not using the sound mods.
Success! You get Dolby Atmos everywhere, but it doesn't max out the phone speaker volume, but it will still max out everything else. Oh and you can also change whatever other settings you want in JamesDSP.