Skip to content

Commit 540b71c

Browse files
authored
Add files via upload
Added "compatible Magisk-mirroring" message for incompatible Magisk variants
1 parent 9beeb2b commit 540b71c

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## A Magisk module for maximizing the digital audio fidelity by reducing jitters on audio outputs (USB DACs, Bluetooth a2dp, DLNA, etc.)
22

3-
So many music lovers abandon audio quality on smart phones and DAP's by believing its causes are delivered from analog components. However, the most crucial cuase of it is actually less than 50Hz jitter (i.e., the standard deviation of actual audio data rate with a low-pass filter; usually converting into time-domain) on digital audio outputs that generates very short reverb or foggy sound like distortion on analog audio outputs. Although more than 50Hz (less than 20msec interval) jitter can be easily reduced under the hearable level by PLL (Phase Locked Loop) in DAC's, the other (especially less than 10Hz or more than 100msec interval) modulates and distorts audio outputs by fluctuating the master clock in a DAC through the PLL. For further explanation, see my another magisk module ["Audio jitter silencer"](https://github.com/Magisk-Modules-Alt-Repo/audio-jitter-silencer).
3+
So many music lovers abandon audio quality on smart phones and DAP's by believing its causes are delivered from analog components. However, the most crucial cuase of it is actually shorter than 50 Hz jitter (i.e., the standard deviation of actual audio data rate with a low-pass filter; usually converting into time-domain) on digital audio outputs that generates very short reverb or foggy sound like distortion on analog audio outputs. Although more than 50 Hz (shorter than 20 msec. interval) jitter can be easily reduced under the hearable level by a PLL (Phase Locked Loop) in DAC's, the other (especially less than 10 Hz or longer than 100 msec. interval) modulates and distorts audio outputs by fluctuating the master clock in a DAC through the PLL. For further explanation, see my another magisk module ["Audio jitter silencer"](https://github.com/Magisk-Modules-Alt-Repo/audio-jitter-silencer).
44

5-
For maximizing the audio fidelity, this module reduces less than 50Hz (more than 20msec interval) jitters on digital audio outputs by optimizing kenel tunables (CPU & GPU governors, thermal control, CPU hotplug, I/O scheduler, Virtual memory), Selinux mode, WIFI parameters, etc. as follows,
5+
For maximizing the audio fidelity, this module reduces less than 50 Hz (longer than 20 msec interval) jitters on digital audio outputs by optimizing kenel tunables (CPU & GPU governors, thermal control, CPU hotplug, I/O scheduler, Virtual memory), Selinux mode, WIFI parameters, etc. as follows,
66

77
* For Reducing Jitters:
88
<ol type="1">
@@ -64,7 +64,7 @@ For maximizing the audio fidelity, this module reduces less than 50Hz (more than
6464

6565
* Don't use Am@zon music using a much worse internal re-sampler which bypasses the mastering quality re-sampling in the OS mixer (audioFlinger). Other music streaming services don't use such an internal re-sampler, as far as I know.
6666

67-
* This module has been tested on LineageOS and ArrowOS ROM's, and phh GSI's (Android 10 ~ 13, Qualcomm & MediaTek SoC, and Arm32 & Arm64 combinations).
67+
* This module has been tested on LineageOS and crDroid ROM's, and phh GSI's (Android 10 ~ 14, Qualcomm & MediaTek SoC, and Arm32 & Arm64 combinations).
6868

6969
* Note: Entry class USB DAC's usually adopt an interface chip communicating with the adaptive mode or the synchronous one defined in the USB audio standard. As in these modes an Android host controller sends audio sampling rate clock signals to the DAC, jitter generated at the host side affects the audio quality of the DAC tremendously. Higher class DAC's communicate with the asynchronous mode (also defined in the standard) to a host controller, but they actually use a PLL to reduce jitter from the host not to stutter even in heavy jitter situations. As this result, they behave as the adaptive mode with a feedback loop to dynamically adjust the host side sampling clock signals while referring a DAC side clock in a real sense, so even with asynchronous mode they are more or less affected by host side jitter. You can see the mode of your USB DAC by opening "/proc/asound/card1/stream0" on your phone while playing music. Please see a word in parentheses at "Endpoint:" lines; "SYNC", "ADAPTIVE" or "ASYNC" means that your DAC uses "synchronous", "adaptive" or "asynchronous" mode to communicate to your phone, respectively. Moreover, almost all audio peripherals, e.g., bluetooth earphones, internal DAC's, network audio devices have a PLL in themselves and are affected by host side jitter for the same reason.
7070

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Change logs
22

3+
#v2.5.6
4+
* Added "compatible Magisk-mirroring" message for incompatible Magisk variants
5+
36
#v2.5.5
47
* Tuned the USB period size for SDM845 devices (2500 usec to 2250 usec)
58
* Tuned the USB period size for other devices (to 2250 usec)

customize-functions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,11 @@ function replaceSystemProps_kona()
234234
\( -e "${MODPATH%/*/*}/modules/usb-samplerate-unlocker" -o -e "${MODPATH%/*/*}/modules_update/usb-samplerate-unlocker" \) ]; then
235235
sed -i \
236236
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=20375/' \
237-
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=20375/' \
237+
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2750/' \
238238
"$MODPATH/system.prop"
239239
sed -i \
240240
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=20375/' \
241-
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=20375/' \
241+
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2750/' \
242242
"$MODPATH/system.prop-workaround"
243243

244244
loosenedMessage 192kHz

customize.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
#!/system/bin/sh
22

3+
[ -z "$(magisk --path)" ] && alias magisk='ksu-magisk'
4+
35
. "$MODPATH/customize-functions.sh"
46

57
if ! isMagiskMountCompatible; then
6-
abort " *** Aborted by an incompatible Magisk variant detection. Try again with pure Magisk! ***"
8+
abort ' ***
9+
Aborted by no Magisk-mirrors:
10+
Try again
11+
a.) with official Magisk (mounting mirrors)
12+
b.) after installing "compatible Magisk-mirroring" Magisk module
13+
***'
714
fi
815

916
MAGISKTMP="$(magisk --path)/.magisk"
@@ -200,5 +207,5 @@ if [ "$tensorFlag" -eq 1 -a -e "${MODPATH%/*/*}/modules/usb-samplerate-unlocke
200207
ui_print ""
201208
fi
202209

203-
rm -f "$MODPATH/customize-functions.sh"
210+
rm -f "$MODPATH/customize-functions.sh" "$MODPATH/LICENSE" "$MODPATH/README.md" "$MODPATH/changelog.md"
204211
rm -rf "$MODPATH/templates"

module.prop

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id=hifi-maximizer-mod
22
name=Hifi Maximizer
3-
version=v2.5.5
4-
versionCode=2505
3+
version=v2.5.6
4+
versionCode=2506
55
author=zyhk
66
description=A module for maximizing the digital audio fidelity by reducing jitters on audio outputs (USB DACs, Bluetooth a2dp, DLNA, etc.)

0 commit comments

Comments
 (0)