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

[stable-v2.10] backport bugfixes PR9055 and PR9136 #9248

Merged

Conversation

kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Jun 20, 2024

Backport following fixes from SOF main:

1e0a9c2 dp: wait till dp thread stops in thread cancel
fe06ef7 tools: plugin: tplg: Fix a couple of memory leaks

ranj063 and others added 2 commits June 20, 2024 14:05
Free the memory allocated for tplg base and available input/output
formats when the topology is freed.

Signed-off-by: Ranjani Sridharan <[email protected]>
(cherry picked from commit 9b7fffd)
Signed-off-by: Kai Vehmanen <[email protected]>
There's a race posiibility in DP when stopping a pipeline:
 - dp starts processing
 - incoming IPC - pause the pipeline. IPC has higher priority
than DP, so DP is preempted
 - pipeline is stopping, module "reset" is called. Some of resources
may be freed here
 - when IPC finishes, DP thread continues processing

Sollution: wait for DP to finish processing and terminate DP thread
before calling "reset" method in module

To do this:
1) call "thread cancel" before calling "reset"reset
2) modify "thread cancel" to mark the thread to terminate and
execute k_thread_join()
3) terminated thread cannot be restarted, so thread creation must be
moved from "init" to "schedule". There's no need to reallocate memory
zephyr guarantees that resources may be re-used when a thread
is terminated.

Signed-off-by: Marcin Szkudlinski <[email protected]>
(cherry picked from commit 34957e7)
Signed-off-by: Kai Vehmanen <[email protected]>
@kv2019i
Copy link
Collaborator Author

kv2019i commented Jun 20, 2024

Known pause-resume fail in https://sof-ci.01.org/sofpr/PR9248/build5852/devicetest/index.html , known alsabat fails for LNL in https://sof-ci.01.org/sofpr/PR9248/build5851/devicetest/index.html. Rest looks good, so proceeding with merge.

@kv2019i kv2019i merged commit 7be6321 into thesofproject:stable-v2.10 Jun 20, 2024
35 of 44 checks passed
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