diff --git a/scripts/core/sxmo_audiocurrentdevice.sh b/scripts/core/sxmo_audiocurrentdevice.sh index ddef734..f3e3134 100755 --- a/scripts/core/sxmo_audiocurrentdevice.sh +++ b/scripts/core/sxmo_audiocurrentdevice.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh -${SPEAKER:-"Line Out"} -${HEADPHONE:-"Headphone"} -${EARPIECE:-"Earpiece"} +SPEAKER=${SPEAKER:-"Line Out"} +HEADPHONE=${HEADPHONE:-"Headphone"} +EARPIECE=${EARPIECE:-"Earpiece"} audiodevice() { amixer sget "$EARPIECE" | grep -qE '\[on\]' && echo "$EARPIECE" && return diff --git a/scripts/core/sxmo_audioout.sh b/scripts/core/sxmo_audioout.sh index 310f307..a06e9b8 100755 --- a/scripts/core/sxmo_audioout.sh +++ b/scripts/core/sxmo_audioout.sh @@ -5,9 +5,9 @@ ARG="$1" # shellcheck source=scripts/core/sxmo_common.sh . "$(dirname "$0")/sxmo_common.sh" -${SPEAKER:-"Line Out"} -${HEADPHONE:-"Headphone"} -${EARPIECE:-"Earpiece"} +SPEAKER="${SPEAKER:-"Line Out"}" +HEADPHONE="${HEADPHONE:-"Headphone"}" +EARPIECE="${EARPIECE:-"Earpiece"}" amixer set "$SPEAKER" mute amixer set "$HEADPHONE" mute