]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: SOF: Intel: add -bt tplg suffix if BT is present
authorBard Liao <yung-chuan.liao@linux.intel.com>
Fri, 19 Dec 2025 03:49:37 +0000 (11:49 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 22 Dec 2025 09:00:36 +0000 (09:00 +0000)
We need to distinguish the topologies with and without BT PCM.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20251219034937.3630569-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda.c

index c1518dbee1b7a96c9db165a00022ed599b766dc7..0bb85f92e1069d0a6ab83376f80a91f07f5e4593 100644 (file)
@@ -1549,6 +1549,7 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
         * name string if quirk flag is set.
         */
        if (mach) {
+               const struct sof_intel_dsp_desc *chip = get_chip_info(sdev->pdata);
                bool tplg_fixup = false;
                bool dmic_fixup = false;
 
@@ -1598,6 +1599,18 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
                        sof_pdata->tplg_filename = tplg_filename;
                }
 
+               if (tplg_fixup && mach->mach_params.bt_link_mask &&
+                   chip->hw_ip_version >= SOF_INTEL_ACE_4_0) {
+                       int bt_port = fls(mach->mach_params.bt_link_mask) - 1;
+
+                       tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, "%s-ssp%d-bt",
+                                                      sof_pdata->tplg_filename, bt_port);
+                       if (!tplg_filename)
+                               return NULL;
+
+                       sof_pdata->tplg_filename = tplg_filename;
+               }
+
                if (mach->link_mask) {
                        mach->mach_params.links = mach->links;
                        mach->mach_params.link_mask = mach->link_mask;
@@ -1609,7 +1622,6 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
                if (tplg_fixup &&
                    mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER &&
                    mach->mach_params.i2s_link_mask) {
-                       const struct sof_intel_dsp_desc *chip = get_chip_info(sdev->pdata);
                        int ssp_num;
                        int mclk_mask;