Skip to contentSkip to conversation

ASoC: Intel: improve DMADEVICES dependency

PATCH In review Arnd Bergmann 4 participants 9 messages Nov 8, 2017

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

PATCH 1/2 ASoC: Intel: improve DMADEVICES dependency

As pointed out by Pierre-Louis Bossart, the depndency I added was broader than necessary, only Baytrail and Haswell/Broadwell actually need it, the others don't.

At the same time, we have individual entries for the codecs that all have the 'select' statement but now don't need it any more.

Fixes f7a88db6fffd ("ASoC: Intel: fix Kconfig dependencies")
---
 sound/soc/intel/Kconfig        | 3 ++-
 sound/soc/intel/boards/Kconfig | 5 -----
 2 files changed, 2 insertions(+), 6 deletions(-)
sound/soc/intel/Kconfig +2 -1
index e18118209b75..bb8be10b8437 100644
@@ -32,19 +32,20 @@ config SND_SOC_ACPI_INTEL_MATCH
 config SND_SOC_INTEL_SST_TOPLEVEL
 	tristate "Intel ASoC SST drivers"
 	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 && SND_DMA_SGBUF
+	depends on DMADEVICES
 	select SND_SOC_INTEL_SST
 	select SND_SOC_INTEL_SST_FIRMWARE
 
 config SND_SOC_INTEL_BAYTRAIL
 	tristate "Intel ASoC SST driver for Baytrail (legacy)"
 	depends on SND_SOC_INTEL_SST_TOPLEVEL
+	depends on DMADEVICES
 	select SND_SOC_INTEL_SST
 	select SND_SOC_INTEL_SST_FIRMWARE
 
sound/soc/intel/boards/Kconfig +0 -5
index 449bc8baaa60..5063f15b4ca4 100644
@@ -19,7 +19,6 @@ config SND_SOC_INTEL_HASWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
-	depends on DMADEVICES
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5640
 	help
@@ -32,7 +31,6 @@ config SND_SOC_INTEL_BDW_RT5677_MACH
 	tristate "ASoC Audio driver for Intel Broadwell with RT5677 codec"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && GPIOLIB && I2C
-	depends on DMADEVICES
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5677
 	help
@@ -43,7 +41,6 @@ config SND_SOC_INTEL_BROADWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
-	depends on DMADEVICES
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT286
 	help
@@ -56,7 +53,6 @@ config SND_SOC_INTEL_BYT_MAX98090_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with MAX98090 codec"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
-	depends on DMADEVICES
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
 	select SND_SOC_MAX98090
@@ -68,7 +64,6 @@ config SND_SOC_INTEL_BYT_RT5640_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with RT5640 codec"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
-	depends on DMADEVICES
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
 	select SND_SOC_RT5640
Signature · 1 line
2.9.0
#1 lore raw

PATCH 2/2 ASoC: Intel: improve SND_SOC_INTEL_MACH dependencies

I ran into a build error with CONFIG_SND_SOC_INTEL_COMMON=m and SND_SOC_INTEL_MACH=y:

ERROR: "snd_soc_acpi_intel_broadwell_machines" [sound/soc/intel/common/snd-soc-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_haswell_machines" [sound/soc/intel/common/snd-soc-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_cherrytrail_machines" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_baytrail_machines" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined!

The problem here is that the sound/soc/intel/common/ directory is then entered only for building modules, but the sst-acpi.o never gets built since it depends on a built-in Kconfig symbol.

That configuration obviously makes no sense since all options below SND_SOC_INTEL_MACH also depend on something else that in turn depends on CONFIG_SND_SOC_INTEL_COMMON.

Adding a SND_SOC_INTEL_SST_TOPLEVEL dependency to SND_SOC_INTEL_MACH solves the build error. I notice we can also consolidate the 'depends on SND_SOC_INTEL_MACH' lines by using an 'if' block to simplify it further and make sure the configuration stays sane.

---
 sound/soc/intel/boards/Kconfig | 26 +++++---------------------
 1 file changed, 5 insertions(+), 21 deletions(-)
sound/soc/intel/boards/Kconfig +5 -21
index 5063f15b4ca4..6f754708a48c 100644
@@ -1,10 +1,12 @@
 config SND_SOC_INTEL_MACH
 	tristate "Intel Audio machine drivers"
+	depends on SND_SOC_INTEL_SST_TOPLEVEL
 	select SND_SOC_ACPI_INTEL_MATCH if ACPI
 
+if SND_SOC_INTEL_MACH
+
 config SND_MFLD_MACHINE
 	tristate "SOC Machine Audio driver for Intel Medfield MID platform"
-	depends on SND_SOC_INTEL_MACH
 	depends on INTEL_SCU_IPC
 	select SND_SOC_SN95031
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -17,7 +19,6 @@ config SND_MFLD_MACHINE
 
 config SND_SOC_INTEL_HASWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5640
@@ -29,7 +30,6 @@ config SND_SOC_INTEL_HASWELL_MACH
 
 config SND_SOC_INTEL_BDW_RT5677_MACH
 	tristate "ASoC Audio driver for Intel Broadwell with RT5677 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && GPIOLIB && I2C
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5677
@@ -39,7 +39,6 @@ config SND_SOC_INTEL_BDW_RT5677_MACH
 
 config SND_SOC_INTEL_BROADWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT286
@@ -51,7 +50,6 @@ config SND_SOC_INTEL_BROADWELL_MACH
 
 config SND_SOC_INTEL_BYT_MAX98090_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with MAX98090 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
@@ -62,7 +60,6 @@ config SND_SOC_INTEL_BYT_MAX98090_MACH
 
 config SND_SOC_INTEL_BYT_RT5640_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with RT5640 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
@@ -74,7 +71,6 @@ config SND_SOC_INTEL_BYT_RT5640_MACH
 
 config SND_SOC_INTEL_BYTCR_RT5640_MACH
         tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5640 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && I2C && ACPI
 	select SND_SOC_RT5640
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -87,7 +83,6 @@ config SND_SOC_INTEL_BYTCR_RT5640_MACH
 
 config SND_SOC_INTEL_BYTCR_RT5651_MACH
         tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5651 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && I2C && ACPI
 	select SND_SOC_RT5651
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -100,7 +95,6 @@ config SND_SOC_INTEL_BYTCR_RT5651_MACH
 
 config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
         tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec"
-        depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
         select SND_SOC_RT5670
         depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -113,7 +107,6 @@ config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
 
 config SND_SOC_INTEL_CHT_BSW_RT5645_MACH
 	tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5645/5650 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_RT5645
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -125,7 +118,6 @@ config SND_SOC_INTEL_CHT_BSW_RT5645_MACH
 
 config SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH
 	tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with MAX98090 & TI codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_MAX98090
 	select SND_SOC_TS3A227E
@@ -138,7 +130,6 @@ config SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH
 
 config SND_SOC_INTEL_BYT_CHT_DA7213_MACH
 	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with DA7212/7213 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_DA7213
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -150,7 +141,6 @@ config SND_SOC_INTEL_BYT_CHT_DA7213_MACH
 
 config SND_SOC_INTEL_BYT_CHT_ES8316_MACH
 	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with ES8316 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_ES8316
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -162,7 +152,6 @@ config SND_SOC_INTEL_BYT_CHT_ES8316_MACH
 
 config SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH
 	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail platform with no codec (MinnowBoard MAX, Up)"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
 	select SND_SST_IPC_ACPI
@@ -174,7 +163,6 @@ config SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH
 
 config SND_SOC_INTEL_SKL_RT286_MACH
 	tristate "ASoC Audio driver for SKL with RT286 I2S mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && ACPI && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_RT286
@@ -188,7 +176,6 @@ config SND_SOC_INTEL_SKL_RT286_MACH
 
 config SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH
 	tristate "ASoC Audio driver for SKL with NAU88L25 and SSM4567 in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_NAU8825
@@ -203,7 +190,6 @@ config SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH
 
 config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH
 	tristate "ASoC Audio driver for SKL with NAU88L25 and MAX98357A in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_NAU8825
@@ -218,7 +204,6 @@ config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH
 
 config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
 	tristate "ASoC Audio driver for Broxton with DA7219 and MAX98357A in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && ACPI && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_DA7219
@@ -234,7 +219,6 @@ config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
 
 config SND_SOC_INTEL_BXT_RT298_MACH
 	tristate "ASoC Audio driver for Broxton with RT298 I2S mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && ACPI && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_RT298
@@ -249,7 +233,6 @@ config SND_SOC_INTEL_BXT_RT298_MACH
 
 config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
 	tristate "ASoC Audio driver for KBL with RT5663 and MAX98927 in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	select SND_SOC_INTEL_SST
 	depends on SND_SOC_INTEL_SKYLAKE
@@ -265,7 +248,6 @@ config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
 
 config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
         tristate "ASoC Audio driver for KBL with RT5663, RT5514 and MAX98927 in I2S Mode"
-        depends on SND_SOC_INTEL_MACH
         depends on X86_INTEL_LPSS && I2C && SPI
         select SND_SOC_INTEL_SST
         depends on SND_SOC_INTEL_SKYLAKE
@@ -279,3 +261,5 @@ config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
           create an alsa sound card for RT5663 + RT5514 + MAX98927.
           Say Y if you have such a device.
           If unsure select "N".
+
+endif
Signature · 1 line
2.9.0
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] ASoC: Intel: improve SND_SOC_INTEL_MACH dependencies

Quoted 12 lines · Arnd Bergmann

I ran into a build error with CONFIG_SND_SOC_INTEL_COMMON=m and SND_SOC_INTEL_MACH=y:

ERROR: "snd_soc_acpi_intel_broadwell_machines" [sound/soc/intel/common/snd-soc-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_haswell_machines" [sound/soc/intel/common/snd-soc-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_cherrytrail_machines" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_baytrail_machines" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined!

The problem here is that the sound/soc/intel/common/ directory is then entered only for building modules, but the sst-acpi.o never gets built since it depends on a built-in Kconfig symbol.

Quoted 8 lines

That configuration obviously makes no sense since all options below SND_SOC_INTEL_MACH also depend on something else that in turn depends on CONFIG_SND_SOC_INTEL_COMMON.

Adding a SND_SOC_INTEL_SST_TOPLEVEL dependency to SND_SOC_INTEL_MACH solves the build error. I notice we can also consolidate the 'depends on SND_SOC_INTEL_MACH' lines by using an 'if' block to simplify it further and make sure the configuration stays sane.

This makes sense to me.

Quoted 192 lines
---
 sound/soc/intel/boards/Kconfig | 26 +++++---------------------
 1 file changed, 5 insertions(+), 21 deletions(-)
sound/soc/intel/boards/Kconfig +5 -21
index 5063f15b4ca4..6f754708a48c 100644
@@ -1,10 +1,12 @@
 config SND_SOC_INTEL_MACH
 	tristate "Intel Audio machine drivers"
+	depends on SND_SOC_INTEL_SST_TOPLEVEL
 	select SND_SOC_ACPI_INTEL_MATCH if ACPI
 
+if SND_SOC_INTEL_MACH
+
 config SND_MFLD_MACHINE
 	tristate "SOC Machine Audio driver for Intel Medfield MID platform"
-	depends on SND_SOC_INTEL_MACH
 	depends on INTEL_SCU_IPC
 	select SND_SOC_SN95031
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -17,7 +19,6 @@ config SND_MFLD_MACHINE
 
 config SND_SOC_INTEL_HASWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5640
@@ -29,7 +30,6 @@ config SND_SOC_INTEL_HASWELL_MACH
 
 config SND_SOC_INTEL_BDW_RT5677_MACH
 	tristate "ASoC Audio driver for Intel Broadwell with RT5677 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && GPIOLIB && I2C
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5677
@@ -39,7 +39,6 @@ config SND_SOC_INTEL_BDW_RT5677_MACH
 
 config SND_SOC_INTEL_BROADWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT286
@@ -51,7 +50,6 @@ config SND_SOC_INTEL_BROADWELL_MACH
 
 config SND_SOC_INTEL_BYT_MAX98090_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with MAX98090 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
@@ -62,7 +60,6 @@ config SND_SOC_INTEL_BYT_MAX98090_MACH
 
 config SND_SOC_INTEL_BYT_RT5640_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with RT5640 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
@@ -74,7 +71,6 @@ config SND_SOC_INTEL_BYT_RT5640_MACH
 
 config SND_SOC_INTEL_BYTCR_RT5640_MACH
         tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5640 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && I2C && ACPI
 	select SND_SOC_RT5640
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -87,7 +83,6 @@ config SND_SOC_INTEL_BYTCR_RT5640_MACH
 
 config SND_SOC_INTEL_BYTCR_RT5651_MACH
         tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5651 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && I2C && ACPI
 	select SND_SOC_RT5651
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -100,7 +95,6 @@ config SND_SOC_INTEL_BYTCR_RT5651_MACH
 
 config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
         tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec"
-        depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
         select SND_SOC_RT5670
         depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -113,7 +107,6 @@ config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
 
 config SND_SOC_INTEL_CHT_BSW_RT5645_MACH
 	tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5645/5650 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_RT5645
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -125,7 +118,6 @@ config SND_SOC_INTEL_CHT_BSW_RT5645_MACH
 
 config SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH
 	tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with MAX98090 & TI codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_MAX98090
 	select SND_SOC_TS3A227E
@@ -138,7 +130,6 @@ config SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH
 
 config SND_SOC_INTEL_BYT_CHT_DA7213_MACH
 	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with DA7212/7213 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_DA7213
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -150,7 +141,6 @@ config SND_SOC_INTEL_BYT_CHT_DA7213_MACH
 
 config SND_SOC_INTEL_BYT_CHT_ES8316_MACH
 	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with ES8316 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_ES8316
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -162,7 +152,6 @@ config SND_SOC_INTEL_BYT_CHT_ES8316_MACH
 
 config SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH
 	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail platform with no codec (MinnowBoard MAX, Up)"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
 	select SND_SST_IPC_ACPI
@@ -174,7 +163,6 @@ config SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH
 
 config SND_SOC_INTEL_SKL_RT286_MACH
 	tristate "ASoC Audio driver for SKL with RT286 I2S mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && ACPI && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_RT286
@@ -188,7 +176,6 @@ config SND_SOC_INTEL_SKL_RT286_MACH
 
 config SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH
 	tristate "ASoC Audio driver for SKL with NAU88L25 and SSM4567 in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_NAU8825
@@ -203,7 +190,6 @@ config SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH
 
 config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH
 	tristate "ASoC Audio driver for SKL with NAU88L25 and MAX98357A in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_NAU8825
@@ -218,7 +204,6 @@ config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH
 
 config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
 	tristate "ASoC Audio driver for Broxton with DA7219 and MAX98357A in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && ACPI && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_DA7219
@@ -234,7 +219,6 @@ config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
 
 config SND_SOC_INTEL_BXT_RT298_MACH
 	tristate "ASoC Audio driver for Broxton with RT298 I2S mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && ACPI && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_RT298
@@ -249,7 +233,6 @@ config SND_SOC_INTEL_BXT_RT298_MACH
 
 config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
 	tristate "ASoC Audio driver for KBL with RT5663 and MAX98927 in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	select SND_SOC_INTEL_SST
 	depends on SND_SOC_INTEL_SKYLAKE
@@ -265,7 +248,6 @@ config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
 
 config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
         tristate "ASoC Audio driver for KBL with RT5663, RT5514 and MAX98927 in I2S Mode"
-        depends on SND_SOC_INTEL_MACH
         depends on X86_INTEL_LPSS && I2C && SPI
         select SND_SOC_INTEL_SST
         depends on SND_SOC_INTEL_SKYLAKE
@@ -279,3 +261,5 @@ config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
           create an alsa sound card for RT5663 + RT5514 + MAX98927.
           Say Y if you have such a device.
           If unsure select "N".
+
+endif
Signature · 1 line
2.9.0
Signature · 1 line
~Vinod
Reviewed-by on v1 2/2
#3 lore raw

Re: [alsa-devel] [PATCH 2/2] ASoC: Intel: improve SND_SOC_INTEL_MACH dependencies

In reply to Arnd Bergmann
Quoted 12 lines · Arnd Bergmann

I ran into a build error with CONFIG_SND_SOC_INTEL_COMMON=m and SND_SOC_INTEL_MACH=y:

ERROR: "snd_soc_acpi_intel_broadwell_machines" [sound/soc/intel/common/snd-soc-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_haswell_machines" [sound/soc/intel/common/snd-soc-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_cherrytrail_machines" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_baytrail_machines" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined!

The problem here is that the sound/soc/intel/common/ directory is then entered only for building modules, but the sst-acpi.o never gets built since it depends on a built-in Kconfig symbol.

Quoted 8 lines

That configuration obviously makes no sense since all options below SND_SOC_INTEL_MACH also depend on something else that in turn depends on CONFIG_SND_SOC_INTEL_COMMON.

Adding a SND_SOC_INTEL_SST_TOPLEVEL dependency to SND_SOC_INTEL_MACH solves the build error. I notice we can also consolidate the 'depends on SND_SOC_INTEL_MACH' lines by using an 'if' block to simplify it further and make sure the configuration stays sane.

Makes sense, thanks for the cleanup.

Quoted 191 lines
---
  sound/soc/intel/boards/Kconfig | 26 +++++---------------------
  1 file changed, 5 insertions(+), 21 deletions(-)
sound/soc/intel/boards/Kconfig +5 -21
index 5063f15b4ca4..6f754708a48c 100644
@@ -1,10 +1,12 @@
  config SND_SOC_INTEL_MACH
  	tristate "Intel Audio machine drivers"
+	depends on SND_SOC_INTEL_SST_TOPLEVEL
  	select SND_SOC_ACPI_INTEL_MATCH if ACPI
 
+if SND_SOC_INTEL_MACH
+
  config SND_MFLD_MACHINE
  	tristate "SOC Machine Audio driver for Intel Medfield MID platform"
-	depends on SND_SOC_INTEL_MACH
  	depends on INTEL_SCU_IPC
  	select SND_SOC_SN95031
  	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -17,7 +19,6 @@ config SND_MFLD_MACHINE
 
  config SND_SOC_INTEL_HASWELL_MACH
  	tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
  	depends on SND_SOC_INTEL_HASWELL
  	select SND_SOC_RT5640
@@ -29,7 +30,6 @@ config SND_SOC_INTEL_HASWELL_MACH
 
  config SND_SOC_INTEL_BDW_RT5677_MACH
  	tristate "ASoC Audio driver for Intel Broadwell with RT5677 codec"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && GPIOLIB && I2C
  	depends on SND_SOC_INTEL_HASWELL
  	select SND_SOC_RT5677
@@ -39,7 +39,6 @@ config SND_SOC_INTEL_BDW_RT5677_MACH
 
  config SND_SOC_INTEL_BROADWELL_MACH
  	tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
  	depends on SND_SOC_INTEL_HASWELL
  	select SND_SOC_RT286
@@ -51,7 +50,6 @@ config SND_SOC_INTEL_BROADWELL_MACH
 
  config SND_SOC_INTEL_BYT_MAX98090_MACH
  	tristate "ASoC Audio driver for Intel Baytrail with MAX98090 codec"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C
  	depends on SND_SST_IPC_ACPI = n
  	depends on SND_SOC_INTEL_BAYTRAIL
@@ -62,7 +60,6 @@ config SND_SOC_INTEL_BYT_MAX98090_MACH
 
  config SND_SOC_INTEL_BYT_RT5640_MACH
  	tristate "ASoC Audio driver for Intel Baytrail with RT5640 codec"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C
  	depends on SND_SST_IPC_ACPI = n
  	depends on SND_SOC_INTEL_BAYTRAIL
@@ -74,7 +71,6 @@ config SND_SOC_INTEL_BYT_RT5640_MACH
 
  config SND_SOC_INTEL_BYTCR_RT5640_MACH
          tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5640 codec"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86 && I2C && ACPI
  	select SND_SOC_RT5640
  	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -87,7 +83,6 @@ config SND_SOC_INTEL_BYTCR_RT5640_MACH
 
  config SND_SOC_INTEL_BYTCR_RT5651_MACH
          tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5651 codec"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86 && I2C && ACPI
  	select SND_SOC_RT5651
  	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -100,7 +95,6 @@ config SND_SOC_INTEL_BYTCR_RT5651_MACH
 
  config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
          tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec"
-        depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C && ACPI
          select SND_SOC_RT5670
          depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -113,7 +107,6 @@ config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
 
  config SND_SOC_INTEL_CHT_BSW_RT5645_MACH
  	tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5645/5650 codec"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C && ACPI
  	select SND_SOC_RT5645
  	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -125,7 +118,6 @@ config SND_SOC_INTEL_CHT_BSW_RT5645_MACH
 
  config SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH
  	tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with MAX98090 & TI codec"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C && ACPI
  	select SND_SOC_MAX98090
  	select SND_SOC_TS3A227E
@@ -138,7 +130,6 @@ config SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH
 
  config SND_SOC_INTEL_BYT_CHT_DA7213_MACH
  	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with DA7212/7213 codec"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C && ACPI
  	select SND_SOC_DA7213
  	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -150,7 +141,6 @@ config SND_SOC_INTEL_BYT_CHT_DA7213_MACH
 
  config SND_SOC_INTEL_BYT_CHT_ES8316_MACH
  	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with ES8316 codec"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C && ACPI
  	select SND_SOC_ES8316
  	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -162,7 +152,6 @@ config SND_SOC_INTEL_BYT_CHT_ES8316_MACH
 
  config SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH
  	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail platform with no codec (MinnowBoard MAX, Up)"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C && ACPI
  	depends on SND_SST_ATOM_HIFI2_PLATFORM
  	select SND_SST_IPC_ACPI
@@ -174,7 +163,6 @@ config SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH
 
  config SND_SOC_INTEL_SKL_RT286_MACH
  	tristate "ASoC Audio driver for SKL with RT286 I2S mode"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86 && ACPI && I2C
  	depends on SND_SOC_INTEL_SKYLAKE
  	select SND_SOC_RT286
@@ -188,7 +176,6 @@ config SND_SOC_INTEL_SKL_RT286_MACH
 
  config SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH
  	tristate "ASoC Audio driver for SKL with NAU88L25 and SSM4567 in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C
  	depends on SND_SOC_INTEL_SKYLAKE
  	select SND_SOC_NAU8825
@@ -203,7 +190,6 @@ config SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH
 
  config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH
  	tristate "ASoC Audio driver for SKL with NAU88L25 and MAX98357A in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C
  	depends on SND_SOC_INTEL_SKYLAKE
  	select SND_SOC_NAU8825
@@ -218,7 +204,6 @@ config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH
 
  config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
  	tristate "ASoC Audio driver for Broxton with DA7219 and MAX98357A in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86 && ACPI && I2C
  	depends on SND_SOC_INTEL_SKYLAKE
  	select SND_SOC_DA7219
@@ -234,7 +219,6 @@ config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
 
  config SND_SOC_INTEL_BXT_RT298_MACH
  	tristate "ASoC Audio driver for Broxton with RT298 I2S mode"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86 && ACPI && I2C
  	depends on SND_SOC_INTEL_SKYLAKE
  	select SND_SOC_RT298
@@ -249,7 +233,6 @@ config SND_SOC_INTEL_BXT_RT298_MACH
 
  config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
  	tristate "ASoC Audio driver for KBL with RT5663 and MAX98927 in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
  	depends on X86_INTEL_LPSS && I2C
  	select SND_SOC_INTEL_SST
  	depends on SND_SOC_INTEL_SKYLAKE
@@ -265,7 +248,6 @@ config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
 
  config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
          tristate "ASoC Audio driver for KBL with RT5663, RT5514 and MAX98927 in I2S Mode"
-        depends on SND_SOC_INTEL_MACH
          depends on X86_INTEL_LPSS && I2C && SPI
          select SND_SOC_INTEL_SST
          depends on SND_SOC_INTEL_SKYLAKE
@@ -279,3 +261,5 @@ config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
            create an alsa sound card for RT5663 + RT5514 + MAX98927.
            Say Y if you have such a device.
            If unsure select "N".
+
+endif
maintainer
#4 lore raw

Applied "ASoC: Intel: improve SND_SOC_INTEL_MACH dependencies" to the asoc tree

In reply to Arnd Bergmann

The patch

ASoC: Intel: improve SND_SOC_INTEL_MACH dependencies

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 960115b842886999a64a87d8baadb81dce4293b4 Mon Sep 17 00:00:00 2001

From: Arnd Bergmann <[email protected]>
Date: Wed, 8 Nov 2017 14:03:20 +0100
Subject: [PATCH] ASoC: Intel: improve SND_SOC_INTEL_MACH dependencies

I ran into a build error with CONFIG_SND_SOC_INTEL_COMMON=m and SND_SOC_INTEL_MACH=y:

ERROR: "snd_soc_acpi_intel_broadwell_machines" [sound/soc/intel/common/snd-soc-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_haswell_machines" [sound/soc/intel/common/snd-soc-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_cherrytrail_machines" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined!
ERROR: "snd_soc_acpi_intel_baytrail_machines" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined!

The problem here is that the sound/soc/intel/common/ directory is then entered only for building modules, but the sst-acpi.o never gets built since it depends on a built-in Kconfig symbol.

That configuration obviously makes no sense since all options below SND_SOC_INTEL_MACH also depend on something else that in turn depends on CONFIG_SND_SOC_INTEL_COMMON.

Adding a SND_SOC_INTEL_SST_TOPLEVEL dependency to SND_SOC_INTEL_MACH solves the build error. I notice we can also consolidate the 'depends on SND_SOC_INTEL_MACH' lines by using an 'if' block to simplify it further and make sure the configuration stays sane.

---
 sound/soc/intel/boards/Kconfig | 26 +++++---------------------
 1 file changed, 5 insertions(+), 21 deletions(-)
sound/soc/intel/boards/Kconfig +5 -21
index 5063f15b4ca4..6f754708a48c 100644
@@ -1,10 +1,12 @@
 config SND_SOC_INTEL_MACH
 	tristate "Intel Audio machine drivers"
+	depends on SND_SOC_INTEL_SST_TOPLEVEL
 	select SND_SOC_ACPI_INTEL_MATCH if ACPI
 
+if SND_SOC_INTEL_MACH
+
 config SND_MFLD_MACHINE
 	tristate "SOC Machine Audio driver for Intel Medfield MID platform"
-	depends on SND_SOC_INTEL_MACH
 	depends on INTEL_SCU_IPC
 	select SND_SOC_SN95031
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -17,7 +19,6 @@ config SND_MFLD_MACHINE
 
 config SND_SOC_INTEL_HASWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5640
@@ -29,7 +30,6 @@ config SND_SOC_INTEL_HASWELL_MACH
 
 config SND_SOC_INTEL_BDW_RT5677_MACH
 	tristate "ASoC Audio driver for Intel Broadwell with RT5677 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && GPIOLIB && I2C
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5677
@@ -39,7 +39,6 @@ config SND_SOC_INTEL_BDW_RT5677_MACH
 
 config SND_SOC_INTEL_BROADWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT286
@@ -51,7 +50,6 @@ config SND_SOC_INTEL_BROADWELL_MACH
 
 config SND_SOC_INTEL_BYT_MAX98090_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with MAX98090 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
@@ -62,7 +60,6 @@ config SND_SOC_INTEL_BYT_MAX98090_MACH
 
 config SND_SOC_INTEL_BYT_RT5640_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with RT5640 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
@@ -74,7 +71,6 @@ config SND_SOC_INTEL_BYT_RT5640_MACH
 
 config SND_SOC_INTEL_BYTCR_RT5640_MACH
         tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5640 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && I2C && ACPI
 	select SND_SOC_RT5640
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -87,7 +83,6 @@ config SND_SOC_INTEL_BYTCR_RT5640_MACH
 
 config SND_SOC_INTEL_BYTCR_RT5651_MACH
         tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5651 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && I2C && ACPI
 	select SND_SOC_RT5651
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -100,7 +95,6 @@ config SND_SOC_INTEL_BYTCR_RT5651_MACH
 
 config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
         tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec"
-        depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
         select SND_SOC_RT5670
         depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -113,7 +107,6 @@ config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
 
 config SND_SOC_INTEL_CHT_BSW_RT5645_MACH
 	tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5645/5650 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_RT5645
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -125,7 +118,6 @@ config SND_SOC_INTEL_CHT_BSW_RT5645_MACH
 
 config SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH
 	tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with MAX98090 & TI codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_MAX98090
 	select SND_SOC_TS3A227E
@@ -138,7 +130,6 @@ config SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH
 
 config SND_SOC_INTEL_BYT_CHT_DA7213_MACH
 	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with DA7212/7213 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_DA7213
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -150,7 +141,6 @@ config SND_SOC_INTEL_BYT_CHT_DA7213_MACH
 
 config SND_SOC_INTEL_BYT_CHT_ES8316_MACH
 	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with ES8316 codec"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	select SND_SOC_ES8316
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
@@ -162,7 +152,6 @@ config SND_SOC_INTEL_BYT_CHT_ES8316_MACH
 
 config SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH
 	tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail platform with no codec (MinnowBoard MAX, Up)"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && ACPI
 	depends on SND_SST_ATOM_HIFI2_PLATFORM
 	select SND_SST_IPC_ACPI
@@ -174,7 +163,6 @@ config SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH
 
 config SND_SOC_INTEL_SKL_RT286_MACH
 	tristate "ASoC Audio driver for SKL with RT286 I2S mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && ACPI && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_RT286
@@ -188,7 +176,6 @@ config SND_SOC_INTEL_SKL_RT286_MACH
 
 config SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH
 	tristate "ASoC Audio driver for SKL with NAU88L25 and SSM4567 in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_NAU8825
@@ -203,7 +190,6 @@ config SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH
 
 config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH
 	tristate "ASoC Audio driver for SKL with NAU88L25 and MAX98357A in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_NAU8825
@@ -218,7 +204,6 @@ config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH
 
 config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
 	tristate "ASoC Audio driver for Broxton with DA7219 and MAX98357A in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && ACPI && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_DA7219
@@ -234,7 +219,6 @@ config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
 
 config SND_SOC_INTEL_BXT_RT298_MACH
 	tristate "ASoC Audio driver for Broxton with RT298 I2S mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86 && ACPI && I2C
 	depends on SND_SOC_INTEL_SKYLAKE
 	select SND_SOC_RT298
@@ -249,7 +233,6 @@ config SND_SOC_INTEL_BXT_RT298_MACH
 
 config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
 	tristate "ASoC Audio driver for KBL with RT5663 and MAX98927 in I2S Mode"
-	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
 	select SND_SOC_INTEL_SST
 	depends on SND_SOC_INTEL_SKYLAKE
@@ -265,7 +248,6 @@ config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
 
 config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
         tristate "ASoC Audio driver for KBL with RT5663, RT5514 and MAX98927 in I2S Mode"
-        depends on SND_SOC_INTEL_MACH
         depends on X86_INTEL_LPSS && I2C && SPI
         select SND_SOC_INTEL_SST
         depends on SND_SOC_INTEL_SKYLAKE
@@ -279,3 +261,5 @@ config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
           create an alsa sound card for RT5663 + RT5514 + MAX98927.
           Say Y if you have such a device.
           If unsure select "N".
+
+endif
Signature · 1 line
2.15.0
#5 lore raw
In reply to Arnd Bergmann
Quoted 1 line · Arnd Bergmann

As pointed out by Pierre-Louis Bossart, the depndency I added

/s/depndency/dependency

Quoted 45 lines

was broader than necessary, only Baytrail and Haswell/Broadwell actually need it, the others don't.

At the same time, we have individual entries for the codecs that all have the 'select' statement but now don't need it any more.

Fixes f7a88db6fffd ("ASoC: Intel: fix Kconfig dependencies")
---
 sound/soc/intel/Kconfig        | 3 ++-
 sound/soc/intel/boards/Kconfig | 5 -----
 2 files changed, 2 insertions(+), 6 deletions(-)
sound/soc/intel/Kconfig +2 -1
index e18118209b75..bb8be10b8437 100644
@@ -32,19 +32,20 @@ config SND_SOC_ACPI_INTEL_MATCH
 config SND_SOC_INTEL_SST_TOPLEVEL
 	tristate "Intel ASoC SST drivers"
 	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 && SND_DMA_SGBUF
+	depends on DMADEVICES
 	select SND_SOC_INTEL_SST
 	select SND_SOC_INTEL_SST_FIRMWARE
 
 config SND_SOC_INTEL_BAYTRAIL
 	tristate "Intel ASoC SST driver for Baytrail (legacy)"
 	depends on SND_SOC_INTEL_SST_TOPLEVEL
+	depends on DMADEVICES
 	select SND_SOC_INTEL_SST
 	select SND_SOC_INTEL_SST_FIRMWARE
 
sound/soc/intel/boards/Kconfig +0 -0
index 449bc8baaa60..5063f15b4ca4 100644

sound/soc/intel/boards/Kconfig config SND_SOC_INTEL_HASWELL_MACH · line 22

Quoted 4 lines
sound/soc/intel/boards/Kconfig +0 -1
@@ -19,7 +19,6 @@ config SND_SOC_INTEL_HASWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
-	depends on DMADEVICES

Per Liam this seems to be required for Haswell

Quoted 38 lines
sound/soc/intel/boards/Kconfig +0 -4
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5640
 	help
@@ -32,7 +31,6 @@ config SND_SOC_INTEL_BDW_RT5677_MACH
 	tristate "ASoC Audio driver for Intel Broadwell with RT5677 codec"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && GPIOLIB && I2C
-	depends on DMADEVICES
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5677
 	help
@@ -43,7 +41,6 @@ config SND_SOC_INTEL_BROADWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
-	depends on DMADEVICES
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT286
 	help
@@ -56,7 +53,6 @@ config SND_SOC_INTEL_BYT_MAX98090_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with MAX98090 codec"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
-	depends on DMADEVICES
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
 	select SND_SOC_MAX98090
@@ -68,7 +64,6 @@ config SND_SOC_INTEL_BYT_RT5640_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with RT5640 codec"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
-	depends on DMADEVICES
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
 	select SND_SOC_RT5640
Signature · 1 line
2.9.0
Signature · 1 line
~Vinod
#6 lore raw
Quoted 4 lines · Vinod Koul
Quoted 1 line · Arnd Bergmann

As pointed out by Pierre-Louis Bossart, the depndency I added

/s/depndency/dependency

Mark, can you fix that up when applying, or should I resend?

Quoted 20 lines
Quoted 19 lines
sound/soc/intel/Kconfig +1 -1
index e18118209b75..bb8be10b8437 100644
@@ -32,19 +32,20 @@ config SND_SOC_ACPI_INTEL_MATCH
 config SND_SOC_INTEL_SST_TOPLEVEL
      tristate "Intel ASoC SST drivers"
      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 && SND_DMA_SGBUF
+     depends on DMADEVICES
      select SND_SOC_INTEL_SST
      select SND_SOC_INTEL_SST_FIRMWARE
 
Quoted 12 lines

sound/soc/intel/boards/Kconfig config SND_SOC_INTEL_HASWELL_MACH · line 22

Quoted 7 lines
sound/soc/intel/boards/Kconfig +0 -1
@@ -19,7 +19,6 @@ config SND_SOC_INTEL_HASWELL_MACH
      tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
      depends on SND_SOC_INTEL_MACH
      depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
-     depends on DMADEVICES

Per Liam this seems to be required for Haswell

Quoted 1 line
sound/soc/intel/boards/Kconfig +0 -0
      depends on SND_SOC_INTEL_HASWELL

Correct, I just moved it to a different place above, we now get it through the SND_SOC_INTEL_HASWELL dependency.

Arnd

Acked-by
#7 lore raw
Quoted 39 lines · Arnd Bergmann
Quoted 4 lines · Vinod Koul
Quoted 1 line · Arnd Bergmann

As pointed out by Pierre-Louis Bossart, the depndency I added

/s/depndency/dependency

Mark, can you fix that up when applying, or should I resend?

Quoted 31 lines
Quoted 23 lines
sound/soc/intel/Kconfig +1 -1
index e18118209b75..bb8be10b8437 100644
@@ -32,19 +32,20 @@ config SND_SOC_ACPI_INTEL_MATCH
 config SND_SOC_INTEL_SST_TOPLEVEL
      tristate "Intel ASoC SST drivers"
      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 && SND_DMA_SGBUF
+     depends on DMADEVICES
      select SND_SOC_INTEL_SST
      select SND_SOC_INTEL_SST_FIRMWARE
 
 

sound/soc/intel/boards/Kconfig config SND_SOC_INTEL_HASWELL_MACH · line 22

Quoted 4 lines
sound/soc/intel/boards/Kconfig +0 -1
@@ -19,7 +19,6 @@ config SND_SOC_INTEL_HASWELL_MACH
      tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
      depends on SND_SOC_INTEL_MACH
      depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
-     depends on DMADEVICES

Per Liam this seems to be required for Haswell

Quoted 4 lines
Quoted 1 line

sound/soc/intel/boards/Kconfig config SND_SOC_INTEL_HASWELL_MACH · line 22

Quoted 1 line
sound/soc/intel/boards/Kconfig +0 -0
      depends on SND_SOC_INTEL_HASWELL

Correct, I just moved it to a different place above, we now get it through the SND_SOC_INTEL_HASWELL dependency.

Ah yes, sorry missed that part. This lgtm so:

Signature · 1 line
~Vinod
maintainer
#8 lore raw

Applied "ASoC: Intel: improve DMADEVICES dependency" to the asoc tree

In reply to Arnd Bergmann

The patch

ASoC: Intel: improve DMADEVICES dependency

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 326c4aa27a801918136df15d507f74968c7093fb Mon Sep 17 00:00:00 2001

From: Arnd Bergmann <[email protected]>
Date: Wed, 8 Nov 2017 14:03:19 +0100
Subject: [PATCH] ASoC: Intel: improve DMADEVICES dependency

As pointed out by Pierre-Louis Bossart, the dependency I added was broader than necessary, only Baytrail and Haswell/Broadwell actually need it, the others don't.

At the same time, we have individual entries for the codecs that all have the 'select' statement but now don't need it any more.

Fixes f7a88db6fffd ("ASoC: Intel: fix Kconfig dependencies")
---
 sound/soc/intel/Kconfig        | 3 ++-
 sound/soc/intel/boards/Kconfig | 5 -----
 2 files changed, 2 insertions(+), 6 deletions(-)
sound/soc/intel/Kconfig +2 -1
index e18118209b75..bb8be10b8437 100644
@@ -32,19 +32,20 @@ config SND_SOC_ACPI_INTEL_MATCH
 config SND_SOC_INTEL_SST_TOPLEVEL
 	tristate "Intel ASoC SST drivers"
 	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 && SND_DMA_SGBUF
+	depends on DMADEVICES
 	select SND_SOC_INTEL_SST
 	select SND_SOC_INTEL_SST_FIRMWARE
 
 config SND_SOC_INTEL_BAYTRAIL
 	tristate "Intel ASoC SST driver for Baytrail (legacy)"
 	depends on SND_SOC_INTEL_SST_TOPLEVEL
+	depends on DMADEVICES
 	select SND_SOC_INTEL_SST
 	select SND_SOC_INTEL_SST_FIRMWARE
 
sound/soc/intel/boards/Kconfig +0 -5
index 449bc8baaa60..5063f15b4ca4 100644
@@ -19,7 +19,6 @@ config SND_SOC_INTEL_HASWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
-	depends on DMADEVICES
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5640
 	help
@@ -32,7 +31,6 @@ config SND_SOC_INTEL_BDW_RT5677_MACH
 	tristate "ASoC Audio driver for Intel Broadwell with RT5677 codec"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && GPIOLIB && I2C
-	depends on DMADEVICES
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT5677
 	help
@@ -43,7 +41,6 @@ config SND_SOC_INTEL_BROADWELL_MACH
 	tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
-	depends on DMADEVICES
 	depends on SND_SOC_INTEL_HASWELL
 	select SND_SOC_RT286
 	help
@@ -56,7 +53,6 @@ config SND_SOC_INTEL_BYT_MAX98090_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with MAX98090 codec"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
-	depends on DMADEVICES
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
 	select SND_SOC_MAX98090
@@ -68,7 +64,6 @@ config SND_SOC_INTEL_BYT_RT5640_MACH
 	tristate "ASoC Audio driver for Intel Baytrail with RT5640 codec"
 	depends on SND_SOC_INTEL_MACH
 	depends on X86_INTEL_LPSS && I2C
-	depends on DMADEVICES
 	depends on SND_SST_IPC_ACPI = n
 	depends on SND_SOC_INTEL_BAYTRAIL
 	select SND_SOC_RT5640
Signature · 1 line
2.15.0