Skip to content

Commit 44e791b

Browse files
committed
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>
1 parent 0a7c849 commit 44e791b

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

sound/soc/sof/fw-file-profile.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ static int sof_test_topology_file(struct device *dev,
7373
if (!profile->tplg_path || !profile->tplg_name)
7474
return 0;
7575

76+
/* Dummy topology does not exist and should not be used */
77+
if (strstr(profile->tplg_name, "dummy"))
78+
return 0;
79+
7680
tplg_filename = kasprintf(GFP_KERNEL, "%s/%s", profile->tplg_path,
7781
profile->tplg_name);
7882
if (!tplg_filename)

sound/soc/sof/topology.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2523,6 +2523,11 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
25232523
* callback or the callback returns 0.
25242524
*/
25252525
if (!tplg_cnt) {
2526+
if (strstr(file, "dummy")) {
2527+
dev_err(scomp->dev,
2528+
"Function topology is required, please upgrade sof-firmware\n");
2529+
return -EINVAL;
2530+
}
25262531
tplg_files[0] = file;
25272532
tplg_cnt = 1;
25282533
dev_info(scomp->dev, "loading topology: %s\n", file);

0 commit comments

Comments
 (0)