]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ASoC: fsl: select SND_SOC_IMX_PCM_DMA where needed
authorArnd Bergmann <arnd@arndb.de>
Tue, 29 Apr 2014 19:36:22 +0000 (21:36 +0200)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:16:49 +0000 (21:16 -0600)
commitf84d4154ba09ecb87624e1129ccb4874b4048005
treecc9a731693861c6e3e31bf2f1506184d82ed3a34
parentb4aa0ec6161830b8e512c460c87b504b5c2ff28b
ASoC: fsl: select SND_SOC_IMX_PCM_DMA where needed

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>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 31ee2bfd724ab1fa2fba6472a071bca5e9132139)
sound/soc/fsl/Kconfig