Skip to content

Commit 96bca11

Browse files
keqiaozhangmarc-hb
authored andcommitted
multiple-pipeline: skip the Echo Reference pipeline in the test
In this case, if we test all capture pipelines at same time, but capture pipeline count is less than requested count defined by -c option, playback pipeline will be started to ensure requested number of pipelines are running in parallel. Considering this scenario, the capture pipeline count is less than requested count and the tplg contains both Smart Amp pipeline and Echo reference pipeline, if the Echo reference pipeline start first and Smart Amp pipeline start next, this will cause the ipc tx times out. This patch skips the Echo reference pipeline to avoid such case Signed-off-by: Keqiao Zhang <keqiao.zhang@intel.com>
1 parent 059e959 commit 96bca11

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

test-case/multiple-pipeline.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,15 @@ APP_LST['capture']='arecord_opts'
8484
DEV_LST['capture']='/dev/null'
8585

8686
# define for load pipeline
87+
# args: $1: playback or capture
88+
# $2: optional filter
8789
func_run_pipeline_with_type()
8890
{
91+
local direction="$1"
92+
local opt_filter
93+
[ -n "$2" ] && opt_filter="& $2"
8994
[[ $tmp_count -le 0 ]] && return
90-
func_pipeline_export "$tplg" "type:$1"
95+
func_pipeline_export "$tplg" "type:$direction $opt_filter"
9196
local -a idx_lst
9297
if [ ${OPT_VAL['r']} -eq 0 ]; then
9398
idx_lst=("$(seq 0 $((PIPELINE_COUNT - 1)))")
@@ -105,7 +110,7 @@ func_run_pipeline_with_type()
105110

106111
dlogi "Testing: $pcm [$dev]"
107112

108-
"${APP_LST[$1]}" -D "$dev" -c "$channel" -r "$rate" -f "$fmt" "${DEV_LST[$1]}" -q &
113+
"${APP_LST[$direction]}" -D "$dev" -c "$channel" -r "$rate" -f "$fmt" "${DEV_LST[$direction]}" -q &
109114

110115
: $((tmp_count--))
111116
if [ "$tmp_count" -le 0 ]; then return 0; fi
@@ -165,11 +170,11 @@ do
165170
'p' | 'a')
166171
tmp_count=$max_count
167172
func_run_pipeline_with_type "playback"
168-
func_run_pipeline_with_type "capture"
173+
func_run_pipeline_with_type "capture" "~pcm:Amplifier Reference"
169174
;;
170175
'c')
171176
tmp_count=$max_count
172-
func_run_pipeline_with_type "capture"
177+
func_run_pipeline_with_type "capture" "~pcm:Amplifier Reference"
173178
func_run_pipeline_with_type "playback"
174179
;;
175180
*)

0 commit comments

Comments
 (0)