diff mbox

ASoC: fsl: select SND_SOC_IMX_PCM_DMA where needed

Message ID 5363504.ttXVrGSYNO@wuerfel (mailing list archive)
State Accepted
Commit 31ee2bfd724ab1fa2fba6472a071bca5e9132139
Headers show

Commit Message

Arnd Bergmann April 29, 2014, 7:36 p.m. UTC
Since commit 204dec93eaa "ASoC: fsl: Allow to select individual common
options", it is possible to enable SND_SOC_FSL_SSI and SND_SOC_FSL_SPDIF
manually, either as loadable modules or built-in. This unfortunately
leads to a link error if one or both of them are built-in, while
the imx-pcm-dma framework is a loadable module:

sound/built-in.o: In function `fsl_ssi_probe':
:(.text+0x51fb8): undefined reference to `imx_pcm_dma_init'
sound/built-in.o: In function `fsl_spdif_probe':
:(.text+0x52e20): undefined reference to `imx_pcm_dma_init'

This changes Kconfig to prevent this case by using 'select' to turn
on the imx-pcm-dma code from both drivers. For consistency, we also
turn on the imx-pcm-fiq code, which is an alternative to the dma
implementation.

Note that imx-pcm-fiq is platform dependent, so we must not enable
that unless we are building a kernel for i.MX. Note also the
"if SND_IMX_SOC != n" syntax as opposed to the normal "if SND_IMX_SOC".
This is needed to avoid turning on the options as 'm' if 'SND_IMX_SOC'
is a module.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Comments

Mark Brown May 1, 2014, 8:54 p.m. UTC | #1
On Tue, Apr 29, 2014 at 09:36:22PM +0200, Arnd Bergmann wrote:
> Since commit 204dec93eaa "ASoC: fsl: Allow to select individual common
> options", it is possible to enable SND_SOC_FSL_SSI and SND_SOC_FSL_SPDIF
> manually, either as loadable modules or built-in. This unfortunately
> leads to a link error if one or both of them are built-in, while
> the imx-pcm-dma framework is a loadable module:

Applied, thanks.  Please don't send patches in reply to existing threads
(especially with the Re - it makes it look like ongoing discussion, I at
least often leave these discussions among people working on the platform
to grind on).
diff mbox

Patch

diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index fb26345..b2a1ade 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -9,6 +9,8 @@  config SND_SOC_FSL_SAI
 
 config SND_SOC_FSL_SSI
 	tristate "Synchronous Serial Interface module support"
+	select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
+	select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC
 	help
 	  Say Y if you want to add Synchronous Serial Interface (SSI)
 	  support for the Freescale CPUs.
@@ -18,6 +20,8 @@  config SND_SOC_FSL_SSI
 config SND_SOC_FSL_SPDIF
 	tristate "Sony/Philips Digital Interface module support"
 	select REGMAP_MMIO
+	select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
+	select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC
 	help
 	  Say Y if you want to add Sony/Philips Digital Interface (SPDIF)
 	  support for the Freescale CPUs.