File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
33set -e
4+ set -o pipefail
45
56# #
67# # Case Name: check-audio-equalizer.sh
@@ -51,6 +52,11 @@ func_test_eq()
5152 local id=$1
5253 local conf=$2
5354 local double_quoted_id=\" " $id " \"
55+ local eq_last_conf=" /tmp/eq_last_conf_${sofcard} _${id} .txt"
56+ local ret=0
57+
58+ rm -f " $eq_last_conf "
59+ sof-ctl -Dhw:" $sofcard " -c name=" $double_quoted_id " | tail -n1 > " $eq_last_conf " || die " Failed to get equalizer config"
5460
5561 dlogc " sof-ctl -Dhw:$sofcard -c name=$double_quoted_id -s $conf "
5662 sof-ctl -Dhw:" $sofcard " -c name=" $double_quoted_id " -s " $conf " || {
@@ -59,10 +65,15 @@ func_test_eq()
5965 }
6066
6167 dlogc " $cmd -D $dev -f $fmt -c $channel -r $rate -d $duration $dummy_file "
62- $cmd -D " $dev " -f " $fmt " -c " $channel " -r " $rate " -d " $duration " " $dummy_file " || {
63- dloge " Equalizer test failure with $conf "
64- return 1
65- }
68+ $cmd -D " $dev " -f " $fmt " -c " $channel " -r " $rate " -d " $duration " " $dummy_file " || ret=$?
69+
70+ [ -r " $eq_last_conf " ] ||
71+ die " Failed to read equalizer config from $eq_last_conf "
72+
73+ sof-ctl -Dhw:" $sofcard " -c name=" $double_quoted_id " -s " $eq_last_conf " || die " Failed to restore equalizer config from $eq_last_conf "
74+
75+ [ " $ret " -eq 0 ] || return 1
76+
6677 sleep 1
6778}
6879
You can’t perform that action at this time.
0 commit comments