From patchwork Mon Jun 15 03:20:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jie, Yang" X-Patchwork-Id: 6605911 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BC195C0020 for ; Mon, 15 Jun 2015 03:16:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF755204B5 for ; Mon, 15 Jun 2015 03:16:48 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 6572F204AD for ; Mon, 15 Jun 2015 03:16:47 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8F05F2606D9; Mon, 15 Jun 2015 05:16:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 9067F26067A; Mon, 15 Jun 2015 05:16:38 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 92AA8260682; Mon, 15 Jun 2015 05:16:36 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id 558BA260676 for ; Mon, 15 Jun 2015 05:16:29 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 14 Jun 2015 20:16:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,616,1427785200"; d="scan'208";a="508294859" Received: from keyon-u1310.sh.intel.com ([10.239.13.15]) by FMSMGA003.fm.intel.com with ESMTP; 14 Jun 2015 20:16:25 -0700 From: Jie Yang To: tiwai@suse.de, broonie@kernel.org Date: Mon, 15 Jun 2015 11:20:44 +0800 Message-Id: <1434338445-31992-1-git-send-email-yang.jie@intel.com> X-Mailer: git-send-email 1.9.1 Cc: ramesh.babu@linux.intel.com, alsa-devel@alsa-project.org, vivian.zhang@intel.com, vinod.koul@linux.intel.com, liam.r.girdwood@intel.com Subject: [alsa-devel] [PATCH v2 1/2] ASoC: soc-compress: add a config item for soc-compress X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- include/sound/soc.h | 7 +++++++ sound/soc/Kconfig | 5 ++++- sound/soc/Makefile | 3 ++- sound/soc/intel/Kconfig | 1 + 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 93df8bf..cc1cd4f 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); +#if IS_ENABLED(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..a124759 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,10 @@ config SND_SOC_GENERIC_DMAENGINE_PCM bool select SND_DMAENGINE_PCM +config SND_SOC_COMPRESS + tristate + select SND_COMPRESS_OFFLOAD + # 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 diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig index 791953f..e559174 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig @@ -12,6 +12,7 @@ config SND_MFLD_MACHINE config SND_SST_MFLD_PLATFORM tristate + select SND_SOC_COMPRESS config SND_SST_IPC tristate