aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYC Hung <[email protected]>2021-11-18 12:07:46 +0200
committerMark Brown <[email protected]>2021-11-18 13:57:40 +0000
commit24281bc2bf1884e665dfbcd17aaaabbc5872e501 (patch)
tree6a88ced436de9a8d8180619da25056ab5660740c
parentb7f6503830cd8f3f7076635409460861b5ff6310 (diff)
ASoC: SOF: Add mt8195 device descriptor
Add SOF device and DT descriptor for Mediatek mt8195 platform. Signed-off-by: YC Hung <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Guennadi Liakhovetski <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Signed-off-by: Daniel Baluta <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/sof/Kconfig2
-rw-r--r--sound/soc/sof/sof-of-dev.c13
2 files changed, 14 insertions, 1 deletions
diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig
index b0cdabcfdde7..ac34c330cf0c 100644
--- a/sound/soc/sof/Kconfig
+++ b/sound/soc/sof/Kconfig
@@ -42,7 +42,7 @@ config SND_SOC_SOF_OF
depends on OF || COMPILE_TEST
help
This adds support for Device Tree enumeration. This option is
- required to enable i.MX8 devices.
+ required to enable i.MX8 or Mediatek devices.
Say Y if you need this option. If unsure select "N".
config SND_SOC_SOF_OF_DEV
diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c
index 885430a42226..412cbb824b84 100644
--- a/sound/soc/sof/sof-of-dev.c
+++ b/sound/soc/sof/sof-of-dev.c
@@ -13,6 +13,7 @@
#include "ops.h"
#include "imx/imx-ops.h"
+#include "mediatek/mediatek-ops.h"
static char *fw_path;
module_param(fw_path, charp, 0444);
@@ -50,6 +51,15 @@ static struct sof_dev_desc sof_of_imx8mp_desc = {
.ops = &sof_imx8m_ops,
};
#endif
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_MT8195)
+static const struct sof_dev_desc sof_of_mt8195_desc = {
+ .default_fw_path = "mediatek/sof",
+ .default_tplg_path = "mediatek/sof-tplg",
+ .default_fw_filename = "sof-mt8195.ri",
+ .nocodec_tplg_filename = "sof-mt8195-nocodec.tplg",
+ .ops = &sof_mt8195_ops,
+};
+#endif
static const struct dev_pm_ops sof_of_pm = {
.prepare = snd_sof_prepare,
@@ -131,6 +141,9 @@ static const struct of_device_id sof_of_ids[] = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_IMX8M)
{ .compatible = "fsl,imx8mp-dsp", .data = &sof_of_imx8mp_desc},
#endif
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_MT8195)
+ { .compatible = "mediatek,mt8195-dsp", .data = &sof_of_mt8195_desc},
+#endif
{ }
};
MODULE_DEVICE_TABLE(of, sof_of_ids);