Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
1. Tuned the USB period size for Tensor devices (2625 usec to 2250 usec)
2. Fixed for Pixel 8's
  • Loading branch information
yzyhk904 authored Dec 31, 2023
1 parent 339fcef commit 6dcba7d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ For maximizing the audio fidelity, this module reduces less than 50Hz (more than

* See also my companion script ["USB_SampleRate_Changer"](https://github.com/yzyhk904/USB_SampleRate_Changer) to change the sample rate of the USB (HAL) audio class driver and a 3.5mm jack on the fly like Bluetooth LDAC or Windows mixer to enjoy high resolution sound or to reduce resampling distortion (actually pre-echo, ringing and intermodulation) ultimately.

* Tips: If you use "AirMusic" to transmit audio data, I recommend setting around 4601 msec additional delay to reduce jitter distortion on the AirMusic panel to display target device(s).
* Tips: If you use "AirMusic" to transmit audio data, I recommend setting around 4599 msec additional delay to reduce jitter distortion on the AirMusic panel to display target device(s).

* Note1: Please remember that this module will stop the thermal control (including CPU core controls, CPU hotplugs and thermal services), the "logd server" and the "camera server" (interfering jitter on audio outputs), disable SELinux enforcing mode and doze (battery saver while idling) on your device. If you like to enable these features, modify variables in "service.sh", respectively. Especially, note that the "Youtube" app became recetly to need the camera server for launching for some unexplained reason.

Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Change logs

# v2.5.4
* Tuned the USB period size for Tensor devices (2625 usec to 2250 usec)
* Fixed for Pixel 8's

# v2.5.3
* Changed the re-sampling parameters for Galaxy S4 to the general purpose ones (optimized for 3.5mm jack; not USB DAC's)
* Reduced I/O scheduling jitter on Tensor and SDM660 devices
Expand Down
16 changes: 8 additions & 8 deletions customize-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,12 @@ function replaceSystemProps_kona()
function replaceSystemProps_SDM845()
{
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/' \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=2500/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2500/' \
"$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/' \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=2500/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2500/' \
"$MODPATH/system.prop-workaround"
}

Expand All @@ -276,12 +276,12 @@ function replaceSystemProps_MTK_Dimensity()
function replaceSystemProps_Tensor()
{
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/' \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=2250/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2250/' \
"$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/' \
-e 's/vendor\.audio\.usb\.perio=.*$/vendor\.audio\.usb\.perio=2250/' \
-e 's/vendor\.audio\.usb\.out\.period_us=.*$/vendor\.audio\.usb\.out\.period_us=2250/' \
"$MODPATH/system.prop-workaround"
}

Expand Down
8 changes: 6 additions & 2 deletions jitter-reducer-functions.shlib
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,10 @@ function getSocModelName()
echo "$modelName"
return 0
;;
zuma )
echo "gs301"
return 0
;;
* )
case "`getprop ro.boot.hardware`" in
qcom )
Expand Down Expand Up @@ -1394,7 +1398,7 @@ function getSchedulerNrRequests()
echo "86163"
;;
sdm8* )
echo "86171"
echo "86167"
;;
sdm* | msm* | sd* | exynos* )
echo "86163"
Expand All @@ -1419,7 +1423,7 @@ function getSchedulerNrRequests()
echo "86163"
;;
sdm8* )
echo "86171"
echo "86167"
;;
sdm* | msm* | sd* | exynos* )
echo "86163"
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=hifi-maximizer-mod
name=Hifi Maximizer
version=v2.5.3
versionCode=2503
version=v2.5.4
versionCode=2504
author=zyhk
description=A module for maximizing the digital audio fidelity by reducing jitters on audio outputs (USB DACs, Bluetooth a2dp, DLNA, etc.)

0 comments on commit 6dcba7d

Please sign in to comment.