diff options
| author | Bard Liao <yung-chuan.liao@linux.intel.com> | 2025-10-14 10:13:33 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-10-14 14:32:34 +0300 |
| commit | 225d70b8074502acee3943bf0c2e839e867cd38c (patch) | |
| tree | 0df0d53cfd448b063b2e77c1959829a2e74e6217 | |
| parent | 0d202ae0256e8e7dcea862ead5904fa27cf4ce6a (diff) | |
| download | linux-225d70b8074502acee3943bf0c2e839e867cd38c.tar.xz | |
ASoC: SOF: don't check the existence of dummy topology
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/20251014071335.3844631-8-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/sof/fw-file-profile.c | 4 | ||||
| -rw-r--r-- | sound/soc/sof/topology.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/sof/fw-file-profile.c b/sound/soc/sof/fw-file-profile.c index d2b232860091..4a2afc04f338 100644 --- a/sound/soc/sof/fw-file-profile.c +++ b/sound/soc/sof/fw-file-profile.c @@ -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) diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index 3404f1306494..c1083ea4624a 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -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); |
