From patchwork Mon Jun 26 10:53:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13292618 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 55382EB64D7 for ; Mon, 26 Jun 2023 10:50:39 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E52F4839; Mon, 26 Jun 2023 12:49:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E52F4839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687776637; bh=K/DIrngDXRqFkoySoWrM87AZXYW6qNCWHv9oMMivNBY=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=bCwQ8riJ8O5AYTnASmG90kjdFh9apJibibddhIQMfGLOzqukJGO4vumAWS6szqgkl w7MkzFqLBiZeTUaa4nwwTq5D6uqZ2/lkVdGNO0rAX2Ip8wG50K1vfOi88qAv+2kQ9C MOts4bwna/cgSq7DlOC79Afq0gac/0Dl3W5i9ytc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6355CF80212; Mon, 26 Jun 2023 12:49:46 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D9840F80169; Mon, 26 Jun 2023 12:49:45 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 586B9F80246; Mon, 26 Jun 2023 12:49:42 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on20613.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe59::613]) (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 23A31F80169 for ; Mon, 26 Jun 2023 12:49:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 23A31F80169 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=vI8Bgnz2 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jrS8CMKTuhJsk6UXNjoRsI5vyUJgmieSei+qEbZh8zXowu1G5VTqM3AQ8X464PvSnwzdewQW+cx/5tspLkwid6c9WnooI97T4FJGoGLmsUQXlxhB/PBwW7ftGWEN1kiVYCPzRi8qWOvLGq7RouusTjas00qmM8wUTMkuTjAqKgJM0cupQf4UiR7tHcHA9gSj5zZbjPMPk49F4QhHMvFnM+bn79gyLLbOqLl6WVl/zw9Z2Qp+aH5JG2rbEdYXUw2475u9GPH6OnHshc/vGw18YqfbEEfhzO3Wu4bDOqVyaG7d2PpeRdtDqvCUQ24I/kkQVvbUo6MR44QWOOiUEslNiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=W25PCIQtrqSR/2RyQHi3bguFladghcAJ45xobGw6ji0=; b=SQ9foh429Eg8IHvwrB7eVUeBy50JZp2aEgFW5zsWELjdYJ4gQwMB5bM+ozt2ElzG03kfCU+FVlRn57Qi8BEby4h3aUwUogx76VATgzxu2m4bs1/44kGB5afITMaQ6ejyN/kbZGNs2N9jLS5KG7APAStImmAVgnPFFfy7yoA4kqQaQVxT3rnxgIOrRmzaE+fyeXXtVyCmeCcdv2Dgboc+HOTW6nItx3/oaJPxTGE+Wa8RQ+o09NNWQ4iyyykYxHbXQHeSkRI7/eWBufldwBhJux0rwrIc+8MGAHySQMAuZRc2/bCQT5Uqy9fNLPBPelBfuTDnxEdiw8wGaBS0dbbsJw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W25PCIQtrqSR/2RyQHi3bguFladghcAJ45xobGw6ji0=; b=vI8Bgnz2ynneWhmWx+ub9cR9WfaDw/NwWZGFvTpN0jA7028ZvXJFxP2QyhUQVfq8AbTA1cwdAZKqJfDeTqh8i/IdwUGc1Lr4Egv6uynj6fWgnlGRmXzWnCxWwcxoQbUOuGNjL+cQHKI/qWIwZOXgIKonmScPWex89jxPd7dQV9o= Received: from MW4PR03CA0204.namprd03.prod.outlook.com (2603:10b6:303:b8::29) by SJ0PR12MB8116.namprd12.prod.outlook.com (2603:10b6:a03:4ec::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Mon, 26 Jun 2023 10:49:29 +0000 Received: from CO1NAM11FT015.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b8:cafe::d2) by MW4PR03CA0204.outlook.office365.com (2603:10b6:303:b8::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.33 via Frontend Transport; Mon, 26 Jun 2023 10:49:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT015.mail.protection.outlook.com (10.13.175.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6500.47 via Frontend Transport; Mon, 26 Jun 2023 10:49:28 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 26 Jun 2023 05:49:27 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Mon, 26 Jun 2023 05:49:24 -0500 From: Vijendar Mukunda To: CC: , , , , , Vijendar Mukunda , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Syed Saba Kareem , Mario Limonciello , open list Subject: [PATCH 1/6] ASoC: amd: ps: add comments for DMA irq bits mapping Date: Mon, 26 Jun 2023 16:23:49 +0530 Message-ID: <20230626105356.2580125-1-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT015:EE_|SJ0PR12MB8116:EE_ X-MS-Office365-Filtering-Correlation-Id: 4440eeff-f82d-4fa7-fcbe-08db76330434 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TIzvj2pQl/phlP1ZXEPpjGEL+QdqWK0IewbSPVOxx2Zlh0+5/UF0rcNokD4ahfwtgyOmfxkeSz46JK6WktSRnH7fyvxuyCS3jPJKB/oxck7jJQqtYVUaHX/bwva1pYiWCqX9ERetYhJC3NNbyDEOqMuChmYtwudL5RsZrDw11oOxMye9VvrfPJfvnnnCTVd7QM1yCULYn+zvHzPStwj5cIXZYfi2GgqGjIzDyJ7R4SeOAgJXxdINsK9KyOxFNXAxVw/ehgc7ADp0uI9d6cEAIobIwFXLbRGyc/hKy7TT4KNrtePGcuDBvYOf6JgbZRG/tFRUSQW2aa+cQy0T61uicXsNur2CM53lAWB11RSneR3kdtg/RmenqKj4NlGJ5GMhycrP/Mj4IWnUp4UNNnwgn/WL7F5/7hScGktxXFr0XzofdVhB0MVxW6VliJaQZSUlKOQ+hWWR7LY5/JSIFlu+wx2QFK26lKaWjL4dgJqLd3g/P7sEsWLkAPpvAzCigUXbdRIRShm0e1z6OqBUQxrO5FY2kEI/CZNHq/uc+5/kHkDBvEAgHCPcWDLimEuu/c4whdtVr4afOPvRv80RZKJMM4GLtCjyOr8k329o/p4mAhxbaq+lkU5ju8E/VEUpjrqjBqICXS0rV8uSxJoTUBB+xqvXsXlNw4u+YFfKfLd0Fho4BeWcSIsb1HTzQdyd5tE3HxMemXDs/JM2O2xyzEwOyC2zYVmU+2yyoiy3Yfa7Y7UybdxXL8sVf9LC1ys11OEABwIAh0KYrF6dBHzFOYri5A== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(396003)(39860400002)(346002)(451199021)(46966006)(40470700004)(36840700001)(36860700001)(82310400005)(47076005)(478600001)(7696005)(2616005)(54906003)(426003)(336012)(6666004)(1076003)(26005)(2906002)(186003)(5660300002)(70206006)(40460700003)(36756003)(356005)(4326008)(81166007)(70586007)(82740400003)(40480700001)(8936002)(8676002)(41300700001)(316002)(86362001)(6916009)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 10:49:28.7485 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4440eeff-f82d-4fa7-fcbe-08db76330434 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT015.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB8116 Message-ID-Hash: ALRPK7CIFEZ3ZQYSG6DM2AWGVEANKWTQ X-Message-ID-Hash: ALRPK7CIFEZ3ZQYSG6DM2AWGVEANKWTQ X-MailFrom: Vijendar.Mukunda@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add comments for DMA stream id and IRQ bit mapping in ACP_EXTERNAL_CNTL & ACP_EXTERNAL_CNTL1 registers for SDW0 and SDW1 manager instances. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/ps/acp63.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sound/soc/amd/ps/acp63.h b/sound/soc/amd/ps/acp63.h index e96e6dc9d90f..733a16e23d32 100644 --- a/sound/soc/amd/ps/acp63.h +++ b/sound/soc/amd/ps/acp63.h @@ -116,8 +116,28 @@ #define ACP63_SDW0_DMA_MAX_STREAMS 6 #define ACP63_SDW1_DMA_MAX_STREAMS 2 #define ACP_P1_AUDIO_TX_THRESHOLD 6 + +/* + * Below entries describes SDW0 instance DMA stream id and DMA irq bit mapping + * in ACP_EXTENAL_INTR_CNTL register. + * Stream id IRQ Bit + * 0 (SDW0_AUDIO0_TX) 28 + * 1 (SDW0_AUDIO1_TX) 26 + * 2 (SDW0_AUDIO2_TX) 24 + * 3 (SDW0_AUDIO0_RX) 27 + * 4 (SDW0_AUDIO1_RX) 25 + * 5 (SDW0_AUDIO2_RX) 23 + */ #define SDW0_DMA_TX_IRQ_MASK(i) (ACP_AUDIO0_TX_THRESHOLD - (2 * (i))) #define SDW0_DMA_RX_IRQ_MASK(i) (ACP_AUDIO0_RX_THRESHOLD - (2 * (i))) + +/* + * Below entries describes SDW1 instance DMA stream id and DMA irq bit mapping + * in ACP_EXTENAL_INTR_CNTL1 register. + * Stream id IRQ Bit + * 0 (SDW1_AUDIO1_TX) 6 + * 1 (SDW1_AUDIO1_RX) 5 + */ #define SDW1_DMA_IRQ_MASK(i) (ACP_P1_AUDIO_TX_THRESHOLD - (i)) #define ACP_DELAY_US 5 From patchwork Mon Jun 26 10:53:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13292620 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 5482DEB64DA for ; Mon, 26 Jun 2023 10:51:30 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A9F98846; Mon, 26 Jun 2023 12:50:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A9F98846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687776687; bh=+boyEBT5kTE1vzt569lDY0Wbvs5340P+jdJ9r+jhO/k=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TV4lm3WEI86Twj7awuEnc1ih6530fhbN4zseOkR7esYebbpEQRGC9dwquQfZyQRcK 4i5+Yk4eSUtJ1sC6l5ZJacO1E70Smon6SzhvjeUlUXqHFotF5jSYRT2r1+Rt7mW5d1 Hlm9RbUNPkXsbP5WhfcKhILwdrHf8L1zBtPV7ssQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 25D84F80549; Mon, 26 Jun 2023 12:49:50 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7F5FDF80535; Mon, 26 Jun 2023 12:49:49 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 67675F80246; Mon, 26 Jun 2023 12:49:45 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20626.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::626]) (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 68CE5F80169 for ; Mon, 26 Jun 2023 12:49:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 68CE5F80169 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=W/xBoYMC ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y+drf+wiylaVkax0XnK63wDKIG8GINBS9AJkwT+ElTQz42CgU7VPNwM5rPJ2ENVzKKkQ+hSlc8RSt5Vv1WlvPrY4a8bl2ceqV8EsWbVcZBD5udvRTHzhYJzgMcZ50CqDUlUX3CERPhENNRB6IaFRRL6oZjU8c8PWfX4IIaeZ5MVQih38aunn+LxTiIfa+AIiwImH3uOrS1NwLNd2Bx0Ar+pJXM+jfObgPc1aIVs7D1u6jH8G32jJGSh1yq7wEjd7XvLi++S+ADqD8slaH3Asvb4CMT19cohjlncWynR1Jk5f2AXsUzUUEjZFm729cDzfqMihruim82GDlkwoYLHC8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=c6aB+WlRzqMc/V9fmqsehMY7bpEID+3jhhJbtBTL3Ys=; b=b/ONRDcs5iwoh+0ecNgwz328CbTxafcDjbSvF2AP5/k9+lQiOPVPk3aE4LI/7+BBsW4Ae4M7E3pTp6NOlSLeOI7BpOOtq4NT2psHno0W0CM2BX9DEehF0QPImSwvtTn4+gAUsklgTn48yFkAjXIf36HaiYVK3eFwLydDwd4FNSfp/VlQWtWA+Doa8oWU2zfEcSEFmt4/lOQX0aMeAQ4KouZfDdyFI3fFJRDWa6yBJEUP4OWedp17W6TxlcrcIOI6HtN+/QC/7lkJRxVzRuWUPHB5cjyzWNAvnj6IANV11Kw8lMRrMaSzptpn1AIifmwNYMwi2ogpRrLT1GzzGZnIBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c6aB+WlRzqMc/V9fmqsehMY7bpEID+3jhhJbtBTL3Ys=; b=W/xBoYMCgXjXqrJ4IAlHNqTcFvaeDgUHPuHkgOMzdVScUluNOmgLI6mnoWIjK50qoAEcK+Ff1nHkdz8oMWH+WPYWV/QwHTw6/v5cG2rn7mks53WOOGUCUIsI5Ookisnl1kP/Tb8zojSa/RzQ1BoUXvlSueiP7/Ky9fqdXpsKNa0= Received: from MW4PR03CA0191.namprd03.prod.outlook.com (2603:10b6:303:b8::16) by SA0PR12MB4544.namprd12.prod.outlook.com (2603:10b6:806:70::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Mon, 26 Jun 2023 10:49:35 +0000 Received: from CO1NAM11FT031.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b8:cafe::84) by MW4PR03CA0191.outlook.office365.com (2603:10b6:303:b8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.33 via Frontend Transport; Mon, 26 Jun 2023 10:49:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT031.mail.protection.outlook.com (10.13.174.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6500.47 via Frontend Transport; Mon, 26 Jun 2023 10:49:34 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 26 Jun 2023 05:49:33 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Mon, 26 Jun 2023 05:49:30 -0500 From: Vijendar Mukunda To: CC: , , , , , Vijendar Mukunda , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Syed Saba Kareem , Mario Limonciello , open list Subject: [PATCH 2/6] ASoC: amd: ps: add fix for dma irq mask for rx streams for SDW0 instance Date: Mon, 26 Jun 2023 16:23:50 +0530 Message-ID: <20230626105356.2580125-2-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230626105356.2580125-1-Vijendar.Mukunda@amd.com> References: <20230626105356.2580125-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT031:EE_|SA0PR12MB4544:EE_ X-MS-Office365-Filtering-Correlation-Id: 301cf36e-7b7d-427f-31f6-08db763307d2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LIxf/8jLaVi2VZU41FutIR0CyY3+YzbehWcHvhvWdDR4+TaV9NvXGULIJttRNecsl7DeEie892eU8mQbRq4IXaXF7gS5ar3VfmjFAsAFxBmME5FuKUSlTlIUSEnAD4CLE00mjbVYJUAPMRNCaL8TGnmCgeZYW67+kYQu1zRAgKNCl9u3nkiJ/H78ZTUuXs0gkyOBbp9xSRy96p4KSDolX38eGI6XKay8KufUqCp/UHaL894kzaioMxBPqB8pXJVOrICI8erf6rxWIeC9BXAjzJTJnbmaevc3gGPw8rvTdKCwkKHCAyIBJZPbv2lR+V4SjoOcmx5S1G5JkXozqmAwng7KRbKYboydMnVY1tdEATRuttlCz/XBSUjPIkHzSNWCtwuwTgtd/S0QEb53oBk45u02C60dudDWktdV6wErvfURnycr8wkdJwbPQuJStn0X4I5G5zzkvMYqJeqV6Mt+JiOrA5bbJmSF5gD4UlQvdxFslmLNF8/HSziDOdSXgqKyAF9za//Zxx2ZrTXU/m2TYF9T6KXH6x+p4b43pTzYbvQcDXDXdIOfPVicgPk2RrcYyYtYfPlipwJGfDbl6y/+go7W/C3rg7UiXBmqAOAKSGEqAvn+GlqI5vBvByFp0WekwKVIGKorpnq8o91q+ygOMSvmTrdk9ePZ9rPreMkU7UTohEnUAXKBBA/rM13paGufqixmAwr1XUoSRQ/qczvegew17sGhiEKjIcJyTkbUQUGJkfYGbADsAo9UFAW0oj89uJjPcxOcepndm4Shwk64dQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(136003)(396003)(39860400002)(451199021)(36840700001)(40470700004)(46966006)(40460700003)(2906002)(7696005)(82310400005)(82740400003)(6666004)(356005)(2616005)(81166007)(83380400001)(336012)(426003)(1076003)(26005)(47076005)(4744005)(186003)(36860700001)(40480700001)(41300700001)(54906003)(86362001)(478600001)(316002)(36756003)(70586007)(70206006)(4326008)(6916009)(5660300002)(8676002)(8936002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 10:49:34.7964 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 301cf36e-7b7d-427f-31f6-08db763307d2 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT031.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4544 Message-ID-Hash: DVLKN4X3CAFPCD6IOG2NHG77SA54CY23 X-Message-ID-Hash: DVLKN4X3CAFPCD6IOG2NHG77SA54CY23 X-MailFrom: Vijendar.Mukunda@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Correct the DMA irq mask macro to program DMA irq bits correctly for SDW0 instance rx streams. Fixes: 298d4f7b1765 ("ASoC: amd: ps: add support for SoundWire DMA interrupts") Signed-off-by: Vijendar Mukunda --- sound/soc/amd/ps/acp63.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/ps/acp63.h b/sound/soc/amd/ps/acp63.h index 733a16e23d32..8b853b8d0219 100644 --- a/sound/soc/amd/ps/acp63.h +++ b/sound/soc/amd/ps/acp63.h @@ -129,7 +129,7 @@ * 5 (SDW0_AUDIO2_RX) 23 */ #define SDW0_DMA_TX_IRQ_MASK(i) (ACP_AUDIO0_TX_THRESHOLD - (2 * (i))) -#define SDW0_DMA_RX_IRQ_MASK(i) (ACP_AUDIO0_RX_THRESHOLD - (2 * (i))) +#define SDW0_DMA_RX_IRQ_MASK(i) (ACP_AUDIO0_RX_THRESHOLD - (2 * ((i) - 3))) /* * Below entries describes SDW1 instance DMA stream id and DMA irq bit mapping From patchwork Mon Jun 26 10:53:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13292621 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 0DDBAEB64D7 for ; Mon, 26 Jun 2023 10:51:50 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7555C1E3; Mon, 26 Jun 2023 12:50:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7555C1E3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687776708; bh=lCN/6l7UXtET39k4PvuBxlWQPhYxOHxGnvZGhlSwQOY=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=cfLQfHBWX2bw/pd9D6UuXfdoYektOGSdGzRxEVW6mmPGZxWnM0dY4KbM/SjEXOhOc VGJ5AZNzavNpepWJyzweY/x/Wpwku+Q5odyyvcEsqCvL8sxPgP1EwStiyAsPZZhfDT czBikXxjrMwPSYB7f1lG2KZlG/+jOW3row4A4GAc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 95A71F80567; Mon, 26 Jun 2023 12:49:53 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 08F45F80564; Mon, 26 Jun 2023 12:49:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D3D11F80549; Mon, 26 Jun 2023 12:49:48 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2061d.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eab::61d]) (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 2A3A6F8053B for ; Mon, 26 Jun 2023 12:49:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2A3A6F8053B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=i8+oVvpn ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ULhyrR8mnkMtLTqG1een1RNXJJ8FyMCapzuIU640U2/9v5DbE85MUc+2bqy6RbE+5RqJJpGHncqlf5HupJTwzflpcVxJTZTn9OiU8oaRFQv0nviH4/mad0jJEh6/64pDE0VfyBUBxsQDWQcx5AOJ447vVhIiPSe0HouLF5YKe7oKcZFRFdOPGP6FiCxwud8HTsDr5VokH2dfdA5yh5yEanJy0QTxbq6ChLt9pv8I2D0MnYHml7E1i5EOpD5Qq7yNE1NSWj/rDzD/AZdQjEhw62f0uL6Ae/34espOPdaVY8b9LYINFQqUKlIMB+yMV4zBoMl24oLviodbla5a7utHBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NIk2r0uvcF642nGKuMeQNKi74wEmD72eDb1fed+gnJo=; b=AkAT5O5et93UYUCU2Itpba/kYiRGGj/8QT+kTFmAxj9adUYJDzgBx12LMANR50M+dL/um7jhsw+ilmAbQid2mvo7aZc3ZuSagMJxGp5cGMC/4SAI1S5PhuJg90XOBgLxG+8CWEs3Wks77c0DLfNjgV5ujxm+p6uz7e08sen+9FnxEpySyDJPIUzW/zc74sx3Pq03EqWn4z9r6UYHRUBeWk2/SwS1qAGpLrOA5jowdsLiCjYr99wE00r6tBj/o5v8rESIhWISYcm2MDUD7QnUk7ggfoPq8+xt6VeTlnIhqp+EYcst1uYNdbA/bMYIVrEkXsmmKmyDbicAYtDt67y4+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NIk2r0uvcF642nGKuMeQNKi74wEmD72eDb1fed+gnJo=; b=i8+oVvpnzY5k6PbcknPR9U93jM9c7kcw9QwtL51mLJG9WEdGYcrGLJRtUFlBjCAsiD8G+ERrno80GZkxmhTsSppDzVnHTufuBIgraW3ScrmszqSY3mnumx/U7sP2L6J7iYziW8ckz5ARwQBTT4Mlrk2+A0DAHgIc4FfLNofqLkk= Received: from BN9PR03CA0850.namprd03.prod.outlook.com (2603:10b6:408:13d::15) by CY8PR12MB7097.namprd12.prod.outlook.com (2603:10b6:930:63::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Mon, 26 Jun 2023 10:49:40 +0000 Received: from BN8NAM11FT032.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13d:cafe::7) by BN9PR03CA0850.outlook.office365.com (2603:10b6:408:13d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.33 via Frontend Transport; Mon, 26 Jun 2023 10:49:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT032.mail.protection.outlook.com (10.13.177.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6500.47 via Frontend Transport; Mon, 26 Jun 2023 10:49:39 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 26 Jun 2023 05:49:39 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Mon, 26 Jun 2023 05:49:36 -0500 From: Vijendar Mukunda To: CC: , , , , , Vijendar Mukunda , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , open list Subject: [PATCH 3/6] ASoC: amd: ps: fix for position register set for AUDIO0 RX stream Date: Mon, 26 Jun 2023 16:23:51 +0530 Message-ID: <20230626105356.2580125-3-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230626105356.2580125-1-Vijendar.Mukunda@amd.com> References: <20230626105356.2580125-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT032:EE_|CY8PR12MB7097:EE_ X-MS-Office365-Filtering-Correlation-Id: ef92b4b9-a2d7-455d-9715-08db76330aa3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J5x5U72IKsS2Y29gvXZ5D3k9dykI2ZrF+cayqEAwa0cCnyPTWWLU71WKihIGqE3oS5pWynswIM264/O1S35ZX8k4XcsAmeShHnbBrw4+7mrCEMxPiiMmc4Cp3hyyxwOcxJzEHmeBf/FW5oGt+eFlbii21t6o3toUerq2zAhDuXom4BRdZzc/c3AMTP2Dizm7g+FXkY2aIb/PB+ut4w77nCe2Zfz4lnY5zeGnAAAsRCilk9bjtbgYuCPW285gitCFOBOtohAzdvOuHoa7XYXDZTuEEx09ZAmC/PRk+hbbJSNoMqVyLwGk4YidX7FYPuVVaRGP7pX/ayFQH1OVb5WJ3HdoTX19LZlKbFZjpVRCEkRZmp4xWWO0a4+LypMAZlEzqe+Vt+/784y9CgwLSKQ77J5idPlb8jqC1H3ROJsNFIpWtstNLyNeiMlijrS88b5yd+BN7ThuJTrEUAXlLBk5ZYGYJBek4lMH8+k/kOAfIJ744SB1zxl8V5EcAkgRXmPYjOfa21BnpiEEPDjLHdrZLvxXhrKQT10+0Nl6F+dgnVRqfH8gUL/2G7z5thHeGYSWq0R8wTJK2kz6nDDCPuFz2mncQk242gaMSMHVNfTLo+9aipTDrD4Qw6XOxZrJtK7NonY3xcMRHEziJjSCT4EGWdT34DkeeT5+GteNT3oj9RJCPTvwKXcWXyPnR1Np8sC+zCva9KMx9DB21DYR+ni5m/Nq/2gD0V1CsTzOLQpVpAW4rME0GfUBGvTnpzY7gt5/RI5F4YjNg/zdC2+u6boPzQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(136003)(346002)(39860400002)(451199021)(40470700004)(36840700001)(46966006)(8676002)(70206006)(8936002)(41300700001)(316002)(70586007)(6916009)(4326008)(26005)(1076003)(186003)(336012)(2616005)(54906003)(478600001)(6666004)(7696005)(40460700003)(82310400005)(2906002)(5660300002)(40480700001)(82740400003)(81166007)(356005)(36756003)(86362001)(83380400001)(36860700001)(47076005)(426003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 10:49:39.6491 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef92b4b9-a2d7-455d-9715-08db76330aa3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT032.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7097 Message-ID-Hash: Z7YNZPPYJO7IL2Z5KVZ2A46I5ZEF6UW7 X-Message-ID-Hash: Z7YNZPPYJO7IL2Z5KVZ2A46I5ZEF6UW7 X-MailFrom: Vijendar.Mukunda@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: For AUDIO0 RX stream, AUDIO0_RX position registers should be used. DMA error is reported due to referring wrong position register set for AUDIO0 RX stream. Correct the position register set for AUDIO0 RX stream. Fixes: f722917350ee ("ASoC: amd: ps: add SoundWire dma driver dma ops") Signed-off-by: Vijendar Mukunda --- sound/soc/amd/ps/ps-sdw-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/ps/ps-sdw-dma.c b/sound/soc/amd/ps/ps-sdw-dma.c index ade130a8062a..3ab41bd1fce2 100644 --- a/sound/soc/amd/ps/ps-sdw-dma.c +++ b/sound/soc/amd/ps/ps-sdw-dma.c @@ -30,7 +30,7 @@ static struct sdw_dma_ring_buf_reg sdw0_dma_ring_buf_reg[ACP63_SDW0_DMA_MAX_STRE ACP_AUDIO2_TX_LINEARPOSITIONCNTR_LOW, ACP_AUDIO2_TX_LINEARPOSITIONCNTR_HIGH}, {ACP_AUDIO0_RX_DMA_SIZE, ACP_AUDIO0_RX_FIFOADDR, ACP_AUDIO0_RX_FIFOSIZE, ACP_AUDIO0_RX_RINGBUFSIZE, ACP_AUDIO0_RX_RINGBUFADDR, ACP_AUDIO0_RX_INTR_WATERMARK_SIZE, - ACP_AUDIO0_TX_LINEARPOSITIONCNTR_LOW, ACP_AUDIO0_TX_LINEARPOSITIONCNTR_HIGH}, + ACP_AUDIO0_RX_LINEARPOSITIONCNTR_LOW, ACP_AUDIO0_RX_LINEARPOSITIONCNTR_HIGH}, {ACP_AUDIO1_RX_DMA_SIZE, ACP_AUDIO1_RX_FIFOADDR, ACP_AUDIO1_RX_FIFOSIZE, ACP_AUDIO1_RX_RINGBUFSIZE, ACP_AUDIO1_RX_RINGBUFADDR, ACP_AUDIO1_RX_INTR_WATERMARK_SIZE, ACP_AUDIO1_RX_LINEARPOSITIONCNTR_LOW, ACP_AUDIO1_RX_LINEARPOSITIONCNTR_HIGH}, From patchwork Mon Jun 26 10:53:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13292622 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 7C9EEEB64DA for ; Mon, 26 Jun 2023 10:51:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8593885D; Mon, 26 Jun 2023 12:51:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8593885D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687776714; bh=PsxmF4x6lKeZxZHKQRHMxEEj80/lp9AuJT0hKqcQ7X8=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Gdv4GH+DfLgV7XQtEIdtParj0sLYMdDMDGhiPCe3EE4p92KiQnteWv7TSDMOvmU9S ctFEceODmJmsDY9Tul0Y/oZE0B81gy/I8fKUieLQZxfDG99hBoYNjJDST3pFgrLn05 lK5JrB4RpcbsgSx8qwKiZGRCRjxoJ9dTYcmJTCG0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0E5ABF80564; Mon, 26 Jun 2023 12:49:58 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6AE39F8057A; Mon, 26 Jun 2023 12:49:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B94EDF80579; Mon, 26 Jun 2023 12:49:54 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on20615.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8a::615]) (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 CA066F8055A for ; Mon, 26 Jun 2023 12:49:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CA066F8055A Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=cwpAP9xF ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kpSdtCvN9DGPxwGL9e6F6IvbaB66/OXu8TRHam5+VBilwUvelagd5J9EvIaUstVv1UVwlbr2yVoTlogI4P+zsIKXZbEkfjFnhAoHOejSeNnbvapD5sBxPPQwEinoXYQ1hC3w1HWqsg+gLg3mOgekv0KqpYMWhBkkteRhEpLrWqHu636JijQitbhlHynDk5ZfGZJUoQ50PrgTFsk5uyaqKeLGGdd07/UQCXs6C4ZQM4h0yKB5IxqVWXwyNCsd2zkewi+wpt6pq6H1eDA35i3qvvi8JzLIl/BdGcmsGEXqxwBBrEnl41wiEW4DVmoFuCGhTmtPW7AwolITcxw0YOBhHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VSrksC/0PHXHaJnoOkeBX10m0xsOLFS9Hz6j+Gq1pJA=; b=oMytg1S51Ej5Et5ro1ErW4k9LE/EhUGhouJH5Bs79C7ipDHvDY9H4xS71IOaIc7UVnf1F1UUPcQ+UtuibLu1weyG3peyG4ffbCnG2BCQ4HLCU5bMqeT4D1cW5b2BO0Vl9anrx6uNSxSqL5WYQ/WhwZ0PhthRR9gm251Uvwkp0VjVVeJDUALj8qjSZFiQJcPSxg8ijKx1HNVdS8/agRW+qRIqb7iBN4JrV6uq3RuFgKzE/P2OFoYfevwyTup4obO/i1ySsPgYpZZBwJ8+jET4pBKMTEdnicaRoUcv1fFzZgcSx9bgNXrVJaCvu2XhYfE45Y6mtpVvsWcrZkfgmtjIng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VSrksC/0PHXHaJnoOkeBX10m0xsOLFS9Hz6j+Gq1pJA=; b=cwpAP9xFQnijIcLy9wxZp5drPn82LHp1wpMEMFI1YlS+7HrgG5aAvNPSk8LKoA0aU9AtBeJi+Q9q3bbG05s7tvk8wm0WRw7NdTN/CM/shoSN4ufMa0fPdpbIontW4QeOQbAlaXCZA3ewkpl8gCGeaGRDEjU2dHLAOpiiXrFM1Es= Received: from BN9PR03CA0909.namprd03.prod.outlook.com (2603:10b6:408:107::14) by PH0PR12MB5605.namprd12.prod.outlook.com (2603:10b6:510:129::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Mon, 26 Jun 2023 10:49:45 +0000 Received: from BN8NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:408:107:cafe::eb) by BN9PR03CA0909.outlook.office365.com (2603:10b6:408:107::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.33 via Frontend Transport; Mon, 26 Jun 2023 10:49:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT034.mail.protection.outlook.com (10.13.176.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6500.47 via Frontend Transport; Mon, 26 Jun 2023 10:49:44 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 26 Jun 2023 05:49:44 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Mon, 26 Jun 2023 05:49:41 -0500 From: Vijendar Mukunda To: CC: , , , , , Vijendar Mukunda , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , open list Subject: [PATCH 4/6] ASoC: amd: ps: add comments for DMA register mapping Date: Mon, 26 Jun 2023 16:23:52 +0530 Message-ID: <20230626105356.2580125-4-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230626105356.2580125-1-Vijendar.Mukunda@amd.com> References: <20230626105356.2580125-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT034:EE_|PH0PR12MB5605:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f9d07b0-afac-4be7-603f-08db76330dbb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tRnkt7IiMO1Idy48RDSxRzDAzKFvAXcWpVWWDwFXpOGfIMaNrILdZEZLscKgnrs/9HqXfNgVb8Jelq3/yowIW27+F3cGJk1xhbXqbJh2M8geYk9vnmVs1qViDiHsS3cANpitpOdiH8nBiUk4bi7usLbVDdHiM4XtQWIz14NGS1ydN9/6iIHefANQ3lpgfdU6LtTMO6UY6chWrW5hgDuhudch2fWclUR+ui8cxpcNllkTIt2g5LbdYWUfUpQmGTnHQabATr6Ea04qMjIGZyoBv9JA6W36uw7CleO1Qucvz9tnB/Uvf88vCHL4lM5/yPAeUeuDmKt5O19V6/GllScURiVklg5EvcTtWApHiFYztoRESBm1V9LINo3gEeVe0H/kPOL1jNpPwKmvcUxRQJ6jBQVTc34xNXaCWZMbMsfDiiwgw30UIfp9u9nnz7p88CULb5WVSq3BkWJ7z0VxK4S44I90HvZqMmbf7d6+Fy4fj5Vdj4zjxaXKtjVanvpGj+ABdmKQRrijanIAh8A2iik3Fw1ToUy3DTAVVH/q9Kjv+OMZ9JEH8b7ePenW7qQ+tDGVJeWAjhNejjOxN+yC9jxsELkXUT6cFz5TCBPnIcezgVvq1fl9xs3iuJQYiASo+EqkckgkXibsVbQ7yVEbhw/ZRF5W3uKILc99TXwvKdGs9Si7TSbh2ouy7egxtZfxF/9Ae+fzUUeFBBRWJGa4CDx3WuJKXqj8XDKwIBk+pQcBcmKMTiw1Am5VybgP0UWpo29Uu6p6j88hXbB6suA2yFA6Xg== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(39860400002)(396003)(376002)(451199021)(40470700004)(36840700001)(46966006)(82310400005)(36860700001)(47076005)(6666004)(2616005)(7696005)(336012)(426003)(54906003)(26005)(1076003)(186003)(2906002)(478600001)(5660300002)(36756003)(40460700003)(70206006)(356005)(81166007)(70586007)(82740400003)(40480700001)(4326008)(316002)(8936002)(8676002)(41300700001)(86362001)(6916009)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 10:49:44.8381 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f9d07b0-afac-4be7-603f-08db76330dbb X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5605 Message-ID-Hash: MAKI3K7A2LYZ7R4BXGEMNFYFLJMPV2ZR X-Message-ID-Hash: MAKI3K7A2LYZ7R4BXGEMNFYFLJMPV2ZR X-MailFrom: Vijendar.Mukunda@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add comments for DMA register mapping for both the SoundWire manager instances. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/ps/ps-sdw-dma.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/soc/amd/ps/ps-sdw-dma.c b/sound/soc/amd/ps/ps-sdw-dma.c index 3ab41bd1fce2..000ab5d96815 100644 --- a/sound/soc/amd/ps/ps-sdw-dma.c +++ b/sound/soc/amd/ps/ps-sdw-dma.c @@ -39,6 +39,11 @@ static struct sdw_dma_ring_buf_reg sdw0_dma_ring_buf_reg[ACP63_SDW0_DMA_MAX_STRE ACP_AUDIO2_RX_LINEARPOSITIONCNTR_LOW, ACP_AUDIO2_RX_LINEARPOSITIONCNTR_HIGH} }; +/* + * SDW1 instance supports one TX stream and one RX stream. + * For TX/RX streams DMA registers programming for SDW1 instance, it uses ACP_P1_AUDIO1 register + * set as per hardware register documentation + */ static struct sdw_dma_ring_buf_reg sdw1_dma_ring_buf_reg[ACP63_SDW1_DMA_MAX_STREAMS] = { {ACP_P1_AUDIO1_TX_DMA_SIZE, ACP_P1_AUDIO1_TX_FIFOADDR, ACP_P1_AUDIO1_TX_FIFOSIZE, ACP_P1_AUDIO1_TX_RINGBUFSIZE, ACP_P1_AUDIO1_TX_RINGBUFADDR, @@ -59,6 +64,12 @@ static u32 sdw0_dma_enable_reg[ACP63_SDW0_DMA_MAX_STREAMS] = { ACP_SW0_AUDIO2_RX_EN, }; +/* + * SDW1 instance supports one TX stream and one RX stream. + * For TX/RX streams DMA enable register programming for SDW1 instance, + * it uses ACP_SW1_AUDIO1_TX_EN and ACP_SW1_AUDIO1_RX_EN registers + * as per hardware register documentation. + */ static u32 sdw1_dma_enable_reg[ACP63_SDW1_DMA_MAX_STREAMS] = { ACP_SW1_AUDIO1_TX_EN, ACP_SW1_AUDIO1_RX_EN, From patchwork Mon Jun 26 10:53:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13292624 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 99110EB64D7 for ; Mon, 26 Jun 2023 10:52:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6C5809F6; Mon, 26 Jun 2023 12:51:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6C5809F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687776745; bh=mauyOpFUpmHh/vJiEnlwOSaqQi7uEjBwjhTk+blisQ4=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=RKRlzPfUxP+rCdoWqMmMlpKlaspjNObEjG+Woj3gzWlCUHOMUpjqBdiG8jGMXplcB LILUw0MnCOnIdIe94bTV6XO5z/jeVcGo8Vs9OaoGTp2jCeHD5Y01vxsdZ64shoc2A7 zyuCJ7EGAkuMvQ77D1u0PVzeOObVDo9B7yhg0bHE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4EEFEF805BD; Mon, 26 Jun 2023 12:50:11 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A5451F805AD; Mon, 26 Jun 2023 12:50:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7B1A5F805A9; Mon, 26 Jun 2023 12:50:07 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2062e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::62e]) (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 F3F28F80587 for ; Mon, 26 Jun 2023 12:50:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F3F28F80587 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=LUlSMUaF ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gFvl3xZlEqP19qEDDkKWIxRROrDctcUoKFxBpvPQ+Pd9cDWhJp+RJkXig/vVznyjA0IV+s0MPkkZlKtJuAPxQvIFkYfcQpC029pzgGbH+SqYwyDY6QpibCsSQbLTygH/r/zZ7PeYv7T98PFubVh+rs19BpGsZdP3Yv7tLUNcOfUoT08uas7F/hd4WRitLKxHwZ0iyubxtR60dPyJeqJwszdSPUADPBLs3q9T1fQy+ctiKJIKX2ae0cPxLu/3vakvFv0j421lgHnPU9wC9sLqgNpjUg/oooDq7j9ukGO25gU0Q9LFFOlLD/8yTGDrLBy/YKbpZdwnTp4bQ39tCpma9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qjqQAsDOlDDkBXLiTHkmm1YDk8BAH5Guh6jH+qFjGqA=; b=Odxs6s2yokVyDeW1Q7lHIdCg7F4tDz4Ltjh/5tZZgyXLVcdefgRbfUXwIaTHivbMn/gOaTKCajeeuzVb6g7wfuaY23q8Xj4NcyjgWo2QeTRK8nF+cqZVPTPnLs/ZY43gtHJEaD1FwD9o4J8wW9XslhACKwORHLnD/Q/vKFl12PDHWQKqEhcAAsqjmsvCq6iZs0t1COnvBsUs/pUNHGyqjqjLtn3fmKkXPVeHb19vFpUVG0jPzU0C4fmA5xkGu7ajxZWoQ7ohXrqjKH2YfiwQyrUpLtBlhhj17pRmYEeK2uR8rUcDq8seeCias7sUnoAB8HEG+MGDYUL7+xmPTED4Og== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qjqQAsDOlDDkBXLiTHkmm1YDk8BAH5Guh6jH+qFjGqA=; b=LUlSMUaFBCivVFd4Q4ymZyNlyt1iQ4E0kzPLBv04XfpsjjuUhSY5ZRQcUlSvXzGUFpJvGaylf4+tYHlosefly7vPRwT2lVEMceHK5mOtGRsPfYpriFcKqqTY9os18Cbn1C6zRHFl+WpquvYEUbHvZSvIUJWUS/4BYAm4UG+cfxA= Received: from BN0PR03CA0052.namprd03.prod.outlook.com (2603:10b6:408:e7::27) by BL1PR12MB5996.namprd12.prod.outlook.com (2603:10b6:208:39c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Mon, 26 Jun 2023 10:49:50 +0000 Received: from BN8NAM11FT006.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e7:cafe::6) by BN0PR03CA0052.outlook.office365.com (2603:10b6:408:e7::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.33 via Frontend Transport; Mon, 26 Jun 2023 10:49:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT006.mail.protection.outlook.com (10.13.177.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6500.47 via Frontend Transport; Mon, 26 Jun 2023 10:49:50 +0000 Received: from SATLEXMB07.amd.com (10.181.41.45) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 26 Jun 2023 05:49:49 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB07.amd.com (10.181.41.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.6; Mon, 26 Jun 2023 03:49:49 -0700 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Mon, 26 Jun 2023 05:49:46 -0500 From: Vijendar Mukunda To: CC: , , , , , Vijendar Mukunda , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , open list Subject: [PATCH 5/6] ASoC: amd: ps: fix byte count return value for invalid SoundWire manager instance Date: Mon, 26 Jun 2023 16:23:53 +0530 Message-ID: <20230626105356.2580125-5-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230626105356.2580125-1-Vijendar.Mukunda@amd.com> References: <20230626105356.2580125-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT006:EE_|BL1PR12MB5996:EE_ X-MS-Office365-Filtering-Correlation-Id: e351118b-0f2b-435b-9b6d-08db763310f6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /MLY5Ma2dPrs+QHWTFA2x5oaqGJcCDGsuZMHnhPAWlR7hDFPLZA4JCpVfPCtkp1kPstV9p6KMLIf7sfEoiaWRg7izxkoGapEk6HI+s6GjHLf+BdkBcpios5BSYQvIkQRh4nTZHfoLIW5dd8xFYF2csZUa5Jiu+FAV3OeOuE0JBDQb092wmNsST+MSiYW1sx+/CFkGr9KBEjGRuM4alvzqDg6zyf//O2NWIUAE/nQStbwCLvHw/GZ2r1u/PMFu2rOouUiuTUfiOq9wo8ZKNNC+kc73PBWEyZxMa36QTXVg2cOePg5TXJNuWFT0AMpR2WsVNMrT9jnI9A+v0Tsz8gND1FIr9y6Y5igMPrIt+DXtmcxZmbmTTW6irgh2uQZU5et3udpUQoZO22iWvTWzFQjQUTdll9/6i46ywsW39npCyKUH+x7DFDF/DVoPb0wjfPvcdP8/8g8OKpsHl3KNBAr3xznvMiIc8fXWoV2SONSL/Pc1wco3Y4pwwuZF08o13c621sFty0ZAxPNQ6vDMk5wWuPuQ9YXtghWHJWzbm5l74tUbNPK9HWtDdR/+Y/VDp9rkGMrYW4+l2MGPHDuK2wXPonrjKFQveoCkhBHanb4wNMHqlxld4wLFmbkA8xBane9CT9K+zacTWmqe1mDWUb16W6uyYbFQRBwmTIO9CRYTFfqn3RumYetiU4jsmc7Ub6dUntC54Q+xuWodr3jPGu8v6I9iset1Euo8bkElOo4GoEKlOvQ7WsIpqftODjf2tHZMJChQS9Cc545QS1oj1oR8g== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(396003)(136003)(346002)(451199021)(46966006)(36840700001)(40470700004)(40460700003)(2906002)(4744005)(7696005)(82310400005)(82740400003)(6666004)(356005)(2616005)(81166007)(83380400001)(336012)(426003)(1076003)(186003)(26005)(47076005)(36860700001)(41300700001)(40480700001)(86362001)(54906003)(478600001)(316002)(70586007)(70206006)(4326008)(6916009)(8936002)(36756003)(8676002)(5660300002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 10:49:50.2595 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e351118b-0f2b-435b-9b6d-08db763310f6 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT006.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5996 Message-ID-Hash: VM653JZPOULGIIPRRYWOOYW6F2SXM5GV X-Message-ID-Hash: VM653JZPOULGIIPRRYWOOYW6F2SXM5GV X-MailFrom: Vijendar.Mukunda@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: acp_get_byte_count() function should return zero bytes instead of -EINVAL for invalid SoundWire manager instance. Fixes: f722917350ee ("ASoC: amd: ps: add SoundWire dma driver dma ops") Signed-off-by: Vijendar Mukunda --- sound/soc/amd/ps/ps-sdw-dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/amd/ps/ps-sdw-dma.c b/sound/soc/amd/ps/ps-sdw-dma.c index 000ab5d96815..324c80fca672 100644 --- a/sound/soc/amd/ps/ps-sdw-dma.c +++ b/sound/soc/amd/ps/ps-sdw-dma.c @@ -318,12 +318,13 @@ static u64 acp63_sdw_get_byte_count(struct acp_sdw_dma_stream *stream, void __io pos_high_reg = sdw1_dma_ring_buf_reg[stream->stream_id].pos_high_reg; break; default: - return -EINVAL; + goto POINTER_RETURN_BYTES; } if (pos_low_reg) { byte_count.bcount.high = readl(acp_base + pos_high_reg); byte_count.bcount.low = readl(acp_base + pos_low_reg); } +POINTER_RETURN_BYTES: return byte_count.bytescount; } From patchwork Mon Jun 26 10:53:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13292623 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 73AC4EB64D7 for ; Mon, 26 Jun 2023 10:52:20 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5A304A4B; Mon, 26 Jun 2023 12:51:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5A304A4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687776738; bh=McaWUdXtXi5Y5HkMSu4/fykmpVvllvZy7KcWpqD7CKk=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=vgaTtpefweVAA0IKAS0baNkQ2c/X2o2miKqxPkhVgq7DRCYH5E8viFlzOvU39vUzp W5M6+7WQ/3TEGxJaN0BNEFITNywC/Ly3yXl9ojsdS5yivMz2gyqqrx1yTO67HhQJm/ PB9NO/3P5ZgcV7XlEcJDJgcONQCa8gVFWt30F1Bg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E9113F805AF; Mon, 26 Jun 2023 12:50:08 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3F6A5F805A9; Mon, 26 Jun 2023 12:50:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6E55CF805AA; Mon, 26 Jun 2023 12:50:05 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2061c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::61c]) (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 42128F8057F for ; Mon, 26 Jun 2023 12:50:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 42128F8057F Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=diLicSt6 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M+9+yPSZSpY79DLzlhSdc74tw2XzFLTQthSHses/WiBsnGx//eqm3dMBkkOkXv+OnzD5l3oCmqLqO78WCvYzXKnAoCtpkDSJAgQzrylzh4RbwZNrSQcERIzd6KxzgH3JJvRtWJMVtSSDPFPK3Tag9ILKxgNwnqdVThTxhdnFKvy6qE6WTmp/xbLpkOFL/op/5xzx4R5WQnt5nxb145lk1cWkHVMNpGxyvZeAtHEoDIhj3rCkGlqQlWNHW/BRmzq3L72K9X596Yu94CbrAR9cvNrJ3IZ+psdXxyckumlqBwXgFFPM3cUZv9+sP4VUCWnl46r8FTxB14Ha8qvRUisIjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xpp4MpPrpDTSF1zyIpBkXk8jxuOqcUeidsJmnH9IkRs=; b=ocF1ZroMOxJ6ngWe2Si18T9/HA55V/BBMiy4hpQ1y2gFYWh2bqZn5nCOFmk4BFDv8LmA3gB8o0DNSniC300EpvqzM+K8rMDyXotXqhLCePGg4UVhDgbRynzOHrQkpcu++MZKD3W/QZ2GF04xc65H4bKgtbSoqIjSFS4N80xoRrhj5BHSkWGkp5l3MCRRdbjOK/dlj4E09fOqf+p/7p7vaASyiQ1jd37WFudTUsSMHSD5Gqy0IlJ84foShNN5vWIixAhbv50nckkZKtWBsCO4+iGiHy1j/g5SHdULqK+5eW7HAW4cEqIMKqsjUM/x0E+1Te02Q5saR6sanNbHFyjNFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xpp4MpPrpDTSF1zyIpBkXk8jxuOqcUeidsJmnH9IkRs=; b=diLicSt6OaWUtI7qAu+gV0e2zB5rxtL/SBF/cREzIxe8+UQx6m/d9F/y0V078L+3d6stXmC389ecMQnJrWpMlodXXppQeZ/FSwlEIipjNO4ZpRnmtQvdStgar7IYNNVtxuKnqxGcc9WpVvQjXm6ilFVZOCbbw16IskMDJa3w/oc= Received: from BN9PR03CA0526.namprd03.prod.outlook.com (2603:10b6:408:131::21) by IA1PR12MB7494.namprd12.prod.outlook.com (2603:10b6:208:41a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Mon, 26 Jun 2023 10:49:55 +0000 Received: from BN8NAM11FT025.eop-nam11.prod.protection.outlook.com (2603:10b6:408:131:cafe::bf) by BN9PR03CA0526.outlook.office365.com (2603:10b6:408:131::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.33 via Frontend Transport; Mon, 26 Jun 2023 10:49:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT025.mail.protection.outlook.com (10.13.177.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6500.47 via Frontend Transport; Mon, 26 Jun 2023 10:49:55 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 26 Jun 2023 05:49:54 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Mon, 26 Jun 2023 05:49:50 -0500 From: Vijendar Mukunda To: CC: , , , , , Vijendar Mukunda , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Venkata Prasad Potturu , V sujith kumar Reddy , Ajit Kumar Pandey , open list Subject: [PATCH 6/6] ASoC: amd: acp: fix for invalid dai id handling in acp_get_byte_count() Date: Mon, 26 Jun 2023 16:23:54 +0530 Message-ID: <20230626105356.2580125-6-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230626105356.2580125-1-Vijendar.Mukunda@amd.com> References: <20230626105356.2580125-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT025:EE_|IA1PR12MB7494:EE_ X-MS-Office365-Filtering-Correlation-Id: bf79c706-f7e6-4a22-a107-08db763313da X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C0nkjRLiy2RD5bXLWuAqcIOWfewGLMLQUmcLaoAf8zj2SQWKIj9dTYMen6ZI5FeReHNPWSobBlmHwUoRFSQUfKYFvzMZYu3DgmBh/uYjIrHliIuTGOHFX4BvL70db1qhk14T8CNp7cIwls/bSNaH/jGJdB2NGZj3h89SKf2BULvOvAhHgDUO/y9CjbO5w9IlcwCZ5W4yaBqLhZ8WCnU6MgXg9DQajqeaygtzeOE0O7qfulqIcwpcVvcz6xuwc3NOyAQ9NMZwFs+qTupsFW99qk6xUcZxjBjoSRS/S8Z9Kv8iEWm3DCfbalFqTENgcNyNqAVenz1rdmKH1WuhPadoMeIs3TfuACbiYYkc+iLQ7BeA9aPOHm2Uqfa8Bsuo8/qEekzMqPx/ic/Ypa/Q9zGMFTFMGznVKE47zgnCSCC3CHjFx1pu0uUhlJTbLd2a/YUWudjnhlNtBr5Dfep1M6qH6qV3WSRv+8/k+5ZzwIZRWt/GVJ36ghZCbhpsw/TSaJCRti4Fo+SKBppUzl1z3FcSgpf0wKbaz9n/ridCKkfONeUAGijYkOCyxLp8m5JAhlB4UntFtVnokicA0rqMxSeZoAONMTlvDn3QJg4OpC+S0NXv1Vlv5LihIPNi7ePCEvUs+D0BPnFQPiXcCswSMcqXYOaX5cPBDakIuD0uOUGH809dIHa8NJbIF9UsxBQ5YHIlBHT5n8Ob4Hojq3sw2WTHeXZ3kmzmayeS7wK1gw+gYdNhLLL/H5RdyBggtF7X0DpyL59Qf3QBnM0BFbx4c41X+Q== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(136003)(346002)(39860400002)(451199021)(40470700004)(36840700001)(46966006)(8676002)(70206006)(8936002)(41300700001)(316002)(70586007)(6916009)(4326008)(26005)(1076003)(186003)(336012)(2616005)(54906003)(478600001)(7696005)(40460700003)(82310400005)(2906002)(5660300002)(40480700001)(82740400003)(81166007)(356005)(36756003)(86362001)(83380400001)(36860700001)(47076005)(426003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2023 10:49:55.1249 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf79c706-f7e6-4a22-a107-08db763313da X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT025.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7494 Message-ID-Hash: GIUPJBM23JQAPYU6TBIBSQQKGLH5WEYC X-Message-ID-Hash: GIUPJBM23JQAPYU6TBIBSQQKGLH5WEYC X-MailFrom: Vijendar.Mukunda@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: For invalid dai id, instead of returning -EINVAL return bytes count as zero in acp_get_byte_count() function. Fixes: 623621a9f9e1 ("ASoC: amd: Add common framework to support I2S on ACP SOC") Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/amd.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h index 5f2119f42271..12a176a50fd6 100644 --- a/sound/soc/amd/acp/amd.h +++ b/sound/soc/amd/acp/amd.h @@ -173,7 +173,7 @@ int snd_amd_acp_find_config(struct pci_dev *pci); static inline u64 acp_get_byte_count(struct acp_dev_data *adata, int dai_id, int direction) { - u64 byte_count, low = 0, high = 0; + u64 byte_count = 0, low = 0, high = 0; if (direction == SNDRV_PCM_STREAM_PLAYBACK) { switch (dai_id) { @@ -191,7 +191,7 @@ static inline u64 acp_get_byte_count(struct acp_dev_data *adata, int dai_id, int break; default: dev_err(adata->dev, "Invalid dai id %x\n", dai_id); - return -EINVAL; + goto POINTER_RETURN_BYTES; } } else { switch (dai_id) { @@ -213,12 +213,13 @@ static inline u64 acp_get_byte_count(struct acp_dev_data *adata, int dai_id, int break; default: dev_err(adata->dev, "Invalid dai id %x\n", dai_id); - return -EINVAL; + goto POINTER_RETURN_BYTES; } } /* Get 64 bit value from two 32 bit registers */ byte_count = (high << 32) | low; +POINTER_RETURN_BYTES: return byte_count; }