summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorJindong <jindong.yue@nxp.com>2020-09-16 15:21:35 +0800
committerJindong <jindong.yue@nxp.com>2020-10-27 17:00:10 +0800
commit0c99d876def2626fc9065126f1db605e230567f5 (patch)
treeeccee35bde37a9b27ff74aa1368c8acd59a67b67 /sound/soc
parent4b82ed17bcfd6395fae498c04b2bc4e2eecf2a31 (diff)
MA-17897 ASoC: fsl_dsp: Support building as module
Make fsl_dsp_cpu as a separate driver, otherwise below build error will occur when set CONFIG_SND_SOC_FSL_DSP=m ld.lld: error: duplicate symbol: init_module >>> defined at fsl_dsp.c >>> sound/soc/fsl/fsl_dsp.o:(init_module) >>> defined at fsl_dsp_cpu.c >>> sound/soc/fsl/fsl_dsp_cpu.o:(.init.text+0x0) Signed-off-by: Jindong <jindong.yue@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/fsl/Kconfig4
-rw-r--r--sound/soc/fsl/Makefile4
-rw-r--r--sound/soc/fsl/fsl_dsp.c2
-rw-r--r--sound/soc/fsl/fsl_dsp_cpu.c1
4 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 7c481681f790..b6fb133236b9 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -87,6 +87,7 @@ config SND_SOC_FSL_EASRC
config SND_SOC_FSL_DSP
tristate "dsp module support"
select SND_SOC_COMPRESS
+ select SND_SOC_FSL_DSP_CPU
select SND_SOC_FSL_DSP_AUDIOMIX
help
Say Y if you want to add hifi 4 support for the Freescale CPUs.
@@ -108,6 +109,9 @@ config SND_SOC_FSL_AUD2HTX
help
Say Y if you want to add AUDIO TO HDMI TX support for NXP.
+config SND_SOC_FSL_DSP_CPU
+ tristate
+
config SND_SOC_FSL_DSP_AUDIOMIX
tristate "Audio MIX DSP helper"
depends on MFD_IMX_AUDIOMIX
diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile
index 3985a983434d..5b4a150b865c 100644
--- a/sound/soc/fsl/Makefile
+++ b/sound/soc/fsl/Makefile
@@ -16,8 +16,9 @@ snd-soc-fsl-audmix-objs := fsl_audmix.o
snd-soc-fsl-dsp-audiomix-objs := fsl_dsp_audiomix.o
snd-soc-fsl-asrc-objs := fsl_asrc.o fsl_asrc_dma.o
snd-soc-fsl-dsp-objs := fsl_dsp.o fsl_dsp_proxy.o fsl_dsp_pool.o \
- fsl_dsp_library_load.o fsl_dsp_xaf_api.o fsl_dsp_cpu.o \
+ fsl_dsp_library_load.o fsl_dsp_xaf_api.o \
fsl_dsp_platform_compress.o
+snd-soc-fsl-dsp-cpu-objs := fsl_dsp_cpu.o
snd-soc-fsl-sai-objs := fsl_sai.o fsl_sai_sysfs.o
snd-soc-fsl-ssi-y := fsl_ssi.o
snd-soc-fsl-ssi-$(CONFIG_DEBUG_FS) += fsl_ssi_dbg.o
@@ -38,6 +39,7 @@ obj-$(CONFIG_SND_SOC_FSL_ASOC_CARD) += snd-soc-fsl-asoc-card.o
snd-soc-fsl-hdmi-objs := fsl_hdmi.o
obj-$(CONFIG_SND_SOC_FSL_ASRC) += snd-soc-fsl-asrc.o
obj-$(CONFIG_SND_SOC_FSL_DSP) += snd-soc-fsl-dsp.o
+obj-$(CONFIG_SND_SOC_FSL_DSP_CPU) += snd-soc-fsl-dsp-cpu.o
obj-$(CONFIG_SND_SOC_FSL_DSP_AUDIOMIX) += snd-soc-fsl-dsp-audiomix.o
obj-$(CONFIG_SND_SOC_FSL_SAI) += snd-soc-fsl-sai.o
obj-$(CONFIG_SND_SOC_FSL_SSI) += snd-soc-fsl-ssi.o
diff --git a/sound/soc/fsl/fsl_dsp.c b/sound/soc/fsl/fsl_dsp.c
index 88c94c44532a..01a49c15af71 100644
--- a/sound/soc/fsl/fsl_dsp.c
+++ b/sound/soc/fsl/fsl_dsp.c
@@ -664,8 +664,10 @@ static void fsl_dsp_start(struct fsl_dsp *dsp_priv)
switch (dsp_priv->dsp_board_type){
case DSP_IMX8QM_TYPE:
case DSP_IMX8QXP_TYPE:
+#if defined(CONFIG_IMX_SCU)
imx_sc_pm_cpu_start(dsp_priv->dsp_ipcHandle,
IMX_SC_R_DSP, true, dsp_priv->iram);
+#endif
break;
case DSP_IMX8MP_TYPE:
imx_audiomix_dsp_start(dsp_priv->audiomix);
diff --git a/sound/soc/fsl/fsl_dsp_cpu.c b/sound/soc/fsl/fsl_dsp_cpu.c
index e97d09ae0c45..f202cdc4ed72 100644
--- a/sound/soc/fsl/fsl_dsp_cpu.c
+++ b/sound/soc/fsl/fsl_dsp_cpu.c
@@ -95,3 +95,4 @@ static struct platform_driver dsp_audio_driver = {
.remove = dsp_audio_remove,
};
module_platform_driver(dsp_audio_driver);
+MODULE_LICENSE("GPL v2");