1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00

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

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>
This commit is contained in:
Bard Liao 2025-12-19 11:49:37 +08:00 committed by Mark Brown
parent e4ca5ecc3c
commit a0c8ee09f9
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View 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;