From patchwork Mon Jul 16 07:02:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akshu Agrawal X-Patchwork-Id: 10525617 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 0E0A9603ED for ; Mon, 16 Jul 2018 07:13:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFFBC2885F for ; Mon, 16 Jul 2018 07:13:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3EA328A53; Mon, 16 Jul 2018 07:13:42 +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=-2.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=unavailable 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 0E235282EC for ; Mon, 16 Jul 2018 07:13:38 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9657A26774B; Mon, 16 Jul 2018 09:03:42 +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 DB1E526774D; Mon, 16 Jul 2018 09:03:39 +0200 (CEST) Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-eopbgr730043.outbound.protection.outlook.com [40.107.73.43]) by alsa0.perex.cz (Postfix) with ESMTP id 55704267743 for ; Mon, 16 Jul 2018 09:03:37 +0200 (CEST) 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=XaKf8CmuIcKS/zEqu7yu01cClrMy6LQdNF7ASVO4FW4=; b=xCQJCC5ZmKwMC+l0xB+EOSolhAMcRuQSd8xKZBflJ8VxShnA7bpMocaBz4mIiI3dtD9ae5AswygUdkT3/LGF0vnwG4Rkw1w3wmS9/b4OA9gVvZo5sitaKCysMCKl1WswLSa/BO17ojHAIZqJ4KNG16YGIMJMxnSNriUFkd5MDjw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Akshu.Agrawal@amd.com; Received: from akshu-HP-EliteBook-745-G2.amd.com (202.56.249.162) by SN1PR12MB2365.namprd12.prod.outlook.com (2603:10b6:802:25::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.21; Mon, 16 Jul 2018 07:03:26 +0000 From: Akshu Agrawal To: Date: Mon, 16 Jul 2018 15:02:41 +0800 Message-Id: <1531724566-4019-2-git-send-email-akshu.agrawal@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1531724566-4019-1-git-send-email-akshu.agrawal@amd.com> References: <1531724566-4019-1-git-send-email-akshu.agrawal@amd.com> MIME-Version: 1.0 X-Originating-IP: [202.56.249.162] X-ClientProxiedBy: MA1PR0101CA0066.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::28) To SN1PR12MB2365.namprd12.prod.outlook.com (2603:10b6:802:25::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 22b12abe-4cc9-4be7-7f37-08d5eaea3f16 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(48565401081)(2017052603328)(7153060)(7193020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mKUae67MaanZd/RdcLk+uaAO2WIY+nF9HpGUuwCOVazUdA7bfKDXUbWjP8t2iOFo8tBfexVczvSh5ugzcDprNVkv28CmbtMB/FfVtRng2OGOyurSTKmjNhY1xWnX02eOL8d49bwHEYz4JshKfemNJl1vYcjIryEv6sgtEnL78Ay1I9mhbhZZkJ3K+lHhYgbVFprYzeqxzQm0a5llUJ13PKKpp+nGGU7RTqf4M/Uy9iEcMyXowCYioOrCXA/zOQxN74dKJMJ+f6qp5N7obJYDWwAUIrHBoVvcElp6Qcb4jtq7oCPPIFp+A1w5ISzOoxwrBRY3IvsXJTQy/gazKOYrFwtGvrMGHE7LeJAvKmW2lTx3yTTanJ3CN6Vt1q3B5xavZbMiRsAojHEZXvGwXx/q1O/ueTEz; 4:g1FfiTuNOO1luIIhPd813UFMn2qXPWxmzgWqvhFY0ufOjzJ3mcBbne12SWHdisCeRm74VJ2WSxI143WgEBEu+runlVijJP3oBXcHKbGERftPEM8Y7c/tXR9JIa4SIirco7CMnBjI9PVzskLL814hyU0xWELOY4ehRI0od2N8qxprtymrcjmsJIZbVrqZvnp5pabUR+5F3GCX1je1vjJAZvLYC+JCPCBWTDKFZcPOF0kZwl70MkW5cZIn+hkqdlzP9l0Y1JUSQcXjZf7P+f0QOMiXBQ203cQEBrq+qSKBvtBEnmq+N9vj++T9MPmWFljG 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)(93006095)(93001095)(10201501046)(3231311)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:SN1PR12MB2365; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB2365; X-Forefront-PRVS: 073515755F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(136003)(39860400002)(346002)(376002)(366004)(199004)(189003)(51416003)(6116002)(16526019)(6486002)(1671002)(386003)(7696005)(186003)(48376002)(36756003)(26005)(76176011)(72206003)(52116002)(50466002)(478600001)(97736004)(3846002)(106356001)(105586002)(53416004)(316002)(8936002)(50226002)(5660300001)(2906002)(16586007)(25786009)(44832011)(54906003)(86362001)(53936002)(81166006)(81156014)(4326008)(305945005)(6666003)(8676002)(7736002)(109986005)(66066001)(11346002)(2616005)(476003)(446003)(956004)(47776003)(486006)(68736007)(39060400002)(266003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB2365; H:akshu-HP-EliteBook-745-G2.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB2365; 23:YQniN1hLRQLJWh0VOA345/orc8xixMAouFkYRwBof?= =?us-ascii?Q?23lB2u7qDzCkr3T2YyyKE65JxJcgo6usEV50yxblqU3LuPwK8eecy+8jOfzT?= =?us-ascii?Q?AHtxUo7C8X1KmUSLO3DdC18ePnbOOm7Ckr9IrVymXQ2fghL+e7Luo/77kBFR?= =?us-ascii?Q?x6nlUOLzD3j7xFjoIRiyNH8LAN2jM00J4qHRfU1+5wVcKdq873/K+WrkzMtj?= =?us-ascii?Q?qxGcLUMdnvz0hP4GwivduwgtdiOvE7hgEeN4Vxzw4OF8m92qSxvcyH1Ll6PP?= =?us-ascii?Q?+8kKBgH4Mw78U4n0GqE98JIIDbP2G8GPP3NWKtz+Ca6oeQbqwc/XRe+9yrl4?= =?us-ascii?Q?8LfhD+a6EqcKtqitRMVdPQoFN3UKaL6p+y+htJZVDAcRK+GLlYPe9oEYj5Xq?= =?us-ascii?Q?ss+fKM/gZ71IuOB/hqcoNZ787dXczoI0xsOJ/GVKdADq6TUXg5ewPKUlwKsE?= =?us-ascii?Q?Q0pAUKgAqPmtCGXjSiDqCqBoXoF+8a84LzUlweqfSSa250i/u9mNgT41NgKU?= =?us-ascii?Q?zuDCmyVfvW3z5MMXfVnd4ceLkfVcoi242dilm/9byp4DmEgyB223DCYeakEf?= =?us-ascii?Q?AiGZnqqVvrdKEMKE8nhM0iZ5BlTh9hjtrNip9EBuQ+02DxmwtilUFyTgh05J?= =?us-ascii?Q?jsMrSq1WLFrZZ851EY7w3zTpaKTiSrsfmYar+RKzKLQrjHiiJhEnrifevGBg?= =?us-ascii?Q?bOdEPpdNjuHknkhZBvXqvKEuho9sBFC0XPh0bNy1DAIoAfQXe/QByFQ2t7a9?= =?us-ascii?Q?RGrpnsmAAOeXXWW7Utg+ze5bzlZKHyCk9k5P/4U91DblCygRqYP/NTqQEbnA?= =?us-ascii?Q?Gtjsm1xPMxsr+DstsAO1Q047TyFZACvG7TnyEELeLKQJpg2LibkA8nXY1bKI?= =?us-ascii?Q?NYPSI8kMY9dIu0kA7fHZgPt7SPt2osbO37pbpZanPbDi/ZvonmML80jPKl/n?= =?us-ascii?Q?bnQQ9vqjPBEOCZsqU6E5ofaZ7iLq+GFaz0DQK17p6Up4JGCwXNz2dyAmZRB0?= =?us-ascii?Q?T5Y5UPxeUlNsO39ieAT5Ejfv/AjYgpMHjL7YDoV32nqAp6MYP29OfRAJuH0w?= =?us-ascii?Q?aI/TQKjlv3dMcYylPPrA+HHt9ADSW8w0IX1K+r/RBU4+LGJcKv4BNz5A+i7d?= =?us-ascii?Q?M1LSWCcvdWd4EwgUruTmNCR1SjyddDb+ysan28j4K50uC+7tkPMo98oYWimA?= =?us-ascii?Q?1TX3QnB1qufj1YjPV/92SFlKkArZ5Sn/5AP39oasw0QbZ0G+pnU+53j7Eu80?= =?us-ascii?Q?fxQFtjWNGv0SPtcFOLZ5z29gHZarKX+9V8FhMRcNBP93xUVyGlRseCPH7VGB?= =?us-ascii?B?QT09?= X-Microsoft-Antispam-Message-Info: 4oCd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7vnA3AeXmRfoTfDWP0+kH/AGVUvQq3YbtOJQ6/YGfT+MUCwKuEsD1WqK6D1kP72tDusEpdHv4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2365; 7:S50PfACsqZ/UrwB2/MO7EPBNYkrwzMKiCmvmfZMTYTJvOW1BafFb1RzVlwAeEVv4K9JUUzKbsW3ArQz+PpdhAFCSPGNHjD6oceAjj1zxtVBKfgazw+RC4LVE7hAJc/ra+zGs/o+qUvTjYi4zclt2tPVpX4ORNiRTiKAd0w987Ch2/RWWCt/PrEjcf1918q2JHnLlfqW8KIgSp40tBscvyKoEvpU5BUWwPRi/glgzFxQCXStuIdGlelDpzAkx9LFh; 20:+mfuw+KUptZthVb9bdUwmkDMPoXJCT/TxQsA7tYzep9f2qhVjajXwQkaxmv+FgZVckG5jEnTfisZSzbdhnhJkVlt/rR2DziJSSC8aRfjHiw/qUgbiQm6jPTCx78K7blfJ8Bfv9QSbrcfu1QdualE4tNPZf7m9lofa7ETcMua/qB2XG5gXpUvJ0qEnvVBUncbv7Azhx4nTTdrrgXwf2G79yJsEhtAudqX5WBk2428JBcy2upmk5eQG5xhgTWk1Pvz X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2018 07:03:26.2059 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22b12abe-4cc9-4be7-7f37-08d5eaea3f16 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2365 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list , Takashi Iwai , Liam Girdwood , djkurtz@chromium.org, Mark Brown , "Mukunda, Vijendar" , Alex Deucher , akshu.agrawal@amd.com, Guenter Roeck Subject: [alsa-devel] [PATCH 2/2] ASoC: AMD: For capture have interrupts on I2S->ACP channel 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 Having interrupts enabled for ACP<->SYSMEM DMA transfer, we are in for an interrupt storm. For both playback and capture interrupts should be enabled for I2S<->ACP DMA. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index eeb8677..94bcf69 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -224,13 +224,11 @@ static void set_acp_sysmem_dma_descriptors(void __iomem *acp_mmio, switch (asic_type) { case CHIP_STONEY: dmadscr[i].xfer_val |= - BIT(22) | (ACP_DMA_ATTR_SHARED_MEM_TO_DAGB_GARLIC << 16) | (size / 2); break; default: dmadscr[i].xfer_val |= - BIT(22) | (ACP_DMA_ATTR_SHAREDMEM_TO_DAGB_ONION << 16) | (size / 2); } @@ -421,9 +419,9 @@ 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: @@ -705,18 +703,18 @@ static irqreturn_t dma_irq_handler(int irq, void *arg) 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; snd_pcm_period_elapsed(irq_data->capture_i2ssp_stream); - 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(ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM)) != 0) { + if ((intr_flag & BIT(I2S_TO_ACP_DMA_BT_INSTANCE_CH_NUM)) != 0) { valid_irq = true; snd_pcm_period_elapsed(irq_data->capture_i2sbt_stream); 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); }