瀏覽代碼

ASoC: atmel: compile pcm driver in snd-soc-atmel_ssc_dai

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'

Solve that by compiling the selected PCM driver (PDC, DMA or both) in the
Atmel SSC DAI driver.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Alexandre Belloni 10 年之前
父節點
當前提交
0ef9dc139d
共有 2 個文件被更改,包括 5 次插入7 次删除
  1. 2 2
      sound/soc/atmel/Kconfig
  2. 3 5
      sound/soc/atmel/Makefile

+ 2 - 2
sound/soc/atmel/Kconfig

@@ -9,10 +9,10 @@ config SND_ATMEL_SOC
 if SND_ATMEL_SOC
 if SND_ATMEL_SOC
 
 
 config SND_ATMEL_SOC_PDC
 config SND_ATMEL_SOC_PDC
-	tristate
+	bool
 
 
 config SND_ATMEL_SOC_DMA
 config SND_ATMEL_SOC_DMA
-	tristate
+	bool
 	select SND_SOC_GENERIC_DMAENGINE_PCM
 	select SND_SOC_GENERIC_DMAENGINE_PCM
 
 
 config SND_ATMEL_SOC_SSC
 config SND_ATMEL_SOC_SSC

+ 3 - 5
sound/soc/atmel/Makefile

@@ -1,10 +1,8 @@
 # AT91 Platform Support
 # AT91 Platform Support
-snd-soc-atmel-pcm-pdc-objs := atmel-pcm-pdc.o
-snd-soc-atmel-pcm-dma-objs := atmel-pcm-dma.o
-snd-soc-atmel_ssc_dai-objs := atmel_ssc_dai.o
+snd-soc-atmel-pcm-$(CONFIG_SND_ATMEL_SOC_PDC) := atmel-pcm-pdc.o
+snd-soc-atmel-pcm-$(CONFIG_SND_ATMEL_SOC_DMA) += atmel-pcm-dma.o
+snd-soc-atmel_ssc_dai-objs := atmel_ssc_dai.o $(snd-soc-atmel-pcm-y)
 
 
-obj-$(CONFIG_SND_ATMEL_SOC_PDC) += snd-soc-atmel-pcm-pdc.o
-obj-$(CONFIG_SND_ATMEL_SOC_DMA) += snd-soc-atmel-pcm-dma.o
 obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel_ssc_dai.o
 obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel_ssc_dai.o
 
 
 # AT91 Machine Support
 # AT91 Machine Support