From 0cc95e4d4ea96f167524089bab3969d5726e84ea Mon Sep 17 00:00:00 2001 From: yzyhk904 <86816519+yzyhk904@users.noreply.github.com> Date: Sun, 23 Jan 2022 17:18:11 +0900 Subject: [PATCH] Add files via upload Resampling quality changes from attenuation 140dB & length 320 to 160dB & 480. --- README.md | 2 +- customize.sh | 5 ++++- module.prop | 4 ++-- system.prop | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 09f796a..fe56eaa 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/customize.sh b/customize.sh index 2026cc3..ffdb133 100644 --- a/customize.sh +++ b/customize.sh @@ -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 diff --git a/module.prop b/module.prop index 3eec452..0d560d9 100644 --- a/module.prop +++ b/module.prop @@ -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.) \ No newline at end of file diff --git a/system.prop b/system.prop index 673d7be..714e4d8 100644 --- a/system.prop +++ b/system.prop @@ -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