]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SOF: Don't print the monolithic topology name if function topology may be used
authorBard Liao <yung-chuan.liao@linux.intel.com>
Tue, 14 Oct 2025 07:13:27 +0000 (15:13 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 14 Oct 2025 11:32:28 +0000 (12:32 +0100)
It may confuse people if "Topology file:" is printed but the topology
file is not really used. We keep the print if the topology file is
missing thus user can know what topology is missed in the file system.
And increase the log level to info for the actual topology that is used.
So that user can get which topology is used.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Simon Trimmer <simont@opensource.cirrus.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20251014071335.3844631-2-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 1c0eb13ae55768f579d288505c08bf4e9b6373b9..d2b232860091305ffdf2470a2a2b6b67e68203a9 100644 (file)
@@ -266,6 +266,7 @@ static void sof_print_profile_info(struct snd_sof_dev *sdev,
                                   enum sof_ipc_type ipc_type,
                                   struct sof_loadable_file_profile *profile)
 {
+       struct snd_sof_pdata *plat_data = sdev->pdata;
        struct device *dev = sdev->dev;
 
        if (ipc_type != profile->ipc_type)
@@ -282,7 +283,12 @@ static void sof_print_profile_info(struct snd_sof_dev *sdev,
 
        if (profile->fw_lib_path)
                dev_info(dev, " Firmware lib path: %s\n", profile->fw_lib_path);
-       dev_info(dev, " Topology file:     %s/%s\n", profile->tplg_path, profile->tplg_name);
+
+       if (plat_data->machine->get_function_tplg_files && !plat_data->disable_function_topology)
+               dev_info(dev, " Topology file:     function topologies\n");
+       else
+               dev_info(dev, " Topology file:     %s/%s\n",
+                        profile->tplg_path, profile->tplg_name);
 }
 
 int sof_create_ipc_file_profile(struct snd_sof_dev *sdev,
index b6d5c8024f8cfae1da2be2a223c1db5b6b288ac7..3404f1306494c2dc1f6144b766b097241f37005f 100644 (file)
@@ -2525,7 +2525,7 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
        if (!tplg_cnt) {
                tplg_files[0] = file;
                tplg_cnt = 1;
-               dev_dbg(scomp->dev, "loading topology: %s\n", file);
+               dev_info(scomp->dev, "loading topology: %s\n", file);
        } else {
                dev_info(scomp->dev, "Using function topologies instead %s\n", file);
        }