Skip to content

Pipeline Refactor - Take 2 Part 2#5381

Closed
ranj063 wants to merge 6 commits intothesofproject:topic/sof-devfrom
ranj063:fix/ppl_mgt_2
Closed

Pipeline Refactor - Take 2 Part 2#5381
ranj063 wants to merge 6 commits intothesofproject:topic/sof-devfrom
ranj063:fix/ppl_mgt_2

Conversation

@ranj063
Copy link
Collaborator

@ranj063 ranj063 commented Apr 2, 2025

No description provided.

ranj063 added 4 commits April 2, 2025 10:56
Define 3 new helper functions for setting up/freeing/unpreparing BE
pipelines. These will be used when the pipeline management is
refactored to set up/free widgets, routes and pipelines during BE DAI
prepare or hw_free.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add and define the prepare op for Intel ACE2.x platforms. For the
moment, the prepare_stream op is exactly the same as the params_stream
op. But it will be modified in the following patch when the pipeline
management is refactored.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Invoke the BE pipeline helper functions in the BE DAI prepare and hw_free
to ensure that all the widgets and routes belonging to the BE pipeline are
handled in the BE DAI ops. Add a new field in struct snd_sof_pipeline to
identify BE managed pipelines i.e. those that will managed by the BE DAI
ops. Lastly, modify the FE ops to make sure that the widgets/routes
belonging to these pipelines are skipped during setup/prepare/unprepare.
Note that the widget_ipc_prepare op handles all pipelines including
those managed by the BE DAI ops. This is because in order to prepare all
the widgets, the hw_params needs to be propagated along the list of
connected DAPM widgets in order from the source to the sink.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Now that all widgets/routes/pipelines are setup, triggered and freed in
the BE DAI ops, we can reuse the be_pipeline flag in struct
snd_sof_pipeline to skip triggering the BE pipelines in the PCM trigger.
So remove the skip_during_fe_trigger flag from struct sof_ipc4_pipeline.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranj063 can you ask validation to schedule a stress test on this PR using latest stable FW release. Thanks

@ranj063
Copy link
Collaborator Author

ranj063 commented Apr 8, 2025

SOFCI TEST

The mem_usage for a pipeline is updated when the widgets in the
pipeline are prepare. So, reset it when a widget in the pipeline is
unprepared. The ipc_unprepare for the pipeline widget might be called
multiple times when each widget associated with the pipeline is
unprepared and it is harmless.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@ranj063 ranj063 force-pushed the fix/ppl_mgt_2 branch 8 times, most recently from 993858d to 4992389 Compare April 16, 2025 16:43
squash me with earlier commits
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants