Skip to content

Commit 2bb220f

Browse files
author
Jyri Sarha
committed
audio: cadence_ipc4: use tracked IPC message allocation
Use mod_ipc_msg_w_ext_init() instead of ipc_msg_w_ext_init() and mod_free() instead of ipc_msg_free() for the Cadence codec notification message. This ensures the IPC message is tracked as a MOD_RES_IPC_MSG resource with proper cleanup on module unload. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 9e5eebc commit 2bb220f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/audio/module_adapter/module/cadence_ipc4.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static struct ipc_msg *cadence_codec_notification_init(struct processing_module
230230
primary.r.type = SOF_IPC4_GLB_NOTIFICATION;
231231
primary.r.rsp = SOF_IPC4_MESSAGE_DIR_MSG_REQUEST;
232232
primary.r.msg_tgt = SOF_IPC4_MESSAGE_TARGET_FW_GEN_MSG;
233-
msg = ipc_msg_w_ext_init(primary.dat, 0, sizeof(*msg_module_data));
233+
msg = mod_ipc_msg_w_ext_init(mod, primary.dat, 0, sizeof(*msg_module_data));
234234
if (!msg)
235235
return NULL;
236236

@@ -349,7 +349,7 @@ static int cadence_codec_init(struct processing_module *mod)
349349
if (setup_cfg)
350350
mod_free(mod, setup_cfg->data);
351351
free_notification:
352-
ipc_msg_free(cd->msg);
352+
mod_free(mod, cd->msg);
353353
free_cd:
354354
mod_free(mod, cd);
355355

@@ -587,7 +587,7 @@ static int ipc4_cadence_codec_free(struct processing_module *mod)
587587
{
588588
struct cadence_codec_data *cd = module_get_private_data(mod);
589589

590-
ipc_msg_free(cd->msg);
590+
mod_free(mod, cd->msg);
591591

592592
return cadence_codec_free(mod);
593593
}

0 commit comments

Comments
 (0)