]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SOF: don't check the existence of dummy topology
authorBard Liao <yung-chuan.liao@linux.intel.com>
Thu, 9 Oct 2025 09:40:21 +0000 (17:40 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 13 Oct 2025 10:23:28 +0000 (11:23 +0100)
Monolithic topology is not needed if function topology is used. Instead
of creating a dummy topology in the file system, we can skip the
existence check in the kernel.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/20251009094023.3474895-8-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/fw-file-profile.c
sound/soc/sof/topology.c

index d2b232860091305ffdf2470a2a2b6b67e68203a9..4a2afc04f3380edf7cecc872097b2f9dd5ebfea3 100644 (file)
@@ -73,6 +73,10 @@ static int sof_test_topology_file(struct device *dev,
        if (!profile->tplg_path || !profile->tplg_name)
                return 0;
 
+       /* Dummy topology does not exist and should not be used */
+       if (strstr(profile->tplg_name, "dummy"))
+               return 0;
+
        tplg_filename = kasprintf(GFP_KERNEL, "%s/%s", profile->tplg_path,
                                  profile->tplg_name);
        if (!tplg_filename)
index 3404f1306494c2dc1f6144b766b097241f37005f..c1083ea4624ad74b96d866b33a3ef193a010f036 100644 (file)
@@ -2523,6 +2523,11 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
         * callback or the callback returns 0.
         */
        if (!tplg_cnt) {
+               if (strstr(file, "dummy")) {
+                       dev_err(scomp->dev,
+                               "Function topology is required, please upgrade sof-firmware\n");
+                       return -EINVAL;
+               }
                tplg_files[0] = file;
                tplg_cnt = 1;
                dev_info(scomp->dev, "loading topology: %s\n", file);