From a5223a23a649512affe2aca10eccfc442b5a5fd2 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Wed, 24 Apr 2024 17:12:17 -0700 Subject: [PATCH] Add dmic_switch_present() test Fixes #1176 Signed-off-by: Marc Herbert --- test-case/verify-kernel-boot-log.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test-case/verify-kernel-boot-log.sh b/test-case/verify-kernel-boot-log.sh index 7bf2c762..a5e0be18 100755 --- a/test-case/verify-kernel-boot-log.sh +++ b/test-case/verify-kernel-boot-log.sh @@ -50,6 +50,8 @@ main() esac sof-kernel-log-check.sh + + dmic_switch_present } wait_is_system_running() @@ -78,6 +80,22 @@ wait_is_system_running() die "Some services are not running correctly" } +# See: +# - https://github.com/thesofproject/sof/pull/8740 +# - https://github.com/thesofproject/sof-test/issues/1176 +# - Internal Intel issue #559 +dmic_switch_present() +{ + # No "DMIC Raw" => no switch => success! + arecord -l | grep -i 'sof.*dmic.*raw' || return 0 + + (set -x + # name= is hardcoded in /usr/share/alsa/ucm2/* + # This returns a non-zero error status on failure + amixer cget name='Dmic0 Capture Switch' + ) +} + show_daemons_session_display() {