ASoC: SOF: ipc4-topology: Modify input audio format selection logic
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Mon, 15 May 2023 10:33:36 +0000 (13:33 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 15 May 2023 11:12:56 +0000 (20:12 +0900)
commit5a56c5335d36decbdcb80900c665360fbbd1042a
tree8ca051257c5b911075e0cf46ae2347adc20e4ea3
parentf37b702cb6f76963013af951737e49e61bf35771
ASoC: SOF: ipc4-topology: Modify input audio format selection logic

The current selection logic assumes that input and output formats always
come in pairs in topology. Handle this special case by checking if all
input formats are the same. And for the case where there are multiple
supported input audio formats, modify the selection logic to pick the
audio formats based on the reference params which is either the FE
hw_params or the pipeline params based on the type of module.

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