-
Notifications
You must be signed in to change notification settings - Fork 357
Audio modules fixes #10752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Audio modules fixes #10752
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -315,15 +315,25 @@ static void asrc_release_buffers(struct processing_module *mod, struct asrc_farr | |
| static int asrc_free(struct processing_module *mod) | ||
| { | ||
| struct comp_data *cd = module_get_private_data(mod); | ||
| struct comp_dev *dev = mod->dev; | ||
|
|
||
| comp_dbg(dev, "entry"); | ||
| comp_info(mod->dev, "asrc_free() entry"); | ||
|
|
||
| if (!cd) | ||
| return 0; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can it be called with |
||
|
|
||
| mod_free(mod, cd->buf); | ||
| asrc_release_buffers(mod, cd->asrc_obj); | ||
| asrc_free_polyphase_filter(mod, cd->asrc_obj); | ||
| mod_free(mod, cd->asrc_obj); | ||
| cd->buf = NULL; | ||
|
|
||
| if (cd->asrc_obj) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same, can it be |
||
| asrc_release_buffers(mod, cd->asrc_obj); | ||
| asrc_free_polyphase_filter(mod, cd->asrc_obj); | ||
| mod_free(mod, cd->asrc_obj); | ||
| cd->asrc_obj = NULL; | ||
| } | ||
|
|
||
| mod_free(mod, cd); | ||
| module_set_private_data(mod, NULL); | ||
|
|
||
| return 0; | ||
| } | ||
|
|
||
|
|
@@ -862,12 +872,17 @@ static int asrc_reset(struct processing_module *mod) | |
| asrc_dai_stop_timestamp(cd); | ||
|
|
||
| /* Free the allocations those were done in prepare() */ | ||
| asrc_release_buffers(mod, cd->asrc_obj); | ||
| asrc_free_polyphase_filter(mod, cd->asrc_obj); | ||
| mod_free(mod, cd->asrc_obj); | ||
| mod_free(mod, cd->buf); | ||
| cd->asrc_obj = NULL; | ||
| cd->buf = NULL; | ||
| if (cd->asrc_obj) { | ||
| asrc_release_buffers(mod, cd->asrc_obj); | ||
| asrc_free_polyphase_filter(mod, cd->asrc_obj); | ||
| mod_free(mod, cd->asrc_obj); | ||
| cd->asrc_obj = NULL; | ||
| } | ||
|
|
||
| if (cd->buf) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same for the above 2 added checks |
||
| mod_free(mod, cd->buf); | ||
| cd->buf = NULL; | ||
| } | ||
|
|
||
| return 0; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have removed all function names from all logging on purpose, let's not start re-adding them. Function names are printed automatically by Zephyr.