Fix audio device detection in non-English locale

This commit is contained in:
Simon Long 2020-06-01 10:31:11 +01:00
parent 0e776cc153
commit cdc9528163
2 changed files with 9 additions and 3 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
raspi-config (20200601) buster; urgency=medium
* Fix audio device check bug when used in non-English locale
-- Simon Long <simon@raspberrypi.com> Mon, 01 Jun 2020 10:28:35 +0100
raspi-config (20200515) buster; urgency=medium
* Update initial resize script

View File

@ -1594,9 +1594,9 @@ do_audio() {
else
ASPATH=$(getent passwd $USER | cut -d : -f 6)/.asoundrc
if [ "$INTERACTIVE" = True ]; then
CARD0=$(aplay -l | grep bcm2835 | grep "card 0" | cut -d [ -f 3 | cut -d ] -f 1 | cut -d ' ' -f 2-)
CARD1=$(aplay -l | grep bcm2835 | grep "card 1" | cut -d [ -f 3 | cut -d ] -f 1 | cut -d ' ' -f 2-)
CARD2=$(aplay -l | grep bcm2835 | grep "card 2" | cut -d [ -f 3 | cut -d ] -f 1 | cut -d ' ' -f 2-)
CARD0=$(LC_ALL=C aplay -l | grep bcm2835 | grep "card 0" | cut -d [ -f 3 | cut -d ] -f 1 | cut -d ' ' -f 2-)
CARD1=$(LC_ALL=C aplay -l | grep bcm2835 | grep "card 1" | cut -d [ -f 3 | cut -d ] -f 1 | cut -d ' ' -f 2-)
CARD2=$(LC_ALL=C aplay -l | grep bcm2835 | grep "card 2" | cut -d [ -f 3 | cut -d ] -f 1 | cut -d ' ' -f 2-)
if ! [ -z "$CARD2" ]; then
AUDIO_OUT=$(whiptail --menu "Choose the audio output" 20 60 10 \
"0" "$CARD0" \