Skip to content

Commit 1f83b15

Browse files
Jyri Sarhalgirdwood
authored andcommitted
Audio: up_down_mixer: Memory, blob, and fast_get allocs to module API
Allocate all memory, blob handlers, and fast_get() buffers through module API mod_alloc() and friends. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 466a210 commit 1f83b15

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/audio/up_down_mixer/up_down_mixer.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <sof/audio/pipeline.h>
1212
#include <rtos/panic.h>
1313
#include <sof/ipc/msg.h>
14-
#include <rtos/alloc.h>
1514
#include <rtos/cache.h>
1615
#include <rtos/init.h>
1716
#include <sof/lib/notifier.h>
@@ -326,9 +325,9 @@ static int up_down_mixer_free(struct processing_module *mod)
326325
{
327326
struct up_down_mixer_data *cd = module_get_private_data(mod);
328327

329-
rfree(cd->buf_in);
330-
rfree(cd->buf_out);
331-
rfree(cd);
328+
mod_free(mod, cd->buf_in);
329+
mod_free(mod, cd->buf_out);
330+
mod_free(mod, cd);
332331

333332
return 0;
334333
}
@@ -342,16 +341,16 @@ static int up_down_mixer_init(struct processing_module *mod)
342341
struct up_down_mixer_data *cd;
343342
int ret;
344343

345-
cd = rzalloc(SOF_MEM_FLAG_USER, sizeof(*cd));
344+
cd = mod_zalloc(mod, sizeof(*cd));
346345
if (!cd) {
347346
comp_free(dev);
348347
return -ENOMEM;
349348
}
350349

351350
mod_data->private = cd;
352351

353-
cd->buf_in = rballoc(SOF_MEM_FLAG_USER, mod->priv.cfg.base_cfg.ibs);
354-
cd->buf_out = rballoc(SOF_MEM_FLAG_USER, mod->priv.cfg.base_cfg.obs);
352+
cd->buf_in = mod_balloc(mod, mod->priv.cfg.base_cfg.ibs);
353+
cd->buf_out = mod_balloc(mod, mod->priv.cfg.base_cfg.obs);
355354
if (!cd->buf_in || !cd->buf_out) {
356355
ret = -ENOMEM;
357356
goto err;

0 commit comments

Comments
 (0)