]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: Intel: avs: Fix dynamic port assignment when TDM is set
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Wed, 7 Feb 2024 11:26:24 +0000 (12:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:51:23 +0000 (09:51 +0100)
[ Upstream commit 44d3b8a19b91cd2af11f918b2fd05628383172de ]

In case TDM is set in topology on SSP0, parser will overwrite vindex
value, because it only checks if port is set. Fix this by checking whole
field value.

Fixes: e6d50e474e45 ("ASoC: Intel: avs: Improve topology parsing of dynamic strings")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240207112624.2132821-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/intel/avs/topology.c

index c74e9d622e4c67a3cd708b2f99f0cc25d197cd50..41020409ffb60a75f1870feb7de2e39500ca923e 100644 (file)
@@ -857,7 +857,7 @@ assign_copier_gtw_instance(struct snd_soc_component *comp, struct avs_tplg_modcf
        }
 
        /* If topology sets value don't overwrite it */
-       if (cfg->copier.vindex.i2s.instance)
+       if (cfg->copier.vindex.val)
                return;
 
        mach = dev_get_platdata(comp->card->dev);