summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart2019-03-02 02:08:51 +0100
committerMark Brown2019-04-02 07:57:25 +0200
commite194098bf9098083f8ae9687924a6878540f8561 (patch)
tree87cb10b8f7db3cb8b382b0ab0f2dc09fd96d3d0e /sound/soc/soc-core.c
parentASoC: sprd: Add Spreadtrum audio compress offload support (diff)
downloadkernel-qcow2-linux-e194098bf9098083f8ae9687924a6878540f8561.tar.gz
kernel-qcow2-linux-e194098bf9098083f8ae9687924a6878540f8561.tar.xz
kernel-qcow2-linux-e194098bf9098083f8ae9687924a6878540f8561.zip
ASoC: core: support driver alias names for FE topology overrides
When the same machine driver is reused between platforms but with a different alias, using the driver name is not enough. Add additional fallback case to use the card device name. Tested on GeminiLake with bxt_da7219_max98357a machine driver Suggested-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d88757659729..6f4842977b8d 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1974,10 +1974,13 @@ static void soc_check_tplg_fes(struct snd_soc_card *card)
continue;
/* for this machine ? */
+ if (!strcmp(component->driver->ignore_machine,
+ card->dev->driver->name))
+ goto match;
if (strcmp(component->driver->ignore_machine,
- card->dev->driver->name))
+ dev_name(card->dev)))
continue;
-
+match:
/* machine matches, so override the rtd data */
for_each_card_prelinks(card, i, dai_link) {