Skip to content

Commit fb23962

Browse files
committed
module: cadence: use module memory APIs
Convert rmalloc and rballoc APIs to mod_alloc APIs. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 97e9037 commit fb23962

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/audio/module_adapter/module/cadence.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ static int cadence_codec_init(struct processing_module *mod)
293293
}
294294

295295
/* allocate memory for runtime set up config */
296-
codec->cfg.data = rmalloc(SOF_MEM_FLAG_USER,
297-
cfg->param_size);
296+
codec->cfg.data = mod_alloc_ext(mod, SOF_MEM_FLAG_USER,
297+
cfg->param_size, 0);
298298
if (!codec->cfg.data) {
299299
comp_err(dev, "failed to alloc runtime setup config");
300300
ret = -ENOMEM;
@@ -326,7 +326,7 @@ static int cadence_codec_init(struct processing_module *mod)
326326
return 0;
327327

328328
free_cfg2:
329-
rfree(codec->cfg.data);
329+
mod_free(mod, codec->cfg.data);
330330
free_cfg:
331331
rfree(setup_cfg->data);
332332
free:
@@ -866,7 +866,7 @@ static int cadence_codec_free(struct processing_module *mod)
866866
{
867867
struct cadence_codec_data *cd = module_get_private_data(mod);
868868

869-
rfree(cd->setup_cfg.data);
869+
mod_free(mod, cd->setup_cfg.data);
870870
mod_free_all(mod);
871871
rfree(cd->self);
872872
rfree(cd);

0 commit comments

Comments
 (0)