Skip to contentSkip to conversation

ASoC: imx: Allow using sound with DT descriptions only

PATCH In review Alexander Shiyan 3 participants 6 messages Jan 10, 2014 – Jan 13, 2014

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

PATCH v3 1/1 ASoC: imx: Allow using sound with DT descriptions only

This patch allow using generic sound cards/codecs based on DT description.

---
 sound/soc/fsl/Kconfig | 43 +++++++++++++++++--------------------------
 1 file changed, 17 insertions(+), 26 deletions(-)
sound/soc/fsl/Kconfig +17 -26
index 1c7b3b7..8249000 100644
@@ -7,6 +7,7 @@ config SND_SOC_FSL_SSI
 
 config SND_SOC_FSL_SPDIF
 	tristate
+	select REGMAP_MMIO
 
 config SND_SOC_FSL_UTILS
 	tristate
@@ -103,27 +104,32 @@ config SND_MPC52xx_SOC_EFIKA
 
 endif # SND_POWERPC_SOC
 
-menuconfig SND_IMX_SOC
-	tristate "SoC Audio for Freescale i.MX CPUs"
-	depends on ARCH_MXC || COMPILE_TEST
-	help
-	  Say Y or M if you want to add support for codecs attached to
-	  the i.MX CPUs.
-
-if SND_IMX_SOC
-
-config SND_SOC_IMX_SSI
+config SND_SOC_IMX_AUDMUX
 	tristate
 
 config SND_SOC_IMX_PCM_FIQ
 	tristate
 	select FIQ
+	default y if SND_SOC_IMX_SSI=y || SND_SOC_FSL_SSI=y
 
 config SND_SOC_IMX_PCM_DMA
 	tristate
 	select SND_SOC_GENERIC_DMAENGINE_PCM
+	default y if SND_SOC_IMX_SSI=y || SND_SOC_FSL_SSI=y
 
-config SND_SOC_IMX_AUDMUX
+menuconfig SND_IMX_SOC
+	tristate "SoC Audio for Freescale i.MX CPUs"
+	depends on ARCH_MXC || COMPILE_TEST
+	select SND_SOC_FSL_SSI if OF
+	select SND_SOC_IMX_AUDMUX
+	select SND_SOC_IMX_PCM_DMA
+	help
+	  Say Y or M if you want to add support for codecs attached to
+	  the i.MX CPUs.
+
+if SND_IMX_SOC
+
+config SND_SOC_IMX_SSI
 	tristate
 
 config SND_MXC_SOC_WM1133_EV1
@@ -131,7 +137,6 @@ config SND_MXC_SOC_WM1133_EV1
 	depends on MACH_MX31ADS_WM1133_EV1
 	select SND_SOC_WM8350
 	select SND_SOC_IMX_PCM_FIQ
-	select SND_SOC_IMX_AUDMUX
 	select SND_SOC_IMX_SSI
 	help
 	  Enable support for audio on the i.MX31ADS with the WM1133-EV1
@@ -141,8 +146,6 @@ config SND_SOC_MX27VIS_AIC32X4
 	tristate "SoC audio support for Visstrim M10 boards"
 	depends on MACH_IMX27_VISSTRIM_M10 && I2C
 	select SND_SOC_TLV320AIC32X4
-	select SND_SOC_IMX_PCM_DMA
-	select SND_SOC_IMX_AUDMUX
 	select SND_SOC_IMX_SSI
 	help
 	  Say Y if you want to add support for SoC audio on Visstrim SM10
@@ -154,7 +157,6 @@ config SND_SOC_PHYCORE_AC97
 	select SND_SOC_AC97_BUS
 	select SND_SOC_WM9712
 	select SND_SOC_IMX_PCM_FIQ
-	select SND_SOC_IMX_AUDMUX
 	select SND_SOC_IMX_SSI
 	help
 	  Say Y if you want to add support for SoC audio on Phytec phyCORE
@@ -169,7 +171,6 @@ config SND_SOC_EUKREA_TLV320
 	depends on I2C
 	select SND_SOC_TLV320AIC23
 	select SND_SOC_IMX_PCM_FIQ
-	select SND_SOC_IMX_AUDMUX
 	select SND_SOC_IMX_SSI
 	help
 	  Enable I2S based access to the TLV320AIC23B codec attached
@@ -179,9 +180,6 @@ config SND_SOC_IMX_WM8962
 	tristate "SoC Audio support for i.MX boards with wm8962"
 	depends on OF && I2C
 	select SND_SOC_WM8962
-	select SND_SOC_IMX_PCM_DMA
-	select SND_SOC_IMX_AUDMUX
-	select SND_SOC_FSL_SSI
 	help
 	  Say Y if you want to add support for SoC audio on an i.MX board with
 	  a wm8962 codec.
@@ -190,18 +188,13 @@ config SND_SOC_IMX_SGTL5000
 	tristate "SoC Audio support for i.MX boards with sgtl5000"
 	depends on OF && I2C
 	select SND_SOC_SGTL5000
-	select SND_SOC_IMX_PCM_DMA
-	select SND_SOC_IMX_AUDMUX
-	select SND_SOC_FSL_SSI
 	help
 	  Say Y if you want to add support for SoC audio on an i.MX board with
 	  a sgtl5000 codec.
 
 config SND_SOC_IMX_SPDIF
 	tristate "SoC Audio support for i.MX boards with S/PDIF"
-	select SND_SOC_IMX_PCM_DMA
 	select SND_SOC_FSL_SPDIF
-	select REGMAP_MMIO
 	help
 	  SoC Audio support for i.MX boards with S/PDIF
 	  Say Y if you want to add support for SoC audio on an i.MX board with
@@ -211,8 +204,6 @@ config SND_SOC_IMX_MC13783
 	tristate "SoC Audio support for I.MX boards with mc13783"
 	depends on MFD_MC13XXX && ARM
 	select SND_SOC_IMX_SSI
-	select SND_SOC_IMX_AUDMUX
 	select SND_SOC_MC13783
-	select SND_SOC_IMX_PCM_DMA
 
 endif # SND_IMX_SOC
Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 43 lines · Alexander Shiyan

This patch allow using generic sound cards/codecs based on DT description.

---
 sound/soc/fsl/Kconfig | 43 +++++++++++++++++--------------------------
 1 file changed, 17 insertions(+), 26 deletions(-)
sound/soc/fsl/Kconfig +3 -10
index 1c7b3b7..8249000 100644
@@ -7,6 +7,7 @@ config SND_SOC_FSL_SSI
 
 config SND_SOC_FSL_SPDIF
 	tristate
+	select REGMAP_MMIO
 
 config SND_SOC_FSL_UTILS
 	tristate
@@ -103,27 +104,32 @@ config SND_MPC52xx_SOC_EFIKA
 
 endif # SND_POWERPC_SOC
 
-menuconfig SND_IMX_SOC
-	tristate "SoC Audio for Freescale i.MX CPUs"
-	depends on ARCH_MXC || COMPILE_TEST
-	help
-	  Say Y or M if you want to add support for codecs attached to
-	  the i.MX CPUs.
-
-if SND_IMX_SOC
-
-config SND_SOC_IMX_SSI
+config SND_SOC_IMX_AUDMUX
 	tristate
 
 config SND_SOC_IMX_PCM_FIQ
 	tristate
 	select FIQ
+	default y if SND_SOC_IMX_SSI=y || SND_SOC_FSL_SSI=y
 
 config SND_SOC_IMX_PCM_DMA
 	tristate

sound/soc/fsl/Kconfig config SND_MPC52xx_SOC_EFIKA · line 125

Quoted 10 lines
sound/soc/fsl/Kconfig +7 -1
 	select SND_SOC_GENERIC_DMAENGINE_PCM
+	default y if SND_SOC_IMX_SSI=y || SND_SOC_FSL_SSI=y
 
-config SND_SOC_IMX_AUDMUX
+menuconfig SND_IMX_SOC
+	tristate "SoC Audio for Freescale i.MX CPUs"
+	depends on ARCH_MXC || COMPILE_TEST
+	select SND_SOC_FSL_SSI if OF
+	select SND_SOC_IMX_AUDMUX
+	select SND_SOC_IMX_PCM_DMA

Just want to understand the direction of this change. Besides FSL_SSI, we will have other CPU DAIs FSL_SPDIF, FSL_ESAI and FSL_SAI. Will we select all of them from SND_IMX_SOC, or we only do it for FSL_SSI? Note, IMX_AUDMUX should be only needed for machine drivers that use SSI CPU DAI.

Shawn

Quoted 84 lines
sound/soc/fsl/Kconfig +7 -15
+	help
+	  Say Y or M if you want to add support for codecs attached to
+	  the i.MX CPUs.
+
+if SND_IMX_SOC
+
+config SND_SOC_IMX_SSI
 	tristate
 
 config SND_MXC_SOC_WM1133_EV1
@@ -131,7 +137,6 @@ config SND_MXC_SOC_WM1133_EV1
 	depends on MACH_MX31ADS_WM1133_EV1
 	select SND_SOC_WM8350
 	select SND_SOC_IMX_PCM_FIQ
-	select SND_SOC_IMX_AUDMUX
 	select SND_SOC_IMX_SSI
 	help
 	  Enable support for audio on the i.MX31ADS with the WM1133-EV1
@@ -141,8 +146,6 @@ config SND_SOC_MX27VIS_AIC32X4
 	tristate "SoC audio support for Visstrim M10 boards"
 	depends on MACH_IMX27_VISSTRIM_M10 && I2C
 	select SND_SOC_TLV320AIC32X4
-	select SND_SOC_IMX_PCM_DMA
-	select SND_SOC_IMX_AUDMUX
 	select SND_SOC_IMX_SSI
 	help
 	  Say Y if you want to add support for SoC audio on Visstrim SM10
@@ -154,7 +157,6 @@ config SND_SOC_PHYCORE_AC97
 	select SND_SOC_AC97_BUS
 	select SND_SOC_WM9712
 	select SND_SOC_IMX_PCM_FIQ
-	select SND_SOC_IMX_AUDMUX
 	select SND_SOC_IMX_SSI
 	help
 	  Say Y if you want to add support for SoC audio on Phytec phyCORE
@@ -169,7 +171,6 @@ config SND_SOC_EUKREA_TLV320
 	depends on I2C
 	select SND_SOC_TLV320AIC23
 	select SND_SOC_IMX_PCM_FIQ
-	select SND_SOC_IMX_AUDMUX
 	select SND_SOC_IMX_SSI
 	help
 	  Enable I2S based access to the TLV320AIC23B codec attached
@@ -179,9 +180,6 @@ config SND_SOC_IMX_WM8962
 	tristate "SoC Audio support for i.MX boards with wm8962"
 	depends on OF && I2C
 	select SND_SOC_WM8962
-	select SND_SOC_IMX_PCM_DMA
-	select SND_SOC_IMX_AUDMUX
-	select SND_SOC_FSL_SSI
 	help
 	  Say Y if you want to add support for SoC audio on an i.MX board with
 	  a wm8962 codec.
@@ -190,18 +188,13 @@ config SND_SOC_IMX_SGTL5000
 	tristate "SoC Audio support for i.MX boards with sgtl5000"
 	depends on OF && I2C
 	select SND_SOC_SGTL5000
-	select SND_SOC_IMX_PCM_DMA
-	select SND_SOC_IMX_AUDMUX
-	select SND_SOC_FSL_SSI
 	help
 	  Say Y if you want to add support for SoC audio on an i.MX board with
 	  a sgtl5000 codec.
 
 config SND_SOC_IMX_SPDIF
 	tristate "SoC Audio support for i.MX boards with S/PDIF"
-	select SND_SOC_IMX_PCM_DMA
 	select SND_SOC_FSL_SPDIF
-	select REGMAP_MMIO
 	help
 	  SoC Audio support for i.MX boards with S/PDIF
 	  Say Y if you want to add support for SoC audio on an i.MX board with
@@ -211,8 +204,6 @@ config SND_SOC_IMX_MC13783
 	tristate "SoC Audio support for I.MX boards with mc13783"
 	depends on MFD_MC13XXX && ARM
 	select SND_SOC_IMX_SSI
-	select SND_SOC_IMX_AUDMUX
 	select SND_SOC_MC13783
-	select SND_SOC_IMX_PCM_DMA
 
 endif # SND_IMX_SOC
Signature · 1 line
1.8.3.2
#2 lore raw

Hello.

Quoted 2 lines · On Mon, 13 Jan 2014 11:56:28 +0800 Shawn Guo <[email protected]> wrote:
Quoted 1 line · Alexander Shiyan

This patch allow using generic sound cards/codecs based on DT description.

...

Quoted 5 lines
Quoted 5 lines
sound/soc/fsl/Kconfig +4 -1
-config SND_SOC_IMX_AUDMUX
+menuconfig SND_IMX_SOC
+	tristate "SoC Audio for Freescale i.MX CPUs"
+	depends on ARCH_MXC || COMPILE_TEST
+	select SND_SOC_FSL_SSI if OF
Quoted 8 lines

sound/soc/fsl/Kconfig config SND_MPC52xx_SOC_EFIKA · line 125

Quoted 2 lines
sound/soc/fsl/Kconfig +2 -0
+	select SND_SOC_IMX_AUDMUX
+	select SND_SOC_IMX_PCM_DMA

Just want to understand the direction of this change. Besides FSL_SSI, we will have other CPU DAIs FSL_SPDIF, FSL_ESAI and FSL_SAI. Will we select all of them from SND_IMX_SOC, or we only do it for FSL_SSI? Note, IMX_AUDMUX should be only needed for machine drivers that use SSI CPU DAI.

Not clear how to do it right ...
I conclude that the first version of the patch was the best, do a separate symbol for DT and select all required options.
Rewrite in this way?

Signature · 1 line
Alexander Shiyan <[email protected]>
maintainer
#3 lore raw
Quoted 8 lines · Alexander Shiyan
Quoted 5 lines · Shawn Guo

Just want to understand the direction of this change. Besides FSL_SSI, we will have other CPU DAIs FSL_SPDIF, FSL_ESAI and FSL_SAI. Will we select all of them from SND_IMX_SOC, or we only do it for FSL_SSI? Note, IMX_AUDMUX should be only needed for machine drivers that use SSI CPU DAI.

Quoted 4 lines

Not clear how to do it right ...
I conclude that the first version of the patch was the best, do a separate symbol for DT and select all required options.
Rewrite in this way?

No, that just means that the same problem that Shawn identified affects all DT users which isn't really moving us forwards since all these systems use DT and they probably shouldn't suffer anyway. Why not just make each of the drivers selectable?

#4 lore raw

Понедельник, 13 января 2014, 17:45 UTC от Mark Brown <[email protected]>:

Quoted 14 lines · Alexander Shiyan
Quoted 8 lines
Quoted 5 lines · Shawn Guo

Just want to understand the direction of this change. Besides FSL_SSI, we will have other CPU DAIs FSL_SPDIF, FSL_ESAI and FSL_SAI. Will we select all of them from SND_IMX_SOC, or we only do it for FSL_SSI? Note, IMX_AUDMUX should be only needed for machine drivers that use SSI CPU DAI.

Quoted 4 lines

Not clear how to do it right ...
I conclude that the first version of the patch was the best, do a separate symbol for DT and select all required options.
Rewrite in this way?

Quoted 4 lines

No, that just means that the same problem that Shawn identified affects all DT users which isn't really moving us forwards since all these systems use DT and they probably shouldn't suffer anyway. Why not just make each of the drivers selectable?

You mean add descriptions for the options and thus make them public?

---
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

maintainer
#5 lore raw
Quoted 8 lines · Alexander Shiyan

Понедельник, 13 января 2014, 17:45 UTC от Mark Brown <[email protected]>:

Quoted 4 lines

No, that just means that the same problem that Shawn identified affects all DT users which isn't really moving us forwards since all these systems use DT and they probably shouldn't suffer anyway. Why not just make each of the drivers selectable?

You mean add descriptions for the options and thus make them public?

Yes.