-
Notifications
You must be signed in to change notification settings - Fork 321
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 module convert #8416
Asrc module convert #8416
Conversation
4223d49
to
f0ea479
Compare
src/audio/asrc/asrc_ipc3.c
Outdated
@@ -0,0 +1,1027 @@ | |||
// SPDX-License-Identifier: BSD-3-Clause |
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.
can we extract common code?
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.
Is there any else to extract? Thanks for pointing out in detail.
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.
@lyakh , we can use another PR to do the extraction and ipc3/ipc4 isolation, this PR can only focus on module convertion.
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.
40c21c2
to
128f2b3
Compare
9151025
to
cceaaa4
Compare
Add IPC4 DAI timestamp ops for ASRC. Signed-off-by: Andrula Song <[email protected]>
Add trigger ops in module_interface. Signed-off-by: Andrula Song <[email protected]>
Convert ASRC to module API and support ASRC IPC3 test with test bench. Signed-off-by: Andrula Song <[email protected]>
cceaaa4
to
35681ba
Compare
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.
@andrula-song , please change status to open, this PR should be done now.
SOFCI TEST |
src_obj->ring_buffers32[ch] = NULL; | ||
rfree(buf_32); |
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.
Interesting, was this a memory violation fix? Please explain and move to a separate commit.
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.
ah, it is because the comment from @lyakh #8416 (comment)
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.
OK fair enough!
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.
@singalsu the original order keeps a theoretical race window open: while you still have a pointer to a freed memory in a globally accessible persistent object, someone might access it at that time, causing a use-after-free bug scenario. Although we don't know any such specific possibilities here, but since we already have a temporary variable with that pointer, we could as well use it to protect against that race possibility. I.e.
free(obj->mem);
// if someone now accesses obj->mem, it's a use-after-free bug
obj->mem = NULL;
that one has a race window, whereas
x = obj->mem;
obj->mem = NULL;
free(x);
this one doesn't
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.
Thanks for elaborating @lyakh !
convert ASRC to module interface with IPC4.