From patchwork Thu Jun 18 06:38:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 6633251 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 53BB9C0020 for ; Thu, 18 Jun 2015 06:37:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7CCA32085C for ; Thu, 18 Jun 2015 06:37:13 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4344A2069B for ; Thu, 18 Jun 2015 06:37:12 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6E78D26621A; Thu, 18 Jun 2015 08:37:10 +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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 2DD2126616A; Thu, 18 Jun 2015 08:37:03 +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 628EB26619A; Thu, 18 Jun 2015 08:37:01 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id 784E826616A for ; Thu, 18 Jun 2015 08:36:55 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 17 Jun 2015 23:36:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,638,1427785200"; d="scan'208";a="590056947" Received: from vkoul-udesk7.iind.intel.com ([10.223.84.34]) by orsmga003.jf.intel.com with ESMTP; 17 Jun 2015 23:36:52 -0700 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Thu, 18 Jun 2015 12:08:24 +0530 Message-Id: <1434609505-776-2-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434609505-776-1-git-send-email-vinod.koul@intel.com> References: <1434609505-776-1-git-send-email-vinod.koul@intel.com> Cc: tiwai@suse.de, patches.audio@intel.com, liam.r.girdwood@linux.intel.com, Vinod Koul , broonie@kernel.org, Jeeja KP Subject: [alsa-devel] [PATCH v2 1/2] ALSA: hda: add snd_adsp_enable module flag 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 Some Intel HDA controllers sport a DSP. These systems can also be enabled with ASoC HDA driver as well. So add a flag in hda-core to enable/disable aDSP. This flag for now is false, and should be true once the ASoC based systems mature. The integrators/OS vendors can configure this flag based on system preference. Signed-off-by: Jeeja KP Signed-off-by: Vinod Koul --- include/sound/hdaudio.h | 11 +++++++++++ sound/hda/hda_bus_type.c | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h index 4caf1fde8a4f..7c4dd26abd4e 100644 --- a/include/sound/hdaudio.h +++ b/include/sound/hdaudio.h @@ -13,6 +13,17 @@ #include #include +/* + * snd_adsp_enable: exported HD-A aDSP enable configuration. + * + * Some Intel HDA controllers sport a DSP, for these platform we can bypass + * aDSP and use as regular HDA controller or enable aDSP and use aDSP + * along with I2S codecs etc. + * hdac_adsp_enable would enable the aDSP based HDA controller if the + * platform supports it + */ +extern bool snd_adsp_enable; + /* codec node id */ typedef u16 hda_nid_t; diff --git a/sound/hda/hda_bus_type.c b/sound/hda/hda_bus_type.c index 89c2711baaaf..8fb4e8b1398e 100644 --- a/sound/hda/hda_bus_type.c +++ b/sound/hda/hda_bus_type.c @@ -10,6 +10,12 @@ MODULE_DESCRIPTION("HD-audio bus"); MODULE_LICENSE("GPL"); +bool snd_adsp_enable = false; +EXPORT_SYMBOL_GPL(snd_adsp_enable); + +module_param(snd_adsp_enable, bool, 0444); +MODULE_PARM_DESC(snd_adsp_enable, "HD-A aDSP enable configuration"); + /** * hdac_get_device_id - gets the hdac device id entry * @hdev: HD-audio core device