From patchwork Fri Nov 10 12:52:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Saba Kareem, Syed" X-Patchwork-Id: 163947 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp1336256vqs; Fri, 10 Nov 2023 11:29:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IFy0QFthKkH9qJIMLEJgFeP+mhEDJ7oUN9BZH+WpxXL1ZAgafXO/MpGWSzZahpR1Aa3tSt+ X-Received: by 2002:a05:6a00:1d0b:b0:6c2:e10:42e3 with SMTP id a11-20020a056a001d0b00b006c20e1042e3mr104297pfx.8.1699644576438; Fri, 10 Nov 2023 11:29:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699644576; cv=pass; d=google.com; s=arc-20160816; b=yDNxr3zThAUannzffsdbfAfARc1tfTkq26eoRVfN/eaqLz+mrxwkr8sIBTpq18ScU8 Qli3RM1FpCAPetqAngQzEnkBMEPUD97/vpwPkviZMfHomHRXzXsqwt7haQBiRvqmRn8v jbKJCNb6hIzGi2oqfi+CLIKsZcrdD9QprDmx5H5Ex9m5sKWPwqr9of1xxsTqz51VvV4j BttYHgQkgMNZ9NXJ2E3ey7iJJGD2eqGGY4FZ5dUzIdp+vWjYjFc+SMrwMjKaGX3kwgMv eZswC3H2PIqj/+BbholUa6DJE8TN/m09JnVg3Z82uuZ7NTV3h3Nk8XUn7HQzfsE2qSWb T0rw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xhbDhl9fGrAbJROG1/ANZa8jolGGLRUlU7HWkkoS6xo=; fh=+Rfinz88573DYGe5Zf2dy3PI0J9sId/MqjpJ6Tzr0sg=; b=eMSX2YA/zdRZ6HGVRgT7OBr1OT4xsYgR40ixW7chchc45itmbnTuYy4iXbHbJVSmhV 1Y/ehx3CzF2azFj7UlLRH15zjYrli0h5o0UK0xReB9RCYeHNmNDZ6F1cBLakFp4AJAvS 6V2yoLitzX/GJZI8olg8Px8cLzZUQfiQg1+o0YGPo4qTn+FwX9wccO/FgmC5jqD6tCUf RcM4fsVER+bH3nhzvXk61ODHGGECCYy90/+i83FBkzzA8DdlG/8ubNZOZq8qNWT34sDW oxphMMhJFNZAF6rELdHW26dul8uPoiZ/ESYFFH1njgEY6iPbnjdZpqxn9qYZRWZxjImq Tyxw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=aQszyRtS; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id bw14-20020a056a02048e00b005b106cd44d1si71745pgb.486.2023.11.10.11.29.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 11:29:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=aQszyRtS; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1F8A382CE43C; Fri, 10 Nov 2023 11:29:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346330AbjKJT2e (ORCPT + 29 others); Fri, 10 Nov 2023 14:28:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236010AbjKJT2Q (ORCPT ); Fri, 10 Nov 2023 14:28:16 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2063.outbound.protection.outlook.com [40.107.93.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EBFE35782 for ; Fri, 10 Nov 2023 04:52:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=drjv/ZclZKRZIiPAkIbi8+dIU4lbnyWDsS0SPwRbrc9q7mqQ0puHCfbE0XOisBI6ppEhxXPifu3+vT0GzZZGfRD149nor2tpcKyopmtqQNO4HUerMyRpr+ovJ9NJBXRJiiHudvEDvy64T4MEcbgkZWthWF3vLkp1ElU9G0Hjp1dBzT0aIcTlmdWSD7J/vqldhPgSeKKq3YXKHrbF6lOIGuS6vpfjUNskxH1kDXYMpzqr0uhDTI4JJh9AFcWN8Xbb2kGxK/3Px7PNXAjDBZGIVx4jWbYioFFXALs/1ZJaaZYcaFotq/6cd8IY25XYyDnVB7u2SMPBB+B47D0CKHLBsA== 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=xhbDhl9fGrAbJROG1/ANZa8jolGGLRUlU7HWkkoS6xo=; b=DwKIwJNIo505x+zYhG4KkcptVQZGbCj22MqM6sR2mNEt+TdZFM6pIgPAKSyGXOcfY7cBdeLsevISPhUiWPDLTGXuFCljOTW8V5GCibyDJ3zbmy8fE5vK45CVfUnURbQYgM80aKlrwGPb9FNa7SFDYbc/AKrwxpDoZefZ+Eq+SJhnbhehpD4VvYJac2+Gd2Ex9YwL+n6UGbgHrhONa+OEfixFQxKOAnKoDPeSvondF6yMy96YWCdWIsj1GIn7Kcl1FroXCBybgdD2YE021LKWv/msppHcWElU5PiTMM29H5GN6maIFIzKINI/WipDVNtUhQON8SebRbIByMDnb1hblg== 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=xhbDhl9fGrAbJROG1/ANZa8jolGGLRUlU7HWkkoS6xo=; b=aQszyRtSn4cOh5KUpLHMrjh9xy925i6UAldrUQTndHHWjdX7yRVxuFJZFr8OIB+E0/NfSTnDzzJxh7NeZcemeBne90P+Yg4huJ4QpY86Pmv0Nv4qxbgXcdZfG50cAVyt5THzYJsidYVxaDi/FGQDhK3sUv9Bai4KuToqxfSa4Xk= Received: from PA7P264CA0020.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2df::16) by DM6PR12MB5007.namprd12.prod.outlook.com (2603:10b6:5:20d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.19; Fri, 10 Nov 2023 12:52:26 +0000 Received: from SA2PEPF000015C8.namprd03.prod.outlook.com (2603:10a6:102:2df:cafe::56) by PA7P264CA0020.outlook.office365.com (2603:10a6:102:2df::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.19 via Frontend Transport; Fri, 10 Nov 2023 12:52: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 SA2PEPF000015C8.mail.protection.outlook.com (10.167.241.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6977.16 via Frontend Transport; Fri, 10 Nov 2023 12:52:24 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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.32; Fri, 10 Nov 2023 06:52:23 -0600 Received: from amd-B450M-DS3H.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.32 via Frontend Transport; Fri, 10 Nov 2023 06:52:19 -0600 From: Syed Saba Kareem To: , CC: , , , , , , Syed Saba Kareem , Liam Girdwood , "Jaroslav Kysela" , Takashi Iwai , Arnd Bergmann , Venkata Prasad Potturu , "open list" Subject: [PATCH 1/2] ASoC: amd: acp: add Kconfig options for acp7.0 based platform driver Date: Fri, 10 Nov 2023 18:22:09 +0530 Message-ID: <20231110125214.2127139-1-Syed.SabaKareem@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015C8:EE_|DM6PR12MB5007:EE_ X-MS-Office365-Filtering-Correlation-Id: b57403de-e0e1-477e-3996-08dbe1ebe2eb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kYSQwaYs/ZSAjQT40RhFi9Q9ImuaUqtaDG3uoTM8DzmOlOXVIVcYyj2VBj9ewDEF6kKHEubGWorBsTQpIe17ug7evjr0L33NDQdJGzsiT7ojQbFbXb/7POjGIEFxcvoUyLHezasXNY9fYKofFGCQZKCnLmXfqWMTsNhjfCXrUqtw/q8YB9n17nhDLcTdXb/KTiBlmMkuqONgF5Q+UJ+TDrrSXCK3eTzN7fr50j1U8GEdgm9c8tLR0ah4zJtZbLZvjO+SIPDiDUp2qsX/CeM1dfp/cE+XtH7Em1VQUAxW3d4ksgu+mS5UlJjy7v8ygsI0hPQ9rGGFEm7j8uq2S10ZxuQi7HV31CLDtqaAPRxSOT5D2Ty3BxufC5FI0UjUtXlwq4uazhsjoO1joCzoY9jB/qcyCPq4/QasAQWM2RT7mvqRmVtOx2Hj8v1S4YrqpPyTMYZg8pcgvm2OICBcqjWZRwm3TX0EbFWtkuzKIb89KZ5yFAYDlz2bwzNn09QIcX2IjZz6xrUl4uLDNRtpCn79rbCqfW1lIHuP80yZSmFKkqkulTbhYe0pnoKPo3T/knWys7Cll4RevN+s+zu7Byap7lb6qpfLP2tJYitzE0BO4+DK+BCayo//fpM9YmVY+FyvLVEFksUxKRvFE8++FCLFfKQtq+9JadeDz0FQw4WTUQjzU/cNmDUTILXJec2pJja9aKxf1c0RuT6yFR2pspUv0DP+9XtS2taAK4ckwXeTEfPii8vhqx4iogCzXCyPJQ+oJgxBo+7qA21uMsvGQH9Oqw== 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)(346002)(376002)(136003)(396003)(39860400002)(230922051799003)(1800799009)(64100799003)(82310400011)(451199024)(186009)(36840700001)(40470700004)(46966006)(2616005)(5660300002)(7696005)(40480700001)(1076003)(26005)(40460700003)(41300700001)(6666004)(2906002)(336012)(426003)(70586007)(70206006)(81166007)(478600001)(356005)(86362001)(110136005)(36756003)(54906003)(316002)(8676002)(4326008)(8936002)(36860700001)(82740400003)(47076005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2023 12:52:24.3062 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b57403de-e0e1-477e-3996-08dbe1ebe2eb 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: SA2PEPF000015C8.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5007 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 10 Nov 2023 11:29:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782206511292158221 X-GMAIL-MSGID: 1782206511292158221 ACP7.0 based platform legacy drivers can be built by selecting necessary kernel config option. This patch enables build support of the same. Signed-off-by: Syed Saba Kareem --- sound/soc/amd/acp/Kconfig | 12 ++++++++++++ sound/soc/amd/acp/Makefile | 2 ++ 2 files changed, 14 insertions(+) diff --git a/sound/soc/amd/acp/Kconfig b/sound/soc/amd/acp/Kconfig index 5fb322212938..c8ac0027f741 100644 --- a/sound/soc/amd/acp/Kconfig +++ b/sound/soc/amd/acp/Kconfig @@ -73,6 +73,18 @@ config SND_AMD_ASOC_ACP63 Say Y if you want to enable AUDIO on ACP6.3 If unsure select "N". +config SND_AMD_ASOC_ACP70 + tristate "AMD ACP ASOC Acp7.0 Support" + depends on X86 && PCI + depends on ACPI + select SND_SOC_AMD_ACP_PCM + select SND_SOC_AMD_ACP_I2S + select SND_SOC_AMD_ACP_PDM + help + This option enables Acp7.0 PDM support on AMD platform. + Say Y if you want to enable AUDIO on ACP7.0 + If unsure select "N". + config SND_SOC_AMD_MACH_COMMON tristate depends on X86 && PCI && I2C diff --git a/sound/soc/amd/acp/Makefile b/sound/soc/amd/acp/Makefile index dd85700f1c5f..ff5f7893b81e 100644 --- a/sound/soc/amd/acp/Makefile +++ b/sound/soc/amd/acp/Makefile @@ -15,6 +15,7 @@ snd-acp-pci-objs := acp-pci.o snd-acp-renoir-objs := acp-renoir.o snd-acp-rembrandt-objs := acp-rembrandt.o snd-acp63-objs := acp63.o +snd-acp70-objs := acp70.o #machine specific driver snd-acp-mach-objs := acp-mach-common.o @@ -30,6 +31,7 @@ obj-$(CONFIG_SND_SOC_AMD_ACP_PCI) += snd-acp-pci.o obj-$(CONFIG_SND_AMD_ASOC_RENOIR) += snd-acp-renoir.o obj-$(CONFIG_SND_AMD_ASOC_REMBRANDT) += snd-acp-rembrandt.o obj-$(CONFIG_SND_AMD_ASOC_ACP63) += snd-acp63.o +obj-$(CONFIG_SND_AMD_ASOC_ACP70) += snd-acp70.o obj-$(CONFIG_SND_SOC_AMD_MACH_COMMON) += snd-acp-mach.o obj-$(CONFIG_SND_SOC_AMD_LEGACY_MACH) += snd-acp-legacy-mach.o From patchwork Fri Nov 10 12:52:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Saba Kareem, Syed" X-Patchwork-Id: 163817 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp1279143vqs; Fri, 10 Nov 2023 09:49:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IF/cAUSO0lx37GAQLFLyEp4TELUph7rrinPeVf4XdzSTq0J/NSR6U/5FHfY70x9GmnWa9Qw X-Received: by 2002:a4a:ea10:0:b0:57e:1c6a:d551 with SMTP id x16-20020a4aea10000000b0057e1c6ad551mr65904ood.3.1699638566476; Fri, 10 Nov 2023 09:49:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699638566; cv=pass; d=google.com; s=arc-20160816; b=H9aQIpW9N+0d7SeWgJU9w83NS7ltjI2+IidS03cCwdrareSQ+iZTABr+7t63g6WD31 iOpwEAByl/Isg12riXNdTKz+XhRgBzV5WOfVLxQ64vbqn6a+Iogeoq+C7PNU9M18Yq16 w4GGLthif5eM5bgsKHokUB9EHi1hNjiLaafoGQx9Iv1IcBxPFPSuIQ9Gt0PSunrKL5K9 tWjfKcv8MY2kacLWgoB2c96uAh8YFyn6aSRF8Ltyr4l9/SblAryNO0+JMyUYgMvrKClp SfNO9Qst2EA8Fpo40/AT2agNuJRIt9pp+MOFasxo0NKeOd/osIz16EGUmUzn5GcQbEjQ GzgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BJgBWxd8ddbsK/2qDi3AKF6y9TrH1VH4mGi8xJbb0I8=; fh=+izT5g2bRI8JtPx+JQx2+pYdltfXw7U44+jDXs3hdIk=; b=UFPDsjqdzhSThbv7KZIRpxy4K4tqwq1jtpoLs8gGfMOtJ0Hqcok96XsKKjUsSDgu+U mEBRPjZw46C4qAZqCDk4ZTiKkFla1zJkgM9ssU4tlPAgMrhmxDnk7k8QFRlOkbZTo0WX c66Y5Pjoqq6t2TFnUgryhaYSzDeuyTxLQLW+OLuVzO2ezRbve0q9Ca11kSb0QRNlzdRh KgagDZNbxNJ5AOGlvM2Nsg7YL7QzzS19PAin6x4t+0/5F/LUSaik/MhB7dWMLNwP+I4x q1zYD9a1U39pHb5nfkwDlgYop1etXCJ7VUuow2N20mslHvfLYGrB/muMiNF7lJUMDAOd bZbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=092XfZu0; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o8-20020a656a48000000b005bd28c9bb23si13247001pgu.308.2023.11.10.09.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 09:49:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=092XfZu0; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 329E08051B6C; Fri, 10 Nov 2023 09:45:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345209AbjKJRpK (ORCPT + 30 others); Fri, 10 Nov 2023 12:45:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345926AbjKJRoH (ORCPT ); Fri, 10 Nov 2023 12:44:07 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0398835784 for ; Fri, 10 Nov 2023 04:52:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TVqjCRRTQ/aZE/AE7sEZgkXV5EYaLOowDaGNgqNmgwBjQh8SbDwrqeutE0l8HMrRY33cieP0RSA3hCtz/CYeZGZcwDzamKLBxhlBqS54yJQNLst9CdOTAQed5tX00RthlCw8IxXGVGZj3ofIr6LUARkxQBtAs/ykwmcKU2soGfTRIY/SzZeUGxWK2RZyiBrIWfWaN9PdQBWVnHJ2PuIH2FoFsRF9c852ltH1Y1dU2mWmMr7j3t4gSPUvEfVKStbX6vUX15yh3bu3daOFuPtDVTZHUmlZbMz/tgfTcLem0/exZZKpoWh/0u4Z4Ope41ljkQJOrI8cOl2y2snmjJGlhA== 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=BJgBWxd8ddbsK/2qDi3AKF6y9TrH1VH4mGi8xJbb0I8=; b=etGdqammGWJzK/G9VcMWejFShsF1g6z8FlXvpN0unBulP4ayC9SOF5V4wdHjVGzDzE5gnnyeLQj0yePPkhSAhl44OFaTIwdcLzKQL834HaGGwkL8dUSo/EDj33cp+ybYrAtQtS9MhA35JC7OortSGmZRc8ku9mOnuPgpkC3/CEAI8fc7+nScYeUQLDz2R2EjumZL6nl42McatXvQ0b4tOUpsayXhEkSiHRyJZcWRKCHXIBpCJ9gg2M13RhtYU68CprL23L4wv/9pM7aouNChlGjYkHS5jn/0RGq8czVno/N7wB67HCbzOO8oz6lEHKX3Ily6AsJgpVlWqG9Pp7tmYw== 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=BJgBWxd8ddbsK/2qDi3AKF6y9TrH1VH4mGi8xJbb0I8=; b=092XfZu0Y7HXcSXHqQVNfSZe8KUatsriIrGbKlWfYCCcza0QC9/1/qXbeKQ74vKLrpSNdYJ+7D03gjn6sS+ZUrmmy/Mw82TZYdu5VVwGyIopCFEEbDqeKjFcvHZF/PvciDLfwXsOcEIrz9l4nTy64pwK5NpRBFfjAs6bj+IwoUY= Received: from BL1P223CA0015.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:2c4::20) by DM6PR12MB4580.namprd12.prod.outlook.com (2603:10b6:5:2a8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.21; Fri, 10 Nov 2023 12:52:30 +0000 Received: from MN1PEPF0000ECD8.namprd02.prod.outlook.com (2603:10b6:208:2c4:cafe::ef) by BL1P223CA0015.outlook.office365.com (2603:10b6:208:2c4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.21 via Frontend Transport; Fri, 10 Nov 2023 12:52:30 +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 MN1PEPF0000ECD8.mail.protection.outlook.com (10.167.242.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6977.16 via Frontend Transport; Fri, 10 Nov 2023 12:52:30 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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.32; Fri, 10 Nov 2023 06:52:29 -0600 Received: from amd-B450M-DS3H.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.32 via Frontend Transport; Fri, 10 Nov 2023 06:52:25 -0600 From: Syed Saba Kareem To: , CC: , , , , , , Syed Saba Kareem , Liam Girdwood , "Jaroslav Kysela" , Takashi Iwai , Kuninori Morimoto , Nicolas Ferre , =?utf-8?q?Uwe_Kleine-K=C3=B6ni?= =?utf-8?q?g?= , open list Subject: [PATCH 2/2] ASoC: amd: acp: add pm ops support for renoir platform Add pm ops for renoir platform. Date: Fri, 10 Nov 2023 18:22:10 +0530 Message-ID: <20231110125214.2127139-2-Syed.SabaKareem@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231110125214.2127139-1-Syed.SabaKareem@amd.com> References: <20231110125214.2127139-1-Syed.SabaKareem@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000ECD8:EE_|DM6PR12MB4580:EE_ X-MS-Office365-Filtering-Correlation-Id: d77caecf-9be5-49c5-7a45-08dbe1ebe667 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +oEzr1/KJ66Mk0LvHaNeZuK85OP5Q6Q3tnLOkmttjmEH3kmg6sRXI/Qq6dJmcLVRWG4+8aUvThAZ9B9JLlUDAFY1Irjo3hA+/dgnD268Y1vz1DisaI8rxOqTeHPCjxpResZqp2dvQZyFuFqrZ2Z45bUDO4Lv+MvToYDrTrsWOCyA8nV+0d6Myf9g3EdySv+2Oz+GFoaXSFfya4dIkhgVcqsq/54YaMqrfjJe/HNTqZgKg7oBuikeDxg34UR4epTfNDBPpaUaFa4A1OwSjDZeZls5VksMU/l/fSJYBiKg6t49NEwq29q0gtm2dW1OXlsRCuc12YFRvjBSxxPrWfoUuFrSflxSr1bcZxoV3sjwWtbDbZRqQWM4mb1PebKDHUpnDrtO0kgRMV2Ee2eixuWySxGULfxQH7+ZkwMYuo5q7B1Vdb1DV1CJI2O5EgsdAqntC9z/OE7HX2io2/AZHs2asx3O0kz7gnWjWp8S5UoUDydzzNFJ7YWq+Z/780TF0yry86qXEqsADzwV9/uwFISfqVM6PsNvmPXzEKtGT3ZVw0VFzVac6gTwDvDcqHuGR3P+hzB6fYnRAKtSBDKfQs82+/Bhz3OprbZkr7/ygnnXTou4LJCeM+pcIfp85nuEeEgOGXcdGbWFKF01vdA2Eqdp09RiWRmHdJosUPNoyDSksEq7yBcSonSLEZiPaMjzk895/HgwCxPFVI7f3ZVOYmZeDnDpr4CPA85vj/q8/5wpim2bB/30rXQY4jOrEENImP6XfjzoZPU+yjTn52I3yv1YzQ== 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)(136003)(346002)(396003)(39860400002)(376002)(230922051799003)(186009)(1800799009)(451199024)(82310400011)(64100799003)(46966006)(36840700001)(40470700004)(70586007)(70206006)(110136005)(1076003)(2616005)(316002)(54906003)(40460700003)(86362001)(36860700001)(6666004)(36756003)(478600001)(7696005)(47076005)(41300700001)(7416002)(5660300002)(426003)(336012)(81166007)(356005)(82740400003)(8936002)(8676002)(4326008)(2906002)(83380400001)(26005)(40480700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2023 12:52:30.1849 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d77caecf-9be5-49c5-7a45-08dbe1ebe667 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: MN1PEPF0000ECD8.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4580 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 10 Nov 2023 09:45:35 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782200209554425213 X-GMAIL-MSGID: 1782200209554425213 Signed-off-by: Syed Saba Kareem Signed-off-by: Syed Saba Kareem --- sound/soc/amd/acp/acp-renoir.c | 38 +++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c index a591482a0726..8539fbacdf4c 100644 --- a/sound/soc/amd/acp/acp-renoir.c +++ b/sound/soc/amd/acp/acp-renoir.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "amd.h" #include "acp-mach.h" @@ -195,7 +196,11 @@ static int renoir_audio_probe(struct platform_device *pdev) dev_set_drvdata(dev, adata); acp_enable_interrupts(adata); acp_platform_register(dev); - + pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS); + pm_runtime_use_autosuspend(&pdev->dev); + pm_runtime_mark_last_busy(&pdev->dev); + pm_runtime_set_active(&pdev->dev); + pm_runtime_enable(&pdev->dev); return 0; } @@ -208,11 +213,42 @@ static void renoir_audio_remove(struct platform_device *pdev) acp_platform_unregister(dev); } +static int __maybe_unused rn_pcm_resume(struct device *dev) +{ + struct acp_dev_data *adata = dev_get_drvdata(dev); + struct acp_stream *stream; + struct snd_pcm_substream *substream; + snd_pcm_uframes_t buf_in_frames; + u64 buf_size; + + spin_lock(&adata->acp_lock); + list_for_each_entry(stream, &adata->stream_list, list) { + substream = stream->substream; + if (substream && substream->runtime) { + buf_in_frames = (substream->runtime->buffer_size); + buf_size = frames_to_bytes(substream->runtime, buf_in_frames); + config_pte_for_stream(adata, stream); + config_acp_dma(adata, stream, buf_size); + if (stream->dai_id) + restore_acp_i2s_params(substream, adata, stream); + else + restore_acp_pdm_params(substream, adata); + } + } + spin_unlock(&adata->acp_lock); + return 0; +} + +static const struct dev_pm_ops rn_dma_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(NULL, rn_pcm_resume) +}; + static struct platform_driver renoir_driver = { .probe = renoir_audio_probe, .remove_new = renoir_audio_remove, .driver = { .name = "acp_asoc_renoir", + .pm = &rn_dma_pm_ops, }, };