All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: s6000-i2s: Fix s6000_i2s_remove() return type
@ 2014-06-30  8:01 Lars-Peter Clausen
  2014-06-30  8:01 ` [PATCH 2/3] ASoC: s6000: Allow to build when COMPILE_TEST is enabled Lars-Peter Clausen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Lars-Peter Clausen @ 2014-06-30  8:01 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: alsa-devel, Lars-Peter Clausen, Daniel Glöckner

The platform_driver remove callback return type is int not void.

Fixes the following warning:
	sound/soc/s6000/s6000-i2s.c:604:19: warning: incorrect type in initializer (different base types)
	sound/soc/s6000/s6000-i2s.c:604:19:    expected int ( *remove )( ... )
	sound/soc/s6000/s6000-i2s.c:604:19:    got void ( static [toplevel] *<noident>)( ... )

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/s6000/s6000-i2s.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/s6000/s6000-i2s.c b/sound/soc/s6000/s6000-i2s.c
index 7eba797..1c8d011 100644
--- a/sound/soc/s6000/s6000-i2s.c
+++ b/sound/soc/s6000/s6000-i2s.c
@@ -570,7 +570,7 @@ err_release_none:
 	return ret;
 }
 
-static void s6000_i2s_remove(struct platform_device *pdev)
+static int s6000_i2s_remove(struct platform_device *pdev)
 {
 	struct s6000_i2s_dev *dev = dev_get_drvdata(&pdev->dev);
 	struct resource *region;
@@ -597,6 +597,8 @@ static void s6000_i2s_remove(struct platform_device *pdev)
 	iounmap(mmio);
 	region = platform_get_resource(pdev, IORESOURCE_IO, 0);
 	release_mem_region(region->start, resource_size(region));
+
+	return 0;
 }
 
 static struct platform_driver s6000_i2s_driver = {
-- 
1.8.0

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

* [PATCH 2/3] ASoC: s6000: Allow to build when COMPILE_TEST is enabled
  2014-06-30  8:01 [PATCH 1/3] ASoC: s6000-i2s: Fix s6000_i2s_remove() return type Lars-Peter Clausen
@ 2014-06-30  8:01 ` Lars-Peter Clausen
  2014-06-30  8:01 ` [PATCH 3/3] ASoC: s6105-ipcam: Automatically disconnect non-connected pins Lars-Peter Clausen
  2014-07-04 17:58 ` [PATCH 1/3] ASoC: s6000-i2s: Fix s6000_i2s_remove() return type Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Lars-Peter Clausen @ 2014-06-30  8:01 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: alsa-devel, Lars-Peter Clausen, Daniel Glöckner

Most of the ASoC s6000 code is architecture independent. This patch makes it
possible to select the platform when COMPILE_TEST is enabled.

The only architecture dependent code is the PCM driver which will still only be
selected if XTENSA_VARIANT_S6000 is enabled.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/s6000/Kconfig       | 10 ++++++++--
 sound/soc/s6000/Makefile      |  2 +-
 sound/soc/s6000/s6105-ipcam.c |  2 --
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/sound/soc/s6000/Kconfig b/sound/soc/s6000/Kconfig
index c74eb3d..4823e1e 100644
--- a/sound/soc/s6000/Kconfig
+++ b/sound/soc/s6000/Kconfig
@@ -1,17 +1,23 @@
 config SND_S6000_SOC
 	tristate "SoC Audio for the Stretch s6000 family"
-	depends on XTENSA_VARIANT_S6000
+	depends on XTENSA_VARIANT_S6000 || COMPILE_TEST
+	depends on HAS_IOMEM
+	select SND_S6000_SOC_PCM if XTENSA_VARIANT_S6000
 	help
 	  Say Y or M if you want to add support for codecs attached to
 	  s6000 family chips. You will also need to select the platform
 	  to support below.
 
+config SND_S6000_SOC_PCM
+	tristate
+
 config SND_S6000_SOC_I2S
 	tristate
 
 config SND_S6000_SOC_S6IPCAM
 	tristate "SoC Audio support for Stretch 6105 IP Camera"
-	depends on SND_S6000_SOC && XTENSA_PLATFORM_S6105
+	depends on SND_S6000_SOC
+	depends on XTENSA_PLATFORM_S6105 || COMPILE_TEST
 	select SND_S6000_SOC_I2S
 	select SND_SOC_TLV320AIC3X
 	help
diff --git a/sound/soc/s6000/Makefile b/sound/soc/s6000/Makefile
index 7a61361..0f0ae2a 100644
--- a/sound/soc/s6000/Makefile
+++ b/sound/soc/s6000/Makefile
@@ -2,7 +2,7 @@
 snd-soc-s6000-objs := s6000-pcm.o
 snd-soc-s6000-i2s-objs := s6000-i2s.o
 
-obj-$(CONFIG_SND_S6000_SOC) += snd-soc-s6000.o
+obj-$(CONFIG_SND_S6000_SOC_PCM) += snd-soc-s6000.o
 obj-$(CONFIG_SND_S6000_SOC_I2S) += snd-soc-s6000-i2s.o
 
 # s6105 Machine Support
diff --git a/sound/soc/s6000/s6105-ipcam.c b/sound/soc/s6000/s6105-ipcam.c
index 0b21d1d..50875e6 100644
--- a/sound/soc/s6000/s6105-ipcam.c
+++ b/sound/soc/s6000/s6105-ipcam.c
@@ -19,8 +19,6 @@
 #include <sound/pcm.h>
 #include <sound/soc.h>
 
-#include <variant/dmac.h>
-
 #include "s6000-pcm.h"
 #include "s6000-i2s.h"
 
-- 
1.8.0

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

* [PATCH 3/3] ASoC: s6105-ipcam: Automatically disconnect non-connected pins
  2014-06-30  8:01 [PATCH 1/3] ASoC: s6000-i2s: Fix s6000_i2s_remove() return type Lars-Peter Clausen
  2014-06-30  8:01 ` [PATCH 2/3] ASoC: s6000: Allow to build when COMPILE_TEST is enabled Lars-Peter Clausen
@ 2014-06-30  8:01 ` Lars-Peter Clausen
  2014-07-04 17:58 ` [PATCH 1/3] ASoC: s6000-i2s: Fix s6000_i2s_remove() return type Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Lars-Peter Clausen @ 2014-06-30  8:01 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: alsa-devel, Lars-Peter Clausen, Daniel Glöckner

All CODEC input and output widgets are either in the DAPM routing table or
manually marked as non-connected. This means the card is fully routed and we can
let the core take care of disconnecting non-connected pins.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/s6000/s6105-ipcam.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/sound/soc/s6000/s6105-ipcam.c b/sound/soc/s6000/s6105-ipcam.c
index 50875e6..3510c01 100644
--- a/sound/soc/s6000/s6105-ipcam.c
+++ b/sound/soc/s6000/s6105-ipcam.c
@@ -133,22 +133,8 @@ static const struct snd_kcontrol_new audio_out_mux = {
 /* Logic for a aic3x as connected on the s6105 ip camera ref design */
 static int s6105_aic3x_init(struct snd_soc_pcm_runtime *rtd)
 {
-	struct snd_soc_codec *codec = rtd->codec;
-	struct snd_soc_dapm_context *dapm = &codec->dapm;
 	struct snd_soc_card *card = rtd->card;
 
-	/* not present */
-	snd_soc_dapm_nc_pin(dapm, "MONO_LOUT");
-	snd_soc_dapm_nc_pin(dapm, "LINE2L");
-	snd_soc_dapm_nc_pin(dapm, "LINE2R");
-
-	/* not connected */
-	snd_soc_dapm_nc_pin(dapm, "MIC3L"); /* LINE2L on this chip */
-	snd_soc_dapm_nc_pin(dapm, "MIC3R"); /* LINE2R on this chip */
-	snd_soc_dapm_nc_pin(dapm, "LLOUT");
-	snd_soc_dapm_nc_pin(dapm, "RLOUT");
-	snd_soc_dapm_nc_pin(dapm, "HPRCOM");
-
 	/* must correspond to audio_out_mux.private_value initializer */
 	snd_soc_dapm_disable_pin(&card->dapm, "Audio Out Differential");
 
@@ -180,6 +166,7 @@ static struct snd_soc_card snd_soc_card_s6105 = {
 	.num_dapm_widgets = ARRAY_SIZE(aic3x_dapm_widgets),
 	.dapm_routes = audio_map,
 	.num_dapm_routes = ARRAY_SIZE(audio_map),
+	.fully_routed = true,
 };
 
 static struct s6000_snd_platform_data s6105_snd_data __initdata = {
-- 
1.8.0

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

* Re: [PATCH 1/3] ASoC: s6000-i2s: Fix s6000_i2s_remove() return type
  2014-06-30  8:01 [PATCH 1/3] ASoC: s6000-i2s: Fix s6000_i2s_remove() return type Lars-Peter Clausen
  2014-06-30  8:01 ` [PATCH 2/3] ASoC: s6000: Allow to build when COMPILE_TEST is enabled Lars-Peter Clausen
  2014-06-30  8:01 ` [PATCH 3/3] ASoC: s6105-ipcam: Automatically disconnect non-connected pins Lars-Peter Clausen
@ 2014-07-04 17:58 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-07-04 17:58 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: alsa-devel, Liam Girdwood, Daniel Glöckner


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

On Mon, Jun 30, 2014 at 10:01:37AM +0200, Lars-Peter Clausen wrote:
> The platform_driver remove callback return type is int not void.

Applied all, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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



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

end of thread, other threads:[~2014-07-04 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-30  8:01 [PATCH 1/3] ASoC: s6000-i2s: Fix s6000_i2s_remove() return type Lars-Peter Clausen
2014-06-30  8:01 ` [PATCH 2/3] ASoC: s6000: Allow to build when COMPILE_TEST is enabled Lars-Peter Clausen
2014-06-30  8:01 ` [PATCH 3/3] ASoC: s6105-ipcam: Automatically disconnect non-connected pins Lars-Peter Clausen
2014-07-04 17:58 ` [PATCH 1/3] ASoC: s6000-i2s: Fix s6000_i2s_remove() return type Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.