ASoC: SOF: ipc4-topology: Improve the audio format
authorMark Brown <broonie@kernel.org>
Mon, 15 May 2023 15:30:14 +0000 (00:30 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 15 May 2023 15:30:14 +0000 (00:30 +0900)
commitfc1d62b3588b74153c0823f7ad59925e586732de
tree630c52241fa63c4e52a10ef06e144fbe2c619d1f
parent25428a9da703539837dee040a18019bb16db1453
parent5a56c5335d36decbdcb80900c665360fbbd1042a
ASoC: SOF: ipc4-topology: Improve the audio format

Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Improve the logic to account for the current restrictions in topology while
making it extensible for future topology modifications.

The current topology definitions assume that input/output formats come in pairs.
For example even if there's only 1 output format for a module, we add 3 output
formats to match that of the input format count with the same parameters.
This is unnecessary but we have to deal with it until the topologies are
modified. Additionally, choosing the input/output audio format should
depend only on the pipeline params or the runtime FE hw_params depending
on where the module is in the pipeline.

This series modifies the logic for selection based on this and removes
unnecessary dependencies between the input and output formats.
sound/soc/sof/ipc4-topology.c