-
Notifications
You must be signed in to change notification settings - Fork 324
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
Add get buffer ID to sink/src api #8433
Conversation
a444436
to
5079c2e
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.
Code looks good. The commit description is little light on the rationale. Is this enabling something, or is this just moving an attribute to a more correct place?
I'm a bit worried about the conceptual override where sink/src in theory allows to abstract the "id", while current SOF code has pretty specific semantics on the buffer id (e.g. using "IPC4_SINK_QUEUD_ID(buf_id)" macro on it). Nothing wrong with this itself, but I wonder if this is abstracted more (behind src/sink), should we documented the semantics better.
Btw, you have build errors in IPC3 targets in CI.
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.
I like the abstraction.
@@ -185,3 +185,9 @@ size_t sink_get_min_free_space(struct sof_sink *sink) | |||
{ | |||
return sink->min_free_space; | |||
} | |||
|
|||
uint32_t sink_get_id(struct sof_sink *sink) |
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.
These should be static inline. There is PR in flow for splitting header directories and we will be able to catch this in the correct folder i.e. for baseFW or module usage.
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.
static inline and put it tou sink_api.h and source_api.h accordingly.
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.
it is extension to current sink/src - we need feature match with current audio stream
i'll check if we can return sink/src part of id
working to fix |
@@ -47,7 +47,7 @@ extern struct tr_ctx buffer_tr; | |||
#define trace_buf_get_id(buf_ptr) ((buf_ptr)->pipeline_id) | |||
|
|||
/** \brief Retrieves subid (comp id) from the buffer */ | |||
#define trace_buf_get_subid(buf_ptr) ((buf_ptr)->id) | |||
#define buf_get_id(buf_ptr) ((buf_ptr)->stream.runtime_stream_params.id) |
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 the ID really a runtime parameter? Isn't it persistent?
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.
it is set once, not modified later. Anyway - in rutime
As it is a common parameter for all streams, no matter how buffers are implemented, so I put it to this container
But you're right, it the name of the container may be somehow misleading, I'll change it
Sorry, I do not understand this PR. The code seems to add a parameter that isn't used apart from for logging ant the description "fulfill all requirements" doesn't really clarify it either. Is logging the only reason to add this? |
@lyakh ??? |
I mean the second commit - an ID is added to source / sink and it doesn't seem to be used |
5079c2e
to
cb170d1
Compare
rebase only |
@lyakh it is used - in a PR mentioned above |
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.
PR looks good, but mandatory CI is failing again -> needs to be checked.
runtime_stream_params is a container for all parameters of a stream Add an API call to retrieve it Signed-off-by: Marcin Szkudlinski <[email protected]>
add get buffer ID to sink/src api Signed-off-by: Marcin Szkudlinski <[email protected]>
cb170d1
to
9bb6599
Compare
lets retry - the logs indicates some issues with test setup |
CI is green |
sink/src API should grow to fulfill all requirements
this PR adds stream ID to sink/src api