Skip to content

Commit a0c8ee0

Browse files
bardliaobroonie
authored andcommitted
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>
1 parent e4ca5ec commit a0c8ee0

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

sound/soc/sof/intel/hda.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,7 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
15491549
* name string if quirk flag is set.
15501550
*/
15511551
if (mach) {
1552+
const struct sof_intel_dsp_desc *chip = get_chip_info(sdev->pdata);
15521553
bool tplg_fixup = false;
15531554
bool dmic_fixup = false;
15541555

@@ -1598,6 +1599,18 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
15981599
sof_pdata->tplg_filename = tplg_filename;
15991600
}
16001601

1602+
if (tplg_fixup && mach->mach_params.bt_link_mask &&
1603+
chip->hw_ip_version >= SOF_INTEL_ACE_4_0) {
1604+
int bt_port = fls(mach->mach_params.bt_link_mask) - 1;
1605+
1606+
tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, "%s-ssp%d-bt",
1607+
sof_pdata->tplg_filename, bt_port);
1608+
if (!tplg_filename)
1609+
return NULL;
1610+
1611+
sof_pdata->tplg_filename = tplg_filename;
1612+
}
1613+
16011614
if (mach->link_mask) {
16021615
mach->mach_params.links = mach->links;
16031616
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)
16091622
if (tplg_fixup &&
16101623
mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER &&
16111624
mach->mach_params.i2s_link_mask) {
1612-
const struct sof_intel_dsp_desc *chip = get_chip_info(sdev->pdata);
16131625
int ssp_num;
16141626
int mclk_mask;
16151627

0 commit comments

Comments
 (0)