Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASoC: SOF: sof-audio: Modify the order of widget set up
IPC4 expects the pipelines to be triggered in the order starting from the sink to the source. The order of triggering pipelines during start is determined by the order in which the widgets are set up. Today, we set up the widgets in the order from source->sink and save the pipelines that the widgets belong to in a list. This list is later traversed in the reverse order for triggering the pipelines. Instead of this, this patch proposes to change the order of widget set up from sink->source so that the pipelines will be added to the list in the same order as well. The FW can handle widgets getting set up in any order (source->sink or sink->source). So reversing the current order will not affect functionality. This change is particularly important in cases where there are 2 DAIs in the topology connected to the same host copier as in the case of AEC with reference capture. SSP DAI copier (Pipeline 0) -> AEC module -> host-copier (Pipeline 2) ^ | DMIC DAI copier (Pipeline 1) In this case, we want both the DAI pipelines (0 and 1) to be started after pipeline 2 has been started. With the order of widget setup from source to sink, the pipelines would be added to the trigger list in the order, pipeline 1, pipeline 2 and finally pipeline 0. This would trigger pipeline 0 first and result in an IPC timeout during start. Modifying the widget set up to start from the sink will guarantee that the pipelines will be added to the trigger list in the order 2 -> 1 -> 0 or 2 -> 0 -> 1 i.e pipeline 2 will always be first. The order of trigger between the 2 DAI pipelines does not matter and it will depend on which order they appear in the list of connected DAPM widgets. Signed-off-by: Ranjani Sridharan <[email protected]>
- Loading branch information