Skip to content

Commit

Permalink
lib.sh: fix ipc4 firmware name
Browse files Browse the repository at this point in the history
The IPC4 firmware name for tgl/adl is dsp_basefw.bin,
but start from mtl, the firmware name is sof-PLATFORM.ri.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
  • Loading branch information
Chao Song committed Oct 20, 2022
1 parent d388738 commit 7254013
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -680,13 +680,26 @@ is_zephyr()
test "$znum" -gt 10
}

get_ipc4_fw_name()
{
local platf; platf=$(sof-dump-status.py -p)
case "$platf" in
tgl|adl)
printf "%s" "dsp_basefw.bin"
;;
*)
printf "%s" "sof-$platf.ri"
;;
esac
}

is_firmware_file_zephyr()
{
local firmware_name firmware_path znum platform
# get the FW name and path
# TODO: optimize this part after driver can expose the FW path to userspace via debugfs
if is_ipc4; then
firmware_name=dsp_basefw.bin
firmware_name=$(get_ipc4_fw_name)
fw_mod_para=/sys/module/snd_sof_pci/parameters/fw_path
if [ -s "$fw_mod_para" ]; then
firmware_path=$(cat $fw_mod_para)
Expand Down

0 comments on commit 7254013

Please sign in to comment.