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
31 changes: 31 additions & 0 deletions case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,27 @@ is_zephyr()
test "$znum" -gt 10
}

ipc4_used()
{
local ipc_type
ipc_file=/sys/module/snd_sof_pci/parameters/ipc_type

# If /sys/module/snd_sof_pci/parameters/ipc_type does not exist
# the DUT is running IPC3 mode
ipc_type=$(cat $ipc_file) || {
return 1
}

# If /sys/module/snd_sof_pci/parameters/ipc_type exists
# If the value of file ipc_type is:
# 0: DUT runs IPC3 mode, ipc_used return 1(false)
# 1: DUT runs IPC4 mode, ipc4_used return 0(true)
[ $ipc_type -eq 1 ] || {
return 1
}
return 0
}

logger_disabled()
{
local ldcFile
Expand All @@ -481,6 +502,16 @@ logger_disabled()
return 0
fi

ipc4_used && {
# TODO:
# Need to remove disabling sof-logger
# after sof-logger support for IPC4 has been provided in the future
dlogi 'Currenly sof-logger is not supported when running IPC4 mode'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currenly should be Currently.

Sorry I didn't respond before the PR was merged.

dlogi 'SOF logs collection is globally disabled because DUT is running IPC4 mode'
return 0
}
dlogi 'DUT is running IPC3 mode'

return 1
}

Expand Down