Skip to content
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

ASRC: move to DRAM #9844

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

ASRC: move to DRAM #9844

wants to merge 3 commits into from

Conversation

lyakh
Copy link
Collaborator

@lyakh lyakh commented Feb 19, 2025

Move ASRC filter coefficients and some DRC functions to DRAM

Mark non-performance critical code with the __cold attribute.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
memory.h is required for __cold and __cold_rodata, add it.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Free SRAM by moving ASRC coefficients to DRAM and only copying the
single required array on demand.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Copy link
Contributor

@jsarha jsarha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -533,7 +560,7 @@ static enum asrc_error_code initialise_filter(struct comp_dev *dev,
/* Reset coefficients for possible exit with error. */
src_obj->filter_length = 0;
src_obj->num_filters = 0;
src_obj->polyphase_filters = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was never needed for anything else but to potentially find bugs where the filter is accessed uninitialized. For that purpose it could still be valid there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsarha it is now inside the asrc_free_polyphase_filter() function and I think it can be needed when called from asrc_set_fs_ratio()

@lyakh
Copy link
Collaborator Author

lyakh commented Feb 19, 2025

because of #9845 I cannot run-time test this, so perhaps it's better to not merge it before it's been tested

@lyakh
Copy link
Collaborator Author

lyakh commented Feb 21, 2025

Waiting for thesofproject/linux#5335 to be merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants