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

is_IPC4()
{
local ipc_type

ipcFile=/sys/module/snd_sof_pci/parameters/ipc_type
# If no /sys/module/snd_sof_pci/parameters/ipc_type exists
# the DUT is running IPC3 mode
[ -e "$ipcFile" ] || {
dlogi 'No /sys/module/snd_sof_pci/parameters/ipc_type, DUT runs IPC3 mode'
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
# 1: DUT runs IPC4 mode
ipc_type=$(cat $ipcFile)
if [ $ipc_type -eq 1 ]; then
dlogi "/sys/module/snd_sof_pci/parameters/ipc_type is ${ipc_type}, DUT runs 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.

Sorry, by "runs" does it mean "will run in?" Or does it mean it ran in IPC4 mode? Current tense is ambiguous here and below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi @greg-intel I modified the tense in #884 .
@plbossart Sorry, I mistook the repo . Already prepare a new PR from my own forked repo #884 , thx~

return 0
else
dlogi "/sys/module/snd_sof_pci/parameters/ipc_type is ${ipc_type}, DUT runs IPC3 mode"
return 1
fi
}

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

is_IPC4 && {
# 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'
dlogi 'SOF logs collection globally disabled because DUT runs IPC4 mode'
return 0
}

return 1
}

Expand Down