ipc4: Fix queue ID extraction#10298
Conversation
tmleman
left a comment
There was a problem hiding this comment.
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.
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.
@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.