Message ID | 20230522133122.166841-10-Vijendar.Mukunda@amd.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <alsa-devel-bounces@alsa-project.org> 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 A7D58C7EE29 for <alsa-devel@archiver.kernel.org>; Mon, 22 May 2023 13:30:26 +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 512C8827; Mon, 22 May 2023 15:29:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 512C8827 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684762224; bh=629VfqixtX6dakJBeMSRcJNufp+XbE9uH5bK0GbfUj8=; 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=SBslWO4LJiwPaP7O8MZ4XL1mlAW7szvCJxAUvXA2Ahxd/6ZXAeTqenk4CgY4CBZR3 gxxVYA1BggvuaoGcjsVZMmHZ5Dux4zA/avDcEKS5HICvgIcaq4xtGPta3alqAz7QpM CWqCuzjs0jbUIxLsdCv7F76cTKPSRkkuDVi6Hryo= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 231FFF805E9; Mon, 22 May 2023 15:27:38 +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 B5A60F80551; Mon, 22 May 2023 15:27:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9CFB1F8057C; Mon, 22 May 2023 15:27:34 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20629.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::629]) (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 7CA05F80551 for <alsa-devel@alsa-project.org>; Mon, 22 May 2023 15:27:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7CA05F80551 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=bdzwZHGz ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V4jXxA6TU9bRsY7ZE3Y+1Dpqs4GCA9vzoVEBYOai5QBESAy9b5boGg6Y14iMKojf1Ug722DJcYAiNdbEx3HhRC6HF7tmzryt6i3uRffU4cj+8n55/I+E9b/wYNWn1nxDASjS3N3PYim3TArnDU60foJdMPgcvFBrP2au419Pjqepm83YCWyq5/znZHP9TY5YGtuyRS0vvqBoXk4Kr95FI2SAAFgqCPUSLnoOT+Ax1BvWCMPi591ev6Z92yYrjmh4UDF+QyAjTSFHkFiNQZx2UKNJCLstMreiTc+FTRKn5ge3p6W8Csmn1F2fkiNSAONhuGKr/YpYg64mR1/V1sxVEQ== 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=XgZh2m1ue2OnvyVEBBAWUfeFVyNibjtPlMMW0oX3v90=; b=lEu4rS4Ab5ujbhsBEa5ZervW6zDP+JeYzkthCMFrl+jaRKhDxD271cKNDQTeVUWEmKdcAQ8r0M560hkGVqljl97Ft1WyJK1s/e1AwO4IBdKbelHf+XUTN8FHnPzyCYRrxeovtO3ks+HcWdNHbALw2k21rOZMwM2+TeChRHu6S2rsptd6saO1V+n1Xc/Jejm00gBWXUkEsHu1oN6l5eOe1iEo8D1uia7/i34kgBkB2h7ydR43gta82jXU5+Dy5zZz8YN52XtyxY6cMD5mnZtmJe/JS0OqS27f5W9krntmfChEyqPnhmizCCcN7lTObFHayfLypSKmcMYgpXOLpv+rsQ== 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=XgZh2m1ue2OnvyVEBBAWUfeFVyNibjtPlMMW0oX3v90=; b=bdzwZHGz06ZZ6khfZVsfeyVmjOILTC3p8kV5BZDompbq7rDuKIOUmvtxuakeK7X4mKUKSDHHy7b3ld6U+07Q1LFZYrDQGMl5xgmObQ5bTb5r0UmRK09Pc4qvVyq40tMo95iLDf7GF7ThZwq7KVzcwQESjcyxoZmwQf//HId+jNc= Received: from MW4PR04CA0213.namprd04.prod.outlook.com (2603:10b6:303:87::8) by SN7PR12MB7130.namprd12.prod.outlook.com (2603:10b6:806:2a2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Mon, 22 May 2023 13:27:24 +0000 Received: from CO1NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:303:87:cafe::ee) by MW4PR04CA0213.outlook.office365.com (2603:10b6:303:87::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28 via Frontend Transport; Mon, 22 May 2023 13:27: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 CO1NAM11FT014.mail.protection.outlook.com (10.13.175.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6411.29 via Frontend Transport; Mon, 22 May 2023 13:27:24 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) 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.2375.34; Mon, 22 May 2023 08:27:23 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 22 May 2023 06:27:23 -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.2375.34 via Frontend Transport; Mon, 22 May 2023 08:27:19 -0500 From: Vijendar Mukunda <Vijendar.Mukunda@amd.com> To: <broonie@kernel.org> CC: <alsa-devel@alsa-project.org>, <pierre-louis.bossart@linux.intel.com>, <Basavaraj.Hiregoudar@amd.com>, <Sunil-kumar.Dommati@amd.com>, <Mastan.Katragadda@amd.com>, <Arungopal.kondaveeti@amd.com>, <mario.limonciello@amd.com>, Vijendar Mukunda <Vijendar.Mukunda@amd.com>, Liam Girdwood <lgirdwood@gmail.com>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Syed Saba Kareem <Syed.SabaKareem@amd.com>, open list <linux-kernel@vger.kernel.org> Subject: [PATCH V2 9/9] ASoC: amd: ps: Add SoundWire specific checks in pci driver in pm ops. Date: Mon, 22 May 2023 19:01:22 +0530 Message-ID: <20230522133122.166841-10-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230522133122.166841-1-Vijendar.Mukunda@amd.com> References: <20230522133122.166841-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT014:EE_|SN7PR12MB7130:EE_ X-MS-Office365-Filtering-Correlation-Id: 72e48deb-7c10-4b60-8127-08db5ac847be X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0QNdF8xR6bK7iDeKxXSW2Fui1ngVHyuIt4eXiXFJTon9J2R9h6XZ1joM8vBoOLRwbaGQrDir9VmApwsFLlO1OPNBXbYy9muwSgDTfH4/A8V7zJUmAvDhZC1819zD88+IepLiCjvcy4fClqx31noTFScDUNg3QRF8J+i597qE14Xlz3fFrkBB8n+G96Pe0v662BmGSO3w8tyJ3zUTk3nvv+paekawrke3y3HFT4g3dX9eqj6fR73Q+HiP595IcmvIzfVfusnDVM+EsrLDvMMsLFs2tlCLSzRijhu0/6WpkSMXvgRHSN42qW8KSJS50XlMped5OKcjJd8yhcY8hNTvqbkv0JEKcmsn/PZDyh0cfXEgFh6ehQrt0FSw+S8O8Q5/v/5XHLPCpvjLcGEbZaGLI2X1Y9n/PnGa551MYVOuD8hcHXvjgT8rhhLV9bRyyCFDoaLcNS10UwzROW+Bu8xh8qs1c+M6vyqaJAbooe723ds3GGaKr8VClfRoDSGIz7xGNprisCqwakC3qP/zXLAD5HE4xG/l2jrXmXGCMFFOKvmvEKSk7fsN8xkE5Hc+VSAy/ooDUVBoB2FKjmCwSzGBjzBCjYqy2lC7qspXKh2rmqA+l68Gl4OUtgAh63kRUigFQnuBngQYGU7oaNP+ehKUWT7XPFQs0fSdy2JfNMSCZNh/9eZ1v2xWId+PdNjCFuDy4jw6bhDVm9LaDhuXN6p2MHA9JUBwpZFeq5SFyiNn77+a6HUQ2tfgbcv1trap84Q5vPnPLkQafEfJnUclAEzzSw== 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:(13230028)(4636009)(376002)(39860400002)(346002)(396003)(136003)(451199021)(36840700001)(46966006)(40470700004)(40480700001)(1076003)(26005)(316002)(6666004)(7696005)(41300700001)(54906003)(478600001)(6916009)(4326008)(70206006)(70586007)(8936002)(8676002)(40460700003)(81166007)(5660300002)(36860700001)(82740400003)(83380400001)(47076005)(86362001)(356005)(2616005)(426003)(336012)(2906002)(36756003)(82310400005)(186003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 May 2023 13:27:24.5277 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 72e48deb-7c10-4b60-8127-08db5ac847be 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: CO1NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7130 Message-ID-Hash: 4HG6M4NXN7TRUNHT5VCYVRETDAGIHE4K X-Message-ID-Hash: 4HG6M4NXN7TRUNHT5VCYVRETDAGIHE4K 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" <alsa-devel.alsa-project.org> Archived-At: <https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/message/4HG6M4NXN7TRUNHT5VCYVRETDAGIHE4K/> List-Archive: <https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/> List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help> List-Owner: <mailto:alsa-devel-owner@alsa-project.org> List-Post: <mailto:alsa-devel@alsa-project.org> List-Subscribe: <mailto:alsa-devel-join@alsa-project.org> List-Unsubscribe: <mailto:alsa-devel-leave@alsa-project.org> |
Series |
ASoC: amd: ps: add SoundWire support
|
expand
|
diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c index c99ac5d90097..f6d14baf2c2e 100644 --- a/sound/soc/amd/ps/pci-ps.c +++ b/sound/soc/amd/ps/pci-ps.c @@ -659,10 +659,15 @@ static int snd_acp63_probe(struct pci_dev *pci, static int __maybe_unused snd_acp63_suspend(struct device *dev) { struct acp63_dev_data *adata; - int ret; + int ret = 0; adata = dev_get_drvdata(dev); - ret = acp63_deinit(adata->acp63_base, dev); + if (adata->pdev_mask & ACP63_SDW_DEV_MASK) { + if (adata->acp_reset) + ret = acp63_deinit(adata->acp63_base, dev); + } else { + ret = acp63_deinit(adata->acp63_base, dev); + } if (ret) dev_err(dev, "ACP de-init failed\n"); return ret; @@ -671,10 +676,15 @@ static int __maybe_unused snd_acp63_suspend(struct device *dev) static int __maybe_unused snd_acp63_resume(struct device *dev) { struct acp63_dev_data *adata; - int ret; + int ret = 0; adata = dev_get_drvdata(dev); - ret = acp63_init(adata->acp63_base, dev); + if (adata->pdev_mask & ACP63_SDW_DEV_MASK) { + if (adata->acp_reset) + ret = acp63_init(adata->acp63_base, dev); + } else { + ret = acp63_init(adata->acp63_base, dev); + } if (ret) dev_err(dev, "ACP init failed\n"); return ret;
AMD SoundWire manager supports different power modes. In case of SoundWire Power off Mode, ACP pci parent driver should invoke acp de-init and init sequence during suspend/resume callbacks. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> --- sound/soc/amd/ps/pci-ps.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)