summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/intel
diff options
context:
space:
mode:
authorSathyanarayana Nujella <sathyanarayana.nujella@intel.com>2020-08-21 21:56:00 +0200
committerMark Brown <broonie@kernel.org>2020-08-24 14:41:35 +0200
commit5253a73d567dcd75e62834ff5f502ea9470e5722 (patch)
tree252d5e7b79f52da76374f60c17b15e5cd1d59036 /sound/soc/sof/intel
parentASoC: Intel: sof_rt5682: override quirk data for tgl_max98373_rt5682 (diff)
downloadlinux-5253a73d567dcd75e62834ff5f502ea9470e5722.tar.xz
linux-5253a73d567dcd75e62834ff5f502ea9470e5722.zip
ASoC: SOF: Add topology filename override based on dmi data match
Add topology filename override based on system DMI data matching, typically to account for a different hardware layout. In ACPI based systems, the tplg_filename is pre-defined in an ACPI machine table. When a DMI quirk is detected, the sof_pdata->tplg_filename is not set with the hard-coded ACPI value, and instead is set with the DMI-specific filename. Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200821195603.215535-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel')
-rw-r--r--sound/soc/sof/intel/hda.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index c0b75d682750..b8157c1f37f3 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -1179,7 +1179,13 @@ void hda_machine_select(struct snd_sof_dev *sdev)
mach = snd_soc_acpi_find_machine(desc->machines);
if (mach) {
- sof_pdata->tplg_filename = mach->sof_tplg_filename;
+ /*
+ * If tplg file name is overridden, use it instead of
+ * the one set in mach table
+ */
+ if (!sof_pdata->tplg_filename)
+ sof_pdata->tplg_filename = mach->sof_tplg_filename;
+
sof_pdata->machine = mach;
if (mach->link_mask) {