@@ -64,38 +64,33 @@ setup_kernel_check_point
6464func_lib_check_sudo
6565func_pipeline_export " $tplg " " type:capture & ${OPT_VAL['S']} "
6666
67- for round in $( seq 1 $round_cnt )
67+ for round in $( seq 1 " $round_cnt " )
6868do
6969 for idx in $( seq 0 $(( PIPELINE_COUNT - 1 )) )
7070 do
71- channel=$( func_pipeline_parse_value " $idx " channel)
72- rate=$( func_pipeline_parse_value " $idx " rate)
73- fmt=$( func_pipeline_parse_value " $idx " fmt)
74- dev=$( func_pipeline_parse_value " $idx " dev)
75- pcm=$( func_pipeline_parse_value " $idx " pcm)
76- type=$( func_pipeline_parse_value " $idx " type)
77- snd=$( func_pipeline_parse_value " $idx " snd)
78-
79- if [ ${OPT_VAL['F']} = ' 1' ]; then
80- fmt=$( func_pipeline_parse_value " $idx " fmts)
71+
72+ initialize_audio_params " $idx "
73+
74+ if [ " ${OPT_VAL['F']} " = ' 1' ]; then
75+ fmts=$( func_pipeline_parse_value " $idx " fmts)
8176 fi
8277
83- for fmt_elem in $fmt
78+ for fmt_elem in $fmts
8479 do
85- for i in $( seq 1 $loop_cnt )
80+ for i in $( seq 1 " $loop_cnt " )
8681 do
8782 dlogi " ===== Testing: (Round: $round /$round_cnt ) (PCM: $pcm [$dev ]<$type >) (Loop: $i /$loop_cnt ) ====="
8883 # get the output file
8984 if [[ -z $file_prefix ]]; then
9085 dlogi " no file prefix, use /dev/null as dummy capture output"
9186 file=/dev/null
9287 else
93- mkdir -p $out_dir
88+ mkdir -p " $out_dir "
9489 file=$out_dir /${file_prefix} _${dev} _${i} .wav
9590 dlogi " using $file as capture output"
9691 fi
9792
98- if ! arecord_opts -D" $dev " -r " $rate " -c " $channel " -f " $fmt_elem " -d $duration " $file " -v -q;
93+ if ! arecord_opts -D" $dev " -r " $rate " -c " $channel " -f " $fmt_elem " -d " $duration " " $file " -v -q;
9994 then
10095 func_lib_lsof_error_dump " $snd "
10196 die " arecord on PCM $dev failed at $i /$loop_cnt ."
0 commit comments