From patchwork Tue Jul 3 15:34:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 140986 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1309192ljj; Tue, 3 Jul 2018 08:35:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfy8I4ZM+rO/sjNmV2APdYlv7ueyhuE9dbGcT2jVe2xsNGHIPLtvYPfvd4BCz9fIkE1WEA/ X-Received: by 2002:adf:8062:: with SMTP id 89-v6mr21739855wrk.221.1530632122081; Tue, 03 Jul 2018 08:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530632122; cv=none; d=google.com; s=arc-20160816; b=lJMfLla2HI2AeCjBHvYX1/VAA8XLWNR6irHrvILs2Vs+qUCAx+tIYyRZH3f1tANQXb aOEizP0QaFt3W/DdPkYAfO5xg9HHOrJvUHZFn2p4BedzOFYNck1jsN7jrpWnzJeRs0Gk 4Q2jOIcSl3LYY0m6YSKfEpXq65+aUo7GAPaTBkU6G8k/6sllBs2Wl1TIr8dB9ZDnEdQc AoTGHg4cO0ygyZYDx+ymy/7ZN777FXtkp8aouQXNjQCW1M9RXuh6K/YyZoDzRmNPZqwL Ojj8Es3l5WaFXjZ/xu0dHypKo1Z4Z1hoPLWbS3US3ZZ7GKxm3kiB1glAq89Me0IUOgEV 1q7g== 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=tbBm5YAE3q/gRDKW3H0PvtuqU2AEytVplT8HkD/lSWo=; b=aupKPMO48R0czxerP+EUGfaFmTwxqmae3cWzNQNyOzG7N62ovDJ3t8/MMKzPO65P3k TpdVYWjwUC/uHnG9sW0YkpAhMch+WW+QwN3aaPRCxp/q0kQuc15zeSIDO259vO1xY07R t00F1f9c3PdYcf2n5kOIvV6TWAxp5EW0jFXT9pFWbHT5H6rKumuTQUcgQtsK+N7HEzm1 h79fI3nDeRG9jFZUQRakulHC28zA0wbept8Lpe3U1NmZWozVAwYD+iiDk3L17NXaOv1n i2SJWKhXqHer39H3qfpKQIDOYB44LNKu/NbRHBzoWBdsa3wpk1cVkadFPEUXzlKGTvuf 1KbQ== 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=YY9Lm4Gd; 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 t128-v6si1240303wma.154.2018.07.03.08.35.21; Tue, 03 Jul 2018 08:35:22 -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=YY9Lm4Gd; 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 74F932677AC; Tue, 3 Jul 2018 17:34:40 +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 E45AB2677A9; 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 46CE526776A for ; Tue, 3 Jul 2018 17:34:27 +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=6dS+RV49xuc8s2RrNYH34kn4Fk7f8z0tw/9LcdB7/bQ=; b=YY9Lm4Gdu1Bp nSkZ3GliQ1Z6ncQmfr7/4tQmsv1mPT3yuPRgmQCoJUufMELf3j/jFr3VjKYjXktebShzqGJIJcnMY daNhTIsCA0pCrxL7g5y4SnXlNGZ8B5DMbCOOJUmeaey0HbMxkBIRQz7MdYkYZrE5itDi4afLWAEeQ 0V9mI=; 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 1faNJn-0006Af-Vp; Tue, 03 Jul 2018 15:34:16 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1faNJn-0003l5-IK; Tue, 03 Jul 2018 16:34:15 +0100 From: Mark Brown To: Daniel Kurtz In-Reply-To: <20180702211956.149355-5-djkurtz@chromium.org> Message-Id: Date: Tue, 03 Jul 2018 16:34:15 +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: Do not generate interrups for every captured sample" 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: Do not generate interrups for every captured sample 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 8c6b964eddd2c39a9796899b2be099ece1b6c6ca Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Mon, 2 Jul 2018 15:19:54 -0600 Subject: [PATCH] ASoC: AMD: Do not generate interrups for every captured sample On capture, audio data is first copied from I2S to ACP memory, and then from ACP to SYSRAM. The I2S_TO_ACP_DMA interrupt fires on every sample transferred from I2S to ACP memory. That is it fires ~48000 times per second when capturing @ 48 kHz. Since we don't do anything on this interrupt anyway, disable it to save quite a few unnecessary interrupts. The real "work" (calling snd_pcm_period_elapsed()) is done when transfer from ACP to SYSRAM is complete. Signed-off-by: Daniel Kurtz Signed-off-by: Mark Brown --- sound/soc/amd/acp-pcm-dma.c | 15 --------------- 1 file changed, 15 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 df53412967e1..cd4d2520ac14 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -412,10 +412,8 @@ static void acp_dma_start(void __iomem *acp_mmio, u16 ch_num) switch (ch_num) { case ACP_TO_I2S_DMA_CH_NUM: case ACP_TO_SYSRAM_CH_NUM: - case I2S_TO_ACP_DMA_CH_NUM: case ACP_TO_I2S_DMA_BT_INSTANCE_CH_NUM: case ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM: - case I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM: dma_ctrl |= ACP_DMA_CNTL_0__DMAChIOCEn_MASK; break; default: @@ -704,12 +702,6 @@ 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) { - valid_irq = true; - acp_reg_write((intr_flag & BIT(I2S_TO_ACP_DMA_CH_NUM)) << 16, - acp_mmio, mmACP_EXTERNAL_INTR_STAT); - } - if ((intr_flag & BIT(ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM)) != 0) { valid_irq = true; snd_pcm_period_elapsed(irq_data->capture_i2sbt_stream); @@ -718,13 +710,6 @@ static irqreturn_t dma_irq_handler(int irq, void *arg) acp_mmio, mmACP_EXTERNAL_INTR_STAT); } - if ((intr_flag & BIT(I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM)) != 0) { - valid_irq = true; - acp_reg_write((intr_flag & - BIT(I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM)) << 16, - acp_mmio, mmACP_EXTERNAL_INTR_STAT); - } - if (valid_irq) return IRQ_HANDLED; else