Skip to content

Commit 7d896f3

Browse files
committed
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>
1 parent 4df2c64 commit 7d896f3

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

sound/soc/sof/intel/hda.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,7 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
15311531
* name string if quirk flag is set.
15321532
*/
15331533
if (mach) {
1534+
const struct sof_intel_dsp_desc *chip = get_chip_info(sdev->pdata);
15341535
bool tplg_fixup = false;
15351536
bool dmic_fixup = false;
15361537

@@ -1580,6 +1581,18 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
15801581
sof_pdata->tplg_filename = tplg_filename;
15811582
}
15821583

1584+
if (tplg_fixup && mach->mach_params.bt_link_mask &&
1585+
chip->hw_ip_version >= SOF_INTEL_ACE_4_0) {
1586+
int bt_port = fls(mach->mach_params.bt_link_mask) - 1;
1587+
1588+
tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, "%s-ssp%d-bt",
1589+
sof_pdata->tplg_filename, bt_port);
1590+
if (!tplg_filename)
1591+
return NULL;
1592+
1593+
sof_pdata->tplg_filename = tplg_filename;
1594+
}
1595+
15831596
if (mach->link_mask) {
15841597
mach->mach_params.links = mach->links;
15851598
mach->mach_params.link_mask = mach->link_mask;
@@ -1591,7 +1604,6 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
15911604
if (tplg_fixup &&
15921605
mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER &&
15931606
mach->mach_params.i2s_link_mask) {
1594-
const struct sof_intel_dsp_desc *chip = get_chip_info(sdev->pdata);
15951607
int ssp_num;
15961608
int mclk_mask;
15971609

0 commit comments

Comments
 (0)