From patchwork Thu Aug 22 19:03:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 11109815 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 51D43174A for ; Thu, 22 Aug 2019 19:05:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D1F1A23400 for ; Thu, 22 Aug 2019 19:05:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="K1PAl0gG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1F1A23400 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0B7D815E4; Thu, 22 Aug 2019 21:04:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0B7D815E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1566500747; bh=1YzCpB3TKMcUh5Eh34aH1Aw6VZ/D4QBFwH1junHQ9No=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=K1PAl0gGKxYXUl8q4x09CCmXaQGWySCZZ89hGuF4GJel5Ns7wd09NB/T3I+XEmUM6 Cav3DLl8beq5jKQykqHEcC5+Ln6PC9X7FnB9Icy/DauuO6z6TR4dHaSCC+uXysWMOv /e9n3zV+K0kGS0CEipL8pVJgAwUD5K0Ytshsyijg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 46FFDF80529; Thu, 22 Aug 2019 21:04:55 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 433DBF805E0; Thu, 22 Aug 2019 21:04:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 324D2F803D5 for ; Thu, 22 Aug 2019 21:04:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 324D2F803D5 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Aug 2019 12:04:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,417,1559545200"; d="scan'208";a="203524203" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga004.fm.intel.com with ESMTP; 22 Aug 2019 12:04:41 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org Date: Thu, 22 Aug 2019 21:03:51 +0200 Message-Id: <20190822190425.23001-2-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190822190425.23001-1-cezary.rojewski@intel.com> References: <20190822190425.23001-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: lgirdwood@gmail.com, broonie@kernel.org, tiwai@suse.com, =?utf-8?q?Amade?= =?utf-8?q?usz_S=C5=82awi=C5=84ski?= , pierre-louis.bossart@linux.intel.com Subject: [alsa-devel] [PATCH 01/35] ASoC: Intel: Skylake: Put FW runtime params defs in one place X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Amadeusz Sławiński Change Runtime Parameters enum to have its own prefix and then reuse those defines in all places where we actually use those parameters. Signed-off-by: Amadeusz Sławiński --- sound/soc/intel/skylake/skl-messages.c | 7 ++----- sound/soc/intel/skylake/skl-sst-ipc.h | 5 +++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c index d43496c5f29e..b6cefb1f9b12 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -34,13 +34,11 @@ static int skl_free_dma_buf(struct device *dev, struct snd_dma_buffer *dmab) return 0; } -#define SKL_ASTATE_PARAM_ID 4 - void skl_dsp_set_astate_cfg(struct skl_dev *skl, u32 cnt, void *data) { struct skl_ipc_large_config_msg msg = {0}; - msg.large_param_id = SKL_ASTATE_PARAM_ID; + msg.large_param_id = SKL_BASEFW_ASTATE_TABLE; msg.param_data_size = (cnt * sizeof(struct skl_astate_param) + sizeof(cnt)); @@ -614,7 +612,6 @@ static void skl_setup_cpr_gateway_cfg(struct skl_dev *skl, skl_copy_copier_caps(mconfig, cpr_mconfig); } -#define DMA_CONTROL_ID 5 #define DMA_I2S_BLOB_SIZE 21 int skl_dsp_set_dma_control(struct skl_dev *skl, u32 *caps, @@ -631,7 +628,7 @@ int skl_dsp_set_dma_control(struct skl_dev *skl, u32 *caps, if (caps_size == 0) return 0; - msg.large_param_id = DMA_CONTROL_ID; + msg.large_param_id = SKL_BASEFW_DMA_CONTROL; msg.param_data_size = sizeof(struct skl_dma_control) + caps_size; dma_ctrl = kzalloc(msg.param_data_size, GFP_KERNEL); diff --git a/sound/soc/intel/skylake/skl-sst-ipc.h b/sound/soc/intel/skylake/skl-sst-ipc.h index 08ac31778325..0058d82bd5a4 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.h +++ b/sound/soc/intel/skylake/skl-sst-ipc.h @@ -67,6 +67,11 @@ struct skl_lib_info { const struct firmware *fw; }; +enum skl_basefw_runtime_param { + SKL_BASEFW_ASTATE_TABLE = 4, + SKL_BASEFW_DMA_CONTROL = 5, +}; + struct skl_ipc_init_instance_msg { u32 module_id; u32 instance_id;