Skip to content

Commit

Permalink
Add dmic_switch_present() test
Browse files Browse the repository at this point in the history
Fixes thesofproject#1176

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb committed Apr 25, 2024
1 parent 788852d commit a5223a2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test-case/verify-kernel-boot-log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ main()
esac

sof-kernel-log-check.sh

dmic_switch_present
}

wait_is_system_running()
Expand Down Expand Up @@ -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()
{
Expand Down

0 comments on commit a5223a2

Please sign in to comment.