From 58a7077ceeb5b8ec65c0bb1324c306087009773c Mon Sep 17 00:00:00 2001 From: "Hariprasad, Rajendra" Date: Sat, 15 Mar 2025 00:41:02 +0530 Subject: [PATCH] test-case/check-alsabat.sh: Select the first card for amixer contents Amixer, by default, looks for the first card, and in Amixer's view, the first card is always numbered 0. In the SoundWire configuration, card 0 is set to sof-probe, while card 1 is assigned to the actual sound card. Therefore, we are configuring it accordingly. Fixes: #1265 Signed-off-by: Hariprasad, Rajendra --- test-case/check-alsabat.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test-case/check-alsabat.sh b/test-case/check-alsabat.sh index e028db78..9aadb863 100755 --- a/test-case/check-alsabat.sh +++ b/test-case/check-alsabat.sh @@ -123,9 +123,11 @@ alsabat -P$pcm_p --standalone -n $frames -c $channel_p -r $rate -f $format -F $f # playback may have low latency, add one second delay to aviod recording zero at beginning. sleep 1 +# Select the first card +first_card_name=$(aplay -l | awk '/^card ([0-9]+)/ {print $3; exit}') # dump amixer contents always. # Good case amixer settings is for reference, bad case for debugging. -amixer contents > "$LOG_ROOT"/amixer_settings.txt +amixer -c "${first_card_name}" contents > "$LOG_ROOT"/amixer_settings.txt # We use different USB sound cards in CI, part of them only support 1 channel for capture, # so make the channel as an option and config it in alsabat-playback.csv