Uh oh!
There was an error while loading. Please reload this page.
ipc4: handler: maintain IPC set_pipeline_state order - #8504
Conversation
kv2019i
commented
Nov 20, 2023
This is a bit heavyweight approach, let's see how this fares in CI. Alternative approach would be to stop propagating pipeline triggers across pipelines in IPC4 (as in IPC4, host sends a separate IPC action to each pipe while in IPC3, only edge nodes of the graph are triggered and DSP traverses the graph to trigger connected pipes). |
RanderWang
left a comment
There was a problem hiding this comment.
If pipeline priority is set, can zephyr schedule pipeline by priority ?
plbossart
commented
Nov 21, 2023
scheduling for LL is not done at the pipeline level, the priority only defines the order in which LL modules will be handled. |
RanderWang
commented
Nov 21, 2023
For cSOF, pipeline is the basic schedule elements, not LL module (only pipeline calls schedule_task_init_ll, not module) . please check pipeline_task which triggers each module in the pipeline from source to sink. |
This will make no sense when LL and DP modules are mixed... Is there any advantage to define LL & DP in single pipeline ? Suggest to define them in different pipelines in topology. |
RanderWang
commented
Nov 21, 2023
As I know, pipeline2.0 is being prepared, maybe it change the game |
| ipc_cmd_err(&ipc_tr, "ipc4: fail with delayed trigger"); | ||
| return IPC4_FAILURE; | ||
| } | ||
| } |
There was a problem hiding this comment.
hmm, so that means that in your example the IPC thread might be delayed by up to 3 (or more for more pipelines) ms? I guess it won't break anything, but maybe at least mention this in the comment above?
There was a problem hiding this comment.
@lyakh Ack. I extended the comment to explain this, see updated patch.
kv2019i
commented
Nov 21, 2023
@plbossart wrote:
Ack on that. For LL tasks, we are using a single Zephyr thread per core, so we need to implement the expected behaviour within SOF LL scheduler logic, i.e. run the tasks in the priority order as requested by host when pipelines are set. And this is what also happens, so no problem here. |
kv2019i
commented
Nov 21, 2023
I pushed an alternative fix to this problem that avoids the delay in executing set_pipeline_states -> #8506 |
f4c2f25 to
b348002CompareFix a side-effect of commit 068f143 ("ipc4: handler: Use separate loops for pipeline state phases") where the order of pipeline triggers was changed when the trigger handling was delayed to the pipeline thread. If host asked for pipelines to be triggered in order 2, 1, 0, the actual trigger order might end up as 0, 1, 2 based on how LL scheduler runs the pipeline tasks (0 is run first). Fix the issue by adding a blocking wait to the IPC thread between each delayed trigger. Link: thesofproject#8481 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
b348002 to
c5d638aComparekv2019i
commented
Nov 22, 2023
V2 and V3:
|
kv2019i
commented
Nov 22, 2023
Dropped the title link to bug #8481 . This will help to avoid the dmic -ENODATA error seen in that case, but this change is required anyways for FW to comply to host requested pipeline trigger order. |
lyakh
left a comment
There was a problem hiding this comment.
a bit scary, but we don't have a better solution so far
kv2019i
commented
Nov 23, 2023
SOFCI TEST |
Fix a side-effect of commit 068f143 ("ipc4: handler: Use separate loops for pipeline state phases") where the order of pipeline triggers was changed when the trigger handling was delayed to the pipeline thread. If host asked for pipelines to be triggered in order 0, 1, 2, the actual trigger order might end up as 2, 1, 0 based on how the pipes were connected.
Fix the issue by adding a blocking wait to the IPC thread between each delayed trigger.
Link: #8481