summaryrefslogtreecommitdiff
path: root/sound/soc/intel/common/sof-function-topology-lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/intel/common/sof-function-topology-lib.c')
-rw-r--r--sound/soc/intel/common/sof-function-topology-lib.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/intel/common/sof-function-topology-lib.c b/sound/soc/intel/common/sof-function-topology-lib.c
index 90fe7aa3df1c..0daa7d83808b 100644
--- a/sound/soc/intel/common/sof-function-topology-lib.c
+++ b/sound/soc/intel/common/sof-function-topology-lib.c
@@ -28,7 +28,7 @@ enum tplg_device_id {
#define SOF_INTEL_PLATFORM_NAME_MAX 4
int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_mach *mach,
- const char *prefix, const char ***tplg_files)
+ const char *prefix, const char ***tplg_files, bool best_effort)
{
struct snd_soc_acpi_mach_params mach_params = mach->mach_params;
struct snd_soc_dai_link *dai_link;
@@ -73,7 +73,8 @@ int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_
break;
default:
dev_warn(card->dev,
- "only -2ch and -4ch are supported for dmic\n");
+ "unsupported number of dmics: %d\n",
+ mach_params.dmic_num);
continue;
}
tplg_dev = TPLG_DEVICE_INTEL_PCH_DMIC;
@@ -86,6 +87,9 @@ int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_
dev_dbg(card->dev,
"dai_link %s is not supported by separated tplg yet\n",
dai_link->name);
+ if (best_effort)
+ continue;
+
return 0;
}
if (tplg_mask & BIT(tplg_dev))
@@ -125,11 +129,15 @@ int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_
if (!ret) {
release_firmware(fw);
} else {
- dev_dbg(card->dev, "Failed to open topology file: %s\n", (*tplg_files)[i]);
+ dev_warn(card->dev,
+ "Failed to open topology file: %s, you might need to\n",
+ (*tplg_files)[i]);
+ dev_warn(card->dev,
+ "download it from https://github.com/thesofproject/sof-bin/\n");
return 0;
}
}
return tplg_num;
}
-
+EXPORT_SYMBOL_GPL(sof_sdw_get_tplg_files);