ASoC: SOF: sof-audio: add support for setting up loopback routes
authorChao Song <chao.song@linux.intel.com>
Mon, 13 Mar 2023 10:13:02 +0000 (12:13 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 13 Mar 2023 14:08:43 +0000 (14:08 +0000)
commit8cd3cb17fcf216cb859f86a00fff428fbcecc1d8
treea84b4525fe069cb148213b762121e242de56137a
parent4727d4d775654986913a21c35c7cfaf1ecdafd62
ASoC: SOF: sof-audio: add support for setting up loopback routes

During route setup, playback stream routes are setup by going through
sink path, capture stream routes are set up by going through source path.
This is not sufficient to handle loopback cases between pipelines
configured with different directions, e.g. a sidetone or an amplifier
feedback connected to a speaker protection module. So, add the logic to
handle such routes between widgets that aren't in the list of DAPM widgets
associated with the same PCM.

Link: https://github.com/thesofproject/linux/issues/4042
Suggested-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230313101302.20950-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/sof-audio.c