-
Notifications
You must be signed in to change notification settings - Fork 318
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
Pipeline2.0 STEP2 - move hybrid buffering logic from comp_buffer to audio_buffer and partially place comp_buffer on top of audio_buffer #9299
Conversation
9dc5a15
to
502a0ec
Compare
502a0ec
to
2d8ee04
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.
@marcinszkudlinski I assume there will be a flag day when we enable the Kconfig for pipeline 2.0 and this PR is just a step to that day ?
@lgirdwood the flag is enabled for IPC4 platforms.
|
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.
Code looks good, ok to +1 once CI is clean. Some build warnings that need to be addressed like https://github.com/thesofproject/sof/actions/runs/10316722150/job/28559534467?pr=9299
1849e86
to
c7c2aec
Compare
fixin compilation in progress, there's still some work to do so DNM |
d57c4c8
to
0cbc166
Compare
memory leak fixed |
The input/output error in https://sof-ci.01.org/sofpr/PR9299/build7167/devicetest/index.html?model=LNLM_SDW_AIOC&testcase=check-capture-3times
|
SOFCI TEST EDIT: it's gone in https://sof-ci.01.org/sofpr/PR9299/build7192/devicetest/index.html; that newer run has only known issues... |
@lgirdwood @kv2019i can we proceed? |
@marcinszkudlinski Can you check Intel internal/quickbuild fail? That's the only thing holding back merge. |
@marcinszkudlinski Any update? |
@lgirdwood looks like there was a problem with FPGA testing, hopefully fixed |
cache operations are pointless when architecture is coherent Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
secondary buffer mechanism is a feature independent of a buffer implementation, therefore it should be located in a base class for all buffers this commit intentionally is not removing the same feature from comp_buffer nor trying to use it anywhere Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
in struct audio_buffer there was only one virtual method (free). There are probably more coming, so an ops structure is introduced. ring buffer which uses audio buffer as a base must adjust, including using of an audio_buffer_init procedure, what implies using audio_stream_params located in audio_buffer Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
comp_buffer, implemented in buffer.c file, should be kept in the buffers directory, together with all buffers Also it has been renamed to comp_buffer.c Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
comp_buffer is a legacy buffer, but currently is widely used in SOF. During transition to pipeline2.0 there's a need that comp_buffer expose a common API, as any other buffer Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
one variable have been forgotten during renaming dp_queue to ring_buffer Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
0cbc166
to
04bea35
Compare
@@ -128,7 +129,7 @@ endif() | |||
add_local_sources(sof | |||
component.c | |||
data_blob.c | |||
buffer.c | |||
buffers/comp_buffer.c |
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 can do this in the next PR if needed (as CI is good), but does it make sense to rename like other similar files to legacy-buffer.c ?
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.
legacy-buffer.c
looks as a good idea
also struct comp_buffer ==> struct legacy_buffer
it will be a clear sign that an API is depreciated
secondary_buffer->audio_stream_params = buffer->audio_stream_params; | ||
/* for performance reasons pointers to params are also kept in sink/src structures */ | ||
secondary_buffer->_sink_api.audio_stream_params = buffer->audio_stream_params; | ||
secondary_buffer->_source_api.audio_stream_params = buffer->audio_stream_params; |
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.
this seems to make 3 copies of stream parameters, so now we have 4 of them on the total? This seems really redundant. Is this a temporary situation until buffers are migrated to the new API? Maybe make one of them where it finally should be and use pointers at all other locations? TBH I'm a bit confused about the roadmap of the migration, how far we're into it and what is still left to do. @marcinszkudlinski maybe you could make a "feature" to explain the steps made so far, the current configuration (what types of buffers we currently have, what copying is done, etc.) and the roadmap?
Maybe like this? https://github.com/orgs/thesofproject/discussions/8645 I assumed this link was already there somewhere in the commit messages or PR description or source code comments but maybe it was missing. |
@lyakh @marc-hb and readable version I add "obsolete" node to old versions I'm doing pipeline2,0 in a "desing&implement" mode, so archeo drifts also a bit when new issues&possibilites come into my mind. Also, I roadmap would be handy. |
@marcinszkudlinski thanks, but is that outdated - I don't see it mentioning |
next steps would be to remove all access to comp_buffer except by 3APIs: audio_buffer / sink / source
Those APIs may of course get another functions during process