Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions test-case/check-audio-equalizer.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -e
set -o pipefail

##
## Case Name: check-audio-equalizer.sh
Expand Down Expand Up @@ -51,6 +52,11 @@ func_test_eq()
local id=$1
local conf=$2
local double_quoted_id=\""$id"\"
local eq_last_conf="/tmp/eq_last_conf_${sofcard}_${id}.txt"
local ret=0

rm -f "$eq_last_conf"
sof-ctl -Dhw:"$sofcard" -c name="$double_quoted_id" | tail -n1 > "$eq_last_conf" || die "Failed to get equalizer config"

dlogc "sof-ctl -Dhw:$sofcard -c name=$double_quoted_id -s $conf"
sof-ctl -Dhw:"$sofcard" -c name="$double_quoted_id" -s "$conf" || {
Expand All @@ -59,10 +65,15 @@ func_test_eq()
}

dlogc "$cmd -D $dev -f $fmt -c $channel -r $rate -d $duration $dummy_file"
$cmd -D "$dev" -f "$fmt" -c "$channel" -r "$rate" -d "$duration" "$dummy_file" || {
dloge "Equalizer test failure with $conf"
return 1
}
$cmd -D "$dev" -f "$fmt" -c "$channel" -r "$rate" -d "$duration" "$dummy_file" || ret=$?

[ -r "$eq_last_conf" ] ||
die "Failed to read equalizer config from $eq_last_conf"

sof-ctl -Dhw:"$sofcard" -c name="$double_quoted_id" -s "$eq_last_conf" || die "Failed to restore equalizer config from $eq_last_conf"

[ "$ret" -eq 0 ] || return 1

sleep 1
}

Expand Down