From e1a0f8b6ad7376f5aabc70f9b9944991d648ea86 Mon Sep 17 00:00:00 2001 From: Keqiao Zhang Date: Wed, 2 Mar 2022 21:58:23 +0800 Subject: [PATCH 1/2] multiple-pause-resume: skip PAUSE/RELEASE test on Echo Reference pipeline Smart Amp playback pipeline and Echo Reference capture pipeline are interdependent, so random pause/release 1 or 2 of them will cause an invalid bug #4434. This patch filters out the Echo Reference capture pipeline for the pause/resume test, it's not a valid use case. Signed-off-by: Keqiao Zhang --- test-case/multiple-pause-resume.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-case/multiple-pause-resume.sh b/test-case/multiple-pause-resume.sh index 3751ccfd..f063f8e2 100755 --- a/test-case/multiple-pause-resume.sh +++ b/test-case/multiple-pause-resume.sh @@ -56,7 +56,7 @@ rnd_range=$((rnd_max - rnd_min)) [[ $rnd_range -le 0 ]] && dlogw "Error random range scope [ min:$rnd_min - max:$rnd_max ]" && exit 2 tplg=${OPT_VAL['t']} -func_pipeline_export "$tplg" "type:any" +func_pipeline_export "$tplg" "type:any & ~pcm:Amplifier Reference" logger_disabled || func_lib_start_log_collect From 39254c9f83a9e2824c653c3fcbe1e9c355c3b50b Mon Sep 17 00:00:00 2001 From: Keqiao Zhang Date: Thu, 3 Mar 2022 13:30:05 +0800 Subject: [PATCH 2/2] 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 --- test-case/multiple-pipeline.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test-case/multiple-pipeline.sh b/test-case/multiple-pipeline.sh index 92dc3786..214facf5 100755 --- a/test-case/multiple-pipeline.sh +++ b/test-case/multiple-pipeline.sh @@ -84,10 +84,15 @@ APP_LST['capture']='arecord_opts' DEV_LST['capture']='/dev/null' # define for load pipeline +# args: $1: playback or capture +# $2: optional filter func_run_pipeline_with_type() { + local direction="$1" + local opt_filter + [ -n "$2" ] && opt_filter="& $2" [[ $tmp_count -le 0 ]] && return - func_pipeline_export "$tplg" "type:$1" + func_pipeline_export "$tplg" "type:$direction $opt_filter" local -a idx_lst if [ ${OPT_VAL['r']} -eq 0 ]; then idx_lst=("$(seq 0 $((PIPELINE_COUNT - 1)))") @@ -105,7 +110,7 @@ func_run_pipeline_with_type() dlogi "Testing: $pcm [$dev]" - "${APP_LST[$1]}" -D "$dev" -c "$channel" -r "$rate" -f "$fmt" "${DEV_LST[$1]}" -q & + "${APP_LST[$direction]}" -D "$dev" -c "$channel" -r "$rate" -f "$fmt" "${DEV_LST[$direction]}" -q & : $((tmp_count--)) if [ "$tmp_count" -le 0 ]; then return 0; fi @@ -165,11 +170,11 @@ do 'p' | 'a') tmp_count=$max_count func_run_pipeline_with_type "playback" - func_run_pipeline_with_type "capture" + func_run_pipeline_with_type "capture" "~pcm:Amplifier Reference" ;; 'c') tmp_count=$max_count - func_run_pipeline_with_type "capture" + func_run_pipeline_with_type "capture" "~pcm:Amplifier Reference" func_run_pipeline_with_type "playback" ;; *)