mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
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/20251009094023.3474895-8-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6937ff42f2
commit
99c159279c
|
|
@ -73,6 +73,10 @@ static int sof_test_topology_file(struct device *dev,
|
||||||
if (!profile->tplg_path || !profile->tplg_name)
|
if (!profile->tplg_path || !profile->tplg_name)
|
||||||
return 0;
|
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,
|
tplg_filename = kasprintf(GFP_KERNEL, "%s/%s", profile->tplg_path,
|
||||||
profile->tplg_name);
|
profile->tplg_name);
|
||||||
if (!tplg_filename)
|
if (!tplg_filename)
|
||||||
|
|
|
||||||
|
|
@ -2523,6 +2523,11 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
|
||||||
* callback or the callback returns 0.
|
* callback or the callback returns 0.
|
||||||
*/
|
*/
|
||||||
if (!tplg_cnt) {
|
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_files[0] = file;
|
||||||
tplg_cnt = 1;
|
tplg_cnt = 1;
|
||||||
dev_info(scomp->dev, "loading topology: %s\n", file);
|
dev_info(scomp->dev, "loading topology: %s\n", file);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user