Skip to content

Commit 1b7d57d

Browse files
ranj063broonie
authored andcommitted
ASoC: SOF: Don't set up widgets during topology parsing
In preparation for supporting dynamic pipelines, move the widget setup, DAI config IPCs to the complete callback during topology loading. For current topology where all the pipelines are static, all the pipelines will be set up during complete. For topologies with dynamic and static pipelines, this will enable setting up only the static ones during topology loading. Reuse the sof_restore_pipelines() function for this purpose and rename it to sof_set_up_pipelines(). Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20210927120517.20505-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 5f3aad7 commit 1b7d57d

File tree

4 files changed

+43
-245
lines changed

4 files changed

+43
-245
lines changed

sound/soc/sof/pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static int sof_resume(struct device *dev, bool runtime_resume)
157157
}
158158

159159
/* restore pipelines */
160-
ret = sof_restore_pipelines(sdev->dev);
160+
ret = sof_set_up_pipelines(sdev->dev);
161161
if (ret < 0) {
162162
dev_err(sdev->dev,
163163
"error: failed to restore pipeline after resume %d\n",

sound/soc/sof/sof-audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ const struct sof_ipc_pipe_new *snd_sof_pipeline_find(struct snd_sof_dev *sdev,
248248
return NULL;
249249
}
250250

251-
int sof_restore_pipelines(struct device *dev)
251+
int sof_set_up_pipelines(struct device *dev)
252252
{
253253
struct snd_sof_dev *sdev = dev_get_drvdata(dev);
254254
struct snd_sof_widget *swidget;

sound/soc/sof/sof-audio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol,
242242
int sof_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params);
243243

244244
/* PM */
245-
int sof_restore_pipelines(struct device *dev);
245+
int sof_set_up_pipelines(struct device *dev);
246246
void sof_tear_down_pipelines(struct device *dev);
247247
int sof_set_hw_params_upon_resume(struct device *dev);
248248
bool snd_sof_stream_suspend_ignored(struct snd_sof_dev *sdev);

0 commit comments

Comments
 (0)