mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-11-05 09:48:03 +09:00
Non-interactive setting of audio added.
This commit is contained in:
parent
8555e8b524
commit
276370a1b1
14
raspi-config
14
raspi-config
@ -1230,11 +1230,15 @@ do_update() {
|
||||
}
|
||||
|
||||
do_audio() {
|
||||
AUDIO_OUT=$(whiptail --menu "Choose the audio output" 20 60 10 \
|
||||
"0" "Auto" \
|
||||
"1" "Force 3.5mm ('headphone') jack" \
|
||||
"2" "Force HDMI" \
|
||||
3>&1 1>&2 2>&3)
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
AUDIO_OUT=$(whiptail --menu "Choose the audio output" 20 60 10 \
|
||||
"0" "Auto" \
|
||||
"1" "Force 3.5mm ('headphone') jack" \
|
||||
"2" "Force HDMI" \
|
||||
3>&1 1>&2 2>&3)
|
||||
else
|
||||
AUDIO_OUT=$1
|
||||
fi
|
||||
if [ $? -eq 0 ]; then
|
||||
amixer cset numid=3 "$AUDIO_OUT"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user