All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: soc-compress: add a config item for soc-compress
@ 2015-06-12 11:59 Jie Yang
  2015-06-12 11:59 ` [PATCH 2/2] ASoC: soc-compress: split soc-compress to a module Jie Yang
  2015-06-12 12:14 ` [PATCH 1/2] ASoC: soc-compress: add a config item for soc-compress Mark Brown
  0 siblings, 2 replies; 12+ messages in thread
From: Jie Yang @ 2015-06-12 11:59 UTC (permalink / raw)
  To: tiwai, broonie
  Cc: ramesh.babu, alsa-devel, vivian.zhang, vinod.koul,
	liam.r.girdwood

We don't always need soc-compress in soc, here add a config item
SND_SOC_COMPRESS, please add 'select SND_SOC_COMPRESS' to driver
Kconfig when it is needed.

Signed-off-by: Jie Yang <yang.jie@intel.com>
---
 include/sound/soc.h | 7 +++++++
 sound/soc/Kconfig   | 6 +++++-
 sound/soc/Makefile  | 3 ++-
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 93df8bf..03c53a9 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -440,7 +440,14 @@ int snd_soc_platform_read(struct snd_soc_platform *platform,
 int snd_soc_platform_write(struct snd_soc_platform *platform,
 					unsigned int reg, unsigned int val);
 int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num);
+#ifdef CONFIG_SND_SOC_COMPRESS
 int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num);
+#else
+static inline int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
+{
+       return -EPERM;
+}
+#endif
 
 struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
 		const char *dai_link, int stream);
diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
index e2828e1..de743d9 100644
--- a/sound/soc/Kconfig
+++ b/sound/soc/Kconfig
@@ -9,7 +9,6 @@ menuconfig SND_SOC
 	select SND_JACK if INPUT=y || INPUT=SND
 	select REGMAP_I2C if I2C
 	select REGMAP_SPI if SPI_MASTER
-	select SND_COMPRESS_OFFLOAD
 	---help---
 
 	  If you want ASoC support, you should say Y here and also to the
@@ -30,6 +29,11 @@ config SND_SOC_GENERIC_DMAENGINE_PCM
 	bool
 	select SND_DMAENGINE_PCM
 
+config SND_SOC_COMPRESS
+	tristate
+	select SND_COMPRESS_OFFLOAD
+	default n
+
 # All the supported SoCs
 source "sound/soc/adi/Kconfig"
 source "sound/soc/atmel/Kconfig"
diff --git a/sound/soc/Makefile b/sound/soc/Makefile
index a0e1ee6..184c1e6 100644
--- a/sound/soc/Makefile
+++ b/sound/soc/Makefile
@@ -1,6 +1,7 @@
 snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o
-snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o soc-devres.o soc-ops.o
+snd-soc-core-objs += soc-pcm.o soc-io.o soc-devres.o soc-ops.o
 snd-soc-core-objs += soc-topology.o
+snd-soc-core-$(CONFIG_SND_SOC_COMPRESS) += soc-compress.o
 
 ifneq ($(CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM),)
 snd-soc-core-objs += soc-generic-dmaengine-pcm.o
-- 
1.9.1

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

end of thread, other threads:[~2015-06-16  8:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-12 11:59 [PATCH 1/2] ASoC: soc-compress: add a config item for soc-compress Jie Yang
2015-06-12 11:59 ` [PATCH 2/2] ASoC: soc-compress: split soc-compress to a module Jie Yang
2015-06-12 12:15   ` Mark Brown
2015-06-12 13:37     ` Jie, Yang
2015-06-12 12:15   ` Mark Brown
2015-06-12 13:34     ` Jie, Yang
2015-06-12 12:14 ` [PATCH 1/2] ASoC: soc-compress: add a config item for soc-compress Mark Brown
2015-06-12 12:31   ` Jie, Yang
2015-06-12 13:00     ` Mark Brown
2015-06-12 13:33       ` Jie, Yang
2015-06-16  8:13         ` Vinod Koul
2015-06-16  8:51           ` Jie, Yang

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.