forked from Magisk-Modules-Alt-Repo/audio-misc-settings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
customize.sh
71 lines (60 loc) · 2.08 KB
/
customize.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/system/bin/sh
. "$MODPATH/customize-functions.sh"
REPLACE=""
# making patched ALSA utility and Tensor's offload libraries for "ro.audio.usb.period_us"
makeLibraries
# removing post-A13 (especially Tensor's) spatial audio flags in an audio configuration file for avoiding errors
deSpatializeAudioPolicyConfig "/vendor/etc/bluetooth_audio_policy_configuration_7_0.xml"
# disabling pre-installed Moto Dolby faetures and Wellbeing for reducing very large jitter caused by them
disablePrivApps "
/system_ext/priv-app/MotoDolbyDax3
/system_ext/priv-app/MotorolaSettingsProvider
/system_ext/priv-app/daxService
/system_ext/priv-app/DaxUI
/system_ext/app/MotoSignatureApp
/product/priv-app/WellbeingPrebuilt
/product/priv-app/Wellbeing
/system_ext/priv-app/WellbeingPrebuilt
/system_ext/priv-app/Wellbeing
"
if "$IS64BIT"; then
board="`getprop ro.board.platform`"
case "$board" in
"kona" | "kalama" | "shima" | "yupik" )
replaceSystemProps_Kona
;;
"sdm845" )
replaceSystemProps_SDM845
;;
gs* )
replaceSystemProps_Tensor
;;
"sdm660" | "bengal" | "holi" )
replaceSystemProps_SDM
;;
mt68* )
replaceSystemProps_MTK_Dimensity
;;
mt67[56]? )
replaceSystemProps_Others
;;
* )
replaceSystemProps_Others
;;
esac
else
if [ "`getprop ro.build.product`" = "jfltexx" ]; then
replaceSystemProps_S4
else
replaceSystemProps_Old
fi
fi
# AudioFlinger's resampler has a bug on an Android OS of which version is less than 12.
# This bug makes the resampler to distort audible audio output by wrong aliasing processing
# when specifying a transition band around or higher than the Nyquist frequency
if [ "`getprop ro.system.build.version.release`" -lt "12" -a "`getprop ro.system.build.date.utc`" -lt "1648632000" ]; then
mv -f "$MODPATH/system.prop-workaround" "$MODPATH/system.prop"
else
rm -f "$MODPATH/system.prop-workaround"
fi
rm -f "$MODPATH/customize-functions.sh"