-
Notifications
You must be signed in to change notification settings - Fork 349
ipc4: Fix queue ID extraction #10298
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
ipc4: Fix queue ID extraction #10298
Conversation
tmleman
left a 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.
The changes look okay, but please maintain the current standard regarding commit titles and descriptions.
softwarecki
left a 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.
This PR addresses the same kind of buffer-related confusion we discussed earlier. I still think the sink/source model offers clearer semantics, and I'd prefer separate ID retrieval functions aligned with that approach.
Also, the commit title is missing tags - please update it accordingly.
This is a follow-up to thesofproject#10257. This fixes all occurrences of incorrect use of IPC4_SRC_QUEUE_ID() and IPC4_SINK_QUEUE_ID(). IPC4_SRC_QUEUE_ID() expects buffer as a parameter and returns the queue ID of the module that produces data for that buffer. So from the buffer's point of view, such a module and queue is the source (hence the name IPC4_SRC_QUEUE_ID()), however, from the module's point of view, such a queue is a sink. That, unfortunately, makes it easy to make a mistake when deciding whether IPC4_SRC_QUEUE_ID() vs. IPC4_SINK_QUEUE_ID() should be used. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
0e29c12 to
2915193
Compare
Updated commit description. |
lgirdwood
left a 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.
@serhiy-katsyuba-intel good find, would be good to have this comment near the macro definition to help :)
This is a follow-up to #10257.
This fixes all occurrences of incorrect use of IPC4_SRC_QUEUE_ID() and IPC4_SINK_QUEUE_ID().
IPC4_SRC_QUEUE_ID() expects buffer as a parameter and returns the queue ID of the module that produces data for that buffer. So from the buffer's point of view, such a module and queue is the source (hence the name IPC4_SRC_QUEUE_ID()), however, from the module's point of view, such a queue is a sink. That, unfortunately, makes it easy to make a mistake
when deciding whether IPC4_SRC_QUEUE_ID() vs. IPC4_SINK_QUEUE_ID() should be used.