aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/intel/hda.c
diff options
context:
space:
mode:
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>2021-09-27 15:05:16 +0300
committerMark Brown <broonie@kernel.org>2021-10-01 20:48:30 +0100
commit5fcdbb2d45df6afb654674379546996b0027aa3e (patch)
tree1120a17a735100b12f071208f29c8cacf1b2abe5 /sound/soc/sof/intel/hda.c
parentASoC: SOF: Intel: hda: make sure DAI widget is set up before IPC (diff)
downloadlinux-dev-5fcdbb2d45df6afb654674379546996b0027aa3e.tar.xz
linux-dev-5fcdbb2d45df6afb654674379546996b0027aa3e.zip
ASoC: SOF: Add support for dynamic pipelines
Add support for dynamic pipelines by modifying the PCM hw_params ioctl implementation to determine the widgets required for a PCM stream by querying the list of connected DAPM widgets. This list is saved as part of snd_sof_pcm_stream struct and will be used to setup the widgets. The sof_widget_list_setup/free routines setup and free connected DAPM widgets when a PCM is opened/closed. These routines accept a list of connected DAPM widgets as input and determine the SOF widgets, their corresponding pipeline widgets and connections between them that need to be setup before the PCM is triggered. Please note that the dynamic pipeline feature will only be enabled for those pipelines whose dynamic_pipeline_widget flag is set in topologies. Add a new token called SOF_TKN_SCHED_DYNAMIC_PIPELINE that when set in topology will be applied to the dynamic_pipeline_widget flag of the pipeline widget. 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-12-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/hda.c')
-rw-r--r--sound/soc/sof/intel/hda.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 8e2613a7ea9d..066e90506ae6 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -41,17 +41,6 @@
#define EXCEPT_MAX_HDR_SIZE 0x400
#define HDA_EXT_ROM_STATUS_SIZE 8
-static const struct sof_intel_dsp_desc
- *get_chip_info(struct snd_sof_pdata *pdata)
-{
- const struct sof_dev_desc *desc = pdata->desc;
- const struct sof_intel_dsp_desc *chip_info;
-
- chip_info = desc->chip_info;
-
- return chip_info;
-}
-
int hda_ctrl_dai_widget_setup(struct snd_soc_dapm_widget *w)
{
struct snd_sof_widget *swidget = w->dobj.private;
@@ -132,6 +121,17 @@ int hda_ctrl_dai_widget_free(struct snd_soc_dapm_widget *w)
return sof_widget_free(sdev, swidget);
}
+static const struct sof_intel_dsp_desc
+ *get_chip_info(struct snd_sof_pdata *pdata)
+{
+ const struct sof_dev_desc *desc = pdata->desc;
+ const struct sof_intel_dsp_desc *chip_info;
+
+ chip_info = desc->chip_info;
+
+ return chip_info;
+}
+
#if IS_ENABLED(CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE)
/*