Set minimum CPU frequency but only when playing audio. Possible? - Galaxy S 4 Q&A, Help & Troubleshooting

I have a GT-I9505 with this ROM and stock kernel. I noticed when I'm listening to music with the screen off the audio stutters sometimes when minimum CPU frequency is set to the lowest value of 384MHz. The stuttering is completely gone when I increase the min frequency to 594MHz in Kernel Adiutor. But from my understanding, increasing the minimum frequency may have a negative impact on battery life. Therefore I would like to only have it increase when I'm listening to music. Is it possible to control minimum CPU frequency in Tasker for example? Maybe I could create some profile which changes it when I open/close spotify or connect/disconnect headphones or something? Any ideas?

Never mind, I figured it out myself Here's what I did if anyone else needs it:
1. Create 2 CPU profiles in Kernel Adiutor: one with 384MHz min freq, and another with 594MHz min freq.
2. In Tasker create 2 tasks and add action to each: Plugin > Kernel Adiutor, and select different profile in each.
3. Create a Tasker profile with State > Hardware > Headset plugged.
4. Assign the 2 tasks as Enter and Exit tasks.
Now I have no more audio stuttering and battery life remains unaffected when I'm not listening to music

I've used the Google Play app SetCPU successfully on a few Android phones with root access.
Just need to set up the given music app profile settings and you're good to go.
I mostly use a powersave governor when the screen is off, which tends to cover most bases.

Related

[Q] Which tasker profiles do you use?

I am curious to find out what tasker profiles you use on your tablet? I have read how useful it is on a phone, i'm not so sure how useful it is on a tablet. I use it to randomly change wallpapers every hour and mute my a500 at night. Please feel free to post your profile or a link on instructions on how to use it so everyone can join in on the fun.
Only things i used to use it for on my phone was to turn GPS on/off depending on what app(s) I was using, and to automatically set my media volume to min or max depending on time of day (go to sleep to Pandora @ min, drive to/from work w/ Power Amp on max because my aux input jack is low volume)
Haven't really been tempted to use Tasker on my tablet yet, and I removed Tasker on my phone after grabbing a low voltage kernel which increased my battery life enough so I didn't need to worry about the GPS receiver battery drain.

[Q] Reduce minimum volume with a kernel

Hello,
I'm currently using the latest nightly of franco's brilliant kernel. Problem is, the minimum volume is far too high for me when I use my sensitive IEM headphones.
With faux's sound control I was able to use faux's app to put a negative headphone amp and thereby reduce the minimum volume.
Is there any way to set a negative amp via franco's kernel? I see that it is possible to set a positive amp in his app.
Thanks in advance

Audio gaps

Anyone else experiencing audio gaps while playing music with screen off?
App doesn't seem to matter (Play Music, N7, ...), Boeffla Sound enabled, Eargasm preset, no saturation prevention, no privacy mode, earphones and speaker boosted and optimised.
Any obvious suspects? Any hints anyone?
NB: Yes, I do use a custom kernel, but I can't tell who's the culprit, so I ask for others experiences to allow to find the cause of it.
husky69 said:
Anyone else experiencing audio gaps while playing music with screen off?
App doesn't seem to matter (Play Music, N7, ...), Boeffla Sound enabled, Eargasm preset, no saturation prevention, no privacy mode, earphones and speaker boosted and optimised.
Any obvious suspects? Any hints anyone?
NB: Yes, I do use a custom kernel, but I can't tell who's the culprit, so I ask for others experiences to allow to find the cause of it.
Click to expand...
Click to collapse
Hi
I do not know if this is related but since I installed Omni (coming from latest AOKP); I have issues with my Samsung HS3000 Bluetooth receiver, i use poweramp and I experience a lot of skips when playing music (poweramp is set to automatically turn off the screen after a few seconds); I increased buffer size, poweramp priority, bluetooth priority but the skips remain... Playing thru headphones directly plugged in is ok
Hey guys,
I've been having this issue as well, and I've managed to narrow down what's wrong, but still haven't been able to fix it or find out what's causing it. I'm using stock kernel with the latest nightly on a GS4 i9505.
The issue seems to be that the device is constantly going into Deep Sleep mode. Go into the Performance tab in Settings (unlock Developer Mode first, I think) and have a look at the Time In State data. Right now, for 12h of uptime, my phone is showing 8h of Deep Sleep, despite me using it as GPS and listening to Audiobooks for most of the work day. Even more, it's been happening while I am actually USING the device.
Additionally, it's reporting that my Max CPU speed is 0 MHz, with Min at 486 MHz. Any time I put the slider up to full (or anything, really), it forgets it and goes back down to 0. I've changed Governer and Scheduler, and even used other tweaking apps to control the kernel, but nothing seems to stick.
On the whole, I'd really not mind too much except I listen to audio books while I'm working/driving, and having it skip and stutter because the phone is struggling to process the audio is exceedingly frustrating.
Going to take a closer look around for this, now that I know what the issue is. Putting it up here so you guys can look as well.
Cheers.
BenG7 said:
Hi
I do not know if this is related but since I installed Omni (coming from latest AOKP); I have issues with my Samsung HS3000 Bluetooth receiver, i use poweramp and I experience a lot of skips when playing music (poweramp is set to automatically turn off the screen after a few seconds); I increased buffer size, poweramp priority, bluetooth priority but the skips remain... Playing thru headphones directly plugged in is ok
Click to expand...
Click to collapse
XD

[GUIDE] [DISCUSSION] (Fixing) the Audio Stuttering Bug

Here's a way to work around audio stuttering during music playback, on ROMs using kernels with core_ctl. Tested on LineageOS's and AospExtended's latest official builds on an A6020a40 (HW39), with Dolby Atmos enabled.
If audio playback is stuttering, set the CPU governors for both processors to "performance". Check if the stuttering goes away or decreases. If it does, change the governor "ondemand", and set "Minimum CPUs big" to 4 (found under Hotplug settings in Kernel Adiutor). This won't kill the stuttering issue entirely, but fix it to a considerable extent.
Of course, this thread has been marked as a discussion, so feel free to post your results here.
I set min offline cpu to 1 and it fixes shuttering issue. :good:
Droidge said:
After a little bit of experimentation on my A6020a40 S616 running scritch007/Shreps's LineageOS 14.1 20170317, I seem to have figured out a way to work around audio stuttering during music playback.
If audio playback is stuttering, set the CPU governors for both processors to "performance". Check if the stuttering goes away or decreases. If it does, change the governors to "interactive" or "ondemand", and note the results. If setting the governors to "performance" reduces stuttering, it has to do with how the kernel handles the phone's processors.
Of course, this thread has been marked as a discussion, so feel free to post your results here, and talk about what you think is causing the issue. Changing the governors is a drastic measure, but it works well for me when I use my phone for short bursts of time.
Click to expand...
Click to collapse
Playing with the minimum frequencies/online cores did the trick here...
You can set a more sensitive target_load for the lower frequencies too.

Android Auto sound tip

The first time I tried my S20 with Android Auto and Spotify I was disappointed with the sound quality in the car. The volume was much lower than other audio sources in the car and it just didn't sound good at all.
I had the equaliser settings on the phone set to my normal Custom settings that I use with headphones. That is a small +dB increase in the high frequency and low frequency.
I accidentally discovered that the +dB increase in the highest frequency band I had in my custom settings was having a weird effect via Android Auto. If that frequency was set to anywhere above 0dB, the whole volume level in the car dropped significantly. Putting this frequency setting back to 0dB and its like someone just massively turned up the volume. The same was not true for changing the low frequency setting in the equaliser - if I had the low frequency band boosted slightly there was no change to volume level. I have no idea why this is happening - very weird!
The car headunit I am using is a Volkswagen Discover Pro system. If don't know if the problem I was having is specific to the car headunit or not but if I get access to a different headunit I will see if the same thing happens.
So if you are having audio quality problems with Android auto, try leaving the equaliser on Normal or making sure the highest frequency band is set to 0dB.
With these settings, the sound quality I am getting with Android Auto is really good
UPDATE: I connected the phone to another headunit (in an Audi Q2) and the same thing happened.
Usefull post. Thank you !
Sent from my [device_name] using XDA-Developers Legacy app

Categories

Resources