* [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure
@ 2019-10-01 14:20 Arnd Bergmann
2019-10-01 14:27 ` Alexandre Belloni
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Arnd Bergmann @ 2019-10-01 14:20 UTC (permalink / raw)
To: Codrin Ciubotariu, Mark Brown
Cc: alsa-devel, Alexandre Belloni, Arnd Bergmann, Liam Girdwood,
linux-kernel, Takashi Iwai, Jaroslav Kysela, Ludovic Desroches,
Michał Mirosław, linux-arm-kernel
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
061981ff8cc8 ("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: 18291410557f ("ASoC: atmel: enable SOC_SSC_PDC and SOC_SSC_DMA in Kconfig")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
sound/soc/atmel/Kconfig | 4 ++--
sound/soc/atmel/Makefile | 10 ++++++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig
index f118c229ed82..25c31bf64936 100644
--- a/sound/soc/atmel/Kconfig
+++ b/sound/soc/atmel/Kconfig
@@ -10,11 +10,11 @@ config SND_ATMEL_SOC
if SND_ATMEL_SOC
config SND_ATMEL_SOC_PDC
- tristate
+ bool
depends on HAS_DMA
config SND_ATMEL_SOC_DMA
- tristate
+ bool
select SND_SOC_GENERIC_DMAENGINE_PCM
config SND_ATMEL_SOC_SSC
diff --git a/sound/soc/atmel/Makefile b/sound/soc/atmel/Makefile
index 1f6890ed3738..c7d2989791be 100644
--- a/sound/soc/atmel/Makefile
+++ b/sound/soc/atmel/Makefile
@@ -6,8 +6,14 @@ snd-soc-atmel_ssc_dai-objs := atmel_ssc_dai.o
snd-soc-atmel-i2s-objs := atmel-i2s.o
snd-soc-mchp-i2s-mcc-objs := mchp-i2s-mcc.o
-obj-$(CONFIG_SND_ATMEL_SOC_PDC) += snd-soc-atmel-pcm-pdc.o
-obj-$(CONFIG_SND_ATMEL_SOC_DMA) += snd-soc-atmel-pcm-dma.o
+# pdc and dma need to both be built-in if any user of
+# ssc is built-in.
+ifdef CONFIG_SND_ATMEL_SOC_PDC
+obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-pdc.o
+endif
+ifdef CONFIG_SND_ATMEL_SOC_DMA
+obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-dma.o
+endif
obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel_ssc_dai.o
obj-$(CONFIG_SND_ATMEL_SOC_I2S) += snd-soc-atmel-i2s.o
obj-$(CONFIG_SND_MCHP_SOC_I2S_MCC) += snd-soc-mchp-i2s-mcc.o
--
2.20.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure
2019-10-01 14:20 [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure Arnd Bergmann
@ 2019-10-01 14:27 ` Alexandre Belloni
2019-10-01 15:59 ` Arnd Bergmann
2019-10-01 14:56 ` Michał Mirosław
2019-10-01 17:55 ` Mark Brown
2 siblings, 1 reply; 7+ messages in thread
From: Alexandre Belloni @ 2019-10-01 14:27 UTC (permalink / raw)
To: Arnd Bergmann
Cc: alsa-devel, Liam Girdwood, linux-kernel, Takashi Iwai,
Jaroslav Kysela, Ludovic Desroches, Mark Brown,
Codrin Ciubotariu, Michał Mirosław, linux-arm-kernel
Hi,
On 01/10/2019 16:20:55+0200, Arnd Bergmann wrote:
> 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
> 061981ff8cc8 ("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: 18291410557f ("ASoC: atmel: enable SOC_SSC_PDC and SOC_SSC_DMA in Kconfig")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> sound/soc/atmel/Kconfig | 4 ++--
> sound/soc/atmel/Makefile | 10 ++++++++--
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig
> index f118c229ed82..25c31bf64936 100644
> --- a/sound/soc/atmel/Kconfig
> +++ b/sound/soc/atmel/Kconfig
> @@ -10,11 +10,11 @@ config SND_ATMEL_SOC
> if SND_ATMEL_SOC
>
> config SND_ATMEL_SOC_PDC
> - tristate
> + bool
> depends on HAS_DMA
>
> config SND_ATMEL_SOC_DMA
> - tristate
> + bool
> select SND_SOC_GENERIC_DMAENGINE_PCM
>
> config SND_ATMEL_SOC_SSC
> diff --git a/sound/soc/atmel/Makefile b/sound/soc/atmel/Makefile
> index 1f6890ed3738..c7d2989791be 100644
> --- a/sound/soc/atmel/Makefile
> +++ b/sound/soc/atmel/Makefile
> @@ -6,8 +6,14 @@ snd-soc-atmel_ssc_dai-objs := atmel_ssc_dai.o
> snd-soc-atmel-i2s-objs := atmel-i2s.o
> snd-soc-mchp-i2s-mcc-objs := mchp-i2s-mcc.o
>
> -obj-$(CONFIG_SND_ATMEL_SOC_PDC) += snd-soc-atmel-pcm-pdc.o
> -obj-$(CONFIG_SND_ATMEL_SOC_DMA) += snd-soc-atmel-pcm-dma.o
> +# pdc and dma need to both be built-in if any user of
> +# ssc is built-in.
> +ifdef CONFIG_SND_ATMEL_SOC_PDC
> +obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-pdc.o
> +endif
> +ifdef CONFIG_SND_ATMEL_SOC_DMA
> +obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-dma.o
> +endif
Doesn't that prevent them to be built as a module at all?
I'm not sure there is a use case though.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure
2019-10-01 14:20 [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure Arnd Bergmann
2019-10-01 14:27 ` Alexandre Belloni
@ 2019-10-01 14:56 ` Michał Mirosław
2019-10-01 17:55 ` Mark Brown
2 siblings, 0 replies; 7+ messages in thread
From: Michał Mirosław @ 2019-10-01 14:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Alexandre Belloni, alsa-devel, Liam Girdwood, linux-kernel,
Takashi Iwai, Jaroslav Kysela, Ludovic Desroches, Mark Brown,
Codrin Ciubotariu, linux-arm-kernel
On Tue, Oct 01, 2019 at 04:20:55PM +0200, Arnd Bergmann wrote:
> 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
> 061981ff8cc8 ("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: 18291410557f ("ASoC: atmel: enable SOC_SSC_PDC and SOC_SSC_DMA in Kconfig")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> sound/soc/atmel/Kconfig | 4 ++--
> sound/soc/atmel/Makefile | 10 ++++++++--
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig
> index f118c229ed82..25c31bf64936 100644
> --- a/sound/soc/atmel/Kconfig
> +++ b/sound/soc/atmel/Kconfig
> @@ -10,11 +10,11 @@ config SND_ATMEL_SOC
> if SND_ATMEL_SOC
>
> config SND_ATMEL_SOC_PDC
> - tristate
> + bool
> depends on HAS_DMA
>
> config SND_ATMEL_SOC_DMA
> - tristate
> + bool
> select SND_SOC_GENERIC_DMAENGINE_PCM
>
> config SND_ATMEL_SOC_SSC
> diff --git a/sound/soc/atmel/Makefile b/sound/soc/atmel/Makefile
> index 1f6890ed3738..c7d2989791be 100644
> --- a/sound/soc/atmel/Makefile
> +++ b/sound/soc/atmel/Makefile
> @@ -6,8 +6,14 @@ snd-soc-atmel_ssc_dai-objs := atmel_ssc_dai.o
> snd-soc-atmel-i2s-objs := atmel-i2s.o
> snd-soc-mchp-i2s-mcc-objs := mchp-i2s-mcc.o
>
> -obj-$(CONFIG_SND_ATMEL_SOC_PDC) += snd-soc-atmel-pcm-pdc.o
> -obj-$(CONFIG_SND_ATMEL_SOC_DMA) += snd-soc-atmel-pcm-dma.o
> +# pdc and dma need to both be built-in if any user of
> +# ssc is built-in.
> +ifdef CONFIG_SND_ATMEL_SOC_PDC
> +obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-pdc.o
> +endif
> +ifdef CONFIG_SND_ATMEL_SOC_DMA
> +obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-dma.o
> +endif
> obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel_ssc_dai.o
> obj-$(CONFIG_SND_ATMEL_SOC_I2S) += snd-soc-atmel-i2s.o
> obj-$(CONFIG_SND_MCHP_SOC_I2S_MCC) += snd-soc-mchp-i2s-mcc.o
I was just exploring similar solution, using $(if X,Y) instead, but your
fix will work just as well.
Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Best Regards,
Michał Mirosław
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure
2019-10-01 14:27 ` Alexandre Belloni
@ 2019-10-01 15:59 ` Arnd Bergmann
0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2019-10-01 15:59 UTC (permalink / raw)
To: Alexandre Belloni
Cc: ALSA Development Mailing List, Liam Girdwood, linux-kernel,
Takashi Iwai, Jaroslav Kysela, Ludovic Desroches, Mark Brown,
Codrin Ciubotariu, Michał Mirosław, Linux ARM
On Tue, Oct 1, 2019 at 4:27 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
> > -obj-$(CONFIG_SND_ATMEL_SOC_PDC) += snd-soc-atmel-pcm-pdc.o
> > -obj-$(CONFIG_SND_ATMEL_SOC_DMA) += snd-soc-atmel-pcm-dma.o
> > +# pdc and dma need to both be built-in if any user of
> > +# ssc is built-in.
> > +ifdef CONFIG_SND_ATMEL_SOC_PDC
> > +obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-pdc.o
> > +endif
> > +ifdef CONFIG_SND_ATMEL_SOC_DMA
> > +obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-dma.o
> > +endif
>
> Doesn't that prevent them to be built as a module at all?
> I'm not sure there is a use case though.
It should not: the idea was that snd-soc-atmel-pcm-{pdc,dma}.o
get built as modules if CONFIG_SND_ATMEL_SOC_SSC=m.
arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure
2019-10-01 14:20 [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure Arnd Bergmann
2019-10-01 14:27 ` Alexandre Belloni
2019-10-01 14:56 ` Michał Mirosław
@ 2019-10-01 17:55 ` Mark Brown
2019-10-01 19:02 ` Arnd Bergmann
2 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2019-10-01 17:55 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Alexandre Belloni, alsa-devel, linux-kernel, Takashi Iwai,
Liam Girdwood, Jaroslav Kysela, Ludovic Desroches,
Codrin Ciubotariu, Michał Mirosław, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 426 bytes --]
On Tue, Oct 01, 2019 at 04:20:55PM +0200, Arnd Bergmann wrote:
> 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
> 061981ff8cc8 ("ASoC: atmel: properly select dma driver state") such as
This doesn't apply against current code, please check and resend.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure
2019-10-01 17:55 ` Mark Brown
@ 2019-10-01 19:02 ` Arnd Bergmann
2019-10-02 11:33 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2019-10-01 19:02 UTC (permalink / raw)
To: Mark Brown
Cc: Alexandre Belloni, ALSA Development Mailing List, linux-kernel,
Takashi Iwai, Liam Girdwood, Jaroslav Kysela, Ludovic Desroches,
Codrin Ciubotariu, Michał Mirosław, Linux ARM
On Tue, Oct 1, 2019 at 7:55 PM Mark Brown <broonie@kernel.org> wrote:
>
> On Tue, Oct 01, 2019 at 04:20:55PM +0200, Arnd Bergmann wrote:
> > 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
> > 061981ff8cc8 ("ASoC: atmel: properly select dma driver state") such as
>
> This doesn't apply against current code, please check and resend.
I looked at "git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
for-next"
as well as the for-linus branch in the same place, but found no
conflicting changes
in there compared to v5.4-rc1. Am I looking at the right tree?
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure
2019-10-01 19:02 ` Arnd Bergmann
@ 2019-10-02 11:33 ` Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2019-10-02 11:33 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Alexandre Belloni, ALSA Development Mailing List, linux-kernel,
Takashi Iwai, Liam Girdwood, Jaroslav Kysela, Ludovic Desroches,
Codrin Ciubotariu, Michał Mirosław, Linux ARM
[-- Attachment #1.1: Type: text/plain, Size: 498 bytes --]
On Tue, Oct 01, 2019 at 09:02:22PM +0200, Arnd Bergmann wrote:
> On Tue, Oct 1, 2019 at 7:55 PM Mark Brown <broonie@kernel.org> wrote:
> > This doesn't apply against current code, please check and resend.
> I looked at "git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
> for-next"
> as well as the for-linus branch in the same place, but found no
> conflicting changes
> in there compared to v5.4-rc1. Am I looking at the right tree?
Yes. I'm just going by what git said here...
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-10-02 11:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 14:20 [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure Arnd Bergmann
2019-10-01 14:27 ` Alexandre Belloni
2019-10-01 15:59 ` Arnd Bergmann
2019-10-01 14:56 ` Michał Mirosław
2019-10-01 17:55 ` Mark Brown
2019-10-01 19:02 ` Arnd Bergmann
2019-10-02 11:33 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).