Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
sink / source API #7622
sink / source API #7622
Changes from 1 commit
e153d75
d92202b
b6a10bb
d93b0a4
b11045c
8e4ec75
0c025db
88af408
5fdf11e
b900d5e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
maybe annotate
audio_stream_params
with__sparse_cache
too instead of casting it out? Same forsink_init()
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.
no, it cannot be sparse. It is up to the implementation how to ensure coherency - This pointer may be uncached - if the queue is shared between cores like dp_queue
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.
@marcinszkudlinski in fact this is a bug. You call this function with an acquired object and you store a pointer to that acquired object permanently and then you use it outside of the object ownership scope. This will cause failures. Please fix in a follow up.
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.
In case of audio_stream handlers to sink/sources are __sparse
That implies that the handlers may be used when buffer is aquired, and only there
This is enforced by module_adapter and there's no danger here
The only concern is academic - we keep something that should not be used without lock.
At the moment we may think about shadowing audio_stream_params in sink/source structure as a temporary sollution (till comp_buffer/audio stream is still in use), this will cost some RAM.
Next implementation (dp_queue) will keep audio_stream_params in shared, never cached memory - no shadowing needed. Other upcoming implementations - like shared LL buffer - will be used exclusively by single core (so may be safely always cached - no shadowing needed).