diff mbox

ASoC: Intel: fix Kconfig dependencies

Message ID 20171102110737.2813128-1-arnd@arndb.de (mailing list archive)
State Accepted
Commit f7a88db6fffdd193d792de5dae7890528b995cc0
Headers show

Commit Message

Arnd Bergmann Nov. 2, 2017, 11:07 a.m. UTC
I ran into multiple problems during randconfig builds of the
recently changed Kconfig logic for Intel ASoC drivers:

- Building without DMADEVICES doesn't work in general
- With that dependency added, we can relax the 'depends
  on X86' again and allow compile-testing, except for
  SND_SST_ATOM_HIFI2_PLATFORM, which depends on X86
  for asm/platform_sst_audio.h
- Skylake requires SND_SOC_INTEL_SST_ACPI, so we
  have to depend on ACPI in turn
- Haswell needs SND_DMA_SGBUF for snd_sgbuf_aligned_pages()

With the new set of dependencies, I no longer get any build
failures.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/intel/Kconfig | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Pierre-Louis Bossart Nov. 2, 2017, 12:43 p.m. UTC | #1
On 11/2/17 6:07 AM, Arnd Bergmann wrote:
> I ran into multiple problems during randconfig builds of the
> recently changed Kconfig logic for Intel ASoC drivers:

we did quite a bit of testing on this change, looks like we missed a 
number of cases. Gah.

> 
> - Building without DMADEVICES doesn't work in general

the Intel audio hardware has its own DMA in general, be it based on 
DesignWare controlled by audio firmware or HDaudio, not sure if/why this 
dependency is needed across the board?

> - With that dependency added, we can relax the 'depends
>    on X86' again and allow compile-testing, except for
>    SND_SST_ATOM_HIFI2_PLATFORM, which depends on X86
>    for asm/platform_sst_audio. > - Skylake requires SND_SOC_INTEL_SST_ACPI, so we
>    have to depend on ACPI in turn
> - Haswell needs SND_DMA_SGBUF for snd_sgbuf_aligned_pages()

This one is surprising as well, this was not there before so it either 
was not detected or is not needed?

> 
> With the new set of dependencies, I no longer get any build
> failures.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   sound/soc/intel/Kconfig | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> index a59dda39007e..e18118209b75 100644
> --- a/sound/soc/intel/Kconfig
> +++ b/sound/soc/intel/Kconfig
> @@ -31,13 +31,14 @@ config SND_SOC_ACPI_INTEL_MATCH
>   
>   config SND_SOC_INTEL_SST_TOPLEVEL
>   	tristate "Intel ASoC SST drivers"
> -	depends on X86
> +	depends on X86 || COMPILE_TEST
> +	depends on DMADEVICES
>   	select SND_SOC_INTEL_MACH
>   	select SND_SOC_INTEL_COMMON
>   
>   config SND_SOC_INTEL_HASWELL
>   	tristate "Intel ASoC SST driver for Haswell/Broadwell"
> -	depends on SND_SOC_INTEL_SST_TOPLEVEL
> +	depends on SND_SOC_INTEL_SST_TOPLEVEL && SND_DMA_SGBUF
>   	select SND_SOC_INTEL_SST
>   	select SND_SOC_INTEL_SST_FIRMWARE
>   
> @@ -49,12 +50,12 @@ config SND_SOC_INTEL_BAYTRAIL
>   
>   config SND_SST_ATOM_HIFI2_PLATFORM
>   	tristate "Intel ASoC SST driver for HiFi2 platforms (*field, *trail)"
> -	depends on SND_SOC_INTEL_SST_TOPLEVEL
> +	depends on SND_SOC_INTEL_SST_TOPLEVEL && X86
>   	select SND_SOC_COMPRESS
>   
>   config SND_SOC_INTEL_SKYLAKE
>   	tristate "Intel ASoC SST driver for SKL/BXT/KBL/GLK/CNL"
> -	depends on SND_SOC_INTEL_SST_TOPLEVEL
> +	depends on SND_SOC_INTEL_SST_TOPLEVEL && PCI && ACPI
>   	select SND_HDA_EXT_CORE
>   	select SND_HDA_DSP_LOADER
>   	select SND_SOC_TOPOLOGY
>
Arnd Bergmann Nov. 2, 2017, 1:04 p.m. UTC | #2
On Thu, Nov 2, 2017 at 1:43 PM, Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
> On 11/2/17 6:07 AM, Arnd Bergmann wrote:
>>
>> I ran into multiple problems during randconfig builds of the
>> recently changed Kconfig logic for Intel ASoC drivers:
>
>
> we did quite a bit of testing on this change, looks like we missed a number
> of cases. Gah.
>
>>
>> - Building without DMADEVICES doesn't work in general
>
>
> the Intel audio hardware has its own DMA in general, be it based on
> DesignWare controlled by audio firmware or HDaudio, not sure if/why this
> dependency is needed across the board?

Probably my mistake. I'll try again without the dependency and see
what problems I run into then and what the correct fix is.

>> - With that dependency added, we can relax the 'depends
>>    on X86' again and allow compile-testing, except for
>>    SND_SST_ATOM_HIFI2_PLATFORM, which depends on X86
>>    for asm/platform_sst_audio. > - Skylake requires
>> SND_SOC_INTEL_SST_ACPI, so we
>>    have to depend on ACPI in turn
>> - Haswell needs SND_DMA_SGBUF for snd_sgbuf_aligned_pages()
>
>
> This one is surprising as well, this was not there before so it either was
> not detected or is not needed?

No idea. The driver has clearly been calling snd_sgbuf_aligned_pages()
since commit 0b708c87f66a ("ASoC: Intel: Fix Haswell/Broadwell DSP
page table creation.") back in 2014, and the helper function has been
unavailable since 2008. My best guess is that some other Kconfig option
enforced the dependency implicitly before.

       Arnd
diff mbox

Patch

diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
index a59dda39007e..e18118209b75 100644
--- a/sound/soc/intel/Kconfig
+++ b/sound/soc/intel/Kconfig
@@ -31,13 +31,14 @@  config SND_SOC_ACPI_INTEL_MATCH
 
 config SND_SOC_INTEL_SST_TOPLEVEL
 	tristate "Intel ASoC SST drivers"
-	depends on X86
+	depends on X86 || COMPILE_TEST
+	depends on DMADEVICES
 	select SND_SOC_INTEL_MACH
 	select SND_SOC_INTEL_COMMON
 
 config SND_SOC_INTEL_HASWELL
 	tristate "Intel ASoC SST driver for Haswell/Broadwell"
-	depends on SND_SOC_INTEL_SST_TOPLEVEL
+	depends on SND_SOC_INTEL_SST_TOPLEVEL && SND_DMA_SGBUF
 	select SND_SOC_INTEL_SST
 	select SND_SOC_INTEL_SST_FIRMWARE
 
@@ -49,12 +50,12 @@  config SND_SOC_INTEL_BAYTRAIL
 
 config SND_SST_ATOM_HIFI2_PLATFORM
 	tristate "Intel ASoC SST driver for HiFi2 platforms (*field, *trail)"
-	depends on SND_SOC_INTEL_SST_TOPLEVEL
+	depends on SND_SOC_INTEL_SST_TOPLEVEL && X86
 	select SND_SOC_COMPRESS
 
 config SND_SOC_INTEL_SKYLAKE
 	tristate "Intel ASoC SST driver for SKL/BXT/KBL/GLK/CNL"
-	depends on SND_SOC_INTEL_SST_TOPLEVEL
+	depends on SND_SOC_INTEL_SST_TOPLEVEL && PCI && ACPI
 	select SND_HDA_EXT_CORE
 	select SND_HDA_DSP_LOADER
 	select SND_SOC_TOPOLOGY