From patchwork Tue Jul 3 15:34:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 140983 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1308752ljj; Tue, 3 Jul 2018 08:34:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeWGGhTGDpSupv7hTyqf3SemfNf8nKGa9eF4/POJgqwub0pK1zDKSlofO/ILlDq1DgFGuDH X-Received: by 2002:adf:ebc3:: with SMTP id v3-v6mr22752704wrn.33.1530632097892; Tue, 03 Jul 2018 08:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530632097; cv=none; d=google.com; s=arc-20160816; b=M9cjKWCDb8+PmMvwQimnCkFMvDbXofvxzwdUt9H1pn2BcpdNkAO9YZHt6q4XPE2VvJ 2DWMg53i2zp4WwKI9KgkI97mnvZI8aEmmTSkDLmLELOeGnzvCyp8kEdUvGMFOIylC5mA YZ+XL5UshFJ98qqIRCG/OFVXgtMGsiUiMxt34hGrfAZLUDH3X8u74ZDhQEPtSo9uVqFg YHfd++ug2qKLtVtGPtxeNN7W6jboezhY/wNqEqtYb7Rnw3d+kEYGkbzhPx4pO9wQAHnt R89dULj33Hm472v1oGcLndRwjkmDdmsPjnp05g1NPNIQXrr24NeAeOwVr/hR7xHivKP4 UgtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=gjMRs/7CerSnd5uF0r0ou4ybeymygyduDBYyGiCu6oU=; b=nKPX0IVXWSyU6L6KfpWRADqpa4CKZSXrOnxN+/R07a1PwfksoaArwVaAu497zqDXbS JA34+Q28v5M1+/1j+IRhJpTOEpN8lmN8VaW4hU7HSciyY5UQ1FaYpJXjQ0AFDqQvmOy0 E9fxr2Kn7Q3rjAu208GIGz0BYWQnduNg4kVZgrc//BsJS/6YzI/S16cIGVUbm51ICP5f 9DV6NHaG8X5rtXmiVd19huf8UhyNuihD9daZGQjlGt8wBZWWjj5Y2rXvvHAgqDPxklzV pLa00jmI/n4ioWWZ6BYGzRJsyL7FvuvURVrqkr5GhczW/+y1oFeU0BXrgrR9kPKszdej MObA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=LDRTYd3G; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id 6-v6si1150872wmc.34.2018.07.03.08.34.57; Tue, 03 Jul 2018 08:34:57 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=LDRTYd3G; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 8FD7626779B; Tue, 3 Jul 2018 17:34:28 +0200 (CEST) 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 3CB51267749; Tue, 3 Jul 2018 17:34:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 23937267790 for ; Tue, 3 Jul 2018 17:34:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=iCxwgXc3M1LUH8T95w/31pXFtexgrbv/fCrOH6XDNw8=; b=LDRTYd3GHhSR UUl6Id6QdrXwpstwiIM9Wjp4Ag6fTUdndvMYwEaQYu1PMg1aley2XwksnDCtVB+Igf5s7buoNT3hO 3CND9u/JQuJIDlXyaa3lkrqOWWyT6HWX1GWCEGXLgmmfgWRtBToLmv++t7BySnPlxwjBPVUY6p3k8 MObcg=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1faNJj-0006AT-Kg; Tue, 03 Jul 2018 15:34:11 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1faNJj-0003is-6E; Tue, 03 Jul 2018 16:34:11 +0100 From: Mark Brown To: Daniel Kurtz In-Reply-To: <20180702211956.149355-6-djkurtz@chromium.org> Message-Id: Date: Tue, 03 Jul 2018 16:34:11 +0100 Cc: , alsa-devel@alsa-project.org, Takashi Iwai , Liam Girdwood , open list , Mark Brown , "Mukunda, Vijendar" , Alex Deucher , Akshu Agrawal , Guenter Roeck Subject: [alsa-devel] Applied "ASoC: AMD: Simplify trigger handler" to the asoc tree 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: AMD: Simplify trigger handler has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From df61f9f76609456efbc60d495b3235baf7d07691 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Mon, 2 Jul 2018 15:19:55 -0600 Subject: [PATCH] ASoC: AMD: Simplify trigger handler Now that the I2S channel names are fixed, and DMA data flow order is consistent (ch1 then ch2), we can simplify channel start order: start the upstream channel and then the downstream channel for both playback and capture cases. Signed-off-by: Daniel Kurtz Signed-off-by: Mark Brown --- sound/soc/amd/acp-pcm-dma.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.18.0.rc2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index ab60129f4f26..65c1033bd51c 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -1024,10 +1024,7 @@ static int acp_dma_trigger(struct snd_pcm_substream *substream, int cmd) case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: case SNDRV_PCM_TRIGGER_RESUME: rtd->bytescount = acp_get_byte_count(rtd); - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - acp_dma_start(rtd->acp_mmio, rtd->ch1); - acp_dma_start(rtd->acp_mmio, rtd->ch2); - } else { + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { if (rtd->capture_channel == CAP_CHANNEL0) { acp_dma_cap_channel_disable(rtd->acp_mmio, CAP_CHANNEL1); @@ -1040,9 +1037,9 @@ static int acp_dma_trigger(struct snd_pcm_substream *substream, int cmd) acp_dma_cap_channel_enable(rtd->acp_mmio, CAP_CHANNEL1); } - acp_dma_start(rtd->acp_mmio, rtd->ch2); - acp_dma_start(rtd->acp_mmio, rtd->ch1); } + acp_dma_start(rtd->acp_mmio, rtd->ch1); + acp_dma_start(rtd->acp_mmio, rtd->ch2); ret = 0; break; case SNDRV_PCM_TRIGGER_STOP: