ASoC: SOF: ipc4-pcm: fixup dailink based on copier format
authorBard Liao <yung-chuan.liao@linux.intel.com>
Fri, 15 Sep 2023 09:35:07 +0000 (12:35 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 15 Sep 2023 12:15:28 +0000 (13:15 +0100)
commit26dfc43461102957e33454e766d592df330ef7a0
tree4b509e6c823bfbffdb5d84205cc494ff39a8e51b
parent94fc6da924072399e4f475c7d7124a7272197e6a
ASoC: SOF: ipc4-pcm: fixup dailink based on copier format

When a copier exposes a single format, we can fixup the BE dailink with
that format. This is helpful when some codec have format restrictions and
e.g. don't support a 32-bit format. In that case, the copier output
formats mirror that restriction in the topology file.

An alternate solution was suggested earlier using a dedicated topology
token. When specified, the token would be used to fix-up the dailink. The
main reason why this solution was chosen is that there is a risk of a
disconnect between token definition and copier format. With a single piece
of information as suggested in this patch, there are fewer risks of a bad
configuration.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@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/20230915093507.7242-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc4-pcm.c