Skip to content

Commit 9437bfd

Browse files
arndbbroonie
authored andcommitted
ASoC: atmel: fix atmel_ssc_set_audio link failure
The ssc audio driver can call into both pdc and dma backends. With the latest rework, the logic to do this in a safe way avoiding link errors was removed, bringing back link errors that were fixed long ago in commit 061981f ("ASoC: atmel: properly select dma driver state") such as sound/soc/atmel/atmel_ssc_dai.o: In function `atmel_ssc_set_audio': atmel_ssc_dai.c:(.text+0xac): undefined reference to `atmel_pcm_pdc_platform_register' Fix it this time using Makefile hacks and a comment to prevent this from accidentally getting removed again rather than Kconfig hacks. Fixes: 1829141 ("ASoC: atmel: enable SOC_SSC_PDC and SOC_SSC_DMA in Kconfig") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Codrin Ciubotariu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Michał Mirosław <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent d152088 commit 9437bfd

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

sound/soc/atmel/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ config SND_ATMEL_SOC
1010
if SND_ATMEL_SOC
1111

1212
config SND_ATMEL_SOC_PDC
13-
tristate
13+
bool
1414
depends on HAS_DMA
1515

1616
config SND_ATMEL_SOC_DMA
17-
tristate
17+
bool
1818
select SND_SOC_GENERIC_DMAENGINE_PCM
1919

2020
config SND_ATMEL_SOC_SSC

sound/soc/atmel/Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ snd-soc-atmel_ssc_dai-objs := atmel_ssc_dai.o
66
snd-soc-atmel-i2s-objs := atmel-i2s.o
77
snd-soc-mchp-i2s-mcc-objs := mchp-i2s-mcc.o
88

9-
obj-$(CONFIG_SND_ATMEL_SOC_PDC) += snd-soc-atmel-pcm-pdc.o
10-
obj-$(CONFIG_SND_ATMEL_SOC_DMA) += snd-soc-atmel-pcm-dma.o
9+
# pdc and dma need to both be built-in if any user of
10+
# ssc is built-in.
11+
ifdef CONFIG_SND_ATMEL_SOC_PDC
12+
obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-pdc.o
13+
endif
14+
ifdef CONFIG_SND_ATMEL_SOC_DMA
15+
obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-dma.o
16+
endif
1117
obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel_ssc_dai.o
1218
obj-$(CONFIG_SND_ATMEL_SOC_I2S) += snd-soc-atmel-i2s.o
1319
obj-$(CONFIG_SND_MCHP_SOC_I2S_MCC) += snd-soc-mchp-i2s-mcc.o

0 commit comments

Comments
 (0)