11#! /bin/bash
22
3- # ## WARNING: this file is 99% COPY/PASTE from multiple-pipeline-playback.sh! ###
4-
53# #
6- # # Case Name: Run multiple pipelines for capture
4+ # # Case Name: Run multiple pipelines for playback or capture
75# # Preconditions:
8- # # check-capture-10sec pass
6+ # # check-playback-10sec or check- capture-10sec pass
97# # Description:
108# # Pick up pipelines from TPLG file for max count
119# # Rule:
1210# # a. fill pipeline need match max count
13- # # b. fill pipeline type order: capture > playback
11+ # # b. Start filling either playback or capture depending on -f parameter
1412# # c. if pipeline in TPLG is not enough of count, max count is pipeline count
1513# # Case step:
1614# # 1. Parse TPLG file to get pipeline count to decide max count is parameter or pipeline count
17- # # 2. load capture for arecord to fill pipeline count
18- # # 3. load playback for aplay fill pipeline count
15+ # # 2/3 . load capture for arecord to fill pipeline count
16+ # # 2/ 3. load playback for aplay fill pipeline count
1917# # 4. wait for 0.5s for process already loaded
2018# # 5. check process status & process count
2119# # 6. wait for sleep time
@@ -35,6 +33,10 @@ OPT_PARM_lst['t']=1 OPT_VALUE_lst['t']="$TPLG"
3533OPT_OPT_lst[' c' ]=' count' OPT_DESC_lst[' c' ]=' test pipeline count'
3634OPT_PARM_lst[' c' ]=1 OPT_VALUE_lst[' c' ]=4
3735
36+ OPT_OPT_lst[' f' ]=' first'
37+ OPT_DESC_lst[' f' ]=' Fill either playback (p) or capture (c) first'
38+ OPT_PARM_lst[' f' ]=1 OPT_VALUE_lst[' f' ]=' p'
39+
3840OPT_OPT_lst[' w' ]=' wait' OPT_DESC_lst[' w' ]=' perpare wait time by sleep'
3941OPT_PARM_lst[' w' ]=1 OPT_VALUE_lst[' w' ]=5
4042
112114 dlogi " ===== Testing: (Loop: $i /$loop_cnt ) ====="
113115
114116 # start capture:
115- func_run_pipeline_with_type " capture"
116- func_run_pipeline_with_type " playback"
117+ f_arg=${OPT_VALUE_lst['f']}
118+ case " $f_arg " in
119+ ' p' )
120+ func_run_pipeline_with_type " playback"
121+ func_run_pipeline_with_type " capture"
122+ ;;
123+ ' c' )
124+ func_run_pipeline_with_type " capture"
125+ func_run_pipeline_with_type " playback"
126+ ;;
127+ * )
128+ die " Wrong -f argument $f_arg , see -h"
129+ esac
117130
118131 dlogi " pipeline start sleep 0.5s for device wakeup"
119132 sleep ${OPT_VALUE_lst['w']}
0 commit comments