From patchwork Mon Mar 26 13:12:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 10307783 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 8AAF7600F6 for ; Mon, 26 Mar 2018 13:12:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BFA62949A for ; Mon, 26 Mar 2018 13:12:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60B04294E9; Mon, 26 Mar 2018 13:12:40 +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 B45B82949A for ; Mon, 26 Mar 2018 13:12:39 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 650842671CC; Mon, 26 Mar 2018 15:12:38 +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 55E9D267190; Mon, 26 Mar 2018 15:12:36 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0045.outbound.protection.outlook.com [104.47.36.45]) by alsa0.perex.cz (Postfix) with ESMTP id 5F124266FA1 for ; Mon, 26 Mar 2018 15:12:32 +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; bh=iOE6lTN8VB9BFw3E/MpGr57LnukENh+eWVo19xvQDiI=; b=YMUiqGe/JfAuXbTTuA0fTbxgR7Abhwrh7gi9/DO67D8oDxOojnNpfUXZz2nedAiVxgq++RYdrNcQ4sqGniZq9dKlHRXCH+FZUYUJmYARV6nZzEuNcNfXvNN3Sz6hvZBdqmE7IwyMYOPD8+AdMgzbsF/3ybCH099wGHQP3nqpYx4= Received: from SN1PR12CA0030.namprd12.prod.outlook.com (2a01:111:e400:5174::40) by SN1PR12MB2432.namprd12.prod.outlook.com (2603:10b6:802:27::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Mon, 26 Mar 2018 13:12:29 +0000 Received: from DM3NAM03FT030.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::205) by SN1PR12CA0030.outlook.office365.com (2a01:111:e400:5174::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.10 via Frontend Transport; Mon, 26 Mar 2018 13:12:29 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none; gmail.com; 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 DM3NAM03FT030.mail.protection.outlook.com (10.152.82.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.631.7 via Frontend Transport; Mon, 26 Mar 2018 13:12:29 +0000 Received: from LinuxHost.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.382.0; Mon, 26 Mar 2018 08:12:26 -0500 From: Vijendar Mukunda To: , , Date: Mon, 26 Mar 2018 18:42:59 +0530 Message-ID: <1522069983-11381-5-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522069983-11381-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1522069983-11381-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)(39380400002)(396003)(39860400002)(376002)(346002)(2980300002)(428003)(199004)(189003)(81156014)(8676002)(305945005)(36756003)(104016004)(97736004)(356003)(8936002)(81166006)(4326008)(106466001)(2201001)(50226002)(336012)(6666003)(426003)(50466002)(48376002)(68736007)(11346002)(186003)(86362001)(39060400002)(446003)(77096007)(26005)(47776003)(5660300001)(2616005)(110136005)(2906002)(54906003)(16586007)(53936002)(76176011)(72206003)(105586002)(316002)(51416003)(53416004)(7696005)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB2432; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT030; 1:799vyK63iRvvVwzqux+Y3iGvKgD0zvk4mgcKuL/QUbIYjBgiaIjIFSjbBOvfsWvwt0T6lwfGmn7MzQxhJ3l7GsG3Gv2eC4ptSjcufmzny4ZNsbCHWTOUAElwWKO8e+sd X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 70dcee61-c30a-48fc-42d0-08d5931b3a3b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:SN1PR12MB2432; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2432; 3:ESm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DW9byahXzFt/feCqOYTR1tHRfuPlyUU7X8DC55gqEx09GFMZ/xzchOF9BqKU4kYYT/a9A2aXLKZkmvHEZ210gjn5FHPxc3KafXjn1zQtZ9ENRDD1GNHTYqDSioYtQlGxQ4gkqENj3BPJicbW74boo5tPVfGKDm81Dp2W+1vK2J6MroUAX8O92xcJIPB4VpxU4GUkVg/ZBd8k1UGDubq/fbI1bHoN0QchKGaTSvhSR8MUohWK4leMLPQYM/RjNU0zV3nYwIMKLmwlm795e0FTPt+SuwEqcgS7LVmBke4XIUMrWbcgiFG8VKY0o1K73gil7F4DTHi2Ek+iCg1/MpY6KcW383P2ohrhMFVvmmUF9KKoLMfeuMZZ4s3csWgj/eLQHJJTVjwNPY3R7r/SgOsnjzMyOpzaGugV64DfOEVnFIAd9qnEU48rC3Jiri5K9OR5IxSH2dZCV7n4iGGY X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(93006095)(93003095)(3002001)(10201501046)(6055026)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011); SRVR:SN1PR12MB2432; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB2432; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2432; 4:eK17i3z1vluLk3kbIF3W895puMXT8fpdn+5+bUdP2XxzbsJkZtykwTIENPLZU3yW/k1oZvemsCH7oPe0PaNK3UNJ1nvSY6voaC6vYQ/gzo8/Rk57zxMs07pdsh+4pCly81v9hPilECpA9VHA6tRvRbndFKiLVyxdExyOsyiaBPQTQmtmxllbMigQs8GzOjQ6key5PdTTV/H4vTBqzF0C8KYmgUyjYHoEn0FkzOfyGh0HP2rssPhfyh09EJtXbdVtrHhtc2uWnFj+QWXrbfw4f7YIe9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OuBspvdDfuhJJlFyWVZZQfmCwaLuCOUqZh9geNsza4JIl/e3isIthTJSOlpDG9tiKZ/dtxd7UxfNZnEfvaPm32fqzmKgNDt2EG7rq13wn5MSInxM/2ztnr7+auvHVg4xHEutrzASH8ifbvxA==; 5:I52SED7fOjSmO+R6DTrF+vdt6QsK37dNNtuDRQXEBl8HZ+iEy41+JPiTOD2uEU27Or3IsnMw9ToGVPavZnBFLmmfWlIIb+W8jTcFuHw4NPeQpBfXupWfw9PE1rj5ojK6eLWLcwK1WaioGuLHiCVUqtp7Wmp1aYhWENzc6aNY0RE=; 24:LM6itYk0jGt5nHAa7vrzMUqUBlGxe0bKSXbNJGPUP5ywirKIDvsItO/wKcCOKf/LhKg1UCtXGgX3Ggou9u2KkbI4v2SIzd1HoebgRkfpFLs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2432; 7:r4k8YqeVztppcTPydc5org9z3wOHRbWayQ5y9C7jVMwQKTLxKiZ4PgzLQZbB2AZIni65hmRCMsJadfU7uQSFTIP2S7GWaG0/oHYfjjgaEAfFc/xSvQRLne9ppgl5nVVneEO37agMqVQMm/Y5Br6kv8+fXAqlj14x1Y6p7UIcJfhihx4ki2P0GbxUq8HIdAzRaPgJpzFUh0/m3FfIOWOFCUMQulKP+HvNyxIcnS2oTZ6i2ien70lqBz+mSgu4rk7R; 20:MeOu2FpJWhC+ZepQ56NcfpnDgAsbeWYfwkOFzxyHJOmm9/J6zt4WjKMS0SeacmlaPgru95g632sAMnzFRg1iMF1cltYHapsvWgO3Uqjf6dyjlGUQoeHFm5lRJRPFKatY2HVieFvB85xhmTuH817rWFSHv4nTrvx20XwtRnUXwbvwtD4JZWS5gWX0Vk39NrX2OJ8wAM+0k7jZMGeXsacLNm7tLYf4tEFpvQam5K5nDtI+Zz9x/pwmFkDocmoT3gN/ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2018 13:12:29.0499 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70dcee61-c30a-48fc-42d0-08d5931b3a3b 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: SN1PR12MB2432 Cc: tiwai@suse.de, Alexander.Deucher@amd.com, Vijendar Mukunda , lgirdwood@gmail.com, Akshu.Agrawal@amd.com Subject: [alsa-devel] [PATCH 4/8] ASoC: amd: Interrupt handler changes for BT I2S instance 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 Interrupt handler changes for BT I2S instance. Signed-off-by: Vijendar Mukunda Reviewed-by: Alex Deucher --- sound/soc/amd/acp-pcm-dma.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index 6da54ab..9bd12bd 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -721,6 +721,24 @@ static irqreturn_t dma_irq_handler(int irq, void *arg) acp_mmio, mmACP_EXTERNAL_INTR_STAT); } + if ((intr_flag & BIT(ACP_TO_I2S_DMA_BT_INSTANCE_CH_NUM)) != 0) { + valid_irq = true; + if (acp_reg_read(acp_mmio, mmACP_DMA_CUR_DSCR_9) == + PLAYBACK_START_DMA_DESCR_CH9) + dscr_idx = PLAYBACK_END_DMA_DESCR_CH8; + else + dscr_idx = PLAYBACK_START_DMA_DESCR_CH8; + config_acp_dma_channel(acp_mmio, + SYSRAM_TO_ACP_BT_INSTANCE_CH_NUM, + dscr_idx, 1, 0); + acp_dma_start(acp_mmio, SYSRAM_TO_ACP_BT_INSTANCE_CH_NUM, + false); + snd_pcm_period_elapsed(irq_data->play_i2sbt_stream); + acp_reg_write((intr_flag & + BIT(ACP_TO_I2S_DMA_BT_INSTANCE_CH_NUM)) << 16, + acp_mmio, mmACP_EXTERNAL_INTR_STAT); + } + if ((intr_flag & BIT(I2S_TO_ACP_DMA_CH_NUM)) != 0) { valid_irq = true; if (acp_reg_read(acp_mmio, mmACP_DMA_CUR_DSCR_15) == @@ -743,6 +761,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_BT_INSTANCE_CH_NUM)) != 0) { + valid_irq = true; + if (acp_reg_read(acp_mmio, mmACP_DMA_CUR_DSCR_11) == + CAPTURE_START_DMA_DESCR_CH11) + dscr_idx = CAPTURE_END_DMA_DESCR_CH10; + else + dscr_idx = CAPTURE_START_DMA_DESCR_CH10; + config_acp_dma_channel(acp_mmio, + ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM, + dscr_idx, 1, 0); + acp_dma_start(acp_mmio, ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM, + false); + acp_reg_write((intr_flag & + BIT(I2S_TO_ACP_DMA_BT_INSTANCE_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); + acp_reg_write((intr_flag & + BIT(ACP_TO_SYSRAM_BT_INSTANCE_CH_NUM)) << 16, + acp_mmio, mmACP_EXTERNAL_INTR_STAT); + } + if (valid_irq) return IRQ_HANDLED; else