ASoC: Intel: Skylake: Fix module resource and format selection
authorCezary Rojewski <cezary.rojewski@intel.com>
Wed, 18 Aug 2021 07:57:35 +0000 (09:57 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 23 Aug 2021 15:39:58 +0000 (16:39 +0100)
commite8b374b649afe756c2470e0e6668022e90bf8518
tree6363f3cac72acf0725df5ff85ccf288496ffdc40
parent87b265260046d4e0ed3f150dac2184b9dbd4bf7c
ASoC: Intel: Skylake: Fix module resource and format selection

Module configuration may differ between its instances depending on
resources required and input and output audio format. Available
parameters to select from are stored in module resource and interface
(format) lists. These come from topology, together with description of
each of pipe's modules.

Ignoring index value provided by topology and relying always on 0th
entry leads to unexpected module behavior due to under/overbudged
resources assigned or impropper format selection. Fix by taking entry at
index specified by topology.

Fixes: f6fa56e22559 ("ASoC: Intel: Skylake: Parse and update module config structure")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Tested-by: Lukasz Majczak <lma@semihalf.com>
Link: https://lore.kernel.org/r/20210818075742.1515155-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c