[alsa-devel] [PATCH 1/3] ASoC: s6000-i2s: Fix s6000_i2s_remove() return type
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 = {
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"
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 = {
participants (2)
-
Lars-Peter Clausen
-
Mark Brown