Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
* Added "--safest-auto" mode for automatic max. USB samplerate detection for old devices
* Fixed to adjust volume curve table links in an audio policy configuration template dynamically for avoiding miss-linking
  • Loading branch information
yzyhk904 authored Nov 13, 2024
1 parent a022bd6 commit cb1bb9d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Usage_Samples/Jitter/jitter-reducer_++io.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/system/bin/sh

MODDIR=${0%/*/*/*}
su -c "/system/bin/sh ${MODDIR}/extras/jitter-reducer.sh ++io --status"
4 changes: 4 additions & 0 deletions Usage_Samples/Jitter/jitter-reducer_--io-boost.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/system/bin/sh

MODDIR=${0%/*/*/*}
su -c "/system/bin/sh ${MODDIR}/extras/jitter-reducer.sh --io '*' boost --status"
5 changes: 4 additions & 1 deletion Usage_Samples/USB/USB__auto_max.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ case "`getprop ro.board.platform`" in
* )
if [ ! -e "/vendor/lib64/hw/audio.bluetooth.default.so" ]; then
# for old devices (under Android 10; various configurations)
Args="48k 16"
Args="--safest-auto"
elif [ "`getprop persist.bluetooth.bluetooth_audio_hal.disabled`" = "true" ]; then
# for legacy configuration devices (using "a2dp" legacy Bluetooth module)
Args="--safest-auto"
elif [ "`getprop ro.hardware.lights`" = "qcom" -o "`getprop ro.hardware`" = "qcom" ]; then
# for Qcom devices (Internal speaker: 384kHz 32bit; the USB HAL & the BT HAL driver: automatic max. detection for even non-HiRes. tracks)
Args="--bypass-offload 384k 32"
Expand Down
14 changes: 10 additions & 4 deletions extras/change-bluetooth-hal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ function reloadAudioserver()
if [ "`getprop sys.boot_completed`" = "1" -a -n "`getprop init.svc.audioserver`" ]; then
break
fi
sleep 0.9
sleep 1
done

if [ -n "`getprop init.svc.audioserver`" ]; then

setprop ctl.restart audioserver
sleep 0.2
if [ "`getprop init.svc.audioserver`" != "running" ]; then
Expand All @@ -52,13 +52,19 @@ function reloadAudioserver()
fi
done
fi
return 0

if [ $# -gt 0 -a "$1" = "all" -a -n "`getprop init.svc.vendor.audio-hal`" ]; then
setprop ctl.restart "vendor.audio-hal" 1>"/dev/null" 2>&1
sleep 0.2
if [ "`getprop init.svc.vendor.audio-hal`" != "running" ]; then
kill "`getprop init.svc_debug_pid.vendor.audio-hal`" 1>"/dev/null" 2>&1
fi
fi

else
echo "audioserver is not found!" 1>&2
return 1
fi

}

function BluetoothHalStatus()
Expand Down
2 changes: 1 addition & 1 deletion extras/jitter-reducer-functions.shlib
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ function getSchedulerNrRequests()
echo "86164"
;;
sdm8* )
echo "86173"
echo "86174"
;;
sdm* | msm* | sd* | exynos* )
echo "86172"
Expand Down

0 comments on commit cb1bb9d

Please sign in to comment.