summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-compress.c
diff options
context:
space:
mode:
authorJie Yang <yang.jie@intel.com>2015-10-13 23:41:00 +0800
committerMark Brown <broonie@kernel.org>2015-10-22 13:52:16 +0100
commit6f0c42269f000b1e346c84d9a589f17aa94c96d8 (patch)
tree2edb15af0b7a05bb81d75c43e5358f2ffcb1b455 /sound/soc/soc-compress.c
parent26d9ca3462df8f7e83fc372b23c8da5ed2b1c4f3 (diff)
downloadlinux-stable-6f0c42269f000b1e346c84d9a589f17aa94c96d8.tar.gz
linux-stable-6f0c42269f000b1e346c84d9a589f17aa94c96d8.tar.bz2
linux-stable-6f0c42269f000b1e346c84d9a589f17aa94c96d8.zip
ASoC: compress: add config item for soc-compress to make it compiled only when needed
We don't always need soc-compress in soc, here add a config item SND_SOC_COMPRESS, when nobody select it, the soc-compress will not be compiled. Here also change Kconfig to 'select SND_SOC_COMPRESS' for drivers that needed soc-compress. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-compress.c')
-rw-r--r--sound/soc/soc-compress.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 025c38fbe3c0..12a9820feac1 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -612,8 +612,15 @@ static struct snd_compr_ops soc_compr_dyn_ops = {
.get_codec_caps = soc_compr_get_codec_caps
};
-/* create a new compress */
-int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
+/**
+ * snd_soc_new_compress - create a new compress.
+ *
+ * @rtd: The runtime for which we will create compress
+ * @num: the device index number (zero based - shared with normal PCMs)
+ *
+ * Return: 0 for success, else error.
+ */
+int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
{
struct snd_soc_codec *codec = rtd->codec;
struct snd_soc_platform *platform = rtd->platform;
@@ -703,3 +710,4 @@ compr_err:
kfree(compr);
return ret;
}
+EXPORT_SYMBOL_GPL(snd_soc_new_compress);