]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: sof-function-topology-lib: add virtual loop dai support
authorBard Liao <yung-chuan.liao@linux.intel.com>
Tue, 21 Apr 2026 09:13:50 +0000 (17:13 +0800)
committerMark Brown <broonie@kernel.org>
Sun, 26 Apr 2026 23:29:00 +0000 (08:29 +0900)
The virtual loop dai link is created by the machine driver and no
topology is needed for the dai link. Handle it to avoid the dai_link
is not supported error.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260421091351.4056377-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/common/sof-function-topology-lib.c

index 0daa7d83808be67972bec6d4ba83515af3bbef51..2f2c902ef90ce9f0e4a9b64d727dec97b522c282 100644 (file)
@@ -19,6 +19,7 @@ enum tplg_device_id {
        TPLG_DEVICE_SDCA_MIC,
        TPLG_DEVICE_INTEL_PCH_DMIC,
        TPLG_DEVICE_HDMI,
+       TPLG_DEVICE_LOOPBACK_VIRTUAL,
        TPLG_DEVICE_MAX
 };
 
@@ -81,7 +82,15 @@ int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_
                } else if (strstr(dai_link->name, "iDisp")) {
                        tplg_dev = TPLG_DEVICE_HDMI;
                        tplg_dev_name = "hdmi-pcm5";
-
+               } else if (strstr(dai_link->name, "Loopback_Virtual")) {
+                       tplg_dev = TPLG_DEVICE_LOOPBACK_VIRTUAL;
+                       /*
+                        * Mark the LOOPBACK_VIRTUAL device but no need to create the
+                        * LOOPBACK_VIRTUAL topology. Just to avoid the dai_link is not supported
+                        * error.
+                        */
+                       tplg_mask |= BIT(tplg_dev);
+                       continue;
                } else {
                        /* The dai link is not supported by separated tplg yet */
                        dev_dbg(card->dev,