Skip to content

Commit 250b755

Browse files
committed
lib.sh: Add log at reset_sof_volume
Add log message to `reset_sof_volume()`. Stop with `die` on incorrect ALSA tool the same way, as at the other places. Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
1 parent b0d4855 commit 250b755

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

case-lib/lib.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ set_sof_volume()
828828
tinymix -D"$device" set "$control_name" "$value"
829829
;;
830830
*)
831-
die "Unknown alsa tool $SOF_ALSA_TOOL"
831+
die "Unknown ALSA tool ${SOF_ALSA_TOOL}"
832832
;;
833833
esac
834834
}
@@ -847,7 +847,7 @@ get_sof_controls()
847847
tinymix --card "$sofcard" controls
848848
;;
849849
*)
850-
die "Unknown alsa tool $SOF_ALSA_TOOL"
850+
die "Unknown ALSA tool ${SOF_ALSA_TOOL}"
851851
;;
852852
esac
853853
}
@@ -863,7 +863,7 @@ kill_play_record()
863863
pkill -9 tinyplay
864864
;;
865865
*)
866-
die "Unknown alsa tool $SOF_ALSA_TOOL"
866+
die "Unknown ALSA tool ${SOF_ALSA_TOOL}"
867867
;;
868868
esac
869869
}
@@ -888,7 +888,7 @@ check_alsa_tool_process()
888888
die "tinyplay process is terminated too early"
889889
;;
890890
*)
891-
die "Unknown alsa tool $SOF_ALSA_TOOL"
891+
die "Unknown ALSA tool ${SOF_ALSA_TOOL}"
892892
;;
893893
esac
894894
}
@@ -911,7 +911,7 @@ aplay_opts()
911911
# shellcheck disable=SC2086
912912
aplay $SOF_ALSA_OPTS $SOF_APLAY_OPTS "$@"
913913
else
914-
die "Unknown ALSA tool: $SOF_ALSA_TOOL"
914+
die "Unknown ALSA tool: ${SOF_ALSA_TOOL}"
915915
fi
916916
}
917917

@@ -930,7 +930,7 @@ arecord_opts()
930930
# shellcheck disable=SC2086
931931
arecord $SOF_ALSA_OPTS $SOF_ARECORD_OPTS "$@"
932932
else
933-
die "Unknown ALSA tool: $SOF_ALSA_TOOL"
933+
die "Unknown ALSA tool: ${SOF_ALSA_TOOL}"
934934
fi
935935
}
936936

@@ -1236,13 +1236,13 @@ reset_sof_volume()
12361236
get_sof_controls "0" | sed -e "s/^.*'\(.*\)'.*/\1/" |grep -E 'PGA|gain' |
12371237
while read -r mixer_name
12381238
do
1239+
dlogi "Reset volume to ${level_db} on ${mixer_name}"
12391240
if [[ "$SOF_ALSA_TOOL" = "alsa" ]]; then
12401241
amixer -Dhw:0 -- sset "$mixer_name" "$level_db"
1241-
elif [[ "$SOF_ALSA_TOOL" = "tinyalsa" ]]; then
1242+
elif [[ "$SOF_ALSA_TOOL" = "tinyalsa" ]]; then
12421243
tinymix -D0 set "$mixer_name" "$level_db"
12431244
else
1244-
echo "Unknown alsa tool $SOF_ALSA_TOOL"
1245-
break
1245+
die "Unknown ALSA tool ${SOF_ALSA_TOOL}"
12461246
fi
12471247
done
12481248
}

0 commit comments

Comments
 (0)