Migrate audio menu logic to appmenu and add indicator for current out device

This commit is contained in:
Miles Alan 2020-05-26 18:03:43 -05:00
parent e7032a4f7f
commit 3c1fbd9e8d
3 changed files with 22 additions and 12 deletions

20
scripts/core/sxmo_audioout.sh Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env sh
ARG="$1"
SPEAKER="Line Out"
HEADPHONE="Headphone"
EARPIECE="Earpiece"
amixer set "$SPEAKER" mute
amixer set "$HEADPHONE" mute
amixer set "$EARPIECE" mute
if [[ "$ARG" = "Speaker" ]]; then
amixer set "$SPEAKER" unmute
elif [[ "$ARG" = "Headphones" ]]; then
amixer set "$HEADPHONE" unmute
elif [[ "$ARG" = "Earpiece" ]]; then
amixer set "$EARPIECE" unmute
fi
echo 1 > /tmp/sxmo_bar