Skip to content

Commit

Permalink
llext: remove logging during module freeing
Browse files Browse the repository at this point in the history
When pipelines are destroyed, component drivers' .reset() and .free()
are called. If those drivers were loaded dynamically their memory is
then unmapped. But logging takes place in a low priority task, so it
is important that no logging is done from those methods.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh committed Jul 16, 2024
1 parent 9cc1afb commit ccd41ba
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
4 changes: 0 additions & 4 deletions src/audio/eq_iir/eq_iir.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ static int eq_iir_free(struct processing_module *mod)
{
struct comp_data *cd = module_get_private_data(mod);

comp_info(mod->dev, "eq_iir_free()");

eq_iir_free_delaylines(cd);
comp_data_blob_handler_free(cd->model_handler);

Expand Down Expand Up @@ -234,8 +232,6 @@ static int eq_iir_reset(struct processing_module *mod)
struct comp_data *cd = module_get_private_data(mod);
int i;

comp_info(mod->dev, "eq_iir_reset()");

eq_iir_free_delaylines(cd);

cd->eq_iir_func = NULL;
Expand Down
8 changes: 0 additions & 8 deletions src/audio/mixin_mixout/mixin_mixout.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,14 @@ static int mixout_init(struct processing_module *mod)
static int mixin_free(struct processing_module *mod)
{
struct mixin_data *md = module_get_private_data(mod);
struct comp_dev *dev = mod->dev;

comp_dbg(dev, "mixin_free()");
rfree(md);

return 0;
}

static int mixout_free(struct processing_module *mod)
{
comp_dbg(mod->dev, "mixout_free()");
rfree(module_get_private_data(mod));

return 0;
Expand Down Expand Up @@ -556,9 +553,6 @@ static int mixout_process(struct processing_module *mod,
static int mixin_reset(struct processing_module *mod)
{
struct mixin_data *mixin_data = module_get_private_data(mod);
struct comp_dev *dev = mod->dev;

comp_dbg(dev, "mixin_reset()");

mixin_data->mix = NULL;
mixin_data->gain_mix = NULL;
Expand All @@ -570,8 +564,6 @@ static int mixout_reset(struct processing_module *mod)
{
struct comp_dev *dev = mod->dev;

comp_dbg(dev, "mixout_reset()");

/* FIXME: move this to module_adapter_reset() */
if (dev->pipeline->source_comp->direction == SOF_IPC_STREAM_PLAYBACK) {
int i;
Expand Down
4 changes: 0 additions & 4 deletions src/samples/audio/smart_amp_test_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ static inline int smart_amp_get_config(struct processing_module *mod,

static int smart_amp_free(struct processing_module *mod)
{
LOG_DBG("smart_amp_free()");

#ifndef __SOF_MODULE_SERVICE_BUILD__
struct smart_amp_data *sad = module_get_private_data(mod);

Expand Down Expand Up @@ -322,8 +320,6 @@ static int smart_amp_process(struct processing_module *mod,

static int smart_amp_reset(struct processing_module *mod)
{
LOG_DBG("smart_amp_reset()");

return 0;
}

Expand Down

0 comments on commit ccd41ba

Please sign in to comment.