From f2818d07afe4fac4d975d18063063f9db08dd8f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Mon, 26 Nov 2012 09:50:47 +0100 Subject: [PATCH] ASoC: fsl: fix miscompilation of snd-soc-imx-pcm MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Hi Mark, thanks your insisting on a better description for the patch, I found a more appropriate solution for the problem: Compiling the SoC Audio driver for Freescale i.MX as a module (CONFIG_SND_SOC_IMX_PCM=m) results in a non-functional sound driver indicated by the error message: | imx-sgtl5000 sound.1: platform imx-pcm-audio not registered | imx-sgtl5000 sound.1: snd_soc_register_card failed (-517) | platform sound.1: Driver imx-sgtl5000 requests probe deferral instead of the message: | imx-sgtl5000 sound.1: sgtl5000 <-> 63fcc000.ssi mapping ok that is to be expected upon loading the snd-soc-imx-pcm.ko module. The build log reveals, that the file imx-pcm-dma.o (or imx-pcm-fiq.o depending on the kernel configuration), which should be linked together with imx-pcm.o into snd-imx-pcm.ko, is not being compiled in this case. The make rules for these files shows that the target object imx-pcm.o is assigned to the variable snd-soc-imx-pcm-y while imx-pcm-{dma,fiq}.o are added to to snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_DMA) and snd-soc-imx-pcm-$(CONFIG_SND_SOC_IMX_PCM_FIQ) which resolve to snd-soc-imx-pcm-m in this case. According to Documentation/kbuild/modules.txt: |When the module is built from multiple sources, an additional line is |needed listing the files: | | -y := .o .o ... Thus the type of the config variables CONFIG_SND_SOC_IMX_PCM_DMA and CONFIG_SND_SOC_IMX_PCM_FIQ should be 'bool' instead of 'tristate' to resolve to 'y' when selected. Signed-off-by: Lothar Waßmann Signed-off-by: Mark Brown --- sound/soc/fsl/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index 4563b28bd625..aa73efa64cb4 100644 --- a/sound/soc/fsl/Kconfig +++ b/sound/soc/fsl/Kconfig @@ -98,12 +98,12 @@ config SND_SOC_IMX_PCM tristate config SND_SOC_IMX_PCM_FIQ - tristate + bool select FIQ select SND_SOC_IMX_PCM config SND_SOC_IMX_PCM_DMA - tristate + bool select SND_SOC_DMAENGINE_PCM select SND_SOC_IMX_PCM -- 2.20.1