From cdc95281634f6c53867795186813eedfdccda177 Mon Sep 17 00:00:00 2001 From: Simon Long Date: Mon, 1 Jun 2020 10:31:11 +0100 Subject: [PATCH] Fix audio device detection in non-English locale --- debian/changelog | 6 ++++++ raspi-config | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 19ff9e2..5317b03 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +raspi-config (20200601) buster; urgency=medium + + * Fix audio device check bug when used in non-English locale + + -- Simon Long Mon, 01 Jun 2020 10:28:35 +0100 + raspi-config (20200515) buster; urgency=medium * Update initial resize script diff --git a/raspi-config b/raspi-config index d2c1230..6040236 100755 --- a/raspi-config +++ b/raspi-config @@ -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" \