Skip to content

Commit

Permalink
test-case: test-speaker.sh: fix test for PCMs that only support 32bit
Browse files Browse the repository at this point in the history
The speaker-test "wav" test method supports only 48000Hz and
16bit files. If a topology has a PCM that does not support S16_LE,
a different speaker-test method must be used.

Signed-off-by: Kai Vehmanen <[email protected]>
  • Loading branch information
kv2019i authored and marc-hb committed Jan 24, 2024
1 parent 8341638 commit a7e28c8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test-case/test-speaker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,16 @@ do
dev=$(func_pipeline_parse_value "$idx" dev)
snd=$(func_pipeline_parse_value "$idx" snd)

# speaker-test only supports wav for 48 kHz test, pink noise works for all rates
if [ "$rate" = "48000" ]; then
#
# The default wav files for speaker-test are 48000Hz 16bit mono
# files. In this test, no alsa-lib plugin layer is used so the "wav" test
# method can be only be used if sampling rate and sample format
# match exactly. Channel count does NOT need to match, so we do not
# need to check for that here.
#
# Use "pink" test method for other audio configurations.
#
if [ "$rate" = "48000" ] && [ "$fmt" = "S16_LE" ]; then
sound_type="wav"
else
sound_type="pink"
Expand Down

0 comments on commit a7e28c8

Please sign in to comment.