Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Resampling quality changes from attenuation 140dB & length 320 to 160dB & 480.
  • Loading branch information
yzyhk904 authored Jan 23, 2022
1 parent 0929dbb commit 0cc95e4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## A Magisk module for setting miscellaneous audio configuration values (media audio volume steps (100 steps), disabling the effects framework, raising resampling quality, etc.)

This module changes the number of steps in media volume to 100 steps (0.4~0.7dB per step), disables the effects framework (nearly direct low jitter audio pass), adjusts a USB trasfer period, and raises the resampling quality of AudioFlinger (the OS mixer) from the AOSP standard one (stop band attenuation 90dB & cut off 100% to Nyquist frequency) to a mastering quality (140db & 91%, i.e. no distortion in a real sense), and the bitrate limit of bluetooth codec SBC (dual channel mode) for EDR 2Mbps earphones to improve audio quality effectively in a simple manner.
This module changes the number of steps in media volume to 100 steps (0.4~0.7dB per step), disables the effects framework (nearly direct low jitter audio pass), adjusts a USB trasfer period, raises the resampling quality of AudioFlinger (the OS mixer) from the AOSP standard one (stop band attenuation 90dB & cut off 100% of Nyquist frequency) to a mastering quality (160db & 91%, i.e. no resampling distortion in a real sense even though the 160dB targeted attenuation is not accomplished in the AOSP implementation), and the bitrate limit of bluetooth codec SBC (dual channel mode) for EDR 2Mbps earphones, for improving audio quality effectively in a simple manner.

* This module has been Tested on LineageOS and ArrowOS ROM's, and phh GSI's (Android 10 & 11 & 12, Qualcomm & MediaTek SoC, and Arm32 & Arm64 combinations).

Expand Down
5 changes: 4 additions & 1 deletion customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
if "$IS64BIT"; then
:
else
sed -i 's/ro\.audio\.usb\.period_us=.*$/ro\.audio\.usb\.period_us=5600/' "$MODPATH/system.prop"
sed -i \
-e 's/ro\.audio\.usb\.period_us=.*$/ro\.audio\.usb\.period_us=5600/' \
-e 's/ro\.audio\.resampler\.psd\.halflength=.*$/ro\.audio\.resampler\.psd\.halflength=320/' \
"$MODPATH/system.prop"
fi
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=audio-misc-settings
name=Audio misc. settings
version=v1.0.2
versionCode=1002
version=v1.0.3
versionCode=1003
author=zyhk
description=Setting audio misc. configuration values (e.g. 100 volume steps, disabling the effects framwork, raising resampling quality, etc.)
4 changes: 2 additions & 2 deletions system.prop
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ ro.audio.usb.period_us=4000
persist.bluetooth.sbc_hd_higher_bitrate=1
af.resampler.quality=7
ro.audio.resampler.psd.enable_at_samplerate=44100
ro.audio.resampler.psd.stopband=140
ro.audio.resampler.psd.halflength=320
ro.audio.resampler.psd.stopband=160
ro.audio.resampler.psd.halflength=480
ro.audio.resampler.psd.cutoff_percent=91

0 comments on commit 0cc95e4

Please sign in to comment.