ipc4: handler: make error message more informative

<err> ipc: ipc4: 0 failed err 12
The above error isn't so informative.

Replace the target number with the actual IPC message names.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
Ranjani Sridharan 2022-10-19 15:51:25 -07:00 committed by Liam Girdwood
parent ce28e09bd3
commit 337bd8ea72
1 changed files with 4 additions and 3 deletions

View File

@ -1091,9 +1091,13 @@ void ipc_cmd(struct ipc_cmd_hdr *_hdr)
switch (target) { switch (target) {
case SOF_IPC4_MESSAGE_TARGET_FW_GEN_MSG: case SOF_IPC4_MESSAGE_TARGET_FW_GEN_MSG:
err = ipc4_process_glb_message(in); err = ipc4_process_glb_message(in);
if (err)
tr_err(&ipc_tr, "ipc4: FW_GEN_MSG failed with err %d", err);
break; break;
case SOF_IPC4_MESSAGE_TARGET_MODULE_MSG: case SOF_IPC4_MESSAGE_TARGET_MODULE_MSG:
err = ipc4_process_module_message(in); err = ipc4_process_module_message(in);
if (err)
tr_err(&ipc_tr, "ipc4: MODULE_MSG failed with err %d", err);
break; break;
default: default:
/* should not reach here as we only have 2 message types */ /* should not reach here as we only have 2 message types */
@ -1101,9 +1105,6 @@ void ipc_cmd(struct ipc_cmd_hdr *_hdr)
err = IPC4_UNKNOWN_MESSAGE_TYPE; err = IPC4_UNKNOWN_MESSAGE_TYPE;
} }
if (err)
tr_err(&ipc_tr, "ipc4: %d failed err %d", target, err);
/* FW sends an ipc message to host if request bit is clear */ /* FW sends an ipc message to host if request bit is clear */
if (in->primary.r.rsp == SOF_IPC4_MESSAGE_DIR_MSG_REQUEST) { if (in->primary.r.rsp == SOF_IPC4_MESSAGE_DIR_MSG_REQUEST) {
struct ipc *ipc = ipc_get(); struct ipc *ipc = ipc_get();