Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
1. Added to disable the adaptive battery charging feature (esp. on Tensor devices)
2. Added some apps into the doze white-list
  • Loading branch information
yzyhk904 authored Jun 20, 2023
1 parent 088d535 commit 8b467d6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Audio jitter silencer
This module disables very large audio jitter generators (i.e., the adaptive battery draining management, the adaptive wireless connectivity management, and battery usage optimizations for audio related apps including system ones) for reducing audio jitter distortion effectively on all digital audio outputs (especially on bluetooth earphones) so that you could enjoy very hi-fi audio music without very short reverb or foggy sound like audio jitter distortion as much as possible in a simple manner.
This module disables very large audio jitter generators (i.e., the adaptive battery draining and charging management, the adaptive wireless connectivity management, and battery usage optimizations for audio related apps including system ones) for reducing audio jitter distortion effectively on all digital audio outputs (especially on bluetooth earphones) so that you could enjoy very hi-fi audio music without very short reverb or foggy sound like audio jitter distortion as much as possible in a simple manner.
<br/>

Audio jitter has two types that one is for phase variations of a master clock and the other is for frequency variations of an audio data stream (an actual audio data rate) via a PLL. Only the latter is considered here. The normalized amount of such audio jitter can be defined as the standard deviation of an actual audio data rate divided by its average data rate. For example, the expected average audio data rate of a 16bit 44.1kHz stereo track is 1.4112Mbps (16 x 44.1 x 2 / 1000). If the standard deviation is 15.0kbps, then the (normalized) jitter is 1.06%. If assuming the adaptive mode (defined in the USB audio standard) is used between a host device and a USB DAC, and the PLL in this DAC attenuates the jitter down-to 1/2 times (this is usual for less than 10 Hz jitter such as the Doze and the battery draining management generate), then the standard 1kHz sine test signal will have the standard deviation of 5.3 Hz. This is the audio jitter distortion caused by the variation of an actual audio data rate.
<br/>

Finally, if you follow my request regarding to disabling battery optimizations written in README's of my other tools (["Audio misc. settings"](https://github.com/Magisk-Modules-Alt-Repo/audio-misc-settings), ["USB_SampleRate_Changer"](https://github.com/yzyhk904/USB_SampleRate_Changer), ["Hifi maximizer"](https://github.com/yzyhk904/hifi-maximizer-mod)), this module isn't needed at all and you could disable them manually by yourself. In short, on behalf of those who don't like to read the README's in detail this module will disable them automatically (but not completely).
Finally, if you follow my request regarding to disabling battery optimizations written in README's of my other tools (["Audio misc. settings"](https://github.com/Magisk-Modules-Alt-Repo/audio-misc-settings), ["USB_SampleRate_Changer"](https://github.com/yzyhk904/USB_SampleRate_Changer), ["Hifi maximizer"](https://github.com/yzyhk904/hifi-maximizer-mod)), this module isn't needed at all and you could disable them manually by yourself. In short, on behalf of those who don't like to read the README's in detail this module will disable them automatically (but not completely). But additionally please manually uninstall "Digital Wellbeing" (system app; if it exists) itself or change "Battery usage" from "Optimized" to "Restricted" (this is very harmful for audio like camera servers) because this module cannot.
<br/>
<br/>

Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Change logs

# v1.0.3
* Added to disable the adaptive battery charging feature (esp. on Tensor devices)
* Added some apps into the doze white-list

# v1.0.0
* Initial Release

Expand Down
5 changes: 5 additions & 0 deletions doze-whitelist/audio-deviceidle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<wl n="com.android.launcher3" />
<wl n="com.android.messaging" />
<wl n="com.android.mtp" />
<wl n="com.android.musicfx" />
<wl n="com.android.networkstack" />
<wl n="com.android.networkstack.inprocess" />
<wl n="com.android.nfc" />
Expand Down Expand Up @@ -66,13 +67,16 @@
<wl n="com.extreamsd.usbaudioplayerpro" />
<wl n="com.facebook.orca" />
<wl n="com.google.android.GoogleCamera" />
<wl n="com.google.android.adservices.api" />
<wl n="com.google.android.apps.customization.pixel" />
<wl n="com.google.android.apps.nbu.files" />
<wl n="com.google.android.apps.nexuslauncher" />
<wl n="com.google.android.apps.restore" />
<wl n="com.google.android.apps.tachyon" />
<wl n="com.google.android.apps.wallpaper" />
<wl n="com.google.android.apps.wellbeing" />
<wl n="com.google.android.apps.youtube.music" />
<wl n="com.google.android.bluetooth" />
<wl n="com.google.android.ext.services" />
<wl n="com.google.android.ext.shared" />
<wl n="com.google.android.gms" />
Expand All @@ -82,6 +86,7 @@
<wl n="com.google.android.setupwizard" />
<wl n="com.google.android.webview" />
<wl n="com.google.ar.core" />
<wl n="com.google.pixel.livewallpaper" />
<wl n="com.jdcteam.buffcore" />
<wl n="com.maxmpz.audioplayer" />
<wl n="com.maxmpz.audioplayer.unlock" />
Expand Down
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=audio-jitter-silencer
name=Audio jitter silencer
version=v1.0.2
versionCode=1002
version=v1.0.3
versionCode=1003
author=zyhk
description=Disabling very large audio jitter generators (w.r.t. battery draining & optimizations, and wireless connectivity) for reducing audio jitter distortion on all digital audio outputs.
1 change: 1 addition & 0 deletions service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function waitBootCompletion()
function disableBatteryOptimizations()
{
settings put global adaptive_battery_management_enabled 0
settings put secure adaptive_charging_enabled 0
settings put secure adaptive_connectivity_enabled 0
settings put global wifi_suspend_optimizations_enabled 0
}
Expand Down
1 change: 1 addition & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function waitBootCompletion()
function enableBatteryOptimizations()
{
settings delete global adaptive_battery_management_enabled
settings delete secure adaptive_charging_enabled
settings delete secure adaptive_connectivity_enabled
settings delete global wifi_suspend_optimizations_enabled
}
Expand Down

0 comments on commit 8b467d6

Please sign in to comment.