From patchwork Tue Dec 19 11:24:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Prasad Potturu X-Patchwork-Id: 180878 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1866335dyi; Tue, 19 Dec 2023 03:24:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxzgz15Tj1lPGWY/gsDOo0JxZn8J+enQrt8izG2XI1VUjHA27o4Aks7Rk0zK+CtQY0Iyp1 X-Received: by 2002:a50:8e17:0:b0:553:5648:ea36 with SMTP id 23-20020a508e17000000b005535648ea36mr1733418edw.10.1702985087961; Tue, 19 Dec 2023 03:24:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702985087; cv=pass; d=google.com; s=arc-20160816; b=YO9qyqOwAWt9EfOqqoKBg6WlQzgO6xuUWQgwU35LmpA4Gziy7F5OLpeMjT1OmrNCSa LTwq4JtzHC3Z1Z1ygVWlOZS93tnRdUBQ5njo8Hs8pH+bh5CJEJt9IemmeqETOMicomd+ /otRTXA8019hqXe2r8ucKPZGtQWZ4OnezKyud2+23GeG4oBZGTE2rHSt3tJoVC9yJzXm sZB7kG557O9+smJfLMscP8ViZVimeY/HbHCbn7Ek6MPDjJ3JCVB1iYxGGSe1FMHlxlvQ 9Z7ZEWvGniCJPqmYBHLyOmMNDjow9+2bXnmf6c8F4P56Ag2lZl+14f0SSfBBWJ2vIlRa W5ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=vTPjxlBwYGQHfWczDCu8z7bW/rfGkxhfKxXlcJVH/ls=; fh=1an0VdsksUTgQcfUDwr+iAnWBskOQH6sgu6yRJzHdzM=; b=Lj1pbxa8OIa7PEMv9S4jsm0DdCVKO9IckA/0jM8wl5Y3P7z3opv/T1QIMi6wkblX/K cQLbDh0Ixl7h3DwNYN+qrvbfm8Ld9JCKtKGkPqwkw+zaHXqh0ScPMSxaEOatbNOV9xw/ 6uKf+TbJ7nJci0VIl86e6Wu7jHJCea06cpOya5FNGSD52lIPnrtxDhkE8KwQpkRDn5JO Q5pafZXTBnSWnogHWcYdZ8LMM5Qj+U0tqZvb9eDU/bFDPPtl56naRqkNDNCOJCF0ZYOw L2aMZbqdqFforaJda9UdWvpcf5/jP3UwaRU00ov2JbQAPpnpHT20QzCvjy36jBcZ9R3S 9q0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=P9YAVAtI; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-5072-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5072-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g14-20020a056402320e00b0054d84d8246esi320442eda.443.2023.12.19.03.24.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 03:24:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5072-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=P9YAVAtI; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-5072-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5072-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5D3211F23F20 for ; Tue, 19 Dec 2023 11:24:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A55415AD3; Tue, 19 Dec 2023 11:24:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="P9YAVAtI" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2079.outbound.protection.outlook.com [40.107.95.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72F12168AF; Tue, 19 Dec 2023 11:24:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lq/b0FXAu8AAdJPyY/jehdK3qcH5TNH5Dc9WhJUSM1hHGbme+ZLSHw8I2htC1QqfNehK37fFlO60VjV6HNXHwBC7zodRKcpI9+4Di8MwhCtSB6jqJWJphdph4jTEDm3YVAMnfzU9FjkTr29AIrx4j7Zc6T6XMNJEzde0a3orZ9gq0+61eR1tvLGDhhML9baI7U/+sc0zCw/4SL7sRjDOyXSdd4L6tK3PqgnBLno5abSePgKA2K7RzQeKv9JJzFMtM4T8mlYL24qB0ik+6DXHSSBuXpTfKHwPTuiDaepFfixnG+rmWQYQr7JtgwBpuCA8aZxN2Z67tDx2ynqKGz1fig== 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=vTPjxlBwYGQHfWczDCu8z7bW/rfGkxhfKxXlcJVH/ls=; b=SBzaZtXd6B0oeb+9DA5RJDI4jIvxkNjB751tuEVJvSyDNKuCc37xKdwHwwWdGYpUX89mbHcMIsHX9+54/iqPLsQ9KzoZzlif43UU5c/7b+zGh2IdF14r+VlIDETqWVXcXXOCM/EzXEaXDVbEXQKOWScwOFJ7wfwDREB/0S1IM5hiSrMLjVo8OybPUkaLeEJhKRqBS0rW1+lGRaX9fHot43IvOKUDdiq7Q72WLF7l56iqqE6SCq+0O9dqRClZVjDwbd2fEsXQ/AnNxlYzmaGPLJRkqTiSusONG6C3Bc8VMr0evYCKeHpVWCBn2avnIPVnsP6cHpu6SgQS28LqjAYXUA== 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 (0) 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=vTPjxlBwYGQHfWczDCu8z7bW/rfGkxhfKxXlcJVH/ls=; b=P9YAVAtILtz+CeeAna0HnAMe7MPUmGIe6tmeSfEJ3Iqmd93gZ0j0cIXvlF6nkYCP6lg3Gm/9l/xEcNECKPcZ/irUuCFyk0Tqy8YXsplQxqO9xgHm+oKMAiqoXU/wD599Fn3W32dGtS0TKBAU+di9E/jN7BM5X2Vufw0i6p5hWCQ= Received: from CH5P222CA0018.NAMP222.PROD.OUTLOOK.COM (2603:10b6:610:1ee::29) by SJ0PR12MB5662.namprd12.prod.outlook.com (2603:10b6:a03:429::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37; Tue, 19 Dec 2023 11:24:24 +0000 Received: from DS1PEPF00017095.namprd03.prod.outlook.com (2603:10b6:610:1ee:cafe::d1) by CH5P222CA0018.outlook.office365.com (2603:10b6:610:1ee::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.18 via Frontend Transport; Tue, 19 Dec 2023 11:24:24 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DS1PEPF00017095.mail.protection.outlook.com (10.167.17.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Tue, 19 Dec 2023 11:24:24 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 19 Dec 2023 05:24:23 -0600 Received: from prasad-lnx-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Tue, 19 Dec 2023 05:24:17 -0600 From: Venkata Prasad Potturu To: , CC: , , , , , , "Venkata Prasad Potturu" , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , Iuliana Prodan , Paul Olaru , "V sujith kumar Reddy" , Mastan Katragadda , "moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , "open list" Subject: [PATCH 1/5] ASoC: SOF: amd: Refactor spinlock_irq(&sdev->ipc_lock) sequence in irq_handler Date: Tue, 19 Dec 2023 16:54:09 +0530 Message-ID: <20231219112416.3334928-1-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017095:EE_|SJ0PR12MB5662:EE_ X-MS-Office365-Filtering-Correlation-Id: de258426-a1ba-4646-161f-08dc00850de1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D5m4KdAlVkLahO+EXS+vrYzO82wZ1GRXWsHeLj5AKmNYzd33Rq8876AM0CV3suNFwJMHNTPzZ5EV7yROOR0zXjfM1S8vsOvKyc3D+mFjvK5OV953lV6OjEiR/8djn19Hf53X20ZXt1YOWe9JS0II17OUBO0ljmNz1mGt14UKTfopQcighKLBYDb0vvRRxFbAMcKB3OgLX8+hvQB18YtawGIn1jVxn9MYy7kxvlLYMmTgULZwIYVFmaw4hD4wvLxEVkMo5cGE3YWHr7bUhVFYVTN9TLGlbvhgo0DUladyB/hg14Jmje6Nx7prJXVG3pETYBgod3OT+kCWjtqeAQc3en13p/kEt+8HblQP/o2I7C8q5/XpZoqZusRCn5aafgKIEwfRUkFS7zhfysLY+HNakkMXsto90b1VFUeiBssMlLdAWxxO6pCRlMU9YvaR+6IDL7JqpF/n2GffRenLJTXxa8Y0ZFd17aMOiNHhYsWQg359bNNBMpdx6kdCS7RbHz1ndcMoAIlUD8UCD1wuz5DAczu0xiMtGb7ze7JT+Ei+tJBSIq3r3qWMszzLC4y6ogd2wDVJL7oK+mLxRzf2X7fypPyH6/xVZe4op8PqhY/X1BpLHf6QRf1KQY7oItukhmvPdnrh7mTYm9ADnxSoYdHUZd8uUwQygWqzgN5K213Gg7KxTVT3aWO+1F7Cv/eVdo/VKM6/QpJy4G/z2BI5QutM13z0kD1jfMAzVj+1wFUHf+V3ekq417TSXjlSnP9jUnOeo/evTkK3u4o1pF99xjxksQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(396003)(39860400002)(346002)(376002)(136003)(230922051799003)(82310400011)(64100799003)(186009)(451199024)(1800799012)(40470700004)(36840700001)(46966006)(40480700001)(40460700003)(82740400003)(70206006)(70586007)(356005)(81166007)(86362001)(36756003)(1076003)(36860700001)(336012)(83380400001)(26005)(426003)(2616005)(7696005)(316002)(6666004)(8936002)(54906003)(478600001)(8676002)(7416002)(110136005)(5660300002)(47076005)(4326008)(2906002)(41300700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 11:24:24.2492 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: de258426-a1ba-4646-161f-08dc00850de1 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017095.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5662 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785709291612296751 X-GMAIL-MSGID: 1785709291612296751 Refactor spinlock_irq(&sdev->ipc_lock) sequence in irq_handler to avoid race conditions for acquiring hw_semaphore. Signed-off-by: Venkata Prasad Potturu --- sound/soc/sof/amd/acp-ipc.c | 4 +--- sound/soc/sof/amd/acp.c | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/sof/amd/acp-ipc.c b/sound/soc/sof/amd/acp-ipc.c index fcb54f545fea..2743f07a5e08 100644 --- a/sound/soc/sof/amd/acp-ipc.c +++ b/sound/soc/sof/amd/acp-ipc.c @@ -3,7 +3,7 @@ // This file is provided under a dual BSD/GPLv2 license. When using or // redistributing this file, you may do so under either license. // -// Copyright(c) 2021 Advanced Micro Devices, Inc. +// Copyright(c) 2021, 2023 Advanced Micro Devices, Inc. // // Authors: Balakishore Pati // Ajit Kumar Pandey @@ -188,13 +188,11 @@ irqreturn_t acp_sof_ipc_irq_thread(int irq, void *context) dsp_ack = snd_sof_dsp_read(sdev, ACP_DSP_BAR, ACP_SCRATCH_REG_0 + dsp_ack_write); if (dsp_ack) { - spin_lock_irq(&sdev->ipc_lock); /* handle immediate reply from DSP core */ acp_dsp_ipc_get_reply(sdev); snd_sof_ipc_reply(sdev, 0); /* set the done bit */ acp_dsp_ipc_dsp_done(sdev); - spin_unlock_irq(&sdev->ipc_lock); ipc_irq = true; } diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c index 603ea5fc0d0d..7860724c4d2d 100644 --- a/sound/soc/sof/amd/acp.c +++ b/sound/soc/sof/amd/acp.c @@ -343,11 +343,13 @@ static irqreturn_t acp_irq_thread(int irq, void *context) const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata); unsigned int count = ACP_HW_SEM_RETRY_COUNT; + spin_lock_irq(&sdev->ipc_lock); while (snd_sof_dsp_read(sdev, ACP_DSP_BAR, desc->hw_semaphore_offset)) { /* Wait until acquired HW Semaphore lock or timeout */ count--; if (!count) { dev_err(sdev->dev, "%s: Failed to acquire HW lock\n", __func__); + spin_unlock_irq(&sdev->ipc_lock); return IRQ_NONE; } } @@ -356,6 +358,7 @@ static irqreturn_t acp_irq_thread(int irq, void *context) /* Unlock or Release HW Semaphore */ snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->hw_semaphore_offset, 0x0); + spin_unlock_irq(&sdev->ipc_lock); return IRQ_HANDLED; }; From patchwork Tue Dec 19 11:24:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Prasad Potturu X-Patchwork-Id: 180880 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1866681dyi; Tue, 19 Dec 2023 03:25:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHioljfkB1zX/UIHhBPViT2CNkB7VX3TRofPBJe9AvFs6dC5w8Gp1Jc7fvC6hXV9eZuz2E X-Received: by 2002:ac2:43ad:0:b0:50e:3818:ec41 with SMTP id t13-20020ac243ad000000b0050e3818ec41mr1580948lfl.102.1702985135679; Tue, 19 Dec 2023 03:25:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702985135; cv=pass; d=google.com; s=arc-20160816; b=erNY0CTCiBNN9bX4Q1sOTdE0RPsopgY+H6My7BGDfAHN7C11I242g67B9b+reinly+ k7n831VcoyGg8dh3bZ8n0ZAE5EZKBR6D2Wgrg5iLqITIszX0OeUbXiyvAAkLNQC/teUi LIckfjIYXliFytJncHwzRLJ+pqJerAmUytSDgq3AgeFR3lkTSu4fN1A1/toau/HxSro6 grxZhZqc80hBBdTIPKDsaH4WzyCSH5d2NkSMVqiG4zz5gZugva9dH9+SmiOTWXVjPSsp u4/bqyu8HAe4nurJv+E8gt23zny55DPLF7Gzqyufpgx1xNlcZGe23DoLcAmBqk0IDn5t Useg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=NkSBLAMH4KwT70ANU71wmaX96JtC3dQeksD0O4Czt5Y=; fh=LuQn+9bED1rv7AqBSaxH6lctjTfun0UJjZHDouumMyA=; b=kTOKBfLFKqyj/Y2XlywPVNe0dwdj3CStkca+WWDtbE6Ed5bGBcqtjNOTqnlQlQ77H4 Ng80LCqRJyQsNu1vMJj344QbL32ASuhHOcDegCzQRxdAo/5UXbcZukOtsewWU+tEZhsk 8CFRlX+GDWxKb+fqhFa4MPn6W5I2teq02T8cSXHBfxdc2BdGKoDSnWDsoINE6XwxF9dm 59cVwV8iLyuB2Ii8MYwxfmYz0YqrFCvI7a7q//MrUnLvguvPOAanAejPqjiluPUwNtuQ RdAjfJHTqhj4JjsmoC5s1GdVvaiaBIKeW6dBvpATGlAr5k+nycgfrNMtfwZoPz7CsMe3 U8Rg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=3zticQfB; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-5075-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5075-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cf14-20020a170906b2ce00b00a268753dbb6si19630ejb.555.2023.12.19.03.25.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 03:25:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5075-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=3zticQfB; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-5075-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5075-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1D1771F23F51 for ; Tue, 19 Dec 2023 11:25:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC686182A3; Tue, 19 Dec 2023 11:24:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="3zticQfB" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2089.outbound.protection.outlook.com [40.107.101.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E500168DF; Tue, 19 Dec 2023 11:24:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EthlP+dY1UbFg6/FSQiSlKOWjGictaFnIY0HL1IzjqCvnHRnkPdGrKTg92viCoWiQVdsldsvtE4wDVF2lHjzCNmy+izp552EslKqSAuOLaQd1p9uLenV/zxYAVksrQJEd/g1UcDMB7q8V0T4HF0p/UnYsi3SSecDLEJwYQKzAERsawGdrx4gv9Ot3olp6LWthaxFtcJ44OhLei17Hh7a3pBzJ7029nMGtKFS0zN7jYNVyyh8qulHAhQqgrbA5eVIP070gmTmWANnMK+sWnw1oGvoPaGvmgg5+/fFGOQrjalyrjVUzlPX9J8blqiH01ftz3R1bNtNq64RJQCRS3TzQA== 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=NkSBLAMH4KwT70ANU71wmaX96JtC3dQeksD0O4Czt5Y=; b=cQ3s+GwSjQwooVdsThOXm954/+NePd8tAHwIQUIhtcNgdV9Cq8O+CvBWXG69MAudGpMST4pXLQylap/HlYSy0LXQXflTbnUQJGQxc+sZyQW+++LE1k+ljN30BznKyEkL5a/9hZpMBsPTDH5VFfxFekLFYgLvB8N6EDV0KEIUYaR0lhgep7jXmPQRs850eR8UYUOQ+vj0WMUGDjCJGdeopioujAeZ1c0il2GAJQ4th689k5XOjwH96fhXRv2RqR/ht5dIqCQy43K165/bYQWyNwdChRgGsacRUwHp49yHPoIgxUYPNo8+BGsj64T9WoGzHBjuTz6YEq6suMOUymcuqA== 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 (0) 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=NkSBLAMH4KwT70ANU71wmaX96JtC3dQeksD0O4Czt5Y=; b=3zticQfBjGGhxT/Joi99W4jX1zz24l8VGq/+MjC8CLP4TS39WljMhWjD0p0KbctlOi1S/Qd0tJRcROR/hv89tra/m1e3DxQiuS3q96xnRydsJhHIe3ZUoOHcoiM0yCFBBlwfcPrsrgdybnstoUIMjzPEuQiEDGQ0gjlzn+yxvPA= Received: from CH2PR20CA0023.namprd20.prod.outlook.com (2603:10b6:610:58::33) by SJ2PR12MB8873.namprd12.prod.outlook.com (2603:10b6:a03:53d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 11:24:35 +0000 Received: from CY4PEPF0000EE3E.namprd03.prod.outlook.com (2603:10b6:610:58:cafe::4e) by CH2PR20CA0023.outlook.office365.com (2603:10b6:610:58::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37 via Frontend Transport; Tue, 19 Dec 2023 11:24:34 +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 CY4PEPF0000EE3E.mail.protection.outlook.com (10.167.242.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Tue, 19 Dec 2023 11:24: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.34; Tue, 19 Dec 2023 05:24:29 -0600 Received: from prasad-lnx-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Tue, 19 Dec 2023 05:24:24 -0600 From: Venkata Prasad Potturu To: , CC: , , , , , , "Venkata Prasad Potturu" , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , "moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 2/5] ASoC: SOF: Refactor sof_i2s_tokens reading to update acpbt dai Date: Tue, 19 Dec 2023 16:54:10 +0530 Message-ID: <20231219112416.3334928-2-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231219112416.3334928-1-venkataprasad.potturu@amd.com> References: <20231219112416.3334928-1-venkataprasad.potturu@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE3E:EE_|SJ2PR12MB8873:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c476196-f330-4d45-493a-08dc008513dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GWoK8b/PKFsuthjaftaBcU553q2IGiLLs8K0EybvcOGrMQccHU06A0qn901w4EnXwz4Iuv3cce3lFGK1lajP9KyhB3N33mITArqjmxz9XbtGRiqZBHgNKtXhk3vLLklIAGIEajkibJgej58ewuhB6znNH3HIsCBEB3BlAolT1a+ivGDfxq3Gvje6J+4pAyldLmR/85ZgRMPxvYjooJX3eTEeMp1zxhSHso/cQBEiFCJEJZ5pJX1uNLU27gQX5D6Xwn7h/hinvwAil0SksFROrxFmqS7IQThhpc3wrJFF9CTbPEZr8TsMXFxj5o9FY5yIQRSljG3t4iUhe/09KGogh0qYaqZOC1djfUQ0kdU5XaMeW+eLi+bcK2odko6NUOm/8seqMJmKXAvtkPAee/xbQHan10VIwYnrKhqEjoF66qgLsZhXSsND3+Obn1y0TOjyQyI9HIk/KKRAjCIx8Lgn2nYQao1n124EN9qyBYC42rUrqQnMbVRczkJ38ltFKPmPKa4Nve8j+eb4dfARmeFpjWFWA3YCTH19NIi+O3Iqh2OKeaQMekkNAGK1iY7eqh5H5fyNjgVFBR59nqdHa25QEhVg8xjUgVJs36PdmnLVYYAgyJ6Avr4G77Ki3XJ86UF5G9ItcmR85UBUvl2EeNp+FGk369pe5YYO79l+ojMeYNGBwYIYP55PXUIX+GdpYMIpDf05uN0KKvTeDpTlN+58HlDQyZwbNFUlfogoFx7ymCoTarj0MY1NnHblxCehxd/IwX6ok9H95Gv0WwFxswLM33d0pP8zHEcOKBpX4/pPvV0dP+FwiAAFaotiK7DxF8tL 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:(13230031)(4636009)(376002)(346002)(39860400002)(396003)(136003)(230922051799003)(1800799012)(451199024)(82310400011)(186009)(64100799003)(40470700004)(46966006)(36840700001)(40460700003)(426003)(83380400001)(1076003)(2616005)(26005)(336012)(47076005)(5660300002)(36860700001)(8936002)(8676002)(4326008)(316002)(110136005)(7416002)(2906002)(15650500001)(478600001)(41300700001)(6666004)(7696005)(70586007)(70206006)(54906003)(356005)(81166007)(36756003)(86362001)(40480700001)(82740400003)(70780200001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 11:24:34.2593 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1c476196-f330-4d45-493a-08dc008513dd 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: CY4PEPF0000EE3E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8873 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785709342090621377 X-GMAIL-MSGID: 1785709342090621377 Refactor sof_i2s_tokens reading to update config->acpbt. Signed-off-by: Venkata Prasad Potturu --- sound/soc/sof/ipc3-topology.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/sof/ipc3-topology.c b/sound/soc/sof/ipc3-topology.c index 1d9e1145fa8f..a8832a1c1a24 100644 --- a/sound/soc/sof/ipc3-topology.c +++ b/sound/soc/sof/ipc3-topology.c @@ -1221,6 +1221,7 @@ static int sof_link_acp_bt_load(struct snd_soc_component *scomp, struct snd_sof_ struct snd_soc_tplg_hw_config *hw_config = slink->hw_configs; struct sof_dai_private_data *private = dai->private; u32 size = sizeof(*config); + int ret; /* handle master/slave and inverted clocks */ sof_dai_set_format(hw_config, config); @@ -1229,12 +1230,14 @@ static int sof_link_acp_bt_load(struct snd_soc_component *scomp, struct snd_sof_ memset(&config->acpbt, 0, sizeof(config->acpbt)); config->hdr.size = size; - config->acpbt.fsync_rate = le32_to_cpu(hw_config->fsync_rate); - config->acpbt.tdm_slots = le32_to_cpu(hw_config->tdm_slots); + ret = sof_update_ipc_object(scomp, &config->acpbt, SOF_ACPI2S_TOKENS, slink->tuples, + slink->num_tuples, size, slink->num_hw_configs); + if (ret < 0) + return ret; - dev_info(scomp->dev, "ACP_BT config ACP%d channel %d rate %d\n", + dev_info(scomp->dev, "ACP_BT config ACP%d channel %d rate %d tdm_mode %d\n", config->dai_index, config->acpbt.tdm_slots, - config->acpbt.fsync_rate); + config->acpbt.fsync_rate, config->acpbt.tdm_mode); dai->number_configs = 1; dai->current_config = 0; From patchwork Tue Dec 19 11:24:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Prasad Potturu X-Patchwork-Id: 180879 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1866617dyi; Tue, 19 Dec 2023 03:25:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwzDVfxqONVv+PJwMlouu/pEd5fQ7agNqnfZrgG1MLfouoynaMco9Nox5bgBf15XQg1pME X-Received: by 2002:a50:f60f:0:b0:553:89e5:488 with SMTP id c15-20020a50f60f000000b0055389e50488mr623028edn.13.1702985127959; Tue, 19 Dec 2023 03:25:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702985127; cv=pass; d=google.com; s=arc-20160816; b=H2dayhmNHMDJ7S569WqymG21o70RugIQrgUwvo3nHnhaJ4k0dzPM4Q2XHlTDuprAsN mxLrZY2HgwTzRC0WtOyqBjDCRtHoe/r0hm879Mur+omz4TTXinS1ny1SW3Q5Fltfnqng fHWXFnL83YVSTqBrTZIzgG4K5J9S/5c6wH89CZLuOluqr/Qz37t55XzsfxLX+NHCnK8r bKN9cHpyygUt5DPRNvDqc6WdhGTeTDLFfIjoztu6PBGpklg3yiBiF5kUYDYZ8M9W1A9h 0w6Mt+vgVOyPlQjL8o9G4TxPMU7azz0Wn6WpANUHdtbkMzBg7pSEqYP7ENAEdOoIAFPP bZGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xnibPXwvtxwiKdsBzcCnwTMu9XwLkmFDV5NF9dsKwvk=; fh=LuQn+9bED1rv7AqBSaxH6lctjTfun0UJjZHDouumMyA=; b=srVf7U/gJeZY4+mKDhtur3q0uOJ+DA60hrkIg8zsWDQa9BzQwSuHrhnxSHG/aPCUrG 7/08ked0zKSLUKtFhxmxTwC0Y3cD7NqKzb+gx+mAhyo/MS9Oy3/Ww86DpWZZLnWexhuT b6870aKBl8Sb1QzThkNf+CctHQuiZ5CHdDQuWSuQOpeEkw08unEvHOU/B/k5AHxPDjmm k0ev4VUYu1usfDD4CabSrx/mf+HsZRvzmNaadLCC3K16iceQ8Yxutq4VNdpuyam2k3JN bKzVeeD34+0fTNF9F3LABJGcJB7ZZ9Ks6wxhGwJuWA1qZpguz5o4vNfSwkMQotn1cKEy Z0RA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=IYoES3OG; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-5074-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5074-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g14-20020a056402320e00b0054d84d8246esi320442eda.443.2023.12.19.03.25.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 03:25:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5074-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=IYoES3OG; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-5074-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5074-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 642A61F23C68 for ; Tue, 19 Dec 2023 11:25:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B35051799A; Tue, 19 Dec 2023 11:24:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="IYoES3OG" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2045.outbound.protection.outlook.com [40.107.220.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85814171AB; Tue, 19 Dec 2023 11:24:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H0Q6q0pyCkwoefr/krLxH6wiSgyiqdISvFooAvUCC3C1vhXZtZFFXGl/UG/wyUBQosf/dkY02QcKoUBVO8la57vaUJ2SxNV0VKeI/kYgHnJTiY8uwGFo0USlgkk3oBAGWBK3Mhf+xmTWh78HL0oidJ/Wy9CGBIekufsiz7y/i2jy7lSIy5tKsFwjz9R2dDxx//1vZ7Qfa0Mmk7btUtwh6YggmmdWxjrThA290qqmNs3uUxZewz/NHuoyoctOvLucI5j8t30exr0Ttf3IRn91nat40X9LPGYrRRG/2cByufACLUV1EzDiWEvO8ENYASq84krRcEhtrRXUPsDzSaQJgQ== 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=xnibPXwvtxwiKdsBzcCnwTMu9XwLkmFDV5NF9dsKwvk=; b=EMD3GBaHPatPGaI1ZnAmNpTEvzpSqRKxkhAJAIwkdg4p3KJbAUwuybpizioJwb4DhocIGdBbXwFD40QxKsv6/uDwu5RHoiU7eIr8AG0IjXDlAYHl1aIKu9o8k83BWO31UahtTlSF395/Y7BPauTDEPD6DDbphDG6JWi4F7qJvmQlRsdDa7rqL1o+dmbtGhjx4/cvCxzKEHsgX8mP2eM/xVCFuZElQBKoSMrLgChbKni5AR91K634sjvUm95yxuO3PymJpdNP2+2GaF//cPP0M5CI8nDV6v7QnklBqsbQ50UTlTx4QET8imxSt8Q2heQHAhRhyDevZ7CZQ4ikLtEAbA== 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 (0) 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=xnibPXwvtxwiKdsBzcCnwTMu9XwLkmFDV5NF9dsKwvk=; b=IYoES3OG9KJUUY0GNdsFc3WrPOLgaO1Q0QGDUNUzM1Edz6keRL3SB18A7g+MulnNv0G3qSNNnxZTQCEta87iAR6Kskn5LMAhHxfNYL9/ppZM2DFWsechkrAEJLB6kqUJ+2WVLg/cAgNxNefGx4aaxjyv47dL6BxjsftQslyF+/I= Received: from DM6PR05CA0050.namprd05.prod.outlook.com (2603:10b6:5:335::19) by CH3PR12MB7620.namprd12.prod.outlook.com (2603:10b6:610:150::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 11:24:35 +0000 Received: from DS1PEPF00017094.namprd03.prod.outlook.com (2603:10b6:5:335:cafe::48) by DM6PR05CA0050.outlook.office365.com (2603:10b6:5:335::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.17 via Frontend Transport; Tue, 19 Dec 2023 11:24: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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DS1PEPF00017094.mail.protection.outlook.com (10.167.17.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Tue, 19 Dec 2023 11:24:35 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 19 Dec 2023 05:24:35 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 19 Dec 2023 05:24:34 -0600 Received: from prasad-lnx-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Tue, 19 Dec 2023 05:24:29 -0600 From: Venkata Prasad Potturu To: , CC: , , , , , , "Venkata Prasad Potturu" , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , "moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 3/5] ASoC: SOF: Add i2s bt dai configuration support for AMD platforms Date: Tue, 19 Dec 2023 16:54:11 +0530 Message-ID: <20231219112416.3334928-3-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231219112416.3334928-1-venkataprasad.potturu@amd.com> References: <20231219112416.3334928-1-venkataprasad.potturu@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017094:EE_|CH3PR12MB7620:EE_ X-MS-Office365-Filtering-Correlation-Id: aa219738-d517-4f99-d2d4-08dc008514ac X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FUXW67hUh4RBdoZH8nIv66IgWV4YAY/9wTjbLZC3j3FgaKUXsodiMQbgYKpQT9tiM0Ix04F+gIoQSxSNsGp8ITUI2nOxQhKPrMOiN5l8y/dfCDD14SZCrq1lcsc4D4KMIfwZ2m+BOLvPpvJhmijc11F2923H1n9Ow0+YwCxYf7Jau3YyHgfbz74QBaIdIGuMlGmVglRikmenoRXs/CicSWMVWEJZtZHLGYq3nksRC09Pp6cI9SnO9onRoRUVlIfiLBa0uqvD/Uh8k15LFTQagM7fXQ7QIpuhOWQTepQ0+lj4n9z+YFLH4cBAHkDvpC60lYaEUIlyg/+sdU1+rbf0oREMXxd/knQMAxZFu0D12B4GBMlHiP76jYqLs+IlPMWjrnYdqezU2n037e1fCOzcBs0PeTP+seUROua13b6vd7vsI2ng+pfcbqmkqrdGJgodW+w3+usU7NawDhzd2Kjlup2qoni0NI79Y1gGspuNVkOgZh4BesRYcaS6Rg0cljaQ6B1eX9k4zWVrrZfh0+KENFf/KlHWqnPaTrdlIq52bdVd/GJqIbTJNI3RvEtxDFt6zwEINVw0i3jAeNRWRiOmtErZ5AsqX7xGZ7Zo00InQaHjMNMpHEm4a9DAhx9g/LhfU8vweWnQB/MIK2REs0tOmK7w0F79RqtjDXVIbTV3Z1nOsH50QVEhG3zecGz3qxN2hw80Kav0i9kEkJkWp/rc7guj/VscSVZ2xmnwD5gBexFRCHXpP4fgRJ3YQgxszeAwrDXr3LyBn8+lkn2/MC1X7g== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(136003)(376002)(39860400002)(346002)(396003)(230922051799003)(186009)(82310400011)(64100799003)(451199024)(1800799012)(40470700004)(36840700001)(46966006)(40480700001)(70586007)(70206006)(356005)(81166007)(82740400003)(36756003)(86362001)(36860700001)(1076003)(478600001)(426003)(336012)(26005)(2616005)(7696005)(47076005)(4326008)(316002)(2906002)(7416002)(110136005)(8676002)(8936002)(54906003)(40460700003)(6666004)(4744005)(5660300002)(41300700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 11:24:35.6507 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aa219738-d517-4f99-d2d4-08dc008514ac 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017094.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7620 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785709332977631258 X-GMAIL-MSGID: 1785709332977631258 Add support for i2s bt dai configuration from topology. Signed-off-by: Venkata Prasad Potturu --- sound/soc/sof/topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index e3e7fbe40fa6..66b271ca6910 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -1956,6 +1956,7 @@ static int sof_link_load(struct snd_soc_component *scomp, int index, struct snd_ token_id = SOF_ACPDMIC_TOKENS; num_tuples += token_list[SOF_ACPDMIC_TOKENS].count; break; + case SOF_DAI_AMD_BT: case SOF_DAI_AMD_SP: case SOF_DAI_AMD_HS: case SOF_DAI_AMD_SP_VIRTUAL: From patchwork Tue Dec 19 11:24:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Prasad Potturu X-Patchwork-Id: 180881 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1866821dyi; Tue, 19 Dec 2023 03:25:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0Eczy1ax4fBGbpCY2LzAdfDve7uJq1TY+vjaBiz9C/qm2TFTn7BXUc+zGU3tOBJVAXalQ X-Received: by 2002:a17:906:2259:b0:a23:5239:bcb3 with SMTP id 25-20020a170906225900b00a235239bcb3mr1987829ejr.147.1702985152628; Tue, 19 Dec 2023 03:25:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702985152; cv=pass; d=google.com; s=arc-20160816; b=YrFbgh7fwcHeCqFHiIgKN7AYhvhk7UVEDr85UWV+odBcL8qFOhiLKUXtZPm77DYv3B ScmQcvJhel8a1ZYK3mj4hu7AhjnyG/G4w2xyRHRARImhMgG2z1YS5uQW1k7zWfCWaXuX dj8Gkkd1a8PvRcDEkVXQrosI3cos6zEnCvhHPjEjXXm8nN3u/7fDPzd5V8+EY2QuoE4s pQJ2HA2zwk6bJCj0iw4BpFMAPO+veV+5BFxf1Xt9W/MZCfCeukjvx98vdfMSMos64vGt UGi2tMDe+g8FsVRtG5Cf03FtCwaWXcPcKX8c97yX/TDO+3MgfqjYcNupqzOq4je2P0o/ LirQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=C2FbWCdmt5+iDcoEXvI56ETEQOMnzw8gw1R8//Oy1Ik=; fh=LuQn+9bED1rv7AqBSaxH6lctjTfun0UJjZHDouumMyA=; b=z6RTAEnG7rWsMw/1ZRREZ0OWmCXdkuLe/0NWJhCchAA6nKq6KiXQZdZOAA9Vznxvoz oKyeKglDyKXal3wMn3DSLnsfwj6IOJW495j7CoI5doPBe6oHRR2tT9pxSxWB+E8s0D0M h8cz1HfPmfm5YLWFLxUWe4QejX1GVPWYzzK4SDyDnjMOVhu9Aown5978LldYMkYwpMZn 62WI7NvyiwLTGinovkdQLZ0YK4IedDKv7+F+IK3OoqyLZNI+wDn+N0MtxxYF1KhpIgXZ GCfM+as0Lpw05TC9Z2SsxP1xxeupmmgqaVK9jVwTyeaW2fvD5JjIzWDajLmveh0r9IdY AL9w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=eAb7MjKy; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-5076-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5076-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h18-20020a1709062dd200b00a23b441e376si449767eji.405.2023.12.19.03.25.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 03:25:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5076-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=eAb7MjKy; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-5076-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5076-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 158FF1F23FCF for ; Tue, 19 Dec 2023 11:25:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 347371864E; Tue, 19 Dec 2023 11:24:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="eAb7MjKy" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2074.outbound.protection.outlook.com [40.107.93.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AFF617752; Tue, 19 Dec 2023 11:24:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MdvAQ2s2hvRlc9CDc/VX1pCCQVE7il+cIruEdUNyphq/ZeGVHgDdeBBzSfWzN6elCyt1v/0s57iqKre9UsAIc8qicURI/7YdTuGWAcicuvwUu2qWHmqWR1VookQOnGdtHGEmp8ndGAfaZSZJ0wGiTnKASouJPLLAJuOK8xdjWMsltDG70ndV4pXayzWGjLjF2p+qgTZIqZS5qCm3VbbDhL9HqD+nXmMYk4eV3DXfPe7ztjz1TMmkzO/Mqrj3L8pbhhDx5BfG+38CPE+okMQ0/Jwn3OXAtVHJd+TocLsQTErQZvaK6wtrhA4mujF4K/KzoW4gtHyBUwqNUgQ4r2nt0A== 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=C2FbWCdmt5+iDcoEXvI56ETEQOMnzw8gw1R8//Oy1Ik=; b=kWZQbzXKIbtpScvhyIdZaxds0skUWa/n621ZyIV4NpDKlrXI+MSdc5i5ZthU0RAXzUEZw/KpMxk82noZtO60WE0o09hAfwErgbWu5RUQqSiynh28xOFlCeldkvyQ2BH6HRSC0hx26s38Nw4b4kfwerSYrO1ycOGWDMdWIQ+HGat9oGj5n0mVd4FWFMkFewD0imOIWKTnNhbuubBdZdLrHj7kR8how8F9MfMwcG8pxOmRvNjQxt16Ldjunu1n3QLfPUn92S266z1XjapDEprVGK3kjrN83r4FV9kB6303ri/bP3YZTqIjHcW+EMx7Em4/DqPYrSJM4/fZ9c7GtpF+uQ== 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 (0) 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=C2FbWCdmt5+iDcoEXvI56ETEQOMnzw8gw1R8//Oy1Ik=; b=eAb7MjKyNBu0tEd6w9HoSteak863DpoJisjuVEGVOUI+Z99kzuA1+aTtsZR+Vk0w3KOd+UL+eyNUA7w9a09qiKAqAZau3v49Jb6x7xE5ceu3NxBD8YQ1xE0vxjAU7EqcFRO+jz+bQHz2BkM8svRYHYv7IN7wi7Nho41UUK7/usw= Received: from DM6PR02CA0075.namprd02.prod.outlook.com (2603:10b6:5:1f4::16) by MN2PR12MB4503.namprd12.prod.outlook.com (2603:10b6:208:264::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.18; Tue, 19 Dec 2023 11:24:41 +0000 Received: from DS1PEPF0001708E.namprd03.prod.outlook.com (2603:10b6:5:1f4:cafe::cb) by DM6PR02CA0075.outlook.office365.com (2603:10b6:5:1f4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38 via Frontend Transport; Tue, 19 Dec 2023 11:24:41 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DS1PEPF0001708E.mail.protection.outlook.com (10.167.17.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Tue, 19 Dec 2023 11:24:41 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 19 Dec 2023 05:24:40 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 19 Dec 2023 05:24:40 -0600 Received: from prasad-lnx-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Tue, 19 Dec 2023 05:24:35 -0600 From: Venkata Prasad Potturu To: , CC: , , , , , , "Venkata Prasad Potturu" , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , "moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 4/5] ASoC: SOF: Rename amd_bt sof_dai_type Date: Tue, 19 Dec 2023 16:54:12 +0530 Message-ID: <20231219112416.3334928-4-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231219112416.3334928-1-venkataprasad.potturu@amd.com> References: <20231219112416.3334928-1-venkataprasad.potturu@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001708E:EE_|MN2PR12MB4503:EE_ X-MS-Office365-Filtering-Correlation-Id: 553ed143-afb6-4def-ff2f-08dc0085180e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y9jOzOqI+CxfscJG7Qa0E4r9QlZhxi9yidSKx4Lrzs6YQH7RQiIoIFdmdUHH8efmG4Qmh+dtEYyOnQ8V3qV16qdcrOI0WnGb5wwb2i2mZ9sNruL3qIffIaW3fWbo8lNhoTT+eA75YHiKYLJMOCJU4lEhUGL7uV/AMyxtQGBeiD2VGUqAwsVbWNeLjiKcZBhqG4kUSK8vVcooAyMOh9NU9vvTKgnDefNUREwTmYMeq2mhnv9N7Wfg8snNFrosOyLbSE8k1yp+S3MoULV9UitdanbMUv054ViNkVjt79d5PR2r9fSbnXAitfphvonyPuHFgCPO6cxUco9Mh6d/yoQ/PvpQuZKfnREu2N9lkfXEXOOO0A51Dh2FVYvvuQIpqwNZ3zD+s8GjclGUwvktT3i8s7QjamchQvvCptiyNeeAPNEVx3fm8XcdAR1kDEbPIeYnZe4dR5A6c30lZH1a5tlHY5B/mFKw8+vQnmITL/mwtInENATKz3i3iCtBQqh9GHFPWnwvHPmw9bn/3RBf7bWdfeTh4ts+j7xhyOxERdmH+pCVHkAxo7xN6AFnkyubTLGqEzYPTb2dPdrBxLFhbmfANeKgtddVzC0lXbOkXXqCwlqivYLyWmNxKYWSanIwdJ5yc2deH1JDpZIfLW4sxkJfyFLIl3dCWGhAgeczD9Un8Po39UdbCTwTf+l+ISkVwM3tkR2gzSUaMx0P1c1nFHE2pjRkyL3haKFMDPusdjPgRUQvIj46+CSw+8r411yHyKs22/nVfUd28HX1Fiqsoijitg== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(136003)(346002)(39860400002)(376002)(396003)(230922051799003)(1800799012)(451199024)(82310400011)(64100799003)(186009)(46966006)(40470700004)(36840700001)(4326008)(8936002)(8676002)(5660300002)(4744005)(2906002)(7416002)(6666004)(7696005)(478600001)(110136005)(70586007)(70206006)(54906003)(316002)(41300700001)(356005)(36860700001)(40480700001)(47076005)(86362001)(36756003)(81166007)(82740400003)(40460700003)(426003)(336012)(26005)(1076003)(2616005)(83380400001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 11:24:41.3272 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 553ed143-afb6-4def-ff2f-08dc0085180e 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001708E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4503 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785709359374330154 X-GMAIL-MSGID: 1785709359374330154 Rename amd_bt sof_dai_type from ACP to ACP_BT. Signed-off-by: Venkata Prasad Potturu --- sound/soc/sof/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index 66b271ca6910..617a225fff24 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -289,7 +289,7 @@ static const struct sof_dai_types sof_dais[] = { {"ALH", SOF_DAI_INTEL_ALH}, {"SAI", SOF_DAI_IMX_SAI}, {"ESAI", SOF_DAI_IMX_ESAI}, - {"ACP", SOF_DAI_AMD_BT}, + {"ACPBT", SOF_DAI_AMD_BT}, {"ACPSP", SOF_DAI_AMD_SP}, {"ACPDMIC", SOF_DAI_AMD_DMIC}, {"ACPHS", SOF_DAI_AMD_HS}, From patchwork Tue Dec 19 11:24:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Prasad Potturu X-Patchwork-Id: 180882 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1866914dyi; Tue, 19 Dec 2023 03:26:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUgLX5wT80c+9dXeYEnWehibdWhazX8JddqvLG8h9S2eyHEEfIrFjqpshJBgyVZy1eQnlM X-Received: by 2002:a05:6402:2227:b0:54b:d16:4bf7 with SMTP id cr7-20020a056402222700b0054b0d164bf7mr4960971edb.40.1702985169445; Tue, 19 Dec 2023 03:26:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702985169; cv=pass; d=google.com; s=arc-20160816; b=fDRhU/8Q5vlcz2BQrZMp5AqpWtTc6bczWh6sGmN2E/WKuykndLWoLEQKSl12R2FIno VWwsEAxoIeZEU4Xo2M5mcPEzKclTjIjCylT2Q2StMqZquKuk0Ec+acGXN1P82veKbZ+t vtTR42MEy+lGHROyESOcAyvIUWgL4PjQi6Fj4VlRzTC+bFiiAuGC5Ge5Yl3vlHy2vxWd 6HNxuza9uCvOPZS6IbMQkr6kkQ84tSl9w6MViwS0gcY25JnsYK1CXLZYIUlH+qfqhczX IBIU5sgDxNe+zvH5rs5nfPt1rNL5wjtjy84p8UIFS2iA4PSEI9pXtNS2t/4AVMmtYZZx hLSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=pzX83JgePZ9kiLGXxJ8ZzTJZTphemMdcgbdFXqAf8/8=; fh=iAeaGYCKI0jlRM+ThTiavkzIjYs38lMqaeLgb5BPjdc=; b=vSlp6yTMjxCYh1PaWVmPxt+Q4mdt0Dl14TS8JsxGeGNd8qWlH757bepnzN+NM5ZF9W qMfOsedzVnP2cFbT/8/GQywN4gWTIEsGQ4LeLUp9qehzgFvfljyfEs1Szdh6XwAk7McO r0DEMUcN46Y5iBKuxmKuCqBt1KmoS7Fz0LsUMawY5WXA5dHsTbyvo44xFeYLOjet1P1i XPHABo4HVuFtUTqiycsyR4kM3qGLXwYe3VUxCUzJgjaP9aDfO0ZdMWUhdI6eJEuh42Wn bJ4NvIJ669EW7pu15aqCH5U8akQ6u7id82wbxYgUntfqfrUKLpDf+XJjWxhrNVZw8zO/ YaHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=f++hItl2; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-5077-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5077-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a9-20020a509e89000000b005521e84c62esi6038369edf.153.2023.12.19.03.26.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 03:26:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5077-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=f++hItl2; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-5077-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5077-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E11CC1F22810 for ; Tue, 19 Dec 2023 11:26:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0F48182DC; Tue, 19 Dec 2023 11:25:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="f++hItl2" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2071.outbound.protection.outlook.com [40.107.237.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB79718E18; Tue, 19 Dec 2023 11:25:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lg8q6tOKUtB5BNl6sBapQzcQ/S4TLYDl8YMOefdBbigDJ32XrOHxiMqqqxU3jEgxaUBYXH6qQewjCeW9ucXNsvZ+Itba2hvOiut4J24jqmOiJlr8AFgnFjcLabS/zybd67f9Ly1TwN6mGsPE2SReDM2IuWgT1Mfbng9sG3IqmcIKIOINDS6qmoXZk2T/Gpgtl0O5BKqIqS+GrpY3xsOHQkzH562mjowa4HGMlxVGtgdxj2CeNhjrI3uSjxzC6/dxMz4nqoparDXKWzv4mJz+zj0NhQdPakXJ1uyATn9/8DlI/BWwWGMg5uM9xM5fmUYzoDscYyoF60AijCShgla57w== 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=pzX83JgePZ9kiLGXxJ8ZzTJZTphemMdcgbdFXqAf8/8=; b=Doii/DkUvdIHCdnP8cDOF04Gzbrwd8JPVG/O5cfEf2UUVU5qNRsGMkZulIMJ+ZDwQ31ar765+/YqUkRI+nzDMfv9TidQ2Nsu/yIgnmXN/owuuvlYhAqol1ofwxsyHm5pOY2KH/g9Jz6JqYvbO/SybJQJrUvIERFynllNoTlCu3YSPJRyAuW0PzFZ7QlSp+C1DyMbdKdczz/N1q9JBHRHz7ufUHcKsdgU/LdM70ln8A6aiDITEaX4EkO/emUh3UIPWTjarkfzpwXwEsrhQu3TWyLGrtbIenl4lO7Efh+tr/+1/dJ7DoRAWMa3nM/h+htMLwKvcqkU1xIJi6jG7oo9vA== 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 (0) 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=pzX83JgePZ9kiLGXxJ8ZzTJZTphemMdcgbdFXqAf8/8=; b=f++hItl2MU11qp+ZgiBAh0A1nuraY1RSZAuHFf9GJFfnNNoJES6n6VsDLbNi+M9w0n/0J0Y9esGOfNrzr0G62VH8MK6TbX74EJMQYYb8vc9quEsq2CCoBt25IuIPQR/5KrZYtHmGdxqJ5MJtw8fBGxpCSWBh/fAW86Iy9zVNxYE= Received: from CY5PR17CA0034.namprd17.prod.outlook.com (2603:10b6:930:12::19) by MN2PR12MB4486.namprd12.prod.outlook.com (2603:10b6:208:263::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 11:25:00 +0000 Received: from CY4PEPF0000EE3A.namprd03.prod.outlook.com (2603:10b6:930:12:cafe::2e) by CY5PR17CA0034.outlook.office365.com (2603:10b6:930:12::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.39 via Frontend Transport; Tue, 19 Dec 2023 11:24:59 +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 CY4PEPF0000EE3A.mail.protection.outlook.com (10.167.242.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7113.14 via Frontend Transport; Tue, 19 Dec 2023 11:24:52 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) 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.34; Tue, 19 Dec 2023 05:24:48 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 19 Dec 2023 05:24:48 -0600 Received: from prasad-lnx-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Tue, 19 Dec 2023 05:24:43 -0600 From: Venkata Prasad Potturu To: , CC: , , , , , , "Venkata Prasad Potturu" , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , Mastan Katragadda , V sujith kumar Reddy , "moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , "open list" Subject: [PATCH 5/5] ASoC: SOF: amd: Add acp-psp mailbox interface for iram-dram fence register modification Date: Tue, 19 Dec 2023 16:54:13 +0530 Message-ID: <20231219112416.3334928-5-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231219112416.3334928-1-venkataprasad.potturu@amd.com> References: <20231219112416.3334928-1-venkataprasad.potturu@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE3A:EE_|MN2PR12MB4486:EE_ X-MS-Office365-Filtering-Correlation-Id: a841392c-3d98-438d-9328-08dc00852315 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AKoNwYm6YA6IkPG5jd0gL9uF9yO4PnGx2/kMPIJNyJbNttZ34mrEzua8zifx/xqRyeipI1JQ9JYnWCzts3mnPFFkQRsbuMzfiEnxZr9UIUosj/O+9OzeSJO57EZ0ZhGYZf0RulQx2gzKVRzy4d9mnsrte09IsihGZtHk+Exp90HRKjxgXUDiLfHjHBwAdqrWRk66iVHJlv1RTHNdLz12JKMT+s6S2UVZhjGudrfHIaM9M8XF3MZFRgz8wGisJLu3YnbH2lIZZXWh9jGf8e0Z24HrsuowASv+CTiaEf1H/wmwmlPNW3/YohN8flKOSiH7x/B76EIEzLZMoN0Apa0QhPu+h2MWovZfU3vXkiEzvd5Gx28tweKD2gdU6ByNijEirAzzNOAdq0nE4o5hVOVXHAQMXizLTF7q8idZYtPv7wUZBdTSaRcfwl7qsgoYixwHLf66ThXWcGScY48jA/MgP8STVNrDPFtWLHUcN9ztAg7baACndBUXqwSZuvLb5fS4G2EZhH1Y0pLoWzVITkNe8XsCDwCh/3guttFWrd3hHHJ82Bey12QjFEmUuyVMvWZz9sGG/ew7dPOvNtMcVw32y3vZ4gr1AL3LlJYQ09ESgS8nwBrbMNbkouHlzJteEQAA86yJVdlSupBY9Z+irZZB+4EO2v0IVtIxUuVCDWbOoaIrfu5lYh/JlWAEpHM1lw1e300oPNhXwos3JZCPZUbCl7bUXAWKqKGRqaZVXArUoR0Jjzz/m2/PSIzzQcOoZbQ0xfjV66cwv7RHcY+HDvjwSQ== 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:(13230031)(4636009)(396003)(346002)(376002)(39860400002)(136003)(230922051799003)(451199024)(1800799012)(64100799003)(82310400011)(186009)(36840700001)(40470700004)(46966006)(40460700003)(336012)(426003)(83380400001)(47076005)(1076003)(478600001)(26005)(2616005)(36860700001)(41300700001)(15650500001)(8676002)(7416002)(4326008)(2906002)(70206006)(316002)(8936002)(7696005)(54906003)(5660300002)(6666004)(70586007)(36756003)(86362001)(81166007)(110136005)(356005)(82740400003)(40480700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 11:24:52.7940 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a841392c-3d98-438d-9328-08dc00852315 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: CY4PEPF0000EE3A.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4486 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785709377005612016 X-GMAIL-MSGID: 1785709377005612016 Add acp-psp mailbox communication interface for iram-dram size modification to notify psp. Signed-off-by: Venkata Prasad Potturu --- sound/soc/sof/amd/acp.c | 11 +++++++++++ sound/soc/sof/amd/acp.h | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c index 7860724c4d2d..32a741fcb84f 100644 --- a/sound/soc/sof/amd/acp.c +++ b/sound/soc/sof/amd/acp.c @@ -278,6 +278,17 @@ int configure_and_run_sha_dma(struct acp_dev_data *adata, void *image_addr, return ret; } + /* psp_send_cmd only required for vangogh platform (rev - 5) */ + if (desc->rev == 5) { + /* Modify IRAM and DRAM size */ + ret = psp_send_cmd(adata, MBOX_ACP_IRAM_DRAM_FENCE_COMMAND | IRAM_DRAM_FENCE_2); + if (ret) + return ret; + ret = psp_send_cmd(adata, MBOX_ACP_IRAM_DRAM_FENCE_COMMAND | MBOX_ISREADY_FLAG); + if (ret) + return ret; + } + ret = snd_sof_dsp_read_poll_timeout(sdev, ACP_DSP_BAR, ACP_SHA_DSP_FW_QUALIFIER, fw_qualifier, fw_qualifier & DSP_FW_RUN_ENABLE, ACP_REG_POLL_INTERVAL, ACP_DMA_COMPLETE_TIMEOUT_US); diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h index c536cfde0e44..c645aee216fd 100644 --- a/sound/soc/sof/amd/acp.h +++ b/sound/soc/sof/amd/acp.h @@ -74,9 +74,14 @@ #define MP0_C2PMSG_114_REG 0x3810AC8 #define MP0_C2PMSG_73_REG 0x3810A24 #define MBOX_ACP_SHA_DMA_COMMAND 0x70000 +#define MBOX_ACP_IRAM_DRAM_FENCE_COMMAND 0x80000 #define MBOX_DELAY_US 1000 #define MBOX_READY_MASK 0x80000000 #define MBOX_STATUS_MASK 0xFFFF +#define MBOX_ISREADY_FLAG 0x40000000 +#define IRAM_DRAM_FENCE_0 0X0 +#define IRAM_DRAM_FENCE_1 0X01 +#define IRAM_DRAM_FENCE_2 0X02 #define BOX_SIZE_512 0x200 #define BOX_SIZE_1024 0x400