Skip to content

Commit 1b03ff9

Browse files
Remove osp_detect()
This doesn't seem to work at all, makes the driver fail to install instead of helping it to work.
1 parent 5103be7 commit 1b03ff9

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

magiskmodule/common/install.sh

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,30 +77,11 @@ killall audioserver
7777

7878
ui_print " "
7979
ui_print " Patching existing audio_effects files..."
80-
osp_detect() {
81-
case "$1" in
82-
*.conf)
83-
SPACES=$(sed -n "/^output_session_processing {/,/^}/ {/^ *music {/p}" $1 | sed -r "s/( *).*/\1/")
84-
EFFECTS=$(sed -n "/^output_session_processing {/,/^}/ {/^$SPACES\music {/,/^$SPACES}/p}" $1 | grep -E "^$SPACES +[A-Za-z]+" | sed -r "s/( *.*) .*/\1/g")
85-
for EFFECT in ${EFFECTS}; do
86-
SPACES=$(sed -n "/^effects {/,/^}/ {/^ *$EFFECT {/p}" $1 | sed -r "s/( *).*/\1/")
87-
[ "$EFFECT" != "atmos" ] && sed -i "/^effects {/,/^}/ {/^$SPACES$EFFECT {/,/^$SPACES}/ s/^/#/g}" $1
88-
done
89-
;;
90-
*.xml)
91-
EFFECTS=$(sed -n "/^ *<postprocess>$/,/^ *<\/postprocess>$/ {/^ *<stream type=\"music\">$/,/^ *<\/stream>$/ {/<stream type=\"music\">/d; /<\/stream>/d; s/<apply effect=\"//g; s/\"\/>//g; p}}" $1)
92-
for EFFECT in ${EFFECTS}; do
93-
[ "$EFFECT" != "atmos" ] && sed -ri "s/^( *)<apply effect=\"$EFFECT\"\/>/\1<\!--<apply effect=\"$EFFECT\"\/>-->/" $1
94-
done
95-
;;
96-
esac
97-
}
9880
AUDIO_EFFECTS_FILES="$(find /system /vendor -type f -name "*audio_effects*.conf" -o -name "*audio_effects*.xml")"
9981
for ORIGINAL_FILE in $AUDIO_EFFECTS_FILES; do
10082
ui_print " Patching $ORIGINAL_FILE"
10183
FILE="$MODPATH$(echo "$ORIGINAL_FILE" | sed "s|^/vendor|/system/vendor|g")"
10284
cp_ch "$ORIGDIR$ORIGINAL_FILE" "$FILE"
103-
osp_detect "$FILE"
10485
case "$FILE" in
10586
*.conf)
10687
sed -i "/v4a_standard_fx {/,/}/d" "$FILE"

0 commit comments

Comments
 (0)