Skip to content

Commit

Permalink
ASoC: core: support driver alias names for FE topology overrides
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pierre-Louis Bossart authored and Mark Brown committed Apr 2, 2019
1 parent cce1396 commit e194098
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down

0 comments on commit e194098

Please sign in to comment.