diff options
| author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-06-11 05:06:09 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2015-06-12 06:34:31 -0400 |
| commit | 061981ff8cc8793d0e6526b9e1c7476322f566ee (patch) | |
| tree | 7423f0e41e069c254a3acea7b4fa68deef1f544a | |
| parent | 9cf08a6561dda1385d58357abd17d32f2d95ed3e (diff) | |
ASoC: atmel: properly select dma driver state
It is currently possible to have CONFIG_SND_ATMEL_SOC_SSC=y with either
CONFIG_SND_ATMEL_SOC_PDC=m or CONFIG_SND_ATMEL_SOC_DMA=m. This results in a
driver that compiles but does not link with this kind of error:
sound/built-in.o: In function `atmel_ssc_set_audio':
(.text+0x87d90): undefined reference to `atmel_pcm_pdc_platform_register'
sound/built-in.o: In function `atmel_ssc_put_audio':
(.text+0x8879a): undefined reference to `atmel_pcm_pdc_platform_unregister'
Introduce new config options SND_ATMEL_SOC_SSC_PDC and
SND_ATMEL_SOC_SSC_DMA which should be used by the board drivers and the
correct logic to properly select the SND_ATMEL_SOC_PDC and
SND_ATMEL_SOC_DMA states.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/atmel/Kconfig | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig index 93abe4e6d596..1489cd461aec 100644 --- a/sound/soc/atmel/Kconfig +++ b/sound/soc/atmel/Kconfig | |||
| @@ -10,20 +10,31 @@ if SND_ATMEL_SOC | |||
| 10 | 10 | ||
| 11 | config SND_ATMEL_SOC_PDC | 11 | config SND_ATMEL_SOC_PDC |
| 12 | tristate | 12 | tristate |
| 13 | default m if SND_ATMEL_SOC_SSC_PDC=m && SND_ATMEL_SOC_SSC=m | ||
| 14 | default y if SND_ATMEL_SOC_SSC_PDC=y || (SND_ATMEL_SOC_SSC_PDC=m && SND_ATMEL_SOC_SSC=y) | ||
| 15 | |||
| 16 | config SND_ATMEL_SOC_SSC_PDC | ||
| 17 | tristate | ||
| 13 | 18 | ||
| 14 | config SND_ATMEL_SOC_DMA | 19 | config SND_ATMEL_SOC_DMA |
| 15 | tristate | 20 | tristate |
| 16 | select SND_SOC_GENERIC_DMAENGINE_PCM | 21 | select SND_SOC_GENERIC_DMAENGINE_PCM |
| 22 | default m if SND_ATMEL_SOC_SSC_DMA=m && SND_ATMEL_SOC_SSC=m | ||
| 23 | default y if SND_ATMEL_SOC_SSC_DMA=y || (SND_ATMEL_SOC_SSC_DMA=m && SND_ATMEL_SOC_SSC=y) | ||
| 24 | |||
| 25 | config SND_ATMEL_SOC_SSC_DMA | ||
| 26 | tristate | ||
| 17 | 27 | ||
| 18 | config SND_ATMEL_SOC_SSC | 28 | config SND_ATMEL_SOC_SSC |
| 19 | tristate | 29 | tristate |
| 30 | default y if SND_ATMEL_SOC_SSC_DMA=y || SND_ATMEL_SOC_SSC_PDC=y | ||
| 31 | default m if SND_ATMEL_SOC_SSC_DMA=m || SND_ATMEL_SOC_SSC_PDC=m | ||
| 20 | 32 | ||
| 21 | config SND_AT91_SOC_SAM9G20_WM8731 | 33 | config SND_AT91_SOC_SAM9G20_WM8731 |
| 22 | tristate "SoC Audio support for WM8731-based At91sam9g20 evaluation board" | 34 | tristate "SoC Audio support for WM8731-based At91sam9g20 evaluation board" |
| 23 | depends on ARCH_AT91 || COMPILE_TEST | 35 | depends on ARCH_AT91 || COMPILE_TEST |
| 24 | depends on ATMEL_SSC && SND_SOC_I2C_AND_SPI | 36 | depends on ATMEL_SSC && SND_SOC_I2C_AND_SPI |
| 25 | select SND_ATMEL_SOC_PDC | 37 | select SND_ATMEL_SOC_SSC_PDC |
| 26 | select SND_ATMEL_SOC_SSC | ||
| 27 | select SND_SOC_WM8731 | 38 | select SND_SOC_WM8731 |
| 28 | help | 39 | help |
| 29 | Say Y if you want to add support for SoC audio on WM8731-based | 40 | Say Y if you want to add support for SoC audio on WM8731-based |
| @@ -33,8 +44,7 @@ config SND_ATMEL_SOC_WM8904 | |||
| 33 | tristate "Atmel ASoC driver for boards using WM8904 codec" | 44 | tristate "Atmel ASoC driver for boards using WM8904 codec" |
| 34 | depends on ARCH_AT91 || COMPILE_TEST | 45 | depends on ARCH_AT91 || COMPILE_TEST |
| 35 | depends on ATMEL_SSC && I2C | 46 | depends on ATMEL_SSC && I2C |
| 36 | select SND_ATMEL_SOC_SSC | 47 | select SND_ATMEL_SOC_SSC_DMA |
| 37 | select SND_ATMEL_SOC_DMA | ||
| 38 | select SND_SOC_WM8904 | 48 | select SND_SOC_WM8904 |
| 39 | help | 49 | help |
| 40 | Say Y if you want to add support for Atmel ASoC driver for boards using | 50 | Say Y if you want to add support for Atmel ASoC driver for boards using |
| @@ -44,8 +54,7 @@ config SND_AT91_SOC_SAM9X5_WM8731 | |||
| 44 | tristate "SoC Audio support for WM8731-based at91sam9x5 board" | 54 | tristate "SoC Audio support for WM8731-based at91sam9x5 board" |
| 45 | depends on ARCH_AT91 || COMPILE_TEST | 55 | depends on ARCH_AT91 || COMPILE_TEST |
| 46 | depends on ATMEL_SSC && SND_SOC_I2C_AND_SPI | 56 | depends on ATMEL_SSC && SND_SOC_I2C_AND_SPI |
| 47 | select SND_ATMEL_SOC_SSC | 57 | select SND_ATMEL_SOC_SSC_DMA |
| 48 | select SND_ATMEL_SOC_DMA | ||
| 49 | select SND_SOC_WM8731 | 58 | select SND_SOC_WM8731 |
| 50 | help | 59 | help |
| 51 | Say Y if you want to add support for audio SoC on an | 60 | Say Y if you want to add support for audio SoC on an |
