diff --git a/sound/soc/intel/common/sof-function-topology-lib.c b/sound/soc/intel/common/sof-function-topology-lib.c index 0daa7d83808be6..fe7c5c5d56f5f5 100644 --- a/sound/soc/intel/common/sof-function-topology-lib.c +++ b/sound/soc/intel/common/sof-function-topology-lib.c @@ -56,8 +56,18 @@ int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_ tplg_dev_name = "sdca-jack"; } else if (strstr(dai_link->name, "SmartAmp")) { tplg_dev = TPLG_DEVICE_SDCA_AMP; - tplg_dev_name = devm_kasprintf(card->dev, GFP_KERNEL, - "sdca-%damp", dai_link->num_cpus); + /* + * The echo reference DAI will be created in the sdca-jack function topology. + * Select the topology with the echo reference DAI if the sdca-jack topology + * is not required, otherwise select the one without it. + * */ + if (tplg_mask & BIT(TPLG_DEVICE_SDCA_JACK)) + tplg_dev_name = devm_kasprintf(card->dev, GFP_KERNEL, + "sdca-%damp", dai_link->num_cpus); + else + tplg_dev_name = devm_kasprintf(card->dev, GFP_KERNEL, + "sdca-%damp-ref_dai", + dai_link->num_cpus); if (!tplg_dev_name) return -ENOMEM; } else if (strstr(dai_link->name, "SmartMic")) {