alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-04-30  2:31   ` Brian Austin
  2014-05-01  1:30   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 02/15] ASoC: davinci: add dependencies for SND_SOC_TLV320AIC3X Xia Kaixu
                   ` (13 subsequent siblings)
  14 siblings, 2 replies; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood,
	Ben Dooks, Kukjin Kim, Sangbeom Kim, Lars-Peter Clausen,
	Timur Tabi, linux-arm-kernel, linux-samsung-soc, linux-input,
	alsa-devel

From: Arnd Bergmann <arnd@arndb.de>

Building ARM randconfig got into a situation where CONFIG_INPUT
is turned off and SND_SOC_ALL_CODECS is turned on, which failed
for two codecs trying to use the input subsystem. Some other 
drivers also select one of these codecs and consequently need an
explicit dependency added. 

Appending to the dependency list seems the easiest way out,
since this is not a practical limitation. If anyone really
needs to build these codecs for a kernel with no input support,
a more sophisticated solution can be implemented.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Timur Tabi <timur@tabi.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-input@vger.kernel.org
Cc: alsa-devel@alsa-project.org
---
 sound/soc/codecs/Kconfig  |    8 ++++----
 sound/soc/fsl/Kconfig     |    2 +-
 sound/soc/samsung/Kconfig |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index f0e8401..d4260d3 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -40,7 +40,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_ALC5632 if I2C
 	select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC
 	select SND_SOC_CS42L51 if I2C
-	select SND_SOC_CS42L52 if I2C
+	select SND_SOC_CS42L52 if I2C && INPUT
 	select SND_SOC_CS42L73 if I2C
 	select SND_SOC_CS4270 if I2C
 	select SND_SOC_CS4271 if SND_SOC_I2C_AND_SPI
@@ -127,7 +127,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_WM8955 if I2C
 	select SND_SOC_WM8960 if I2C
 	select SND_SOC_WM8961 if I2C
-	select SND_SOC_WM8962 if I2C
+	select SND_SOC_WM8962 if I2C && INPUT
 	select SND_SOC_WM8971 if I2C
 	select SND_SOC_WM8974 if I2C
 	select SND_SOC_WM8978 if I2C
@@ -282,7 +282,7 @@ config SND_SOC_CS42L51
 
 config SND_SOC_CS42L52
 	tristate "Cirrus Logic CS42L52 CODEC"
-	depends on I2C
+	depends on I2C && INPUT
 
 config SND_SOC_CS42L73
 	tristate "Cirrus Logic CS42L73 CODEC"
@@ -598,7 +598,7 @@ config SND_SOC_WM8961
 
 config SND_SOC_WM8962
 	tristate "Wolfson Microelectronics WM8962 CODEC"
-	depends on I2C
+	depends on I2C && INPUT
 
 config SND_SOC_WM8971
 	tristate
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 338a916..f4069d0 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -187,7 +187,7 @@ config SND_SOC_EUKREA_TLV320
 
 config SND_SOC_IMX_WM8962
 	tristate "SoC Audio support for i.MX boards with wm8962"
-	depends on OF && I2C
+	depends on OF && I2C && INPUT
 	select SND_SOC_WM8962
 	select SND_SOC_IMX_PCM_DMA
 	select SND_SOC_IMX_AUDMUX
diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index f2e2891..14568be 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -204,7 +204,7 @@ config SND_SOC_SPEYSIDE
 
 config SND_SOC_TOBERMORY
 	tristate "Audio support for Wolfson Tobermory"
-	depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410
+	depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 && INPUT
 	select SND_SAMSUNG_I2S
 	select SND_SOC_WM8962
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 02/15] ASoC: davinci: add dependencies for SND_SOC_TLV320AIC3X
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
  2014-04-29 11:18 ` [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01  3:29   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 03/15] ASoC: SMDK_WM8580_PCM needs REGMAP_I2C Xia Kaixu
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood, alsa-devel

From: Arnd Bergmann <arnd@arndb.de>

This codec requires I2C to be enabled, so any other option
that selects it should also depend on I2C.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org
---
 sound/soc/davinci/Kconfig |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig
index a8ec1fc..50a0987 100644
--- a/sound/soc/davinci/Kconfig
+++ b/sound/soc/davinci/Kconfig
@@ -18,7 +18,7 @@ config SND_DAVINCI_SOC_GENERIC_EVM
 
 config SND_AM33XX_SOC_EVM
 	tristate "SoC Audio for the AM33XX chip based boards"
-	depends on SND_DAVINCI_SOC && SOC_AM33XX
+	depends on SND_DAVINCI_SOC && SOC_AM33XX && I2C
 	select SND_DAVINCI_SOC_GENERIC_EVM
 	help
 	  Say Y or M if you want to add support for SoC audio on AM33XX
@@ -28,7 +28,7 @@ config SND_AM33XX_SOC_EVM
 
 config SND_DAVINCI_SOC_EVM
 	tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM"
-	depends on SND_DAVINCI_SOC
+	depends on SND_DAVINCI_SOC && I2C
 	depends on MACH_DAVINCI_EVM || MACH_DAVINCI_DM355_EVM || MACH_DAVINCI_DM365_EVM
 	select SND_DAVINCI_SOC_GENERIC_EVM
 	help
@@ -56,7 +56,7 @@ endchoice
 
 config  SND_DM6467_SOC_EVM
 	tristate "SoC Audio support for DaVinci DM6467 EVM"
-	depends on SND_DAVINCI_SOC && MACH_DAVINCI_DM6467_EVM
+	depends on SND_DAVINCI_SOC && MACH_DAVINCI_DM6467_EVM && I2C
 	select SND_DAVINCI_SOC_GENERIC_EVM
 	select SND_SOC_SPDIF
 
@@ -65,7 +65,7 @@ config  SND_DM6467_SOC_EVM
 
 config  SND_DA830_SOC_EVM
 	tristate "SoC Audio support for DA830/OMAP-L137 EVM"
-	depends on SND_DAVINCI_SOC && MACH_DAVINCI_DA830_EVM
+	depends on SND_DAVINCI_SOC && MACH_DAVINCI_DA830_EVM && I2C
 	select SND_DAVINCI_SOC_GENERIC_EVM
 
 	help
@@ -74,7 +74,7 @@ config  SND_DA830_SOC_EVM
 
 config  SND_DA850_SOC_EVM
 	tristate "SoC Audio support for DA850/OMAP-L138 EVM"
-	depends on SND_DAVINCI_SOC && MACH_DAVINCI_DA850_EVM
+	depends on SND_DAVINCI_SOC && MACH_DAVINCI_DA850_EVM && I2C
 	select SND_DAVINCI_SOC_GENERIC_EVM
 	help
 	  Say Y if you want to add support for SoC audio on TI
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 03/15] ASoC: SMDK_WM8580_PCM needs REGMAP_I2C
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
  2014-04-29 11:18 ` [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT Xia Kaixu
  2014-04-29 11:18 ` [PATCH 02/15] ASoC: davinci: add dependencies for SND_SOC_TLV320AIC3X Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01  3:30   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division Xia Kaixu
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood,
	Ben Dooks, Kukjin Kim, Sangbeom Kim, linux-arm-kernel,
	linux-samsung-soc, alsa-devel

From: Arnd Bergmann <arnd@arndb.de>

This adds a missing dependency for SND_SOC_SMDK_WM8580_PCM to
require REGMAP_I2C to be enabled, avoiding possible build
erorrs.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: alsa-devel@alsa-project.org
---
 sound/soc/samsung/Kconfig |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 14568be..0c5e9e2 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -64,6 +64,7 @@ config SND_SOC_SAMSUNG_JIVE_WM8750
 config SND_SOC_SAMSUNG_SMDK_WM8580
 	tristate "SoC I2S Audio support for WM8580 on SMDK"
 	depends on SND_SOC_SAMSUNG && (MACH_SMDK6410 || MACH_SMDKC100 || MACH_SMDK6440 || MACH_SMDK6450 || MACH_SMDKV210 || MACH_SMDKC110)
+	depends on REGMAP_I2C
 	select SND_SOC_WM8580
 	select SND_SAMSUNG_I2S
 	help
@@ -178,6 +179,7 @@ config SND_SOC_SAMSUNG_SMDK_SPDIF
 config SND_SOC_SMDK_WM8580_PCM
 	tristate "SoC PCM Audio support for WM8580 on SMDK"
 	depends on SND_SOC_SAMSUNG && (MACH_SMDK6450 || MACH_SMDKV210 || MACH_SMDKC110)
+	depends on REGMAP_I2C
 	select SND_SOC_WM8580
 	select SND_SAMSUNG_PCM
 	help
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (2 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 03/15] ASoC: SMDK_WM8580_PCM needs REGMAP_I2C Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-04-30  3:50   ` Tushar Behera
  2014-05-01  3:31   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 05/15] ASoC: nuc900: export nuc900_ac97_data Xia Kaixu
                   ` (10 subsequent siblings)
  14 siblings, 2 replies; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood,
	Ben Dooks, Kukjin Kim, Sangbeom Kim, linux-arm-kernel,
	linux-samsung-soc, alsa-devel

From: Arnd Bergmann <arnd@arndb.de>

dma_addr_t may be 64 bit wide, which causes a build failure
when doing a division on it. Here it is safe to cast to an
u32 type, which avoids the problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: alsa-devel@alsa-project.org
---
 sound/soc/samsung/idma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c
index 3d5cf15..e9891b4 100644
--- a/sound/soc/samsung/idma.c
+++ b/sound/soc/samsung/idma.c
@@ -274,7 +274,7 @@ static irqreturn_t iis_irq(int irqno, void *dev_id)
 
 		addr = readl(idma.regs + I2SLVL0ADDR) - idma.lp_tx_addr;
 		addr += prtd->periodsz;
-		addr %= (prtd->end - prtd->start);
+		addr %= (u32)(prtd->end - prtd->start);
 		addr += idma.lp_tx_addr;
 
 		writel(addr, idma.regs + I2SLVL0ADDR);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 05/15] ASoC: nuc900: export nuc900_ac97_data
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (3 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01  3:32   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 06/15] ASoC: RX-51 audio needs I2C Xia Kaixu
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood,
	Wan ZongShun, alsa-devel, linux-arm-kernel

From: Arnd Bergmann <arnd@arndb.de>

The symbol "nuc900_ac97_data" is used by the nuc900_pcm driver, 
which may be a loadable module, so we should export it.

If one tries to build SND_SOC_NUC900 without SND_SOC_NUC900_AC97,
the kernel fails to link because of the reference to nuc900_ac97_data. 

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-arm-kernel@lists.infradead.org
---
 sound/soc/nuc900/Kconfig       |    1 +
 sound/soc/nuc900/nuc900-ac97.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/sound/soc/nuc900/Kconfig b/sound/soc/nuc900/Kconfig
index a0ed1c6..7f0c954 100644
--- a/sound/soc/nuc900/Kconfig
+++ b/sound/soc/nuc900/Kconfig
@@ -4,6 +4,7 @@
 config SND_SOC_NUC900
 	tristate "SoC Audio for NUC900 series"
 	depends on ARCH_W90X900
+	select SND_SOC_NUC900_AC97
 	help
 	  This option enables support for AC97 mode on the NUC900 SoC.
 
diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
index 8987bf9..f2f6794 100644
--- a/sound/soc/nuc900/nuc900-ac97.c
+++ b/sound/soc/nuc900/nuc900-ac97.c
@@ -28,6 +28,7 @@
 
 static DEFINE_MUTEX(ac97_mutex);
 struct nuc900_audio *nuc900_ac97_data;
+EXPORT_SYMBOL_GPL(nuc900_ac97_data);
 
 static int nuc900_checkready(void)
 {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 06/15] ASoC: RX-51 audio needs I2C
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (4 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 05/15] ASoC: nuc900: export nuc900_ac97_data Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01 17:59   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 07/15] ASoC: UDA1380 " Xia Kaixu
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood,
	Peter Ujfalusi, Jarkko Nikula, alsa-devel, linux-omap

From: Arnd Bergmann <arnd@arndb.de>

The codec requires I2C to be enabled, so any other option
that selects it should also depend on I2C.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-omap@vger.kernel.org
---
 sound/soc/omap/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index e006593..2796af9 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -26,7 +26,7 @@ config SND_OMAP_SOC_N810
 
 config SND_OMAP_SOC_RX51
 	tristate "SoC Audio support for Nokia RX-51"
-	depends on SND_OMAP_SOC && ARM && (MACH_NOKIA_RX51 || COMPILE_TEST)
+	depends on SND_OMAP_SOC && ARM && (MACH_NOKIA_RX51 || COMPILE_TEST) && I2C
 	select SND_OMAP_SOC_MCBSP
 	select SND_SOC_TLV320AIC3X
 	select SND_SOC_TPA6130A2
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 07/15] ASoC: UDA1380 needs I2C
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (5 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 06/15] ASoC: RX-51 audio needs I2C Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01 17:59   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 08/15] ASoC: TTC DKB audio " Xia Kaixu
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: alsa-devel, linaro-kernel, arnd, Sangbeom Kim, Liam Girdwood,
	linux-samsung-soc, Mark Brown, Ben Dooks, Kukjin Kim,
	linux-arm-kernel, kaixu.xia

From: Arnd Bergmann <arnd@arndb.de>

The UDA1380 driver needs I2C to be enabled, so 
SND_SOC_SAMSUNG_H1940_UDA1380 and 
SND_SOC_SAMSUNG_RX1950_UDA1380 also 
require this.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
---
 sound/soc/samsung/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 0c5e9e2..b09b5a4 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -130,7 +130,7 @@ config SND_SOC_SAMSUNG_SIMTEC_HERMES
 
 config SND_SOC_SAMSUNG_H1940_UDA1380
 	tristate "Audio support for the HP iPAQ H1940"
-	depends on SND_SOC_SAMSUNG && ARCH_H1940
+	depends on SND_SOC_SAMSUNG && ARCH_H1940 && I2C
 	select SND_S3C24XX_I2S
 	select SND_SOC_UDA1380
 	help
@@ -138,7 +138,7 @@ config SND_SOC_SAMSUNG_H1940_UDA1380
 
 config SND_SOC_SAMSUNG_RX1950_UDA1380
 	tristate "Audio support for the HP iPAQ RX1950"
-	depends on SND_SOC_SAMSUNG && MACH_RX1950
+	depends on SND_SOC_SAMSUNG && MACH_RX1950 && I2C
 	select SND_S3C24XX_I2S
 	select SND_SOC_UDA1380
 	help
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 08/15] ASoC: TTC DKB audio needs I2C
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (6 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 07/15] ASoC: UDA1380 " Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01 18:01   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 09/15] ASoC: Migo-R sound " Xia Kaixu
                   ` (6 subsequent siblings)
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood,
	Philipp Zabel, Paul Parsons, Russell King, Eric Miao,
	Haojian Zhuang, alsa-devel, linux-arm-kernel

From: Arnd Bergmann <arnd@arndb.de>

The missing dependency can lead to build errors, so
make it explicit in Kconfig.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Paul Parsons <lost.distance@yahoo.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-arm-kernel@lists.infradead.org
---
 sound/soc/pxa/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig
index 6473052..6acb225 100644
--- a/sound/soc/pxa/Kconfig
+++ b/sound/soc/pxa/Kconfig
@@ -140,7 +140,7 @@ config SND_PXA910_SOC
 
 config SND_SOC_TTC_DKB
 	bool "SoC Audio support for TTC DKB"
-	depends on SND_PXA910_SOC && MACH_TTC_DKB
+	depends on SND_PXA910_SOC && MACH_TTC_DKB && I2C=y
 	select PXA_SSP
 	select SND_PXA_SOC_SSP
 	select SND_MMP_SOC
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 09/15] ASoC: Migo-R sound needs I2C
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (7 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 08/15] ASoC: TTC DKB audio " Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01 20:30   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 10/15] ASoC: TLV320AIC23 and Simtec Hermes audio Xia Kaixu
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood,
	alsa-devel, linux-arm-kernel

From: Arnd Bergmann <arnd@arndb.de>

The WM8978 driver needs I2C to be enabled, so the
SND_SIU_MIGOR option also requires this.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-arm-kernel@lists.infradead.org
---
 sound/soc/sh/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig
index ff60e11..b43fdf0 100644
--- a/sound/soc/sh/Kconfig
+++ b/sound/soc/sh/Kconfig
@@ -56,7 +56,7 @@ config SND_SH7760_AC97
 
 config SND_SIU_MIGOR
 	tristate "SIU sound support on Migo-R"
-	depends on SH_MIGOR
+	depends on SH_MIGOR && I2C
 	select SND_SOC_SH4_SIU
 	select SND_SOC_WM8978
 	help
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 10/15] ASoC: TLV320AIC23 and Simtec Hermes audio
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (8 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 09/15] ASoC: Migo-R sound " Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01 20:29   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 11/15] ASoC: WM0010 needs SPI Xia Kaixu
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood,
	Ben Dooks, Kukjin Kim, Sangbeom Kim, alsa-devel,
	linux-arm-kernel, linux-samsung-soc

From: Arnd Bergmann <arnd@arndb.de>

This codec requires I2C to be enabled, so any other option
that selects it should also depend on I2C.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
---
 sound/soc/samsung/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index b09b5a4..9fd6f62 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -116,14 +116,14 @@ config SND_SOC_SAMSUNG_SIMTEC
 
 config SND_SOC_SAMSUNG_SIMTEC_TLV320AIC23
 	tristate "SoC I2S Audio support for TLV320AIC23 on Simtec boards"
-	depends on SND_SOC_SAMSUNG && ARCH_S3C24XX
+	depends on SND_SOC_SAMSUNG && ARCH_S3C24XX && I2C
 	select SND_S3C24XX_I2S
 	select SND_SOC_TLV320AIC23_I2C
 	select SND_SOC_SAMSUNG_SIMTEC
 
 config SND_SOC_SAMSUNG_SIMTEC_HERMES
 	tristate "SoC I2S Audio support for Simtec Hermes board"
-	depends on SND_SOC_SAMSUNG && ARCH_S3C24XX
+	depends on SND_SOC_SAMSUNG && ARCH_S3C24XX && I2C
 	select SND_S3C24XX_I2S
 	select SND_SOC_TLV320AIC3X
 	select SND_SOC_SAMSUNG_SIMTEC
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 11/15] ASoC: WM0010 needs SPI
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (9 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 10/15] ASoC: TLV320AIC23 and Simtec Hermes audio Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01 19:08   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 12/15] ASoC: Atmel WM8904 codec support needs I2C Xia Kaixu
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood,
	Ben Dooks, Kukjin Kim, Sangbeom Kim, alsa-devel,
	linux-arm-kernel, linux-samsung-soc

From: Arnd Bergmann <arnd@arndb.de>

The missing dependency can lead to build errors, so
make it explicit in Kconfig.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
---
 sound/soc/samsung/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 9fd6f62..99cc196 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -201,7 +201,7 @@ config SND_SOC_SPEYSIDE
 	select SND_SAMSUNG_I2S
 	select SND_SOC_WM8996
 	select SND_SOC_WM9081
-	select SND_SOC_WM0010
+	select SND_SOC_WM0010 if SPI
 	select SND_SOC_WM1250_EV1
 
 config SND_SOC_TOBERMORY
@@ -217,7 +217,7 @@ config SND_SOC_BELLS
 	select SND_SOC_WM5102
 	select SND_SOC_WM5110
 	select SND_SOC_WM9081
-	select SND_SOC_WM0010
+	select SND_SOC_WM0010 if SPI
 	select SND_SOC_WM1250_EV1
 
 config SND_SOC_LOWLAND
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 12/15] ASoC: Atmel WM8904 codec support needs I2C
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (10 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 11/15] ASoC: WM0010 needs SPI Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01 19:09   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA Xia Kaixu
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood, alsa-devel

From: Arnd Bergmann <arnd@arndb.de>

The WM8904 codec driver needs I2C to be enabled, so the
SND_ATMEL_SOC_WM8904 option also requires this.

Found using randconfig build testing.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org
---
 sound/soc/atmel/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig
index 4789619..27e3fc4 100644
--- a/sound/soc/atmel/Kconfig
+++ b/sound/soc/atmel/Kconfig
@@ -35,7 +35,7 @@ config SND_AT91_SOC_SAM9G20_WM8731
 
 config SND_ATMEL_SOC_WM8904
 	tristate "Atmel ASoC driver for boards using WM8904 codec"
-	depends on ARCH_AT91 && ATMEL_SSC && SND_ATMEL_SOC
+	depends on ARCH_AT91 && ATMEL_SSC && SND_ATMEL_SOC && I2C
 	select SND_ATMEL_SOC_SSC
 	select SND_ATMEL_SOC_DMA
 	select SND_SOC_WM8904
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (11 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 12/15] ASoC: Atmel WM8904 codec support needs I2C Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01 19:11   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 14/15] ASoC: Amstrad E3 needs TTY support for codec Xia Kaixu
  2014-04-29 11:18 ` [PATCH 15/15] ASoC: pxa: remove mach header dependency Xia Kaixu
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood,
	Ben Dooks, Kukjin Kim, Sangbeom Kim, linux-arm-kernel,
	linux-samsung-soc, alsa-devel

From: Arnd Bergmann <arnd@arndb.de>

SND_S3C_DMA_LEGACY can only be set on S3C24xx, which does not
(yet) support the dmaengine framework, so samsung_dma_get_ops()
fails to link if S3C24XX_DMA is disabled:

sound/built-in.o: In function `dma_hw_params':
:(.text+0x7f310): undefined reference to `s3c_dma_get_ops'
sound/built-in.o: In function `s3c_ac97_trigger':
:(.text+0x7f7f0): undefined reference to `s3c_dma_get_ops'
sound/built-in.o: In function `s3c_ac97_mic_trigger':
:(.text+0x7f884): undefined reference to `s3c_dma_get_ops'
sound/built-in.o: In function `s3c2412_i2s_trigger':
:(.text+0x80944): undefined reference to `s3c2410_dma_ctrl'

This makes sure S3C24XX_DMA is always enabled when we need
it, just like we do it for the same dependency in SND_S3C24XX_I2S,
which has the same problem. Selecting "S3C2410_DMA" as we did
before does not actually have the intended effect, since
that one is only used on the s3c2410 and s3c2442 SoCs of the
s3c24xx family, but not the others, so we can remove this
from Kconfig.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: alsa-devel@alsa-project.org
---
 sound/soc/samsung/Kconfig |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 99cc196..7b610a8 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -1,7 +1,6 @@
 config SND_SOC_SAMSUNG
 	tristate "ASoC support for Samsung"
 	depends on PLAT_SAMSUNG
-	select S3C2410_DMA if ARCH_S3C24XX
 	select S3C64XX_PL080 if ARCH_S3C64XX
 	select SND_S3C_DMA if !ARCH_S3C24XX
 	select SND_S3C_DMA_LEGACY if ARCH_S3C24XX
@@ -15,11 +14,11 @@ config SND_S3C_DMA
 	tristate
 
 config SND_S3C_DMA_LEGACY
+	select S3C24XX_DMA
 	tristate
 
 config SND_S3C24XX_I2S
 	tristate
-	select S3C24XX_DMA
 
 config SND_S3C_I2SV2_SOC
 	tristate
@@ -27,7 +26,6 @@ config SND_S3C_I2SV2_SOC
 config SND_S3C2412_SOC_I2S
 	tristate
 	select SND_S3C_I2SV2_SOC
-	select S3C2410_DMA
 
 config SND_SAMSUNG_PCM
 	tristate
@@ -83,7 +81,6 @@ config SND_SOC_SAMSUNG_SMDK_WM8994
 config SND_SOC_SAMSUNG_SMDK2443_WM9710
 	tristate "SoC AC97 Audio support for SMDK2443 - WM9710"
 	depends on SND_SOC_SAMSUNG && MACH_SMDK2443
-	select S3C2410_DMA
 	select AC97_BUS
 	select SND_SOC_AC97_CODEC
 	select SND_SAMSUNG_AC97
@@ -94,7 +91,6 @@ config SND_SOC_SAMSUNG_SMDK2443_WM9710
 config SND_SOC_SAMSUNG_LN2440SBC_ALC650
 	tristate "SoC AC97 Audio support for LN2440SBC - ALC650"
 	depends on SND_SOC_SAMSUNG && ARCH_S3C24XX
-	select S3C2410_DMA
 	select AC97_BUS
 	select SND_SOC_AC97_CODEC
 	select SND_SAMSUNG_AC97
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 14/15] ASoC: Amstrad E3 needs TTY support for codec
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (12 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  2014-05-01 20:31   ` Mark Brown
  2014-04-29 11:18 ` [PATCH 15/15] ASoC: pxa: remove mach header dependency Xia Kaixu
  14 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Mark Brown, Liam Girdwood,
	Peter Ujfalusi, Jarkko Nikula, linux-omap, alsa-devel

From: Arnd Bergmann <arnd@arndb.de>

The cx20442 codec driver used here requires the TTY layer to
be enabled, or we get a link error:

sound/built-in.o: In function `cx20442_codec_remove':
cx20442.c:398: undefined reference to `tty_hangup'
sound/built-in.o: In function `ams_delta_remove':
ams-delta.c:613: undefined reference to `tty_unregister_ldisc'
sound/built-in.o: In function `ams_delta_cx20442_init':
ams-delta.c:559: undefined reference to `tty_register_ldisc'

This adds the missing dependency in the E3 configuration, there
was already one for the codec.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: linux-omap@vger.kernel.org
Cc: alsa-devel@alsa-project.org
---
 sound/soc/omap/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 2796af9..d44463a 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -37,7 +37,7 @@ config SND_OMAP_SOC_RX51
 
 config SND_OMAP_SOC_AMS_DELTA
 	tristate "SoC Audio support for Amstrad E3 (Delta) videophone"
-	depends on SND_OMAP_SOC && MACH_AMS_DELTA
+	depends on SND_OMAP_SOC && MACH_AMS_DELTA && TTY
 	select SND_OMAP_SOC_MCBSP
 	select SND_SOC_CX20442
 	help
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 15/15] ASoC: pxa: remove mach header dependency
       [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
                   ` (13 preceding siblings ...)
  2014-04-29 11:18 ` [PATCH 14/15] ASoC: Amstrad E3 needs TTY support for codec Xia Kaixu
@ 2014-04-29 11:18 ` Xia Kaixu
  14 siblings, 0 replies; 43+ messages in thread
From: Xia Kaixu @ 2014-04-29 11:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: linaro-kernel, arnd, kaixu.xia, Liam Girdwood, Eric Miao,
	Russell King, Haojian Zhuang, linux-arm-kernel, alsa-devel

From: Arnd Bergmann <arnd@arndb.de>

As we are moving the mmp platform towards multiplatform support,
we have to stop including platform header files.

This changes the pxa-ssp sound driver file to no longer depend
on mach/hardware.h and mach/dma.h. The code using the definitions
from those headers is actually gone already, the only thing
that was still being used was the pxa_dma_desc typedef, which
we can easily work around by using the normal 'struct pxa_dma_desc'
name.

The pxa2xx-dma driver still uses this header, so we include it
explicitly there, which is ok because that is only used on pxa,
not on mmp.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Mark Brown <broonie@kernel.org> 
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: alsa-devel@alsa-project.org
---
 sound/arm/pxa2xx-pcm.c     |    2 ++
 sound/arm/pxa2xx-pcm.h     |    3 +--
 sound/soc/pxa/pxa-ssp.c    |    2 --
 sound/soc/pxa/pxa2xx-pcm.c |    2 ++
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sound/arm/pxa2xx-pcm.c b/sound/arm/pxa2xx-pcm.c
index e6c727b..83be8e3 100644
--- a/sound/arm/pxa2xx-pcm.c
+++ b/sound/arm/pxa2xx-pcm.c
@@ -14,6 +14,8 @@
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
 
+#include <mach/dma.h>
+
 #include <sound/core.h>
 #include <sound/pxa2xx-lib.h>
 #include <sound/dmaengine_pcm.h>
diff --git a/sound/arm/pxa2xx-pcm.h b/sound/arm/pxa2xx-pcm.h
index 2a8fc08..0033098 100644
--- a/sound/arm/pxa2xx-pcm.h
+++ b/sound/arm/pxa2xx-pcm.h
@@ -9,12 +9,11 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <mach/dma.h>
 
 struct pxa2xx_runtime_data {
 	int dma_ch;
 	struct snd_dmaengine_dai_dma_data *params;
-	pxa_dma_desc *dma_desc_array;
+	struct pxa_dma_desc *dma_desc_array;
 	dma_addr_t dma_desc_array_phys;
 };
 
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index a3119a0..9b19ee7 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -34,8 +34,6 @@
 #include <sound/pxa2xx-lib.h>
 #include <sound/dmaengine_pcm.h>
 
-#include <mach/hardware.h>
-
 #include "../../arm/pxa2xx-pcm.h"
 #include "pxa-ssp.h"
 
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index d58b09f..42f2f01 100644
--- a/sound/soc/pxa/pxa2xx-pcm.c
+++ b/sound/soc/pxa/pxa2xx-pcm.c
@@ -15,6 +15,8 @@
 #include <linux/dmaengine.h>
 #include <linux/of.h>
 
+#include <mach/dma.h>
+
 #include <sound/core.h>
 #include <sound/soc.h>
 #include <sound/pxa2xx-lib.h>
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* Re: [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT
  2014-04-29 11:18 ` [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT Xia Kaixu
@ 2014-04-30  2:31   ` Brian Austin
  2014-05-01  1:31     ` [alsa-devel] " Mark Brown
  2014-05-01  1:30   ` Mark Brown
  1 sibling, 1 reply; 43+ messages in thread
From: Brian Austin @ 2014-04-30  2:31 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: alsa-devel, linaro-kernel, arnd, Sangbeom Kim, Mark Brown,
	linux-kernel, Timur Tabi, linux-samsung-soc, Lars-Peter Clausen,
	Ben Dooks, linux-input, Kukjin Kim, linux-arm-kernel,
	Liam Girdwood



On Tue, 29 Apr 2014, Xia Kaixu wrote:

> From: Arnd Bergmann <arnd@arndb.de>
>
> Building ARM randconfig got into a situation where CONFIG_INPUT
> is turned off and SND_SOC_ALL_CODECS is turned on, which failed
> for two codecs trying to use the input subsystem. Some other
> drivers also select one of these codecs and consequently need an
> explicit dependency added.

I assume you mean the CS42L52 instead of the L51. INPUT is used for a BEEP 
Generator but when I disable CONFIG_INPUT I do not get an error. Is there 
any information available on what the error is?


>
> Appending to the dependency list seems the easiest way out,
> since this is not a practical limitation. If anyone really
> needs to build these codecs for a kernel with no input support,
> a more sophisticated solution can be implemented.
>
It shouldn't build the BEEP code without CONFIG_INPUT enabled as you can 
use the CODEC without the BEEP enabled.

I believe the WM8962 is done the same way.

Thanks,
Brian

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division
  2014-04-29 11:18 ` [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division Xia Kaixu
@ 2014-04-30  3:50   ` Tushar Behera
  2014-05-01  3:31   ` Mark Brown
  1 sibling, 0 replies; 43+ messages in thread
From: Tushar Behera @ 2014-04-30  3:50 UTC (permalink / raw)
  To: Xia Kaixu, linux-kernel
  Cc: alsa-devel, linaro-kernel, Sangbeom Kim, Liam Girdwood,
	linux-samsung-soc, Mark Brown, Ben Dooks, Kukjin Kim,
	linux-arm-kernel

On 04/29/2014 04:48 PM, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> dma_addr_t may be 64 bit wide, which causes a build failure
> when doing a division on it. Here it is safe to cast to an
> u32 type, which avoids the problem.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Sangbeom Kim <sbkim73@samsung.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: alsa-devel@alsa-project.org
> ---

Tested with ARM_LPAE enabled. Without this patch, getting following error.

sound/built-in.o: In function `iis_irq':
sound/soc/samsung/idma.c:277: undefined reference to `__aeabi_uldivmod'

Tested-by: Tushar Behera <tushar.behera@linaro.org>

>  sound/soc/samsung/idma.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c
> index 3d5cf15..e9891b4 100644
> --- a/sound/soc/samsung/idma.c
> +++ b/sound/soc/samsung/idma.c
> @@ -274,7 +274,7 @@ static irqreturn_t iis_irq(int irqno, void *dev_id)
>  
>  		addr = readl(idma.regs + I2SLVL0ADDR) - idma.lp_tx_addr;
>  		addr += prtd->periodsz;
> -		addr %= (prtd->end - prtd->start);
> +		addr %= (u32)(prtd->end - prtd->start);
>  		addr += idma.lp_tx_addr;
>  
>  		writel(addr, idma.regs + I2SLVL0ADDR);
> 


-- 
Tushar Behera

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT
  2014-04-29 11:18 ` [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT Xia Kaixu
  2014-04-30  2:31   ` Brian Austin
@ 2014-05-01  1:30   ` Mark Brown
  1 sibling, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01  1:30 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, Ben Dooks,
	Kukjin Kim, Sangbeom Kim, Lars-Peter Clausen, Timur Tabi,
	linux-arm-kernel, linux-samsung-soc, linux-input, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 924 bytes --]

On Tue, Apr 29, 2014 at 07:18:22PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Building ARM randconfig got into a situation where CONFIG_INPUT
> is turned off and SND_SOC_ALL_CODECS is turned on, which failed
> for two codecs trying to use the input subsystem. Some other 

Applied, but...

> Cc: Mark Brown <broonie@kernel.org>
> Cc: Liam Girdwood <lrg@slimlogic.co.uk>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Sangbeom Kim <sbkim73@samsung.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Timur Tabi <timur@tabi.org>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> Cc: linux-input@vger.kernel.org
> Cc: alsa-devel@alsa-project.org

...please don't include noise like this in patch submissions, especially
with such long lists (which still manage to miss the driver maintainers
concerned).

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [alsa-devel] [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT
  2014-04-30  2:31   ` Brian Austin
@ 2014-05-01  1:31     ` Mark Brown
  2014-05-01  1:54       ` Austin, Brian
  0 siblings, 1 reply; 43+ messages in thread
From: Mark Brown @ 2014-05-01  1:31 UTC (permalink / raw)
  To: Brian Austin
  Cc: Xia Kaixu, linux-kernel, alsa-devel, linaro-kernel,
	Lars-Peter Clausen, arnd, Sangbeom Kim, Timur Tabi,
	linux-samsung-soc, Ben Dooks, linux-input, Kukjin Kim,
	linux-arm-kernel, Liam Girdwood

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

On Tue, Apr 29, 2014 at 09:31:30PM -0500, Brian Austin wrote:

> I assume you mean the CS42L52 instead of the L51. INPUT is used for a BEEP
> Generator but when I disable CONFIG_INPUT I do not get an error. Is there
> any information available on what the error is?

I suspect it's ASoC built in and INPUT build as a module.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT
  2014-05-01  1:31     ` [alsa-devel] " Mark Brown
@ 2014-05-01  1:54       ` Austin, Brian
  2014-05-01  2:16         ` Austin, Brian
  0 siblings, 1 reply; 43+ messages in thread
From: Austin, Brian @ 2014-05-01  1:54 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, linaro-kernel, arnd, Sangbeom Kim, linux-kernel,
	Timur Tabi, linux-samsung-soc, Lars-Peter Clausen, Ben Dooks,
	linux-input, Kukjin Kim, Liam Girdwood, linux-arm-kernel,
	Xia Kaixu



> On Apr 30, 2014, at 20:31, "Mark Brown" <broonie@kernel.org> wrote:
> 
>> On Tue, Apr 29, 2014 at 09:31:30PM -0500, Brian Austin wrote:
>> 
>> I assume you mean the CS42L52 instead of the L51. INPUT is used for a BEEP
>> Generator but when I disable CONFIG_INPUT I do not get an error. Is there
>> any information available on what the error is?
> 
> I suspect it's ASoC built in and INPUT build as a module.
Ok, I'll try that next.
Doesn't IS_ENABLED cover that?

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT
  2014-05-01  1:54       ` Austin, Brian
@ 2014-05-01  2:16         ` Austin, Brian
  2014-05-01  3:27           ` [alsa-devel] " Mark Brown
  0 siblings, 1 reply; 43+ messages in thread
From: Austin, Brian @ 2014-05-01  2:16 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, linaro-kernel, Lars-Peter Clausen, arnd,
	Sangbeom Kim, linux-kernel, Timur Tabi, linux-samsung-soc,
	Ben Dooks, linux-input, Kukjin Kim, Xia Kaixu, linux-arm-kernel,
	Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 749 bytes --]


On Apr 30, 2014, at 8:54 PM, Austin, Brian <Brian.Austin@cirrus.com> wrote:

> 
> 
>> On Apr 30, 2014, at 20:31, "Mark Brown" <broonie@kernel.org> wrote:
>> 
>>> On Tue, Apr 29, 2014 at 09:31:30PM -0500, Brian Austin wrote:
>>> 
>>> I assume you mean the CS42L52 instead of the L51. INPUT is used for a BEEP
>>> Generator but when I disable CONFIG_INPUT I do not get an error. Is there
>>> any information available on what the error is?
>> 
>> I suspect it's ASoC built in and INPUT build as a module.
> Ok, I'll try that next.
> Doesn't IS_ENABLED cover that?
Apparently not.
I would like to come up with a better solution than making INPUT a requirement. I just need some time.
In the meantime I suppose it’s OK to apply it? 

[-- Attachment #1.2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 496 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [alsa-devel] [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT
  2014-05-01  2:16         ` Austin, Brian
@ 2014-05-01  3:27           ` Mark Brown
  2014-05-01 12:26             ` Austin, Brian
  0 siblings, 1 reply; 43+ messages in thread
From: Mark Brown @ 2014-05-01  3:27 UTC (permalink / raw)
  To: Austin, Brian
  Cc: alsa-devel, linaro-kernel, arnd, Sangbeom Kim, linux-kernel,
	Timur Tabi, linux-samsung-soc, Lars-Peter Clausen, Ben Dooks,
	linux-input, Kukjin Kim, Liam Girdwood, linux-arm-kernel,
	Xia Kaixu

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

On Thu, May 01, 2014 at 02:16:27AM +0000, Austin, Brian wrote:

> Apparently not.
> I would like to come up with a better solution than making INPUT a requirement. I just need some time.
> In the meantime I suppose it’s OK to apply it? 

Yeah.  Realistically it's probably not going to ever be a practical
problem - the number of systems with audio but no input is likely to be
very close to zero.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 02/15] ASoC: davinci: add dependencies for SND_SOC_TLV320AIC3X
  2014-04-29 11:18 ` [PATCH 02/15] ASoC: davinci: add dependencies for SND_SOC_TLV320AIC3X Xia Kaixu
@ 2014-05-01  3:29   ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01  3:29 UTC (permalink / raw)
  To: Xia Kaixu; +Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

On Tue, Apr 29, 2014 at 07:18:23PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> This codec requires I2C to be enabled, so any other option
> that selects it should also depend on I2C.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 03/15] ASoC: SMDK_WM8580_PCM needs REGMAP_I2C
  2014-04-29 11:18 ` [PATCH 03/15] ASoC: SMDK_WM8580_PCM needs REGMAP_I2C Xia Kaixu
@ 2014-05-01  3:30   ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01  3:30 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, Ben Dooks,
	Kukjin Kim, Sangbeom Kim, linux-arm-kernel, linux-samsung-soc,
	alsa-devel

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

On Tue, Apr 29, 2014 at 07:18:24PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> This adds a missing dependency for SND_SOC_SMDK_WM8580_PCM to
> require REGMAP_I2C to be enabled, avoiding possible build
> erorrs.

Applied, thanks.  As well as the Cc list thing please try to use subject
lines matching the style for the subsystem.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division
  2014-04-29 11:18 ` [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division Xia Kaixu
  2014-04-30  3:50   ` Tushar Behera
@ 2014-05-01  3:31   ` Mark Brown
  1 sibling, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01  3:31 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, Ben Dooks,
	Kukjin Kim, Sangbeom Kim, linux-arm-kernel, linux-samsung-soc,
	alsa-devel

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

On Tue, Apr 29, 2014 at 07:18:25PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> dma_addr_t may be 64 bit wide, which causes a build failure
> when doing a division on it. Here it is safe to cast to an
> u32 type, which avoids the problem.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 05/15] ASoC: nuc900: export nuc900_ac97_data
  2014-04-29 11:18 ` [PATCH 05/15] ASoC: nuc900: export nuc900_ac97_data Xia Kaixu
@ 2014-05-01  3:32   ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01  3:32 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, Wan ZongShun,
	alsa-devel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

On Tue, Apr 29, 2014 at 07:18:26PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The symbol "nuc900_ac97_data" is used by the nuc900_pcm driver, 
> which may be a loadable module, so we should export it.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT
  2014-05-01  3:27           ` [alsa-devel] " Mark Brown
@ 2014-05-01 12:26             ` Austin, Brian
  0 siblings, 0 replies; 43+ messages in thread
From: Austin, Brian @ 2014-05-01 12:26 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, linaro-kernel, Lars-Peter Clausen, arnd,
	Sangbeom Kim, linux-kernel, Timur Tabi, linux-samsung-soc,
	Ben Dooks, linux-input, Kukjin Kim, Xia Kaixu, linux-arm-kernel,
	Liam Girdwood



> On Apr 30, 2014, at 22:28, "Mark Brown" <broonie@kernel.org> wrote:
> 
>> On Thu, May 01, 2014 at 02:16:27AM +0000, Austin, Brian wrote:
>> 
>> Apparently not.
>> I would like to come up with a better solution than making INPUT a requirement. I just need some time.
>> In the meantime I suppose it’s OK to apply it?
> 
> Yeah.  Realistically it's probably not going to ever be a practical
> problem - the number of systems with audio but no input is likely to be
> very close to zero.

Yeah, I'm just gonna go ahead and remove the #if's from the drivers then since it's required 

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 06/15] ASoC: RX-51 audio needs I2C
  2014-04-29 11:18 ` [PATCH 06/15] ASoC: RX-51 audio needs I2C Xia Kaixu
@ 2014-05-01 17:59   ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01 17:59 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, Peter Ujfalusi,
	Jarkko Nikula, alsa-devel, linux-omap

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

On Tue, Apr 29, 2014 at 07:18:27PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The codec requires I2C to be enabled, so any other option
> that selects it should also depend on I2C.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 07/15] ASoC: UDA1380 needs I2C
  2014-04-29 11:18 ` [PATCH 07/15] ASoC: UDA1380 " Xia Kaixu
@ 2014-05-01 17:59   ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01 17:59 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, Ben Dooks,
	Kukjin Kim, Sangbeom Kim, alsa-devel, linux-arm-kernel,
	linux-samsung-soc

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

On Tue, Apr 29, 2014 at 07:18:28PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The UDA1380 driver needs I2C to be enabled, so 
> SND_SOC_SAMSUNG_H1940_UDA1380 and 
> SND_SOC_SAMSUNG_RX1950_UDA1380 also 
> require this.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 08/15] ASoC: TTC DKB audio needs I2C
  2014-04-29 11:18 ` [PATCH 08/15] ASoC: TTC DKB audio " Xia Kaixu
@ 2014-05-01 18:01   ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01 18:01 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, Philipp Zabel,
	Paul Parsons, Russell King, Eric Miao, Haojian Zhuang,
	alsa-devel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]

On Tue, Apr 29, 2014 at 07:18:29PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The missing dependency can lead to build errors, so
> make it explicit in Kconfig.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 11/15] ASoC: WM0010 needs SPI
  2014-04-29 11:18 ` [PATCH 11/15] ASoC: WM0010 needs SPI Xia Kaixu
@ 2014-05-01 19:08   ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01 19:08 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, Ben Dooks,
	Kukjin Kim, Sangbeom Kim, alsa-devel, linux-arm-kernel,
	linux-samsung-soc

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

On Tue, Apr 29, 2014 at 07:18:32PM +0800, Xia Kaixu wrote:

> @@ -201,7 +201,7 @@ config SND_SOC_SPEYSIDE
>  	select SND_SAMSUNG_I2S
>  	select SND_SOC_WM8996
>  	select SND_SOC_WM9081
> -	select SND_SOC_WM0010
> +	select SND_SOC_WM0010 if SPI
>  	select SND_SOC_WM1250_EV1

No, this is broken.  The driver won't work if all the components it uses
don't load and the dependency for SPI isn't SPI, it's SPI_MASTER.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 12/15] ASoC: Atmel WM8904 codec support needs I2C
  2014-04-29 11:18 ` [PATCH 12/15] ASoC: Atmel WM8904 codec support needs I2C Xia Kaixu
@ 2014-05-01 19:09   ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01 19:09 UTC (permalink / raw)
  To: Xia Kaixu; +Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

On Tue, Apr 29, 2014 at 07:18:33PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The WM8904 codec driver needs I2C to be enabled, so the
> SND_ATMEL_SOC_WM8904 option also requires this.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA
  2014-04-29 11:18 ` [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA Xia Kaixu
@ 2014-05-01 19:11   ` Mark Brown
  2014-05-01 22:35     ` Arnd Bergmann
  0 siblings, 1 reply; 43+ messages in thread
From: Mark Brown @ 2014-05-01 19:11 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, Ben Dooks,
	Kukjin Kim, Sangbeom Kim, linux-arm-kernel, linux-samsung-soc,
	alsa-devel

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

On Tue, Apr 29, 2014 at 07:18:34PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> SND_S3C_DMA_LEGACY can only be set on S3C24xx, which does not
> (yet) support the dmaengine framework, so samsung_dma_get_ops()
> fails to link if S3C24XX_DMA is disabled:

Why is the fix for this not to ensure that s3c24xx always enables the
DMA controller - how likely is it that it would be sane to build a
kernel without DMA after all?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 10/15] ASoC: TLV320AIC23 and Simtec Hermes audio
  2014-04-29 11:18 ` [PATCH 10/15] ASoC: TLV320AIC23 and Simtec Hermes audio Xia Kaixu
@ 2014-05-01 20:29   ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01 20:29 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, Ben Dooks,
	Kukjin Kim, Sangbeom Kim, alsa-devel, linux-arm-kernel,
	linux-samsung-soc

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

On Tue, Apr 29, 2014 at 07:18:31PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> This codec requires I2C to be enabled, so any other option
> that selects it should also depend on I2C.

Applied, thanks.  Please try to use meaningful subject lines.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 09/15] ASoC: Migo-R sound needs I2C
  2014-04-29 11:18 ` [PATCH 09/15] ASoC: Migo-R sound " Xia Kaixu
@ 2014-05-01 20:30   ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01 20:30 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, alsa-devel,
	linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

On Tue, Apr 29, 2014 at 07:18:30PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The WM8978 driver needs I2C to be enabled, so the
> SND_SIU_MIGOR option also requires this.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 14/15] ASoC: Amstrad E3 needs TTY support for codec
  2014-04-29 11:18 ` [PATCH 14/15] ASoC: Amstrad E3 needs TTY support for codec Xia Kaixu
@ 2014-05-01 20:31   ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-01 20:31 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, arnd, Liam Girdwood, Peter Ujfalusi,
	Jarkko Nikula, linux-omap, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

On Tue, Apr 29, 2014 at 07:18:35PM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The cx20442 codec driver used here requires the TTY layer to
> be enabled, or we get a link error:

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA
  2014-05-01 19:11   ` Mark Brown
@ 2014-05-01 22:35     ` Arnd Bergmann
  2014-05-02 10:25       ` Heiko Stübner
  2014-05-02 17:24       ` Mark Brown
  0 siblings, 2 replies; 43+ messages in thread
From: Arnd Bergmann @ 2014-05-01 22:35 UTC (permalink / raw)
  To: Mark Brown
  Cc: Xia Kaixu, linux-kernel, linaro-kernel, Liam Girdwood, Ben Dooks,
	Kukjin Kim, Sangbeom Kim, linux-arm-kernel, linux-samsung-soc,
	alsa-devel

On Thursday 01 May 2014 12:11:25 Mark Brown wrote:
> On Tue, Apr 29, 2014 at 07:18:34PM +0800, Xia Kaixu wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > SND_S3C_DMA_LEGACY can only be set on S3C24xx, which does not
> > (yet) support the dmaengine framework, so samsung_dma_get_ops()
> > fails to link if S3C24XX_DMA is disabled:
> 
> Why is the fix for this not to ensure that s3c24xx always enables the
> DMA controller - how likely is it that it would be sane to build a
> kernel without DMA after all?

S3C24XX_DMA is only needed for ASoC and for s3cmci. The latter
uses 'depends on S3C24XX_DMA'. arch/arm/configs/tct_hammer_defconfig
is an example of a configuration that does not include DMA because
it uses neither of the two drivers.

On a related topic, I looked at the overall DMA situation for
plat-samsung again now, and it looks much nicer now than it used to,
with mach-s3c64xx fully migrated to dmaengine, so there might be an
even better way to deal with this.

>From all I can tell, sound/soc/samsung is the only remaining user
of the plat/dma.h interfaces, and there is only one other  driver
using the s3c24xx_dma interface directly, drivers/mmc/host/s3cmci.c.

How about the patch below?
8<-------
ASoC: s3c24xx: use legacy DMA interface directly

The samsung platform code has a wrapper around the legacy s3c24xx
DMA API as an alternative to the dmaengine API. This is only used
by the legacy s3c24xx sound support, which is never used in combination
with the dmaengine API.

We can simplify the ASoC code significantly, and thereby completely
obsoleting arch/arm/plat-samsung/dma-ops.c,
arch/arm/plat-samsung/s3c-dma-ops.c and
arch/arm/plat-samsung/include/plat/dma-ops.h.

This patch achieves this by open-coding the implementation of this
wrapper, which ends up saving us more code than we have to add.
s3c24xx does not support cyclic DMA, so anything referring to that
gets deleted in the process.

The plat-samsung dma wrapper code is now dead code and can be removed
subsequently.

Signed-off--by: Arnd Bergmann <arnd@arndb.de>
---

 sound/soc/samsung/ac97.c | 10 ++----
 sound/soc/samsung/dma.c  | 79 +++++++++++++++---------------------------------
 sound/soc/samsung/dma.h  |  2 --
 3 files changed, 27 insertions(+), 64 deletions(-)

diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
index 76b072b..28fe097 100644
--- a/sound/soc/samsung/ac97.c
+++ b/sound/soc/samsung/ac97.c
@@ -253,10 +253,7 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
 
 	writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL);
 
-	if (!dma_data->ops)
-		dma_data->ops = samsung_dma_get_ops();
-
-	dma_data->ops->started(dma_data->channel);
+	s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED);
 
 	return 0;
 }
@@ -287,10 +284,7 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream,
 
 	writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL);
 
-	if (!dma_data->ops)
-		dma_data->ops = samsung_dma_get_ops();
-
-	dma_data->ops->started(dma_data->channel);
+	s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED);
 
 	return 0;
 }
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c
index dc09b71..3c6e2f2 100644
--- a/sound/soc/samsung/dma.c
+++ b/sound/soc/samsung/dma.c
@@ -54,8 +54,6 @@ struct runtime_data {
 	struct s3c_dma_params *params;
 };
 
-static void audio_buffdone(void *data);
-
 /* dma_enqueue
  *
  * place a dma buffer onto the queue for the dma system
@@ -66,7 +64,6 @@ static void dma_enqueue(struct snd_pcm_substream *substream)
 	struct runtime_data *prtd = substream->runtime->private_data;
 	dma_addr_t pos = prtd->dma_pos;
 	unsigned int limit;
-	struct samsung_dma_prep dma_info;
 
 	pr_debug("Entered %s\n", __func__);
 
@@ -75,33 +72,11 @@ static void dma_enqueue(struct snd_pcm_substream *substream)
 	pr_debug("%s: loaded %d, limit %d\n",
 				__func__, prtd->dma_loaded, limit);
 
-	dma_info.cap = (samsung_dma_has_circular() ? DMA_CYCLIC : DMA_SLAVE);
-	dma_info.direction =
-		(substream->stream == SNDRV_PCM_STREAM_PLAYBACK
-		? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM);
-	dma_info.fp = audio_buffdone;
-	dma_info.fp_param = substream;
-	dma_info.period = prtd->dma_period;
-	dma_info.len = prtd->dma_period*limit;
-
-	if (dma_info.cap == DMA_CYCLIC) {
-		dma_info.buf = pos;
-		prtd->params->ops->prepare(prtd->params->ch, &dma_info);
-		prtd->dma_loaded += limit;
-		return;
-	}
-
 	while (prtd->dma_loaded < limit) {
 		pr_debug("dma_loaded: %d\n", prtd->dma_loaded);
 
-		if ((pos + dma_info.period) > prtd->dma_end) {
-			dma_info.period  = prtd->dma_end - pos;
-			pr_debug("%s: corrected dma len %ld\n",
-					__func__, dma_info.period);
-		}
-
-		dma_info.buf = pos;
-		prtd->params->ops->prepare(prtd->params->ch, &dma_info);
+		s3c2410_dma_enqueue(prtd->params->channel, substream, pos,
+				    prtd->dma_period * limit);
 
 		prtd->dma_loaded++;
 		pos += prtd->dma_period;
@@ -112,7 +87,8 @@ static void dma_enqueue(struct snd_pcm_substream *substream)
 	prtd->dma_pos = pos;
 }
 
-static void audio_buffdone(void *data)
+static void audio_buffdone(struct s3c2410_dma_chan *channel, void *data,
+		       int size, enum s3c2410_dma_buffresult res)
 {
 	struct snd_pcm_substream *substream = data;
 	struct runtime_data *prtd = substream->runtime->private_data;
@@ -128,10 +104,8 @@ static void audio_buffdone(void *data)
 			snd_pcm_period_elapsed(substream);
 
 		spin_lock(&prtd->lock);
-		if (!samsung_dma_has_circular()) {
-			prtd->dma_loaded--;
-			dma_enqueue(substream);
-		}
+		prtd->dma_loaded--;
+		dma_enqueue(substream);
 		spin_unlock(&prtd->lock);
 	}
 }
@@ -145,8 +119,7 @@ static int dma_hw_params(struct snd_pcm_substream *substream,
 	unsigned long totbytes = params_buffer_bytes(params);
 	struct s3c_dma_params *dma =
 		snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
-	struct samsung_dma_req req;
-	struct samsung_dma_config config;
+	enum dma_transfer_direction direction;
 
 	pr_debug("Entered %s\n", __func__);
 
@@ -164,24 +137,22 @@ static int dma_hw_params(struct snd_pcm_substream *substream,
 		pr_debug("params %p, client %p, channel %d\n", prtd->params,
 			prtd->params->client, prtd->params->channel);
 
-		prtd->params->ops = samsung_dma_get_ops();
-
-		req.cap = (samsung_dma_has_circular() ?
-			DMA_CYCLIC : DMA_SLAVE);
-		req.client = prtd->params->client;
-		config.direction =
-			(substream->stream == SNDRV_PCM_STREAM_PLAYBACK
+		direction = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK
 			? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM);
-		config.width = prtd->params->dma_size;
-		config.fifo = prtd->params->dma_addr;
-		prtd->params->ch = prtd->params->ops->request(
-				prtd->params->channel, &req, rtd->cpu_dai->dev,
-				prtd->params->ch_name);
-		if (!prtd->params->ch) {
+
+		if (s3c2410_dma_request(prtd->params->channel,
+					(void*)prtd->params->client, NULL) < 0) {
 			pr_err("Failed to allocate DMA channel\n");
+			s3c2410_dma_free(prtd->params->channel,
+					 (void*)prtd->params->client);
 			return -ENXIO;
 		}
-		prtd->params->ops->config(prtd->params->ch, &config);
+		s3c2410_dma_devconfig(prtd->params->channel, direction,
+				      prtd->params->dma_addr);
+		s3c2410_dma_config(prtd->params->channel,
+				   prtd->params->dma_size);
+		s3c2410_dma_set_buffdone_fn(prtd->params->channel,
+					    audio_buffdone);
 	}
 
 	snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
@@ -208,9 +179,9 @@ static int dma_hw_free(struct snd_pcm_substream *substream)
 	snd_pcm_set_runtime_buffer(substream, NULL);
 
 	if (prtd->params) {
-		prtd->params->ops->flush(prtd->params->ch);
-		prtd->params->ops->release(prtd->params->ch,
-					prtd->params->client);
+		s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_FLUSH);
+		s3c2410_dma_free(prtd->params->channel,
+				 (void*)prtd->params->client);
 		prtd->params = NULL;
 	}
 
@@ -230,7 +201,7 @@ static int dma_prepare(struct snd_pcm_substream *substream)
 		return 0;
 
 	/* flush the DMA channel */
-	prtd->params->ops->flush(prtd->params->ch);
+	s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_FLUSH);
 
 	prtd->dma_loaded = 0;
 	prtd->dma_pos = prtd->dma_start;
@@ -253,12 +224,12 @@ static int dma_trigger(struct snd_pcm_substream *substream, int cmd)
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
 		prtd->state |= ST_RUNNING;
-		prtd->params->ops->trigger(prtd->params->ch);
+		s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_START);
 		break;
 
 	case SNDRV_PCM_TRIGGER_STOP:
 		prtd->state &= ~ST_RUNNING;
-		prtd->params->ops->stop(prtd->params->ch);
+		s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_STOP);
 		break;
 
 	default:
diff --git a/sound/soc/samsung/dma.h b/sound/soc/samsung/dma.h
index ad7c0f0..c52fa86 100644
--- a/sound/soc/samsung/dma.h
+++ b/sound/soc/samsung/dma.h
@@ -23,8 +23,6 @@ struct s3c_dma_params {
 	int channel;				/* Channel ID */
 	dma_addr_t dma_addr;
 	int dma_size;			/* Size of the DMA transfer */
-	unsigned ch;
-	struct samsung_dma_ops *ops;
 	char *ch_name;
 	struct snd_dmaengine_dai_dma_data dma_data;
 };

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* Re: [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA
  2014-05-01 22:35     ` Arnd Bergmann
@ 2014-05-02 10:25       ` Heiko Stübner
  2014-05-02 16:10         ` Arnd Bergmann
  2014-05-02 17:26         ` Mark Brown
  2014-05-02 17:24       ` Mark Brown
  1 sibling, 2 replies; 43+ messages in thread
From: Heiko Stübner @ 2014-05-02 10:25 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mark Brown, Xia Kaixu, linux-kernel, linaro-kernel,
	Liam Girdwood, Ben Dooks, Kukjin Kim, Sangbeom Kim,
	linux-arm-kernel, linux-samsung-soc, alsa-devel

Hi Arnd,

Am Freitag, 2. Mai 2014, 00:35:21 schrieb Arnd Bergmann:
> On Thursday 01 May 2014 12:11:25 Mark Brown wrote:
> > On Tue, Apr 29, 2014 at 07:18:34PM +0800, Xia Kaixu wrote:
> > > From: Arnd Bergmann <arnd@arndb.de>
> > > 
> > > SND_S3C_DMA_LEGACY can only be set on S3C24xx, which does not
> > > (yet) support the dmaengine framework, so samsung_dma_get_ops()
> > 
> > > fails to link if S3C24XX_DMA is disabled:
> > Why is the fix for this not to ensure that s3c24xx always enables the
> > DMA controller - how likely is it that it would be sane to build a
> > kernel without DMA after all?
> 
> S3C24XX_DMA is only needed for ASoC and for s3cmci. The latter
> uses 'depends on S3C24XX_DMA'. arch/arm/configs/tct_hammer_defconfig
> is an example of a configuration that does not include DMA because
> it uses neither of the two drivers.
> 
> On a related topic, I looked at the overall DMA situation for
> plat-samsung again now, and it looks much nicer now than it used to,
> with mach-s3c64xx fully migrated to dmaengine, so there might be an
> even better way to deal with this.
> 
> From all I can tell, sound/soc/samsung is the only remaining user
> of the plat/dma.h interfaces, and there is only one other  driver
> using the s3c24xx_dma interface directly, drivers/mmc/host/s3cmci.c.
> 
> How about the patch below?
> 8<-------
> ASoC: s3c24xx: use legacy DMA interface directly
> 
> The samsung platform code has a wrapper around the legacy s3c24xx
> DMA API as an alternative to the dmaengine API. This is only used
> by the legacy s3c24xx sound support, which is never used in combination
> with the dmaengine API.

Just to mention, we have a dmaengine driver for s3c24xx :-) . Correct 
platform-data is present for all s3c24xx socs (in mach-s3c24xx/common.c) .

Mark already removed support for the legacy API from the s3c64xx spi driver 
(used by s3c2416 and s3c2443), so I guess to way forward would be to "simply" 
convert asoc and s3cmci to dmaengine and get rid of it altogether.

I just never had hardware using the old mci driver or with any previously 
working sound and didn't trust my experience to be enough to be able to do 
such a conversion "on the fly" like you below in the opposite direction ;-)


Heiko

> 
> We can simplify the ASoC code significantly, and thereby completely
> obsoleting arch/arm/plat-samsung/dma-ops.c,
> arch/arm/plat-samsung/s3c-dma-ops.c and
> arch/arm/plat-samsung/include/plat/dma-ops.h.
> 
> This patch achieves this by open-coding the implementation of this
> wrapper, which ends up saving us more code than we have to add.
> s3c24xx does not support cyclic DMA, so anything referring to that
> gets deleted in the process.
> 
> The plat-samsung dma wrapper code is now dead code and can be removed
> subsequently.
> 
> Signed-off--by: Arnd Bergmann <arnd@arndb.de>
> ---
> 
>  sound/soc/samsung/ac97.c | 10 ++----
>  sound/soc/samsung/dma.c  | 79
> +++++++++++++++--------------------------------- sound/soc/samsung/dma.h  |
>  2 --
>  3 files changed, 27 insertions(+), 64 deletions(-)
> 
> diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
> index 76b072b..28fe097 100644
> --- a/sound/soc/samsung/ac97.c
> +++ b/sound/soc/samsung/ac97.c
> @@ -253,10 +253,7 @@ static int s3c_ac97_trigger(struct snd_pcm_substream
> *substream, int cmd,
> 
>  	writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL);
> 
> -	if (!dma_data->ops)
> -		dma_data->ops = samsung_dma_get_ops();
> -
> -	dma_data->ops->started(dma_data->channel);
> +	s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED);
> 
>  	return 0;
>  }
> @@ -287,10 +284,7 @@ static int s3c_ac97_mic_trigger(struct
> snd_pcm_substream *substream,
> 
>  	writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL);
> 
> -	if (!dma_data->ops)
> -		dma_data->ops = samsung_dma_get_ops();
> -
> -	dma_data->ops->started(dma_data->channel);
> +	s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED);
> 
>  	return 0;
>  }
> diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c
> index dc09b71..3c6e2f2 100644
> --- a/sound/soc/samsung/dma.c
> +++ b/sound/soc/samsung/dma.c
> @@ -54,8 +54,6 @@ struct runtime_data {
>  	struct s3c_dma_params *params;
>  };
> 
> -static void audio_buffdone(void *data);
> -
>  /* dma_enqueue
>   *
>   * place a dma buffer onto the queue for the dma system
> @@ -66,7 +64,6 @@ static void dma_enqueue(struct snd_pcm_substream
> *substream) struct runtime_data *prtd = substream->runtime->private_data;
>  	dma_addr_t pos = prtd->dma_pos;
>  	unsigned int limit;
> -	struct samsung_dma_prep dma_info;
> 
>  	pr_debug("Entered %s\n", __func__);
> 
> @@ -75,33 +72,11 @@ static void dma_enqueue(struct snd_pcm_substream
> *substream) pr_debug("%s: loaded %d, limit %d\n",
>  				__func__, prtd->dma_loaded, limit);
> 
> -	dma_info.cap = (samsung_dma_has_circular() ? DMA_CYCLIC : DMA_SLAVE);
> -	dma_info.direction =
> -		(substream->stream == SNDRV_PCM_STREAM_PLAYBACK
> -		? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM);
> -	dma_info.fp = audio_buffdone;
> -	dma_info.fp_param = substream;
> -	dma_info.period = prtd->dma_period;
> -	dma_info.len = prtd->dma_period*limit;
> -
> -	if (dma_info.cap == DMA_CYCLIC) {
> -		dma_info.buf = pos;
> -		prtd->params->ops->prepare(prtd->params->ch, &dma_info);
> -		prtd->dma_loaded += limit;
> -		return;
> -	}
> -
>  	while (prtd->dma_loaded < limit) {
>  		pr_debug("dma_loaded: %d\n", prtd->dma_loaded);
> 
> -		if ((pos + dma_info.period) > prtd->dma_end) {
> -			dma_info.period  = prtd->dma_end - pos;
> -			pr_debug("%s: corrected dma len %ld\n",
> -					__func__, dma_info.period);
> -		}
> -
> -		dma_info.buf = pos;
> -		prtd->params->ops->prepare(prtd->params->ch, &dma_info);
> +		s3c2410_dma_enqueue(prtd->params->channel, substream, pos,
> +				    prtd->dma_period * limit);
> 
>  		prtd->dma_loaded++;
>  		pos += prtd->dma_period;
> @@ -112,7 +87,8 @@ static void dma_enqueue(struct snd_pcm_substream
> *substream) prtd->dma_pos = pos;
>  }
> 
> -static void audio_buffdone(void *data)
> +static void audio_buffdone(struct s3c2410_dma_chan *channel, void *data,
> +		       int size, enum s3c2410_dma_buffresult res)
>  {
>  	struct snd_pcm_substream *substream = data;
>  	struct runtime_data *prtd = substream->runtime->private_data;
> @@ -128,10 +104,8 @@ static void audio_buffdone(void *data)
>  			snd_pcm_period_elapsed(substream);
> 
>  		spin_lock(&prtd->lock);
> -		if (!samsung_dma_has_circular()) {
> -			prtd->dma_loaded--;
> -			dma_enqueue(substream);
> -		}
> +		prtd->dma_loaded--;
> +		dma_enqueue(substream);
>  		spin_unlock(&prtd->lock);
>  	}
>  }
> @@ -145,8 +119,7 @@ static int dma_hw_params(struct snd_pcm_substream
> *substream, unsigned long totbytes = params_buffer_bytes(params);
>  	struct s3c_dma_params *dma =
>  		snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
> -	struct samsung_dma_req req;
> -	struct samsung_dma_config config;
> +	enum dma_transfer_direction direction;
> 
>  	pr_debug("Entered %s\n", __func__);
> 
> @@ -164,24 +137,22 @@ static int dma_hw_params(struct snd_pcm_substream
> *substream, pr_debug("params %p, client %p, channel %d\n", prtd->params,
>  			prtd->params->client, prtd->params->channel);
> 
> -		prtd->params->ops = samsung_dma_get_ops();
> -
> -		req.cap = (samsung_dma_has_circular() ?
> -			DMA_CYCLIC : DMA_SLAVE);
> -		req.client = prtd->params->client;
> -		config.direction =
> -			(substream->stream == SNDRV_PCM_STREAM_PLAYBACK
> +		direction = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK
>  			? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM);
> -		config.width = prtd->params->dma_size;
> -		config.fifo = prtd->params->dma_addr;
> -		prtd->params->ch = prtd->params->ops->request(
> -				prtd->params->channel, &req, rtd->cpu_dai->dev,
> -				prtd->params->ch_name);
> -		if (!prtd->params->ch) {
> +
> +		if (s3c2410_dma_request(prtd->params->channel,
> +					(void*)prtd->params->client, NULL) < 0) {
>  			pr_err("Failed to allocate DMA channel\n");
> +			s3c2410_dma_free(prtd->params->channel,
> +					 (void*)prtd->params->client);
>  			return -ENXIO;
>  		}
> -		prtd->params->ops->config(prtd->params->ch, &config);
> +		s3c2410_dma_devconfig(prtd->params->channel, direction,
> +				      prtd->params->dma_addr);
> +		s3c2410_dma_config(prtd->params->channel,
> +				   prtd->params->dma_size);
> +		s3c2410_dma_set_buffdone_fn(prtd->params->channel,
> +					    audio_buffdone);
>  	}
> 
>  	snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
> @@ -208,9 +179,9 @@ static int dma_hw_free(struct snd_pcm_substream
> *substream) snd_pcm_set_runtime_buffer(substream, NULL);
> 
>  	if (prtd->params) {
> -		prtd->params->ops->flush(prtd->params->ch);
> -		prtd->params->ops->release(prtd->params->ch,
> -					prtd->params->client);
> +		s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_FLUSH);
> +		s3c2410_dma_free(prtd->params->channel,
> +				 (void*)prtd->params->client);
>  		prtd->params = NULL;
>  	}
> 
> @@ -230,7 +201,7 @@ static int dma_prepare(struct snd_pcm_substream
> *substream) return 0;
> 
>  	/* flush the DMA channel */
> -	prtd->params->ops->flush(prtd->params->ch);
> +	s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_FLUSH);
> 
>  	prtd->dma_loaded = 0;
>  	prtd->dma_pos = prtd->dma_start;
> @@ -253,12 +224,12 @@ static int dma_trigger(struct snd_pcm_substream
> *substream, int cmd) switch (cmd) {
>  	case SNDRV_PCM_TRIGGER_START:
>  		prtd->state |= ST_RUNNING;
> -		prtd->params->ops->trigger(prtd->params->ch);
> +		s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_START);
>  		break;
> 
>  	case SNDRV_PCM_TRIGGER_STOP:
>  		prtd->state &= ~ST_RUNNING;
> -		prtd->params->ops->stop(prtd->params->ch);
> +		s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_STOP);
>  		break;
> 
>  	default:
> diff --git a/sound/soc/samsung/dma.h b/sound/soc/samsung/dma.h
> index ad7c0f0..c52fa86 100644
> --- a/sound/soc/samsung/dma.h
> +++ b/sound/soc/samsung/dma.h
> @@ -23,8 +23,6 @@ struct s3c_dma_params {
>  	int channel;				/* Channel ID */
>  	dma_addr_t dma_addr;
>  	int dma_size;			/* Size of the DMA transfer */
> -	unsigned ch;
> -	struct samsung_dma_ops *ops;
>  	char *ch_name;
>  	struct snd_dmaengine_dai_dma_data dma_data;
>  };
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc"
> in the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA
  2014-05-02 10:25       ` Heiko Stübner
@ 2014-05-02 16:10         ` Arnd Bergmann
  2014-05-02 17:26         ` Mark Brown
  1 sibling, 0 replies; 43+ messages in thread
From: Arnd Bergmann @ 2014-05-02 16:10 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: alsa-devel, linaro-kernel, Sangbeom Kim, Liam Girdwood,
	linux-kernel, linux-samsung-soc, Mark Brown, Ben Dooks,
	Kukjin Kim, linux-arm-kernel, Xia Kaixu

On Friday 02 May 2014 12:25:58 Heiko Stübner wrote:
> 
> Just to mention, we have a dmaengine driver for s3c24xx  . Correct 
> platform-data is present for all s3c24xx socs (in mach-s3c24xx/common.c) .
> 
> Mark already removed support for the legacy API from the s3c64xx spi driver 
> (used by s3c2416 and s3c2443), so I guess to way forward would be to "simply" 
> convert asoc and s3cmci to dmaengine and get rid of it altogether.

For asoc, this is probably very simple: the dma.c gets replaced with the
dmaengine.c, and the three drivers calling s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED) get changed to do something equivalent.

> I just never had hardware using the old mci driver or with any previously 
> working sound and didn't trust my experience to be enough to be able to do 
> such a conversion "on the fly" like you below in the opposite direction 

What I did was much easier: the dma.c file was already using a wrapper
around both interfaces, I just unwrapped it. For mci, you'd have to
replace one API with another incompatible one. I've tried a conversion
in the patch below, but I also don't enough confidence in this to
submit it.

What is interesting however is that none of the three defconfigs we have
for S3C24xx actually uses DMA wiht MMC_S3C: tct_hammer doesn't have
any MMC support, and mini2440_defonfig as well as s3c2410_defconfig
enable the MMC driver in PIO-only mode.

When Ben Dooks did all the changes to the DMA code in that driver, but
he also marked DMA support as 'EXPERIMENTAL'. Maybe we can just get
away with deprecating that?

	Arnd

8<------
Subject: convert s3cmci to use dmaengine

This is an attempt to migrate s3cmci from the samsung-proprietary DMA
interface to the generic dmaengine API. I don't really understand
what I'm doing here, and this is not tested at all. Somebody who
has the hardware and understands this code can probably get it to
work, but I would expect a couple of small bugs to get introduced.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index f237826..02847d3 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -14,6 +14,7 @@
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk.h>
+#include <linux/dmaengine.h>
 #include <linux/mmc/host.h>
 #include <linux/platform_device.h>
 #include <linux/cpufreq.h>
@@ -28,6 +29,7 @@
 #include <mach/gpio-samsung.h>
 
 #include <linux/platform_data/mmc-s3cmci.h>
+#include <linux/platform_data/dma-s3c24xx.h>
 
 #include "s3cmci.h"
 
@@ -140,10 +142,6 @@ static const int dbgmap_debug = dbg_err | dbg_debug;
 		dev_dbg(&host->pdev->dev, args);  \
 	} while (0)
 
-static struct s3c2410_dma_client s3cmci_dma_client = {
-	.name		= "s3c-mci",
-};
-
 static void finalize_request(struct s3cmci_host *host);
 static void s3cmci_send_request(struct mmc_host *mmc);
 static void s3cmci_reset(struct s3cmci_host *host);
@@ -841,9 +839,7 @@ static irqreturn_t s3cmci_irq_cd(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static void s3cmci_dma_done_callback(struct s3c2410_dma_chan *dma_ch,
-				     void *buf_id, int size,
-				     enum s3c2410_dma_buffresult result)
+static void s3cmci_dma_done_callback(void *buf_id)
 {
 	struct s3cmci_host *host = buf_id;
 	unsigned long iflags;
@@ -856,45 +852,18 @@ static void s3cmci_dma_done_callback(struct s3c2410_dma_chan *dma_ch,
 
 	BUG_ON(!host->mrq);
 	BUG_ON(!host->mrq->data);
-	BUG_ON(!host->dmatogo);
 
 	spin_lock_irqsave(&host->complete_lock, iflags);
 
-	if (result != S3C2410_RES_OK) {
-		dbg(host, dbg_fail, "DMA FAILED: csta=0x%08x dsta=0x%08x "
-			"fsta=0x%08x dcnt:0x%08x result:0x%08x toGo:%u\n",
-			mci_csta, mci_dsta, mci_fsta,
-			mci_dcnt, result, host->dmatogo);
-
-		goto fail_request;
-	}
-
-	host->dmatogo--;
-	if (host->dmatogo) {
-		dbg(host, dbg_dma, "DMA DONE  Size:%i DSTA:[%08x] "
-			"DCNT:[%08x] toGo:%u\n",
-			size, mci_dsta, mci_dcnt, host->dmatogo);
-
-		goto out;
-	}
-
-	dbg(host, dbg_dma, "DMA FINISHED Size:%i DSTA:%08x DCNT:%08x\n",
-		size, mci_dsta, mci_dcnt);
+	dbg(host, dbg_dma, "DMA FINISHED DSTA:%08x DCNT:%08x\n",
+		mci_dsta, mci_dcnt);
 
 	host->dma_complete = 1;
 	host->complete_what = COMPLETION_FINALIZE;
 
-out:
 	tasklet_schedule(&host->pio_tasklet);
 	spin_unlock_irqrestore(&host->complete_lock, iflags);
 	return;
-
-fail_request:
-	host->mrq->data->error = -EINVAL;
-	host->complete_what = COMPLETION_FINALIZE;
-	clear_imask(host);
-
-	goto out;
 }
 
 static void finalize_request(struct s3cmci_host *host)
@@ -966,7 +935,7 @@ static void finalize_request(struct s3cmci_host *host)
 	 * DMA channel and the fifo to clear out any garbage. */
 	if (mrq->data->error != 0) {
 		if (s3cmci_host_usedma(host))
-			s3c2410_dma_ctrl(host->dma, S3C2410_DMAOP_FLUSH);
+			dmaengine_terminate_all(host->dma);
 
 		if (host->is2440) {
 			/* Clear failure register and reset fifo. */
@@ -993,26 +962,27 @@ request_done:
 }
 
 static void s3cmci_dma_setup(struct s3cmci_host *host,
-			     enum dma_data_direction source)
+			     enum dma_transfer_direction source)
 {
-	static enum dma_data_direction last_source = -1;
-	static int setup_ok;
+	static enum dma_transfer_direction last_source = -1;
+	struct dma_slave_config slave_config;
 
 	if (last_source == source)
 		return;
 
-	last_source = source;
-
-	s3c2410_dma_devconfig(host->dma, source,
-			      host->mem->start + host->sdidata);
-
-	if (!setup_ok) {
-		s3c2410_dma_config(host->dma, 4);
-		s3c2410_dma_set_buffdone_fn(host->dma,
-					    s3cmci_dma_done_callback);
-		s3c2410_dma_setflags(host->dma, S3C2410_DMAF_AUTOSTART);
-		setup_ok = 1;
+	memset(&slave_config, 0, sizeof(struct dma_slave_config));
+	slave_config.direction = source;
+	if (source == DMA_DEV_TO_MEM) {
+		slave_config.src_addr = host->mem->start + host->sdidata;
+		slave_config.src_addr_width = 4;
+		slave_config.src_maxburst = 1;
+	} else {
+		slave_config.dst_addr = host->mem->start + host->sdidata;
+		slave_config.dst_addr_width = 4;
+		slave_config.dst_maxburst = 1;
 	}
+	last_source = source;
+	dmaengine_slave_config(host->dma, &slave_config);
 }
 
 static void s3cmci_send_command(struct s3cmci_host *host,
@@ -1162,41 +1132,33 @@ static int s3cmci_prepare_pio(struct s3cmci_host *host, struct mmc_data *data)
 
 static int s3cmci_prepare_dma(struct s3cmci_host *host, struct mmc_data *data)
 {
-	int dma_len, i;
-	int rw = data->flags & MMC_DATA_WRITE;
+	int dma_len;
+	int dir = data->flags & MMC_DATA_WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
+	struct dma_async_tx_descriptor *desc;
 
 	BUG_ON((data->flags & BOTH_DIR) == BOTH_DIR);
 
-	s3cmci_dma_setup(host, rw ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
-	s3c2410_dma_ctrl(host->dma, S3C2410_DMAOP_FLUSH);
-
-	dma_len = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
-			     rw ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
+	s3cmci_dma_setup(host, dir);
 
+	dma_len = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, dir);
 	if (dma_len == 0)
 		return -ENOMEM;
 
-	host->dma_complete = 0;
-	host->dmatogo = dma_len;
-
-	for (i = 0; i < dma_len; i++) {
-		int res;
+	desc = dmaengine_prep_slave_sg(host->dma, data->sg, dma_len,
+				       dir, DMA_CTRL_ACK);
 
-		dbg(host, dbg_dma, "enqueue %i: %08x@%u\n", i,
-		    sg_dma_address(&data->sg[i]),
-		    sg_dma_len(&data->sg[i]));
+	if (!desc) {
+		dma_unmap_sg(mmc_dev(host->mmc), data->sg, dma_len, dir);
+		return -EIO;
+	}
 
-		res = s3c2410_dma_enqueue(host->dma, host,
-					  sg_dma_address(&data->sg[i]),
-					  sg_dma_len(&data->sg[i]));
+	host->dma_complete = 0;
 
-		if (res) {
-			s3c2410_dma_ctrl(host->dma, S3C2410_DMAOP_FLUSH);
-			return -EBUSY;
-		}
-	}
+	desc->callback = s3cmci_dma_done_callback;
+	desc->callback_param = host;
 
-	s3c2410_dma_ctrl(host->dma, S3C2410_DMAOP_START);
+	dmaengine_submit(desc);
+	dma_async_issue_pending(host->dma);
 
 	return 0;
 }
@@ -1765,9 +1727,14 @@ static int s3cmci_probe(struct platform_device *pdev)
 	/* depending on the dma state, get a dma channel to use. */
 
 	if (s3cmci_host_usedma(host)) {
-		host->dma = s3c2410_dma_request(DMACH_SDI, &s3cmci_dma_client,
-						host);
-		if (host->dma < 0) {
+		dma_cap_mask_t mask;
+        
+		dma_cap_zero(mask);
+		dma_cap_set(DMA_SLAVE, mask);
+
+		host->dma = dma_request_channel(mask, s3c24xx_dma_filter, (void *)DMACH_SDI);
+
+		if (!host->dma) {
 			dev_err(&pdev->dev, "cannot get DMA channel.\n");
 			if (!s3cmci_host_canpio()) {
 				ret = -EBUSY;
@@ -1816,9 +1783,9 @@ static int s3cmci_probe(struct platform_device *pdev)
 	mmc->max_segs		= 128;
 
 	dbg(host, dbg_debug,
-	    "probe: mode:%s mapped mci_base:%p irq:%u irq_cd:%u dma:%u.\n",
+	    "probe: mode:%s mapped mci_base:%p irq:%u irq_cd:%u.\n",
 	    (host->is2440?"2440":""),
-	    host->base, host->irq, host->irq_cd, host->dma);
+	    host->base, host->irq, host->irq_cd);
 
 	ret = s3cmci_cpufreq_register(host);
 	if (ret) {
@@ -1852,7 +1819,7 @@ static int s3cmci_probe(struct platform_device *pdev)
 
  probe_free_dma:
 	if (s3cmci_host_usedma(host))
-		s3c2410_dma_free(host->dma, &s3cmci_dma_client);
+		dma_release_channel(host->dma);
 
  probe_free_gpio_wp:
 	if (!host->pdata->no_wprotect)
@@ -1914,7 +1881,7 @@ static int s3cmci_remove(struct platform_device *pdev)
 	tasklet_disable(&host->pio_tasklet);
 
 	if (s3cmci_host_usedma(host))
-		s3c2410_dma_free(host->dma, &s3cmci_dma_client);
+		dma_release_channel(host->dma);
 
 	free_irq(host->irq, host);
 

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* Re: [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA
  2014-05-01 22:35     ` Arnd Bergmann
  2014-05-02 10:25       ` Heiko Stübner
@ 2014-05-02 17:24       ` Mark Brown
  1 sibling, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-02 17:24 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Xia Kaixu, linux-kernel, linaro-kernel, Liam Girdwood, Ben Dooks,
	Kukjin Kim, Sangbeom Kim, linux-arm-kernel, linux-samsung-soc,
	alsa-devel

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

On Fri, May 02, 2014 at 12:35:21AM +0200, Arnd Bergmann wrote:
> On Thursday 01 May 2014 12:11:25 Mark Brown wrote:

> > Why is the fix for this not to ensure that s3c24xx always enables the
> > DMA controller - how likely is it that it would be sane to build a
> > kernel without DMA after all?

> S3C24XX_DMA is only needed for ASoC and for s3cmci. The latter
> uses 'depends on S3C24XX_DMA'. arch/arm/configs/tct_hammer_defconfig
> is an example of a configuration that does not include DMA because
> it uses neither of the two drivers.

I'm having a hard time caring about that, the arch code can always do an
"if whatever".  If that board is what I think it actually does have
audio on it, either the defconfig was never updated or the driver wasn't
merged into mainline.

> How about the patch below?

I guess (modulo the issues below).  Killing the wrapper and making the
existing selection of DMA support actually select DMA support does avoid
the redundancy.

> diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
> index 76b072b..28fe097 100644
> --- a/sound/soc/samsung/ac97.c
> +++ b/sound/soc/samsung/ac97.c
> @@ -253,10 +253,7 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
>  
>  	writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL);
>  
> -	if (!dma_data->ops)
> -		dma_data->ops = samsung_dma_get_ops();
> -
> -	dma_data->ops->started(dma_data->channel);
> +	s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED);
>  
>  	return 0;
>  }

This code is broken in general - at least s3c64xx has AC'97.  That's
broken anyway though.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA
  2014-05-02 10:25       ` Heiko Stübner
  2014-05-02 16:10         ` Arnd Bergmann
@ 2014-05-02 17:26         ` Mark Brown
  1 sibling, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-02 17:26 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: Arnd Bergmann, Xia Kaixu, linux-kernel, linaro-kernel,
	Liam Girdwood, Ben Dooks, Kukjin Kim, Sangbeom Kim,
	linux-arm-kernel, linux-samsung-soc, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 582 bytes --]

On Fri, May 02, 2014 at 12:25:58PM +0200, Heiko Stübner wrote:

> Mark already removed support for the legacy API from the s3c64xx spi driver 
> (used by s3c2416 and s3c2443), so I guess to way forward would be to "simply" 
> convert asoc and s3cmci to dmaengine and get rid of it altogether.

ASoC is already totally capable of using dmaengine on Samsung platforms,
we're just wating for the architecture to be converted.  I know there's
a dmaengine driver present but it needs to actually be used on the
platforms, there should be no blocker on that from the ASoC side.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 15/15] ASoC: pxa: remove mach header dependency
  2014-05-04  3:25 Xia Kaixu
@ 2014-05-20 22:15 ` Mark Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Mark Brown @ 2014-05-20 22:15 UTC (permalink / raw)
  To: Xia Kaixu
  Cc: linux-kernel, linaro-kernel, Arnd Bergmann, Liam Girdwood,
	Eric Miao, Russell King, Haojian Zhuang, linux-arm-kernel,
	alsa-devel

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

On Sun, May 04, 2014 at 11:25:21AM +0800, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> As we are moving the mmp platform towards multiplatform support,
> we have to stop including platform header files.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 15/15] ASoC: pxa: remove mach header dependency
@ 2014-05-04  3:25 Xia Kaixu
  2014-05-20 22:15 ` Mark Brown
  0 siblings, 1 reply; 43+ messages in thread
From: Xia Kaixu @ 2014-05-04  3:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: kaixu.xia, linaro-kernel, Arnd Bergmann, Liam Girdwood,
	Mark Brown, Eric Miao, Russell King, Haojian Zhuang,
	linux-arm-kernel, alsa-devel

From: Arnd Bergmann <arnd@arndb.de>

As we are moving the mmp platform towards multiplatform support,
we have to stop including platform header files.

This changes the pxa-ssp sound driver file to no longer depend
on mach/hardware.h and mach/dma.h. The code using the definitions
from those headers is actually gone already, the only thing
that was still being used was the pxa_dma_desc typedef, which
we can easily work around by using the normal 'struct pxa_dma_desc'
name.

The pxa2xx-dma driver still uses this header, so we include it
explicitly there, which is ok because that is only used on pxa,
not on mmp.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: alsa-devel@alsa-project.org
---
 sound/arm/pxa2xx-pcm.c     |    2 ++
 sound/arm/pxa2xx-pcm.h     |    3 +--
 sound/soc/pxa/pxa-ssp.c    |    2 --
 sound/soc/pxa/pxa2xx-pcm.c |    2 ++
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sound/arm/pxa2xx-pcm.c b/sound/arm/pxa2xx-pcm.c
index e6c727b..83be8e3 100644
--- a/sound/arm/pxa2xx-pcm.c
+++ b/sound/arm/pxa2xx-pcm.c
@@ -14,6 +14,8 @@
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
 
+#include <mach/dma.h>
+
 #include <sound/core.h>
 #include <sound/pxa2xx-lib.h>
 #include <sound/dmaengine_pcm.h>
diff --git a/sound/arm/pxa2xx-pcm.h b/sound/arm/pxa2xx-pcm.h
index 2a8fc08..0033098 100644
--- a/sound/arm/pxa2xx-pcm.h
+++ b/sound/arm/pxa2xx-pcm.h
@@ -9,12 +9,11 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <mach/dma.h>
 
 struct pxa2xx_runtime_data {
 	int dma_ch;
 	struct snd_dmaengine_dai_dma_data *params;
-	pxa_dma_desc *dma_desc_array;
+	struct pxa_dma_desc *dma_desc_array;
 	dma_addr_t dma_desc_array_phys;
 };
 
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index a3119a0..9b19ee7 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -34,8 +34,6 @@
 #include <sound/pxa2xx-lib.h>
 #include <sound/dmaengine_pcm.h>
 
-#include <mach/hardware.h>
-
 #include "../../arm/pxa2xx-pcm.h"
 #include "pxa-ssp.h"
 
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index d58b09f..42f2f01 100644
--- a/sound/soc/pxa/pxa2xx-pcm.c
+++ b/sound/soc/pxa/pxa2xx-pcm.c
@@ -15,6 +15,8 @@
 #include <linux/dmaengine.h>
 #include <linux/of.h>
 
+#include <mach/dma.h>
+
 #include <sound/core.h>
 #include <sound/soc.h>
 #include <sound/pxa2xx-lib.h>
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2014-05-20 22:15 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
2014-04-29 11:18 ` [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT Xia Kaixu
2014-04-30  2:31   ` Brian Austin
2014-05-01  1:31     ` [alsa-devel] " Mark Brown
2014-05-01  1:54       ` Austin, Brian
2014-05-01  2:16         ` Austin, Brian
2014-05-01  3:27           ` [alsa-devel] " Mark Brown
2014-05-01 12:26             ` Austin, Brian
2014-05-01  1:30   ` Mark Brown
2014-04-29 11:18 ` [PATCH 02/15] ASoC: davinci: add dependencies for SND_SOC_TLV320AIC3X Xia Kaixu
2014-05-01  3:29   ` Mark Brown
2014-04-29 11:18 ` [PATCH 03/15] ASoC: SMDK_WM8580_PCM needs REGMAP_I2C Xia Kaixu
2014-05-01  3:30   ` Mark Brown
2014-04-29 11:18 ` [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division Xia Kaixu
2014-04-30  3:50   ` Tushar Behera
2014-05-01  3:31   ` Mark Brown
2014-04-29 11:18 ` [PATCH 05/15] ASoC: nuc900: export nuc900_ac97_data Xia Kaixu
2014-05-01  3:32   ` Mark Brown
2014-04-29 11:18 ` [PATCH 06/15] ASoC: RX-51 audio needs I2C Xia Kaixu
2014-05-01 17:59   ` Mark Brown
2014-04-29 11:18 ` [PATCH 07/15] ASoC: UDA1380 " Xia Kaixu
2014-05-01 17:59   ` Mark Brown
2014-04-29 11:18 ` [PATCH 08/15] ASoC: TTC DKB audio " Xia Kaixu
2014-05-01 18:01   ` Mark Brown
2014-04-29 11:18 ` [PATCH 09/15] ASoC: Migo-R sound " Xia Kaixu
2014-05-01 20:30   ` Mark Brown
2014-04-29 11:18 ` [PATCH 10/15] ASoC: TLV320AIC23 and Simtec Hermes audio Xia Kaixu
2014-05-01 20:29   ` Mark Brown
2014-04-29 11:18 ` [PATCH 11/15] ASoC: WM0010 needs SPI Xia Kaixu
2014-05-01 19:08   ` Mark Brown
2014-04-29 11:18 ` [PATCH 12/15] ASoC: Atmel WM8904 codec support needs I2C Xia Kaixu
2014-05-01 19:09   ` Mark Brown
2014-04-29 11:18 ` [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA Xia Kaixu
2014-05-01 19:11   ` Mark Brown
2014-05-01 22:35     ` Arnd Bergmann
2014-05-02 10:25       ` Heiko Stübner
2014-05-02 16:10         ` Arnd Bergmann
2014-05-02 17:26         ` Mark Brown
2014-05-02 17:24       ` Mark Brown
2014-04-29 11:18 ` [PATCH 14/15] ASoC: Amstrad E3 needs TTY support for codec Xia Kaixu
2014-05-01 20:31   ` Mark Brown
2014-04-29 11:18 ` [PATCH 15/15] ASoC: pxa: remove mach header dependency Xia Kaixu
2014-05-04  3:25 Xia Kaixu
2014-05-20 22:15 ` 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).