From patchwork Thu Apr 30 14:52:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 6304601 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6E3049F1C2 for ; Thu, 30 Apr 2015 14:52:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EED53201E4 for ; Thu, 30 Apr 2015 14:52:16 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 38B12201BB for ; Thu, 30 Apr 2015 14:52:15 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3A6BC264F52; Thu, 30 Apr 2015 16:52:13 +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 CDB73261AA3; Thu, 30 Apr 2015 16:52:10 +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 CE55B261B02; Thu, 30 Apr 2015 16:52:09 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by alsa0.perex.cz (Postfix) with ESMTP id 8093D2617DE for ; Thu, 30 Apr 2015 16:52:02 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 30 Apr 2015 07:52:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,677,1422950400"; d="scan'208";a="564317763" Received: from unknown (HELO vkoul-udesk7.iind.intel.com) ([10.223.84.34]) by orsmga003.jf.intel.com with ESMTP; 30 Apr 2015 07:51:59 -0700 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Thu, 30 Apr 2015 20:22:34 +0530 Message-Id: <1430405556-19166-1-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.9.1 Cc: liam.r.girdwood@linux.intel.com, tiwai@suse.de, broonie@kernel.org, Vinod Koul , patches.audio@intel.com Subject: [alsa-devel] [PATCH 1/3] ALSA: hda: add hdac_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: Vinod Koul --- include/sound/hdaudio.h | 11 +++++++++++ sound/hda/hda_bus_type.c | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h index b97c59eab7ab..015bec1079f9 100644 --- a/include/sound/hdaudio.h +++ b/include/sound/hdaudio.h @@ -12,6 +12,17 @@ #include #include +/* + * hdac_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 hdac_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 519914a12e8a..80e0570ffbf4 100644 --- a/sound/hda/hda_bus_type.c +++ b/sound/hda/hda_bus_type.c @@ -10,6 +10,10 @@ MODULE_DESCRIPTION("HD-audio bus"); MODULE_LICENSE("GPL"); +bool hdac_adsp_enable = false; +module_param(hdac_adsp_enable, bool, 0444); +MODULE_PARM_DESC(hdac_adsp_enable, "Enable aDSP on Intel HDA based systems"); + static int hda_bus_match(struct device *dev, struct device_driver *drv) { struct hdac_device *hdev = dev_to_hdac_dev(dev);