From 783eff8779a85b7b5a6baf697a658ab5ab9249ed Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Wed, 9 Sep 2020 03:25:19 +0100 Subject: [PATCH] Use logic from raspi-config to determine if bcm2835 routing option exists or not The snd_bcm2835.enable_compat_alsa option: enable_compat_alsa:Enables ALSA compatibility virtual audio device (bool) is off these days, since the beginning of 2020 apparently. Reference: raspi-config (20200120) buster; urgency=medium * Add audio switching for discrete internal ALSA devices -- Simon Long Mon, 20 Jan 2020 11:38:37 +0000 --- seeed-voicecard | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seeed-voicecard b/seeed-voicecard index f8c3986..79a3551 100755 --- a/seeed-voicecard +++ b/seeed-voicecard @@ -150,6 +150,6 @@ fi alsactl restore #Force 3.5mm ('headphone') jack -if [[ "$kernel_ver" =~ ^4\.*$ ]]; then +if aplay -l | grep -q "bcm2835 ALSA"; then amixer cset numid=3 1 || true fi