From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id AA471ECAAA1 for ; Fri, 9 Sep 2022 11:45:29 +0000 (UTC) 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 B5AD01693; Fri, 9 Sep 2022 13:44:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B5AD01693 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1662723927; bh=ysWZGiz2qyS9RSPmPOrsjqxLYFcr69lf0wUrx6wXSAw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=U3lyl7gkZAT3QqasCYN+20v7/tTLbZ1/IiSMUT+i6dmwm21kt+VJK7Q2uCXGMmAhM lJT4BZ+uiEM7pJ9QKUYfT22/sn7oxSl0oiCVAvQu9lVCGEyl+0G/YoieT3vjNSeTLu GkN2BEwCHVCbpQ5RFN+OYP0Pl9BjBwTXZmkJHfsg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 637DAF8011C; Fri, 9 Sep 2022 13:43:52 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3AA9DF80537; Fri, 9 Sep 2022 13:43:50 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) (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 D4BCBF8023A for ; Fri, 9 Sep 2022 13:43:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D4BCBF8023A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ltoYU7hb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662723824; x=1694259824; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ysWZGiz2qyS9RSPmPOrsjqxLYFcr69lf0wUrx6wXSAw=; b=ltoYU7hbLWJBkXAgHyvayQmsCuE8Xss2on643sp8/NV4BA/j0fFvd+hl MykG/NqGYTi2UEHW+sHD49Nnt03jgIPeOskAxsFugMxsRv19MFGSEwZMg 9vaMxqFBWad7+0lkImPwYNVMTHzHXn64Xg4CBpSXNy9dICbA+GCDmcXBS FUG0nHJvLoQkpuWkT4YOx0oqAWsJR+PnvcAimTwkUZvG/b6zcw7hoVUIv 9FfXjzarlj9j14FRJMPjcyd0PThNUlvg/qmlHjRLgN3v3cLUFF16t94+Z P4IUIIM8Egbg5CAk8FUs60Jd9H6yRLHwFWRPN0Yu7UPTEBR1UwRRcENEw A==; X-IronPort-AV: E=McAfee;i="6500,9779,10464"; a="359180097" X-IronPort-AV: E=Sophos;i="5.93,303,1654585200"; d="scan'208";a="359180097" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2022 04:43:38 -0700 X-IronPort-AV: E=Sophos;i="5.93,303,1654585200"; d="scan'208";a="683613854" Received: from desharpe-mobl1.amr.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.0.89]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2022 04:43:35 -0700 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org, pierre-louis.bossart@linux.intel.com Subject: [PATCH 3/7] ASoC: SOF: ipc4: Add define for the outbox window index Date: Fri, 9 Sep 2022 14:43:28 +0300 Message-Id: <20220909114332.31393-4-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220909114332.31393-1-peter.ujfalusi@linux.intel.com> References: <20220909114332.31393-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: alsa-devel@alsa-project.org, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, rander.wang@intel.com 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" Instead of using the index number directly, add a define for the outbox window index. It is always window 1 with IPC4. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan --- sound/soc/sof/ipc4-priv.h | 3 +++ sound/soc/sof/ipc4.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/ipc4-priv.h b/sound/soc/sof/ipc4-priv.h index 9492fe1796c2..f3dbcc2e6331 100644 --- a/sound/soc/sof/ipc4-priv.h +++ b/sound/soc/sof/ipc4-priv.h @@ -13,6 +13,9 @@ #include #include "sof-priv.h" +/* The DSP window indices are fixed */ +#define SOF_IPC4_OUTBOX_WINDOW_IDX 1 + /** * struct sof_ipc4_fw_data - IPC4-specific data * @manifest_fw_hdr_offset: FW header offset in the manifest diff --git a/sound/soc/sof/ipc4.c b/sound/soc/sof/ipc4.c index 1c51938ce43b..58aa054663bf 100644 --- a/sound/soc/sof/ipc4.c +++ b/sound/soc/sof/ipc4.c @@ -537,7 +537,7 @@ static int ipc4_fw_ready(struct snd_sof_dev *sdev, struct sof_ipc4_msg *ipc4_msg return inbox_offset; } inbox_size = SOF_IPC4_MSG_MAX_SIZE; - outbox_offset = snd_sof_dsp_get_window_offset(sdev, 1); + outbox_offset = snd_sof_dsp_get_window_offset(sdev, SOF_IPC4_OUTBOX_WINDOW_IDX); outbox_size = SOF_IPC4_MSG_MAX_SIZE; sdev->dsp_box.offset = inbox_offset; -- 2.37.3