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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:43 +0000 (09:50 +0200)
commitdd903083cbe433b56e7998d3e855b77f4b17eb01
treec917b7a1d16a3f73ef467fb70b1d5a3900afc170
parentb0159dbd1dd6011befed7c125ca7d2690f24b7d4
ASoC: Intel: Skylake: Fix module resource and format selection

[ Upstream commit e8b374b649afe756c2470e0e6668022e90bf8518 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/intel/skylake/skl-topology.c