Non-interactive setting of audio added.

This commit is contained in:
spl 2017-01-10 18:15:43 +00:00
parent 8555e8b524
commit 276370a1b1

View File

@ -1230,11 +1230,15 @@ do_update() {
} }
do_audio() { do_audio() {
AUDIO_OUT=$(whiptail --menu "Choose the audio output" 20 60 10 \ if [ "$INTERACTIVE" = True ]; then
"0" "Auto" \ AUDIO_OUT=$(whiptail --menu "Choose the audio output" 20 60 10 \
"1" "Force 3.5mm ('headphone') jack" \ "0" "Auto" \
"2" "Force HDMI" \ "1" "Force 3.5mm ('headphone') jack" \
3>&1 1>&2 2>&3) "2" "Force HDMI" \
3>&1 1>&2 2>&3)
else
AUDIO_OUT=$1
fi
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
amixer cset numid=3 "$AUDIO_OUT" amixer cset numid=3 "$AUDIO_OUT"
fi fi