[alsa-devel] [PATCH] ASoC: fsl: Fix module build
From: Fabio Estevam fabio.estevam@freescale.com
Building imx_v6_v7_defconfig with all audio drivers as modules results in the folowing build error:
ERROR: "imx_pcm_fiq_init" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined! ERROR: "imx_pcm_dma_init" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined! ERROR: "imx_pcm_fiq_exit" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined! ERROR: "imx_pcm_dma_exit" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined! ERROR: "imx_pcm_dma_init" [sound/soc/fsl/snd-soc-fsl-ssi.ko] undefined! ERROR: "imx_pcm_dma_exit" [sound/soc/fsl/snd-soc-fsl-ssi.ko] undefined!
Fix this by allowing SND_SOC_IMX_PCM_FIQ and SND_SOC_IMX_PCM_DMA to be also built as modules and by using 'IS_ENABLED' to cover the module case.
Reported-by: Guennadi Liakhovetski g.liakhovetski@gmx.de Signed-off-by: Fabio Estevam fabio.estevam@freescale.com --- sound/soc/fsl/Kconfig | 4 ++-- sound/soc/fsl/imx-pcm.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index 3a79d01..c26449b 100644 --- a/sound/soc/fsl/Kconfig +++ b/sound/soc/fsl/Kconfig @@ -109,11 +109,11 @@ config SND_SOC_IMX_SSI tristate
config SND_SOC_IMX_PCM_FIQ - bool + tristate select FIQ
config SND_SOC_IMX_PCM_DMA - bool + tristate select SND_SOC_GENERIC_DMAENGINE_PCM
config SND_SOC_IMX_AUDMUX diff --git a/sound/soc/fsl/imx-pcm.h b/sound/soc/fsl/imx-pcm.h index 9136625..5d5b733 100644 --- a/sound/soc/fsl/imx-pcm.h +++ b/sound/soc/fsl/imx-pcm.h @@ -38,7 +38,7 @@ struct imx_pcm_fiq_params { struct snd_dmaengine_dai_dma_data *dma_params_tx; };
-#ifdef CONFIG_SND_SOC_IMX_PCM_DMA +#if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_DMA) int imx_pcm_dma_init(struct platform_device *pdev); void imx_pcm_dma_exit(struct platform_device *pdev); #else @@ -52,7 +52,7 @@ static inline void imx_pcm_dma_exit(struct platform_device *pdev) } #endif
-#ifdef CONFIG_SND_SOC_IMX_PCM_FIQ +#if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_FIQ) int imx_pcm_fiq_init(struct platform_device *pdev, struct imx_pcm_fiq_params *params); void imx_pcm_fiq_exit(struct platform_device *pdev);
On Mon, Jul 29, 2013 at 06:37:32PM -0300, Fabio Estevam wrote:
From: Fabio Estevam fabio.estevam@freescale.com
Building imx_v6_v7_defconfig with all audio drivers as modules results in the folowing build error:
ERROR: "imx_pcm_fiq_init" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined! ERROR: "imx_pcm_dma_init" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined! ERROR: "imx_pcm_fiq_exit" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined! ERROR: "imx_pcm_dma_exit" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined! ERROR: "imx_pcm_dma_init" [sound/soc/fsl/snd-soc-fsl-ssi.ko] undefined! ERROR: "imx_pcm_dma_exit" [sound/soc/fsl/snd-soc-fsl-ssi.ko] undefined!
What tree? I tested linux-next 20130730 and did not see the error.
LD [M] sound/soc/codecs/snd-soc-sgtl5000.ko LD [M] sound/soc/codecs/snd-soc-tlv320aic23.ko LD [M] sound/soc/codecs/snd-soc-wm8962.ko LD [M] sound/soc/codecs/snd-soc-wm9712.ko LD [M] sound/soc/fsl/snd-soc-eukrea-tlv320.ko LD [M] sound/soc/fsl/snd-soc-fsl-ssi.ko LD [M] sound/soc/fsl/snd-soc-fsl-utils.ko LD [M] sound/soc/fsl/snd-soc-imx-audmux.ko LD [M] sound/soc/fsl/snd-soc-imx-sgtl5000.ko LD [M] sound/soc/fsl/snd-soc-imx-wm8962.ko LD [M] sound/soc/fsl/snd-soc-imx-ssi.ko LD [M] sound/soc/fsl/snd-soc-phycore-ac97.ko
Shawn
Hi Shawn,
On Tue, Jul 30, 2013 at 4:55 AM, Shawn Guo shawn.guo@linaro.org wrote:
What tree? I tested linux-next 20130730 and did not see the error.
Just tested it with linux-next 20130730 and could reproduce the error there as well.
You can apply the attached patch and you will see the error.
On Tue, Jul 30, 2013 at 09:53:21AM -0300, Fabio Estevam wrote:
Hi Shawn,
On Tue, Jul 30, 2013 at 4:55 AM, Shawn Guo shawn.guo@linaro.org wrote:
What tree? I tested linux-next 20130730 and did not see the error.
Just tested it with linux-next 20130730 and could reproduce the error there as well.
You can apply the attached patch and you will see the error.
I see the difference here. With my build, I only set CONFIG_SND_IMX_SOC to 'm', while you set CONFIG_SND to 'm'.
As imx-pcm-fiq is only used by imx-ssi and imx-pcm-dma is pretty small, I thought that it's not worth to build imx-pcm-fiq and imx-pcm-dma as modules, and having them be 'bool' and then link them into imx-ssi and fsl-ssi should also work. But I see Markus is working on fsl-ssi to adopt imx-pcm-fiq. And imx-pcm-fiq is still big, it makes some sense to build them as modules. So,
Acked-by: Shawn Guo shawn.guo@linaro.org
Shawn
On Mon, Jul 29, 2013 at 06:37:32PM -0300, Fabio Estevam wrote:
From: Fabio Estevam fabio.estevam@freescale.com
Building imx_v6_v7_defconfig with all audio drivers as modules results in the folowing build error:
Applied, thanks.
participants (3)
-
Fabio Estevam
-
Mark Brown
-
Shawn Guo