Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3690093imu; Sun, 11 Nov 2018 21:35:09 -0800 (PST) X-Google-Smtp-Source: AJdET5f8noTmMGgKOcIvgCSPS+t7xGDgIuXHe4J9qKwLnrHoEX304xkHRnbId0du0fqy2NM16sJx X-Received: by 2002:a63:f047:: with SMTP id s7mr16174502pgj.441.1542000909325; Sun, 11 Nov 2018 21:35:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542000909; cv=none; d=google.com; s=arc-20160816; b=MSVq9Uw8Eh7dq/NHW0pUXm2wDK6EH/ntiCoGBB9wlDDKS2d36KVjeddCh/0WtBJBjV g3sRXKSHnYRZMrmGxK4o2bYJKbDqqnI1oVTwhEOEjKzW+RywFISI/c4948rU+2uXgKkF J17u3scFTtHVK2cPyPEFJApGWpQmUmCXCkQG+HPBSv48EibzO+L5hrrpxl6646nJ6/0Y GifBr1pnFto48KZZmCtSRdomM8rvkEy/UtcNlDoBeUn5M1AFjBmd+x7eRgD5q/PtM+lD LM6Ha25GmZdhwjSJDn9eqg0au/r5gcd09n47DRV7ZsErr+eUBNCWsILIjeA9CVxGBvfI tdiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:from:dkim-signature; bh=CCAO4ZUf6UeO/NWbRWAidAwihnT8i1sbrPmRcJyIqbk=; b=tva1oVPhy/451WNNOMqzwpoj0bMtLHVBvn2HM/ffXDLQzAzDkfl9Y8MTIeqp4rsUmF a4lvrP6M97QtaHyCfG/SGyFJA1CoK0ODbRj8HxhMZRTDAY9ngqWmZxGi2c3LmIBDneoH o56Va0WEb3Q8lnIQ7vBUU6LeIrLCyzrQNuVj2pxgc5sf4R/dKIiCVaffenJrH+SVAj// +zF/o3ZMSJGoL7nHd0r+5XhouWUdsSdIRwmgUln743AQR3eCqnN1LUT+kYb1/4oDisFU T2mpLFfuXIvRrebK9Z+UH24ol87694sHtSfe1xc9Lb1vOPrSNsb6sVkU7fgpCLgC6E8p OnGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=MrTxHoXq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14-v6si17865725pfw.217.2018.11.11.21.34.54; Sun, 11 Nov 2018 21:35:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=MrTxHoXq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731284AbeKLPZW (ORCPT + 99 others); Mon, 12 Nov 2018 10:25:22 -0500 Received: from mail-eopbgr710086.outbound.protection.outlook.com ([40.107.71.86]:59968 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731042AbeKLPZW (ORCPT ); Mon, 12 Nov 2018 10:25:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CCAO4ZUf6UeO/NWbRWAidAwihnT8i1sbrPmRcJyIqbk=; b=MrTxHoXqQ2DwCru5esFif7QKnZAkM4krpyCySOSAyx1aWRrGJ8NQfyS26C+lea0jFkN1hX0Icn0PZ91YWWtCNRYoS16QX2rdCXDcZjVPWui2zyzHHfRhVOuq2EGI1ZuFksRhSh6hDjDV+Eth3UUQC4E8K2gJNfd099Hfm0xoqK4= Received: from BN6PR12CA0025.namprd12.prod.outlook.com (2603:10b6:405:70::11) by BLUPR12MB0417.namprd12.prod.outlook.com (2a01:111:e400:516a::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.29; Mon, 12 Nov 2018 05:33:42 +0000 Received: from CO1NAM03FT040.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::201) by BN6PR12CA0025.outlook.office365.com (2603:10b6:405:70::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1294.26 via Frontend Transport; Mon, 12 Nov 2018 05:33:41 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by CO1NAM03FT040.mail.protection.outlook.com (10.152.81.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1339.10 via Frontend Transport; Mon, 12 Nov 2018 05:33:41 +0000 Received: from LinuxHost.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.389.1; Sun, 11 Nov 2018 23:33:39 -0600 From: Vijendar Mukunda CC: , , , Vijendar Mukunda , Maruthi Bayyavarapu , Liam Girdwood , "Mark Brown" , Jaroslav Kysela , Takashi Iwai , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 10/11] ASoC: amd: add acp3x system resume pm op Date: Mon, 12 Nov 2018 11:05:01 +0530 Message-ID: <1542000903-19020-11-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542000903-19020-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1542000903-19020-1-git-send-email-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(979002)(136003)(376002)(346002)(39860400002)(396003)(2980300002)(428003)(199004)(189003)(336012)(446003)(2616005)(8676002)(11346002)(126002)(476003)(8936002)(86362001)(1671002)(426003)(305945005)(81166006)(486006)(186003)(81156014)(50226002)(68736007)(106466001)(97736004)(53416004)(105586002)(36756003)(51416003)(109986005)(53936002)(5660300001)(76176011)(50466002)(77096007)(7696005)(48376002)(47776003)(54906003)(14444005)(16586007)(39060400002)(72206003)(2906002)(104016004)(316002)(356004)(6666004)(26005)(478600001)(4326008)(42413003)(266003)(32563001)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR12MB0417;H:SATLEXCHOV01.amd.com;FPR:;SPF:None;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM03FT040;1:6WbYB/cqCf7B1X0yO2UFUCNc/cNd7oiIIbOnPN3klRDgpoQ7OEJZ3sMhPmwCaNOzN0stOzw/0BGnsVScS5qaUx81s5kQ/79Zg6u6UaZIyWOc/833uCThBZU11nZC/YTS X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8f1c7e2e-2206-44ed-62b9-08d6486067c3 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390040)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060);SRVR:BLUPR12MB0417; X-Microsoft-Exchange-Diagn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U7rpHqDlUlvY8hFvd1QHrBgw36axYYZdaqZ6HYAA7vLxklrhewZmwUqlfrw1VEkcW7XHVuBV2HTYt6Na2D5eyn0NXvs/cigQG0sSYe1s1BF+U5iYuaQca/dcO4l3tJU/Ey3HPpyr+ZohGvOtrbgysyA3iqB5qf/vTy0sdpZKWG4IULilUaCHrTCoAE+3pPVTXF1cQEruQybFb6ajiHItLtYwcJ4WFm5vAuCXeijbisZPBb4cKtzTz/gWBLu0hwwVZwGDz2MKVTKOqe5VZhNmlv5z4Dx8mHoCTm8WYKTWKMd4QCjw7C6tBtsKLSGOz2ffPSEbZQmnm1a1rZNM+4b6mfd6nLNlPHTOGAxKucORSbKGxHhVJKP43QvVW7z16Y6DggRg42sWnlVR3J66/tcBRzCh8f9VWDqBwVuCJP3jDPW2VbVJYSd9H6tZ8STVapDXpIZ8OdeH0afil/q70ZcENukXRXYdDpqcyl220 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231382)(944501410)(52105112)(3002001)(93006095)(93003095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:BLUPR12MB0417;BCL:0;PCL:0;RULEID:;SRVR:BLUPR12MB0417; X-Microsoft-Exchange-Diagnostics: 1;BLUPR12MB0417;4:bqj4reqaw3DqXlWtETlIcF9r+rghh0Zu74PoUoCW4xf/Xd6t2Uh/dFXuVVGuhZoJyukU127/Ov1K78nfVDZ3V7cmNtR44dvrbQB/RO14G8FJrg9cP6Rgpgt4qlFAbk4DPJRxqYg/+43hF+jkxDSJTxb96DovVqvj19suwRbAXa0LK5yUgL+LJzWTbQErQQWL3Gq3tHVtQrELDv9IjUetAQefdkIUNSlh58tUhr4misW2tXamg2lupWSgbtaKVRoufscWDt8/CkxMkVOI/fMged0oHlmObkUba/mab9Vw1/FLOe3jsCpfinUiOTwhhiPq X-Forefront-PRVS: 0854128AF0 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR12MB0417;23:6+w6XTQiQxPd7VlzvBXfz9Nyh51KH16pSlVUe2SMK?= =?us-ascii?Q?R7DfeAdN6zly9x7jwkloendduYBLYOyzIEvzgbDCywMTKe8P55r7E7xGQzUg?= =?us-ascii?Q?X97eqUOW52gS7zqaUlu5LaCJIa2U5i3odBwAioZkiUPr4QedG75BecWDud9E?= =?us-ascii?Q?6yi5XVWHt/B9IxzjdMInxnj6XjYtNLaLzB7h836V4uKnlYwSqHeS3OFHuOoM?= =?us-ascii?Q?kO3F5t+gcNxAX1Ke2y7CE8l+SFN0Lw17ed+m01oVRwqJwgiORFfIk64+i3RP?= =?us-ascii?Q?I+34v5aLwo72x9IIeJc+ZR3T2chEb2pEgVKXXzvNL4BdoY3DRkbt0XtlTLNj?= =?us-ascii?Q?XRyYJgI9DJrkWu2jxxbnCPKhicCql8i+vN4+zi0mXU5MhIoH0LgbFDhHCr1g?= =?us-ascii?Q?0iz3gjzSglNA+1TfOshuFAAnLixs8VWe+ffSXakVH07R1eQbFLoKV0STVkcd?= =?us-ascii?Q?oDK9ayeyyzPoIjQA3j0bZAXaT2iy7A11SxKiAQEI3R8AHebQZomRLy06ed/w?= =?us-ascii?Q?Oh3FHMe6EJvY57SQGNns9bUfWjH+rivhfYYlQgEmOcuVejP+0yxJi5jlfbh4?= =?us-ascii?Q?tRULdRAzBhdURH6JDybC/FEcHoPVnW/z6Rp6cq/jmxVhf8dBYt7iQgmUuNTx?= =?us-ascii?Q?YakjGYRnctRxhiA+TJ5IN4LmdLbmSyswgQIOHbKHIILQowuJhtDGCcbvHzhP?= =?us-ascii?Q?PvAqwA2qr1ZdwASnl/Zs8CXeisMiNZjTPfokj0moC50G49jNeAgjASV7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xsUjKtOmtdLJ6W8hNTzXWfNV1ZJhnwm4qfiNvq6gSUP8RBownigSinoO5Wci5xsOR6pFquYZ3kiJtedg1+dFN7Ct4HByAUW+RCo= X-Microsoft-Exchange-Diagnostics: 1;BLUPR12MB0417;6:d4ec44filtF9LlCak8nYG3MCVymJemq8Kvi9jR9PEZzU0/9YuERTRsGaM1Hy20M5nR7klVRz6p9rRRxZLIflK0Hj+pYBB5uYiQuYDZ724Sd1AvjjjHMwVO4s5anwPcBwkz1TcUsOCX4YatkHKitB7dmDexBeN08Oz3tZUFLE/FcVboeGaGmnvX5/iLDTuqdjwhQjrsUWutRFivV6BYp8bDtd4TxP13bOMskgbkBfPMLr9MGJSmeJU+jc/xzR80LRFHa5s29p5DqOGGTFolZ/wzhEqsDVzFLD007P6YuvlZxzfbfvyoKAJZ9TmYzl4CJ9l0zS+nMCFgrCHuecyYJCNju6aCuddxMdaPxE9hA7fJd5ygYXmS69HXFeEAr+qrhhkoe30lfrunIeP++fvmQ3MOCBV37jUCYl+yhOeniwP48j4P7fGGLQf818iALEc7aWCgt2vlUX1FmdfwFEgKHnmw==;5:Avn4EVKMqY2H5y5MSQsnFcFnceGPV6sPkguBKDUyiuld4VP4VKV+dowmacKnY7473QwwCQjWf/srGs1UN+0desuk2DsVvdyixYeAW1lKBiH/Wvq/BP5XYlz8WkuPF7lYKZxO7GNmLsK1p0kjcM8EzXs1gXVGfE18cQvVbq8gNwM=;7:dR4h5ivqp2h4yOi9O/PXb3cnD+Kq963NHNBpncqfTB1OlaL7/93sq9s1eZYYjkXpL2gpU7SqTOYztAhu8icNoAlX7nHKCWqDytA9o0xJLID2Q4PM0ow5FF8Feq6kmQt9+MmBOoDEB/IGQqYh/4q8Bg== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BLUPR12MB0417;20:D5a4FgpGZZhm6T/EoXnGK5+KJVOlweQcVEZlnev/TANKzzueNMyXBL5gU241YzYEg138jYAy0OG4Qdbkq/iqsoUjNH3WQONX6tWR3n5mkjNVbS4aYPeN5+JUMsZAVp9ULUzu/45GhYNTsqhdSBouWj3PZmoax2oRdNHUthQ1mhXikWovWPHOpo2PXYX1W/QB7tIQZ64FIkRysN7r+GEDrOgrcVet09yRhd1XL3/L0uLwtvodxjrsluGf7GB6orO1 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Nov 2018 05:33:41.0984 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8f1c7e2e-2206-44ed-62b9-08d6486067c3 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=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0417 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When system wide suspend happens, ACP will be powered off. When system resumes, all the runtime configuration data for ACP needs to be programmed again. Added 'resume'pm call back to ACP pm ops. Signed-off-by: Maruthi Bayyavarapu Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda --- sound/soc/amd/raven/acp3x-pcm-dma.c | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 710c5c5..2e61cef 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -690,6 +690,51 @@ static int acp3x_audio_remove(struct platform_device *pdev) return 0; } +static int acp3x_resume(struct device *dev) +{ + int status; + u32 val; + struct i2s_dev_data *adata = dev_get_drvdata(dev); + + status = acp3x_init(adata->acp3x_base); + if (status) + return -ENODEV; + + if (adata->play_stream && adata->play_stream->runtime) { + struct i2s_stream_instance *rtd = + adata->play_stream->runtime->private_data; + config_acp3x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK); + rv_writel((rtd->xfer_resolution << 3), + rtd->acp3x_base + mmACP_BTTDM_ITER); + if (adata->tdm_mode == true) { + rv_writel(adata->tdm_fmt, adata->acp3x_base + + mmACP_BTTDM_TXFRMT); + val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER); + rv_writel((val | 0x2), adata->acp3x_base + + mmACP_BTTDM_ITER); + } + } + + if (adata->capture_stream && adata->capture_stream->runtime) { + struct i2s_stream_instance *rtd = + adata->capture_stream->runtime->private_data; + config_acp3x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE); + rv_writel((rtd->xfer_resolution << 3), + rtd->acp3x_base + mmACP_BTTDM_IRER); + if (adata->tdm_mode == true) { + rv_writel(adata->tdm_fmt, adata->acp3x_base + + mmACP_BTTDM_RXFRMT); + val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER); + rv_writel((val | 0x2), adata->acp3x_base + + mmACP_BTTDM_IRER); + } + } + + rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB); + return 0; +} + + static int acp3x_pcm_runtime_suspend(struct device *dev) { int status; @@ -721,6 +766,7 @@ static int acp3x_pcm_runtime_resume(struct device *dev) static const struct dev_pm_ops acp3x_pm_ops = { .runtime_suspend = acp3x_pcm_runtime_suspend, .runtime_resume = acp3x_pcm_runtime_resume, + .resume = acp3x_resume, }; static struct platform_driver acp3x_dma_driver = { -- 2.7.4