Skip to contentSkip to conversation

ASoC: atmel: add COMPILE_TEST for SND_ATMEL_SOC_PDC

PATCH In review Randy Dunlap 3 participants 5 messages Oct 3, 2021 – Oct 13, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: atmel: add COMPILE_TEST for SND_ATMEL_SOC_PDC

Geert pointed out that since sound/soc has the soc_dummy_driver for NO_DMA platforms, it is possible (desirable) to have drivers that depend on HAS_DMA to alternately depend on COMPILE_TEST.

This means that SND_ATMEL_SOC_PDC can depend on HAS_DMA || COMPIE_TEST.

Fixes 6c5c659dfe3f ("ASoC: atmel: ATMEL drivers don't need HAS_DMA")
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Codrin Ciubotariu <[email protected]>
---
 sound/soc/atmel/Kconfig |    1 +
 1 file changed, 1 insertion(+)
sound/soc/atmel/Kconfig +1 -0
@@ -11,6 +11,7 @@ if SND_ATMEL_SOC
 
 config SND_ATMEL_SOC_PDC
 	bool
+	depends on HAS_DMA || COMPILE_TEST
 
 config SND_ATMEL_SOC_DMA
 	bool
Reviewed-by on v1 1/1
#1 lore raw

Hi Randy,

Quoted 3 lines · Randy Dunlap

Geert pointed out that since sound/soc has the soc_dummy_driver for NO_DMA platforms, it is possible (desirable) to have drivers that depend on HAS_DMA to alternately depend on COMPILE_TEST.

Actually I had never heard about the soc_dummy_driver before ;-) I did know about the dummies in include/linux/dma-mapping.h.

Quoted 1 line

This means that SND_ATMEL_SOC_PDC can depend on HAS_DMA || COMPIE_TEST.

COMPILE_TEST

Quoted 14 lines
Fixes 6c5c659dfe3f ("ASoC: atmel: ATMEL drivers don't need HAS_DMA")
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Codrin Ciubotariu <[email protected]>
---
 sound/soc/atmel/Kconfig |    1 +
 1 file changed, 1 insertion(+)

sound/soc/atmel/Kconfig if SND_ATMEL_SOC · line 17

Quoted 7 lines
sound/soc/atmel/Kconfig +1 -0
@@ -11,6 +11,7 @@ if SND_ATMEL_SOC
 
 config SND_ATMEL_SOC_PDC
        bool
+       depends on HAS_DMA || COMPILE_TEST
 
 config SND_ATMEL_SOC_DMA
        bool

The actual change LGTM, so

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
In reply to Randy Dunlap
Quoted 20 lines · Randy Dunlap

Geert pointed out that since sound/soc has the soc_dummy_driver for NO_DMA platforms, it is possible (desirable) to have drivers that depend on HAS_DMA to alternately depend on COMPILE_TEST.

This means that SND_ATMEL_SOC_PDC can depend on HAS_DMA || COMPIE_TEST.

Fixes 6c5c659dfe3f ("ASoC: atmel: ATMEL drivers don't need HAS_DMA")
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Codrin Ciubotariu <[email protected]>
---
  sound/soc/atmel/Kconfig |    1 +
  1 file changed, 1 insertion(+)

sound/soc/atmel/Kconfig if SND_ATMEL_SOC · line 14

Quoted 4 lines
sound/soc/atmel/Kconfig +1 -0
@@ -11,6 +11,7 @@ if SND_ATMEL_SOC
 
  config SND_ATMEL_SOC_PDC
         bool
+       depends on HAS_DMA || COMPILE_TEST

SND_ATMEL_SOC_PDC compiles fine without HAS_DMA, so I don't understand the need for this...

#3 lore raw

Hi Codrin,

Quoted 22 lines · On Wed, Oct 13, 2021 at 10:15 AM <[email protected]> wrote:
Quoted 21 lines · Randy Dunlap

Geert pointed out that since sound/soc has the soc_dummy_driver for NO_DMA platforms, it is possible (desirable) to have drivers that depend on HAS_DMA to alternately depend on COMPILE_TEST.

This means that SND_ATMEL_SOC_PDC can depend on HAS_DMA || COMPIE_TEST.

Fixes 6c5c659dfe3f ("ASoC: atmel: ATMEL drivers don't need HAS_DMA")
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Codrin Ciubotariu <[email protected]>
---
  sound/soc/atmel/Kconfig |    1 +
  1 file changed, 1 insertion(+)
sound/soc/atmel/Kconfig +0 -0
@@ -11,6 +11,7 @@ if SND_ATMEL_SOC
 
Quoted 6 lines

sound/soc/atmel/Kconfig if SND_ATMEL_SOC · line 14

Quoted 3 lines
sound/soc/atmel/Kconfig +1 -0
  config SND_ATMEL_SOC_PDC
         bool
+       depends on HAS_DMA || COMPILE_TEST

SND_ATMEL_SOC_PDC compiles fine without HAS_DMA, so I don't understand the need for this...

Does it work without DMA support?
If not, it doesn't make much sense to offer this option to the user, unless the user is compile-testing.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Reviewed-by
#4 lore raw
Quoted 32 lines · Geert Uytterhoeven

Hi Codrin,

Quoted 22 lines · On Wed, Oct 13, 2021 at 10:15 AM <[email protected]> wrote:
Quoted 21 lines · Randy Dunlap

Geert pointed out that since sound/soc has the soc_dummy_driver for NO_DMA platforms, it is possible (desirable) to have drivers that depend on HAS_DMA to alternately depend on COMPILE_TEST.

This means that SND_ATMEL_SOC_PDC can depend on HAS_DMA || COMPIE_TEST.

Fixes 6c5c659dfe3f ("ASoC: atmel: ATMEL drivers don't need HAS_DMA")
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Codrin Ciubotariu <[email protected]>
---
   sound/soc/atmel/Kconfig |    1 +
   1 file changed, 1 insertion(+)
sound/soc/atmel/Kconfig +0 -0
@@ -11,6 +11,7 @@ if SND_ATMEL_SOC
 
Quoted 6 lines

sound/soc/atmel/Kconfig if SND_ATMEL_SOC · line 14

Quoted 3 lines
sound/soc/atmel/Kconfig +1 -0
   config SND_ATMEL_SOC_PDC
          bool
+       depends on HAS_DMA || COMPILE_TEST

SND_ATMEL_SOC_PDC compiles fine without HAS_DMA, so I don't understand the need for this...

Quoted 3 lines

Does it work without DMA support?
If not, it doesn't make much sense to offer this option to the user, unless the user is compile-testing.

it is using a Peripheral DMA controller, that is mapped in SSC's address space and is not using the DMA engine. I see that HAS_DMA is needed for the DMA mapping API, which we use, so I guess we do depend on it. That being said:

Thanks!