Skip to content

Commit b319db5

Browse files
committed
check-alsabat.sh: Fix shellcheck warnings
Fix `shellcheck` warinings in check-alsabat.sh Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
1 parent 1a82c40 commit b319db5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test-case/check-alsabat.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ function __upload_wav_file
102102

103103
# check the PCMs before alsabat test
104104
dlogi "check the PCMs before alsabat test"
105-
aplay -Dplug$pcm_p -d 1 /dev/zero -q || die "Failed to play on PCM: $pcm_p"
106-
arecord -Dplug$pcm_c -d 1 /dev/null -q || die "Failed to capture on PCM: $pcm_c"
105+
aplay "-Dplug${pcm_p}" -d 1 /dev/zero -q || die "Failed to play on PCM: ${pcm_p}"
106+
arecord "-Dplug${pcm_c}" -d 1 /dev/null -q || die "Failed to capture on PCM: ${pcm_c}"
107107

108108
# alsabat test
109109
# BT offload PCMs also support mono playback.
110110
dlogc "alsabat -P$pcm_p --standalone -n $frames -r $rate -c $channel_p -f $format -F $frequency -k $sigmak"
111-
alsabat -P$pcm_p --standalone -n $frames -c $channel_p -r $rate -f $format -F $frequency -k $sigmak & playPID=$!
111+
alsabat "-P${pcm_p}" --standalone -n "${frames}" -c "${channel_p}" -r "${rate}" -f "${format}" -F "${frequency}" -k "${sigmak}" & playPID=$!
112112

113113
# playback may have low latency, add one second delay to aviod recording zero at beginning.
114114
sleep 1
@@ -122,7 +122,7 @@ amixer -c "${first_card_name}" contents > "$LOG_ROOT"/amixer_settings.txt
122122
# We use different USB sound cards in CI, part of them only support 1 channel for capture,
123123
# so make the channel as an option and config it in alsabat-playback.csv
124124
dlogc "alsabat -C$pcm_c -c $channel_c -r $rate -f $format -F $frequency -k $sigmak"
125-
alsabat -C$pcm_c -c $channel_c -r $rate -f $format -F $frequency -k $sigmak || {
125+
alsabat "-C${pcm_c}" -c "${channel_c}" -r "${rate}" -f "${format}" -F "${frequency}" -k "${sigmak}" || {
126126
# upload failed wav file
127127
__upload_wav_file
128128
exit 1

0 commit comments

Comments
 (0)