OSDN Git Service

ASoC: SOF: Add support for dynamic pipelines
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Mon, 27 Sep 2021 12:05:16 +0000 (15:05 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 1 Oct 2021 19:48:30 +0000 (20:48 +0100)
commit5fcdbb2d45df6afb654674379546996b0027aa3e
tree1120a17a735100b12f071208f29c8cacf1b2abe5
parent0acb48dd31e39b617bb12ca546b4fecd6ccb2972
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>
sound/soc/sof/intel/hda.c
sound/soc/sof/pcm.c
sound/soc/sof/sof-audio.c
sound/soc/sof/sof-audio.h