From patchwork Tue Jul 26 12:36:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 9248559 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CB7CB607D8 for ; Tue, 26 Jul 2016 17:43:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF14B2094D for ; Tue, 26 Jul 2016 17:43:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B391C26B39; Tue, 26 Jul 2016 17:43:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF4212094D for ; Tue, 26 Jul 2016 17:43:06 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E0BD4266947; Tue, 26 Jul 2016 19:43:05 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E9FEA2669DC; Tue, 26 Jul 2016 15:50:23 +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 5D9AC268332; Tue, 26 Jul 2016 15:50:23 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id 12BA52669DC for ; Tue, 26 Jul 2016 14:30:27 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 26 Jul 2016 05:30:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.28,424,1464678000"; d="scan'208"; a="1024133141" Received: from vkoul-udesk7.iind.intel.com ([10.223.84.143]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2016 05:30:13 -0700 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Tue, 26 Jul 2016 18:06:50 +0530 Message-Id: <1469536610-27606-13-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469536610-27606-1-git-send-email-vinod.koul@intel.com> References: <1469536610-27606-1-git-send-email-vinod.koul@intel.com> Cc: liam.r.girdwood@linux.intel.com, patches.audio@intel.com, broonie@kernel.org, Vinod Koul , Senthilnathan Veppur Subject: [alsa-devel] [PATCH 12/12] ASoC: Intel: Skylake: Add module processing domain support 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 From: Senthilnathan Veppur A module can be scheduled in deferent processing domains in DSP. Topology specifies the module domain. Signed-off-by: Senthilnathan Veppur Signed-off-by: Vinod Koul --- sound/soc/intel/skylake/skl-messages.c | 1 + sound/soc/intel/skylake/skl-sst-ipc.c | 6 ++++++ sound/soc/intel/skylake/skl-sst-ipc.h | 1 + sound/soc/intel/skylake/skl-topology.c | 1 + sound/soc/intel/skylake/skl-tplg-interface.h | 3 ++- 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c index 2199a91d90d6..8a750b67273f 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -870,6 +870,7 @@ int skl_init_module(struct skl_sst *ctx, msg.ppl_instance_id = mconfig->pipe->ppl_id; msg.param_data_size = module_config_size; msg.core_id = mconfig->core_id; + msg.domain = mconfig->domain; ret = skl_ipc_init_instance(&ctx->ipc, &msg, param_data); if (ret < 0) { diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c index 04c1b123aadf..b8baa9aaf6c4 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.c +++ b/sound/soc/intel/skylake/skl-sst-ipc.c @@ -114,6 +114,11 @@ #define IPC_CORE_ID(x) (((x) & IPC_CORE_ID_MASK) \ << IPC_CORE_ID_SHIFT) +#define IPC_DOMAIN_SHIFT 28 +#define IPC_DOMAIN_MASK 0x1 +#define IPC_DOMAIN(x) (((x) & IPC_DOMAIN_MASK) \ + << IPC_DOMAIN_SHIFT) + /* Bind/Unbind message extension register */ #define IPC_DST_MOD_ID_SHIFT 0 #define IPC_DST_MOD_ID(x) (((x) & IPC_MOD_ID_MASK) \ @@ -705,6 +710,7 @@ int skl_ipc_init_instance(struct sst_generic_ipc *ipc, header.extension = IPC_CORE_ID(msg->core_id); header.extension |= IPC_PPL_INSTANCE_ID(msg->ppl_instance_id); header.extension |= IPC_PARAM_BLOCK_SIZE(param_block_size); + header.extension |= IPC_DOMAIN(msg->domain); dev_dbg(ipc->dev, "In %s primary =%x ext=%x\n", __func__, header.primary, header.extension); diff --git a/sound/soc/intel/skylake/skl-sst-ipc.h b/sound/soc/intel/skylake/skl-sst-ipc.h index aad527d5fc52..0334ed4af031 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.h +++ b/sound/soc/intel/skylake/skl-sst-ipc.h @@ -91,6 +91,7 @@ struct skl_ipc_init_instance_msg { u16 param_data_size; u8 ppl_instance_id; u8 core_id; + u8 domain; }; struct skl_ipc_bind_unbind_msg { diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index a1d9f84d9674..1ef2c92d1944 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -1656,6 +1656,7 @@ static int skl_tplg_widget_load(struct snd_soc_component *cmpnt, mconfig->max_in_queue = dfw_config->max_in_queue; mconfig->max_out_queue = dfw_config->max_out_queue; mconfig->is_loadable = dfw_config->is_loadable; + mconfig->domain = dfw_config->proc_domain; skl_tplg_fill_fmt(mconfig->in_fmt, dfw_config->in_fmt, MODULE_MAX_IN_PINS); skl_tplg_fill_fmt(mconfig->out_fmt, dfw_config->out_fmt, diff --git a/sound/soc/intel/skylake/skl-tplg-interface.h b/sound/soc/intel/skylake/skl-tplg-interface.h index 1b531c165a91..bd8b4ae43557 100644 --- a/sound/soc/intel/skylake/skl-tplg-interface.h +++ b/sound/soc/intel/skylake/skl-tplg-interface.h @@ -210,7 +210,8 @@ struct skl_dfw_module { u32 is_dynamic_in_pin:1; u32 is_dynamic_out_pin:1; u32 is_loadable:1; - u32 rsvd3:11; + u32 proc_domain:1; + u32 rsvd3:10; struct skl_dfw_pipe pipe; struct skl_dfw_module_fmt in_fmt[MAX_IN_QUEUE];