ASoC: SOF: IPC4: fix reversed pipeline trigger priority order - #5810
ASoC: SOF: IPC4: fix reversed pipeline trigger priority order#5810ujfalusi wants to merge 1 commit into
Conversation
The IPC4 definition of pipeline prioity is: 0 - highest priority 7 - lowest priority RUNNING should use ascending order (highest priority first), otherwise descending order (lowest priority first) should be used. Fixes: 4df7d6a ("ASoC: SOF: IPC4: sort pipeline based on priority") Cc: stable@vger.kernel.org Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
There was a problem hiding this comment.
Pull request overview
Fixes IPC4 pipeline trigger sorting to match the documented priority semantics (0 = highest, 7 = lowest) by using ascending order for RUNNING transitions and descending order for non-RUNNING transitions (e.g., PAUSED/RESET). This corrects the reversed ordering introduced by the prior priority-sorting change and aligns behavior with the IPC4 specification.
Changes:
- Adjust pipeline insertion ordering so
SOF_IPC4_PIPE_RUNNINGtriggers pipelines in ascending priority (highest first). - Adjust
SOF_IPC4_PIPE_PAUSEDandSOF_IPC4_PIPE_RESETto trigger pipelines in descending priority (lowest first). - Clarify the intended ordering with comments in the priority insertion helper.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kv2019i
left a comment
There was a problem hiding this comment.
The comment is misleading, but I think the order is intentionally this way and matches Intel reference code for IPC4. There is a delta how SOF FW handles this and this is discussed in the SOF FW PR thesofproject/sof#10868 (comment)
I don't think we should merge especially if we don't have plan to change the FW implementation.
The IPC4 definition of pipeline prioity is:
0 - highest priority
7 - lowest priority
RUNNING should use ascending order (highest priority first), otherwise descending order (lowest priority first) should be used.
Fixes: 4df7d6a ("ASoC: SOF: IPC4: sort pipeline based on priority")
Cc: stable@vger.kernel.org