From patchwork Fri Feb 16 07:33:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 10224127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2BA5E603EE for ; Fri, 16 Feb 2018 07:33:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B27F2911A for ; Fri, 16 Feb 2018 07:33:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F9452912F; Fri, 16 Feb 2018 07:33:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47E7529095 for ; Fri, 16 Feb 2018 07:33:42 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 7551C267D83; Fri, 16 Feb 2018 08:32:39 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4B083267D91; Fri, 16 Feb 2018 08:32:36 +0100 (CET) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0059.outbound.protection.outlook.com [104.47.38.59]) by alsa0.perex.cz (Postfix) with ESMTP id EB904267D9C for ; Fri, 16 Feb 2018 08:32:31 +0100 (CET) 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; bh=7jVXcZEpEfZdxm2TQJZl32GH1d/YTb9l07XcILYTxMA=; b=RG+ron2lNWTufEpRhbrC8uJKQtMpZCQTXfrSRcl6y4NzgAizKkoObGx9/YyjUU3RV/7rwqiEJj5Ntqy+YOesQRbWQUU8sQL4svLXMPsZ3oihf26QnRDQk0RV5rMF1PhaL9GtIQBiYwOWbxI5yNj1YMkl4vPU2F72AmF0tufUAns= Received: from CY1PR12CA0045.namprd12.prod.outlook.com (10.163.230.13) by BN6PR12MB1236.namprd12.prod.outlook.com (10.168.227.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Fri, 16 Feb 2018 07:32:28 +0000 Received: from BY2NAM03FT019.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::208) by CY1PR12CA0045.outlook.office365.com (2a01:111:e400:c42b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.506.18 via Frontend Transport; Fri, 16 Feb 2018 07:32:27 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; kernel.org; dkim=none (message not signed) header.d=none; kernel.org; 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 BY2NAM03FT019.mail.protection.outlook.com (10.152.84.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.506.19 via Frontend Transport; Fri, 16 Feb 2018 07:32:27 +0000 Received: from SCYBEXDAG03.amd.com (10.34.11.13) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server (TLS) id 14.3.382.0; Fri, 16 Feb 2018 01:32:26 -0600 Received: from LinuxHost.amd.com (10.129.12.246) by SCYBEXDAG03.amd.com (10.34.11.13) with Microsoft SMTP Server id 14.3.382.0; Fri, 16 Feb 2018 15:32:22 +0800 From: Vijendar Mukunda To: , , Date: Fri, 16 Feb 2018 13:03:52 +0530 Message-ID: <1518766434-7911-8-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518766434-7911-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1518766434-7911-1-git-send-email-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 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)(346002)(39380400002)(39860400002)(396003)(376002)(2980300002)(428003)(199004)(189003)(16586007)(53936002)(2950100002)(106466001)(6666003)(8676002)(97736004)(81156014)(81166006)(305945005)(50466002)(5660300001)(48376002)(36756003)(105586002)(86362001)(8936002)(68736007)(2906002)(356003)(2201001)(50226002)(76176011)(72206003)(51416003)(7696005)(47776003)(53416004)(4326008)(39060400002)(478600001)(54906003)(26005)(316002)(77096007)(110136005)(186003)(336011); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1236; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2NAM03FT019; 1:pXoVoIi4gBEJ0AJVJX/xxsgbCHaNdNucghrkYDqPxPw39OyTIn2pw17iiKuH8DcsrFLJIzFYpffSwSse+bbQ9KmgtwWRGR72DXaOOfjqpSZ2zYk4jj4cfPyPD+V0UTMP X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b0923cd4-1e98-4fb1-0a74-08d5750f6e1c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:BN6PR12MB1236; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1236; 3:8RkGJpZ01juSB3mvBYLmIwsZdeBCfOufVlyOXjplaIts8NJyVaC0AW9VE4xK4YYUMG6A4rQU0NCCNDtZ/X+2irroTGfZk2E2arp85wcUXkqBR5kvvXQ/7kp95DW0Bi4de3fforzJEo/ZgbbCrSLpmjo4gn4pcG/uEgBqXKnhn4AlXuJgQKiOM51pagBIz7yDu5melO7OG+U/z2LhRrcL136UO+YeRPUe7SqzBsdNT+GkjktRI/FzN/unG5B9bZe8K59TQn7F8WaJboetF+IvH0k4wd1XlnGGpDqH26lD3A3amqUG9S4qVTtfy+IiG4KKy+sFCT/zA9WCnoNx4Z6Atw6o8AG8Wdr57Lu5UEgOZ48=; 25:2zkAdNvU3dDOezVFcJaezpul987xiGjP4NpaRxf1pYp5QzdrYWT5HJFWaGw1rREAoGPNQlUlon5O027KX93pzL2ZBFD7kFiVTVTYHXfF4nsaSqrmMwcZtbWs0aDspmWDZiOOj1gtML1juulifTOLXOKnMaJM2gi9HujVLWipTldlLaUY9TynOiC3RyRbz0m7oEr6KdK7RO4PrMuEtXMloeDKyCli0v4yGH0Fy3u2vDlA0GXvqHIafSHrepIHLnIYTYuIjoQhd/mc7/dvPqSw+u0M06XvJIG2UQoopVMlSDHXcYi5StCUwTRva9BRahfEADXCVCjvJ5SbjxQGAA+rJg== X-MS-TrafficTypeDiagnostic: BN6PR12MB1236: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1236; 31:Foya6g/RJ5qO4V7KaiV0v8i5Bmp2UzKEeuhxp2VgyysGq3GlpDeOUu/D+0C7Bhtv9sMo3JDOKYLSylTQ5FLJfv9Yv6CEPmfBc35mSs4W3FXv2wLlaiJ7B6t7XVd6Wu+CG9t1fm8K6RmpXrnXpRmFzP+tBsV7V++8naAKrpS0j0U2bWbbGr/0huxnO6O1cG/qUdNmvzCUYh6u6tGIMwUkRHmVh8xxXy3wN3VhQ2GPba0=; 20:M13xFJq+itTDgzlGZUynz5C33Syx2YoUw9jLTBaJhDhtzxnfWvFFq99TkAmGhcGGUcETXQZEY6+TLRFUwOggK6jeYBlliqGrogLgLnKvLpDjQFWa+dW8uzBPMoCNlxMH+PIa02t95denc/0iwMcxTurYpL9CL+bUTe8knzOD+XDRk7ehX7BDsto4YSpFYFVZEZME8M+21wFoRfVbIHgtftGxAzJSphIsD4QOgJRrvKxKyLVa5VeIkZqCJJQHd3OutLdHykIPnZMFyzuKbvVRbRn6Mtl76UcyPG3P0dDeA1sNGCpxpWdNuPEKh+7eHcGevsGnESMLAkjlPFGjGnqhC7C4rDo0NgAW+ivp9NDGspMuavLkvAlT6kFMgMRO/0dNC4A+m60dmrEuU9RMlYr1Podf7AIp3EkiV+rDtwoWMZ5UP0c1WAhBOhN6o2H5wXb9mNuvtbnBq+FDMo2K4LfjOO5wyf+uXw6VKxGmaNy/wCjY5v/rMpi993ochvRmcbdx X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93003095)(3231101)(944501161)(3002001)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:BN6PR12MB1236; BCL:0; PCL:0; RULEID:; SRVR:BN6PR12MB1236; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1236; 4:mPwI8JHkkiDovmi84zzMb8N9fcRHMbad7qK1Fh/cycrzluoM9ofnJ1nk5tyulUSPNlWmy7feLmwjamaDjwUdQUfkKVjcWD2rH9UDyAsvIdqTxRRIeYe7YldINzLXdKng7N0+l2oY3Ev4aIHklbfgfP7CjZ9WK9ly9jg3uLKisc9u9n0ocPCNQLAatgAvqJn+HYRu84dmfPbdlO7JfQAzB3OK0NMVVDdBujm7jLFiArK2qUmIrg+wACznO7tjgp3dq8eT6F0fyKJ3yroDdF0ACnOWsqf77kV9DJF1xnwLVDCAeP//4+kTJncVtUQGUeTp X-Forefront-PRVS: 0585417D7B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1236; 23:A54ZIX+8EiXoKDmDZSahIE6REPXCT3K56jqRVnjxJ?= =?us-ascii?Q?lmLv3FFqiU6WstXJlWIE47VEmKpDvZeDwCfPKqru5SHDRNf53iFJzkK/hdSx?= =?us-ascii?Q?8oaigjenoekemh6Uzys/3Wc3nDndLrJAkyDEaE599u3tBWgAPrryDvyWC3dO?= =?us-ascii?Q?UARpRQfVZd4tx6xzOxBCLrNr0bz0YYsbg/ocsVquHXtM/YiZW5zNnFXDcyqe?= =?us-ascii?Q?CkF4n9YRwbZTBeH0uk2qOmK9ByfBcJz52TezDitupvz+QUUur2o6EE/pi+pZ?= =?us-ascii?Q?dwIWTX4ChEVmr2Mt4HO03ayoZUd9l2TTvIMDN5JlyEhDo4kCdnwTlE7UUmE5?= =?us-ascii?Q?YY3R3XIPjWK6flXsj0kmlda7n1f0Gw4Oia/lZlOsFecQv2mnLLGX7AvULTKQ?= =?us-ascii?Q?ZdFqrA5dTzsuS2uGmNB2r/75qxu+IFOFTVZynsANCjm0/LibccrZ05h5Jj8d?= =?us-ascii?Q?uRa7zryDcr3QpdJ/ruqdn1laeZHvxSeGcVN8eP9tlztaafjhLwXqjuUr5nxz?= =?us-ascii?Q?TWJE8nEKNfSPgDhFwJqIOaHwyLUdEYj+WRl4PkVpkNj7ByoW0VjgdoJBk+Lw?= =?us-ascii?Q?UxAKY4OxRutAFarjqWAurQUKeDeWVCqQrELz/yKI97aL9bCs4ZHty51o32yG?= =?us-ascii?Q?t2hcNqEPRVx9JYULSAIkmlFbmdxQ51SZU861yZRE/6v+eyfuLf+h1cHki/CJ?= =?us-ascii?Q?4Alv9sNNmIJf+HvxUevfIsnHidEbtUeD6SUTGNsWNcLGZHf/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OjT5ad/4mxf9C/PsZiQCbyCxJoVt8tFYITfMKpbiEKqFdBcf/7ciX+Antxa0FlcB9qIo7sm4=; 7:VxqA8dAvj2eb6EDOvc7OYENSa0ImpzgVxJp8LLvh8bVUJzcbtUeZwJRAnBf5ilrubalY9EsIckXbowsSaFPoj0Xe/FHFRZ4QpBHGRFCJBb98CBypbA+BkH/vddPkyE/BbjZ0uI2go2AOaPHzApK1hL1roDvvPi2wP8IA8F2lONYkK62eRa9ASU82EmbnRe2leLb+M9NYK3hKUp1kL6OyEkIPCo+o7zH1315a+mS6BWZhD0Z/CofobkdQuZQjdck1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1236; 20:mWKyVrp/J3/iVw4K/qjCI1qu4OcB0cKXwTr4RvQ1ucBmCiLZWLY2UmkBu69IRyfAovBSQcGK4HHjvtW9+FZijByQEAvoMmCpmrNhke6lTGnYoo+bEiMZVvHsOQshWcRR0olwnt3oSUoAlFkoyeeWjKePf2mce7shhqaPD4U5xK7HcWkUNF7eN+t0pOAfiW0/8R6UqbdDrzpOFXBnycl/jbNWrZZe5p9kVo96t9lnnl9YM2uVTEoZ56AO2m5B6lOU X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2018 07:32:27.2896 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b0923cd4-1e98-4fb1-0a74-08d5750f6e1c 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: BN6PR12MB1236 Cc: tiwai@suse.de, Alexander.Deucher@amd.com, lgirdwood@gmail.com, Vijendar Mukunda Subject: [alsa-devel] [PATCH 7/9] ASoC: amd: modifications in dma stop sequence X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP As per design, non-circular dma also need to be stopped explicitly for both playback and capture scenarios. Added condition checks to stop non-circular dma for both the I2S controller instances. Signed-off-by: Vijendar Mukunda Reviewed-by: Alex Deucher --- sound/soc/amd/acp-pcm-dma.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index 0e2dc05..a16e2bb 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -1178,11 +1178,15 @@ static int acp_dma_trigger(struct snd_pcm_substream *substream, int cmd) switch (rtd->i2s_play_instance) { case I2S_BT_INSTANCE: ret = acp_dma_stop(rtd->acp_mmio, + SYSRAM_TO_ACP_BT_INSTANCE_CH_NUM); + ret = acp_dma_stop(rtd->acp_mmio, ACP_TO_I2S_DMA_BT_INSTANCE_CH_NUM); rtd->i2sbt_renderbytescount = 0; break; case I2S_SP_INSTANCE: default: + ret = acp_dma_stop(rtd->acp_mmio, + SYSRAM_TO_ACP_CH_NUM); ret = acp_dma_stop(rtd->acp_mmio, ACP_TO_I2S_DMA_CH_NUM); rtd->i2ssp_renderbytescount = 0; @@ -1192,12 +1196,16 @@ static int acp_dma_trigger(struct snd_pcm_substream *substream, int cmd) case I2S_BT_INSTANCE: ret = acp_dma_stop(rtd->acp_mmio, I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM); + ret = acp_dma_stop(rtd->acp_mmio, + ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM); rtd->i2sbt_capturebytescount = 0; break; case I2S_SP_INSTANCE: default: ret = acp_dma_stop(rtd->acp_mmio, I2S_TO_ACP_DMA_CH_NUM); + ret = acp_dma_stop(rtd->acp_mmio, + ACP_TO_SYSRAM_CH_NUM); rtd->i2ssp_capturebytescount = 0; } }