Unverified Commit a0c8ee09 authored by Bard Liao's avatar Bard Liao Committed by Mark Brown
Browse files

ASoC: SOF: Intel: add -bt tplg suffix if BT is present

parent e4ca5ecc
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -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;