Merge pull request #284 from ponces/android-12.0-fix-distorted-audio

Disable soundvolume effect on Xiaomi Mi 11 Lite 5G
This commit is contained in:
Pierre-Hugues HUSSON 2021-12-02 22:53:13 +01:00 committed by GitHub
commit e9855ca82d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -184,3 +184,19 @@ if [ "$1" == "persist.sys.phh.backlight.scale" ];then
fi
exit
fi
if [ "$1" == "persist.sys.phh.disable_soundvolume_effect" ];then
if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then
exit 1
fi
if [[ "$prop_value" == 1 ]];then
mount /system/phh/empty /vendor/lib/soundfx/libvolumelistener.so
mount /system/phh/empty /vendor/lib64/soundfx/libvolumelistener.so
else
umount /vendor/lib/soundfx/libvolumelistener.so
umount /vendor/lib64/soundfx/libvolumelistener.so
fi
restartAudio
exit
fi

View File

@ -47,6 +47,9 @@ on property:persist.sys.phh.vsmart.dt2w=*
on property:persist.sys.phh.backlight.scale=*
exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.backlight.scale"
on property:persist.sys.phh.disable_soundvolume_effect=*
exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.disable_soundvolume_effect"
on property:ro.sf.lcd_density=*
restart surfaceflinger