Skip to content

Commit

Permalink
module_adapter: free memory resource
Browse files Browse the repository at this point in the history
Since module-specific prepare API will be called every time on prepare
 of module_adapter (stream start trigger), the reset API should
free all memory that was allocated during the prepare API.

Signed-off-by: barry.jan <[email protected]>
(cherry picked from commit 6275d18)
  • Loading branch information
barry-waves authored and cujomalainey committed Feb 14, 2023
1 parent 714c6d4 commit e4f8104
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/audio/module_adapter/module/waves.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,12 @@ static int waves_codec_reset(struct processing_module *mod)
if (ret)
comp_err(dev, "waves_codec_reset() failed %d", ret);

if (codec->mpd.in_buff)
module_free_memory(mod, codec->mpd.in_buff);

if (codec->mpd.out_buff)
module_free_memory(mod, codec->mpd.out_buff);

comp_dbg(dev, "waves_codec_reset() done");
return ret;
}
Expand Down

0 comments on commit e4f8104

Please sign in to comment.