Skip to content

Commit fe508fc

Browse files
author
Amery Song
committed
pipeline.sh: export proc pipeline info to test case
Signed-off-by: Amery Song <chao.song@intel.com>
1 parent 66d28ae commit fe508fc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

case-lib/pipeline.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11
#!/bin/bash
22

3+
# This function will evaluate pipeline parameter related shell code generated by
4+
# - sof-tplgreader.py (for SOF, pipeline parameters dumped from topology)
5+
# - sof-dump-status.py (for legacy HDA, pipeline paramters dumped from proc)
6+
# Args: $1: SOF topology path
7+
# $2: Pipeline filter in string form
8+
# Note: for legacy HDA, topology is not present, $1 will be empty.
39
func_pipeline_export()
410
{
11+
# For legacy HDA platform, there is no topology, we have to export pipeline
12+
# parameters from proc file system.
13+
is_sof_used || {
14+
filter_str="$2"
15+
dlogi "No SOF sound card found, exporting pipeline parameters from proc file system"
16+
tmp_pipeline_params=$(mktemp /tmp/pipeline-params.XXXXXXXX)
17+
sof-dump-status.py -e "$filter_str" > "$tmp_pipeline_params" ||
18+
die "Failed to export pipeline parameters from proc file system"
19+
source "$tmp_pipeline_params" || return 1
20+
rm "$tmp_pipeline_params"
21+
return 0
22+
}
23+
524
# no parameter input the function
625
if [ $# -lt 1 ]; then
726
die "Topology file name is not specified, unable to run command: $SCRIPT_NAME"

0 commit comments

Comments
 (0)