From patchwork Tue Jul 3 15:34:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 140985 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1309064ljj; Tue, 3 Jul 2018 08:35:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdLDqblNeuDhGk99QDZjoBAhQL+UZGWTmEtfjc+nq8n/8AsSt8kZjhkXmKlP1rEc4Wm50HP X-Received: by 2002:a1c:1203:: with SMTP id 3-v6mr4051790wms.46.1530632114101; Tue, 03 Jul 2018 08:35:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530632114; cv=none; d=google.com; s=arc-20160816; b=t/zDwU3j45MmWjRxqF/l4OUArEg9jNaGD5xJLLkQ30SRyP8k3qdOR6spDz4+QdnwXx cYsapghZm3m0TF/xK8qLRZsX0kyxA1xNgsBKdAA1fRLl8QqSPLS9yY8YakowRWIlzxsm +RsADnl28SyC+OvK+DoCQbLttdF9pLUeFzShm98apw6c9s1q9aRPRy4j+2rpc7Fimp1t Bm6wF3TSJec8OpUzBOSY25ZqHYZpqn8AmqDOfPuZOVU/8Roz7hCvNmn01GV45jDdeyWt 2wrhCYWnyj2r/yuFX9aBlOclpmon/i/d57pRlc+YYaHxW4WZdLpTH5bp+19qGAZGCsR4 v7Tg== 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=czCoN9M4jH7Mz0vP2rLcdCzg8JgfL76XbFZPXMoxvI8=; b=sSErylFkSiDfvR47lhY1+SWZFv7ZZH2aDSdgcVoIyRKZhS+zHTtrEUvqHMGFEVuVVH 0UUy0nx7eIumKfhlXmJjfe8wOddzg7LpwfvZLZkixVHUiDb5tqifryb+Cf9dKtiPv5wf p/U2lzZS1hg+FBRjhZ7wdDNv+C6UaBZJDzNZPjH1JG3AuNny0gw9VbEYQNF7liFsPDeo 3j7x0N53/rBuAgWwTveWWkbEMxRt9NL4MMeHQJF69+vo0Xsof6PHYE0/UxWLA8Q9L5vz nolDxB5mSchjKOQ6QKflk+VPkSD/LNjLEN1IM11YZSe4EyUTZgy2qIZcno0YuBR40QSK y73A== 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=QHURTkoP; 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 s12-v6si1312054wrb.190.2018.07.03.08.35.13; Tue, 03 Jul 2018 08:35:14 -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=QHURTkoP; 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 CD4C62677AD; Tue, 3 Jul 2018 17:34:33 +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 024D12677A9; Tue, 3 Jul 2018 17:34:30 +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 83DDD267763 for ; Tue, 3 Jul 2018 17:34:25 +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=mnTvY/df1XfM7nVKhBrkclLv/tS6+29w6b9z8Z69X7w=; b=QHURTkoPDawF s2SIfjdt3Dh2kfsW1i6e9++9msTs1FOI8gle32t+o47hXnO7aIBnhWzWcmIVMGh6I5jH4Moo5j59T iSvp9J1/mUnwxkqeI+RLUJvI6fn0ejVhnQ6ZNjZeGJzuJPin/fMQnhU4ohbRfBld5FsDBXWJ+9QWn igYyo=; 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 1faNJq-0006An-4H; Tue, 03 Jul 2018 15:34:18 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1faNJp-0003mJ-Mm; Tue, 03 Jul 2018 16:34:17 +0100 From: Mark Brown To: Daniel Kurtz In-Reply-To: <20180702211956.149355-4-djkurtz@chromium.org> Message-Id: Date: Tue, 03 Jul 2018 16:34:17 +0100 Cc: , alsa-devel@alsa-project.org, Liam Girdwood , Greg Kroah-Hartman , open list , Takashi Iwai , Mark Brown , "Mukunda, , Vijendar" , Alex Deucher , Akshu Agrawal , Guenter Roeck Subject: [alsa-devel] Applied "ASoC: AMD: Fix Capture DMA channel names" 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: Fix Capture DMA channel names 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 55af49ac1b8627dfbfa2689af118d994d7a0ba1b Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Mon, 2 Jul 2018 15:19:53 -0600 Subject: [PATCH] ASoC: AMD: Fix Capture DMA channel names On capture, audio data is first copied from I2S to ACP memory, and then to SYSRAM. For each step the channel number increases, so the names in the driver were wrong. Signed-off-by: Daniel Kurtz Signed-off-by: Mark Brown --- sound/soc/amd/acp-pcm-dma.c | 24 ++++++++++++------------ sound/soc/amd/acp.h | 8 ++++---- 2 files changed, 16 insertions(+), 16 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 034fac3de037..df53412967e1 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -697,31 +697,31 @@ static irqreturn_t dma_irq_handler(int irq, void *arg) acp_mmio, mmACP_EXTERNAL_INTR_STAT); } - if ((intr_flag & BIT(I2S_TO_ACP_DMA_CH_NUM)) != 0) { + if ((intr_flag & BIT(ACP_TO_SYSRAM_CH_NUM)) != 0) { valid_irq = true; snd_pcm_period_elapsed(irq_data->capture_i2ssp_stream); - acp_reg_write((intr_flag & BIT(I2S_TO_ACP_DMA_CH_NUM)) << 16, + acp_reg_write((intr_flag & BIT(ACP_TO_SYSRAM_CH_NUM)) << 16, acp_mmio, mmACP_EXTERNAL_INTR_STAT); } - if ((intr_flag & BIT(ACP_TO_SYSRAM_CH_NUM)) != 0) { + if ((intr_flag & BIT(I2S_TO_ACP_DMA_CH_NUM)) != 0) { valid_irq = true; - acp_reg_write((intr_flag & BIT(ACP_TO_SYSRAM_CH_NUM)) << 16, + acp_reg_write((intr_flag & BIT(I2S_TO_ACP_DMA_CH_NUM)) << 16, acp_mmio, mmACP_EXTERNAL_INTR_STAT); } - if ((intr_flag & BIT(I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM)) != 0) { + if ((intr_flag & BIT(ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM)) != 0) { valid_irq = true; snd_pcm_period_elapsed(irq_data->capture_i2sbt_stream); acp_reg_write((intr_flag & - BIT(I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM)) << 16, + BIT(ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM)) << 16, acp_mmio, mmACP_EXTERNAL_INTR_STAT); } - if ((intr_flag & BIT(ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM)) != 0) { + if ((intr_flag & BIT(I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM)) != 0) { valid_irq = true; acp_reg_write((intr_flag & - BIT(ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM)) << 16, + BIT(I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM)) << 16, acp_mmio, mmACP_EXTERNAL_INTR_STAT); } @@ -899,8 +899,8 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream, switch (rtd->i2s_instance) { case I2S_BT_INSTANCE: rtd->pte_offset = ACP_ST_BT_CAPTURE_PTE_OFFSET; - rtd->ch1 = ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM; - rtd->ch2 = I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM; + rtd->ch1 = I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM; + rtd->ch2 = ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM; rtd->sram_bank = ACP_SRAM_BANK_4_ADDRESS; rtd->destination = FROM_BLUETOOTH; rtd->dma_dscr_idx_1 = CAPTURE_START_DMA_DESCR_CH10; @@ -914,8 +914,8 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream, case I2S_SP_INSTANCE: default: rtd->pte_offset = ACP_CAPTURE_PTE_OFFSET; - rtd->ch1 = ACP_TO_SYSRAM_CH_NUM; - rtd->ch2 = I2S_TO_ACP_DMA_CH_NUM; + rtd->ch1 = I2S_TO_ACP_DMA_CH_NUM; + rtd->ch2 = ACP_TO_SYSRAM_CH_NUM; switch (adata->asic_type) { case CHIP_STONEY: rtd->pte_offset = ACP_ST_CAPTURE_PTE_OFFSET; diff --git a/sound/soc/amd/acp.h b/sound/soc/amd/acp.h index 3190fdce6307..0a2240bff62e 100644 --- a/sound/soc/amd/acp.h +++ b/sound/soc/amd/acp.h @@ -74,16 +74,16 @@ #define ACP_TO_I2S_DMA_CH_NUM 13 /* Capture DMA channels */ -#define ACP_TO_SYSRAM_CH_NUM 14 -#define I2S_TO_ACP_DMA_CH_NUM 15 +#define I2S_TO_ACP_DMA_CH_NUM 14 +#define ACP_TO_SYSRAM_CH_NUM 15 /* Playback DMA Channels for I2S BT instance */ #define SYSRAM_TO_ACP_BT_INSTANCE_CH_NUM 8 #define ACP_TO_I2S_DMA_BT_INSTANCE_CH_NUM 9 /* Capture DMA Channels for I2S BT Instance */ -#define ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM 10 -#define I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM 11 +#define I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM 10 +#define ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM 11 #define NUM_DSCRS_PER_CHANNEL 2