Skip to content

Commit a21c389

Browse files
kv2019imarc-hb
authored andcommitted
test-case: test-speaker.sh: use -F to pass sample format
Unlike other alsa-utils, -f is not used to pass sample format, but instead -F needs to be used. speaker-test also doesn't complain if a sample format is passed to -f, which makes this not so easy to catch (especially as S16_LE works with most PCMs). Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 6000b4e commit a21c389

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test-case/test-speaker.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ do
5050
sound_type="pink"
5151
fi
5252

53-
dlogc "speaker-test -D $dev -r $rate -c $channel -f $fmt -l $tcnt -t $sound_type -P 8"
54-
speaker-test -D "$dev" -r "$rate" -c "$channel" -f "$fmt" -l "$tcnt" -t "$sound_type" -P 8 2>&1 |tee "$LOG_ROOT"/result_"$idx".txt
53+
dlogc "speaker-test -D $dev -r $rate -c $channel -F $fmt -l $tcnt -t $sound_type -P 8"
54+
# note -F has different semantics than in other alsa-utils, and speaker-test(1)
55+
# man page does not cover this
56+
speaker-test -D "$dev" -r "$rate" -c "$channel" -F "$fmt" -l "$tcnt" -t "$sound_type" -P 8 2>&1 |tee "$LOG_ROOT"/result_"$idx".txt
5557
resultRet=${PIPESTATUS[0]}
5658

5759
if grep -nr -E "error|failed" "$LOG_ROOT"/result_"$idx".txt ||

0 commit comments

Comments
 (0)