Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Tuned tunables of I/O scheduler for reducing jitter
  • Loading branch information
yzyhk904 authored Aug 13, 2023
1 parent a5368af commit 0e741a4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Change logs

# v1.3.4
* Tuned tunables of I/O scheduler for reducing jitter

# v1.3.3
* Stopped Tensor device's AOC daemon for reducing significant jitter

Expand Down
38 changes: 16 additions & 22 deletions customize-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,14 @@ function replaceSystemProps_kona()

function replaceSystemProps_SDM845()
{
# Do nothing even if "usb-samplerate-unlocker" exists
:
sed -i \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=2750/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2750/' \
"$MODPATH/system.prop"
sed -i \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=2750/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2750/' \
"$MODPATH/system.prop-workaround"
}

function replaceSystemProps_SDM()
Expand All @@ -274,26 +280,14 @@ function replaceSystemProps_MTK_Dimensity()

function replaceSystemProps_Tensor()
{
local freq="96000"
if [ $# -gt 0 ]; then
freq="$1"
fi

if [ "$freq" -gt 96000 -o \
-e "${MODPATH%/*/*}/modules/usb-samplerate-unlocker" -o -e "${MODPATH%/*/*}/modules_update/usb-samplerate-unlocker" ]; then
sed -i \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=2625/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2625/' \
"$MODPATH/system.prop"
sed -i \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=2625/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2625/' \
"$MODPATH/system.prop-workaround"

loosenedMessage

fi

sed -i \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=2625/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2625/' \
"$MODPATH/system.prop"
sed -i \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=2625/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2625/' \
"$MODPATH/system.prop-workaround"
}

function replaceSystemProps_Others()
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-misc-settings
name=Audio misc. settings
version=v1.3.3
versionCode=1303
version=v1.3.4
versionCode=1304
author=zyhk
description=Setting audio misc. configuration values (e.g. 100 volume steps, raising the resampling quality, disabling the effects framework, etc.)

0 comments on commit 0e741a4

Please sign in to comment.