Skip to content

Commit 114f37b

Browse files
harajendgolowanow
authored andcommitted
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 <hariprasad.rajendra@intel.com>
1 parent f0f82d0 commit 114f37b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test-case/check-alsabat.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ alsabat -P$pcm_p --standalone -n $frames -c $channel_p -r $rate -f $format -F $f
123123
# playback may have low latency, add one second delay to aviod recording zero at beginning.
124124
sleep 1
125125

126+
# Select the first card
127+
first_card_name=$(aplay -l | awk '/^card ([0-9]+)/ {print $3; exit}')
126128
# dump amixer contents always.
127129
# Good case amixer settings is for reference, bad case for debugging.
128-
amixer contents > "$LOG_ROOT"/amixer_settings.txt
130+
amixer -c "${first_card_name}" contents > "$LOG_ROOT"/amixer_settings.txt
129131

130132
# We use different USB sound cards in CI, part of them only support 1 channel for capture,
131133
# so make the channel as an option and config it in alsabat-playback.csv

0 commit comments

Comments
 (0)