From patchwork Fri Feb 16 07:33:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 10224123 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 4871C603EE for ; Fri, 16 Feb 2018 07:33:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3901629095 for ; Fri, 16 Feb 2018 07:33:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C163290B3; Fri, 16 Feb 2018 07:33:18 +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 2F75A29095 for ; Fri, 16 Feb 2018 07:33:17 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 8729D267D8B; Fri, 16 Feb 2018 08:32:27 +0100 (CET) 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 9B8AA267DA2; Fri, 16 Feb 2018 08:32:26 +0100 (CET) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0062.outbound.protection.outlook.com [104.47.34.62]) by alsa0.perex.cz (Postfix) with ESMTP id C94A5267D86 for ; Fri, 16 Feb 2018 08:32:23 +0100 (CET) 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=O4EYgGg8VM6mPsWmSLAxhsM7MzTWFMYjhDijPQQT2jc=; b=NSSFg/73jkXBrV9pgNlAjyS7SXJtzMWsWJ/KgIwNos0nJw/eXZmhMeqxTN85mwRi6iznSamexD0Mj1/9krm9OC21BYnUiipxUm9parMIWuBo7/p1s90UsEwSZuE+rwGfB+Dzj8R1CP6n/fun3N0Hnj35sW1DXM6iijzxkcz5FuE= Received: from DM3PR12CA0080.namprd12.prod.outlook.com (10.161.151.152) by BY2PR12MB0257.namprd12.prod.outlook.com (10.162.83.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Fri, 16 Feb 2018 07:32:19 +0000 Received: from BY2NAM03FT063.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::204) by DM3PR12CA0080.outlook.office365.com (2603:10b6:0:57::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.506.18 via Frontend Transport; Fri, 16 Feb 2018 07:32:19 +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 SATLEXCHOV02.amd.com (165.204.84.17) by BY2NAM03FT063.mail.protection.outlook.com (10.152.85.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.19 via Frontend Transport; Fri, 16 Feb 2018 07:32:18 +0000 Received: from SATLEXDAG01.amd.com (10.181.40.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server (TLS) id 14.3.382.0; Fri, 16 Feb 2018 01:32:16 -0600 Received: from SCYBEXDAG03.amd.com (10.34.11.13) by SATLEXDAG01.amd.com (10.181.40.3) with Microsoft SMTP Server (TLS) id 14.3.382.0; Fri, 16 Feb 2018 02:32:15 -0500 Received: from LinuxHost.amd.com (10.129.12.246) by SCYBEXDAG03.amd.com (10.34.11.13) with Microsoft SMTP Server id 14.3.382.0; Fri, 16 Feb 2018 15:32:12 +0800 From: Vijendar Mukunda To: , , Date: Fri, 16 Feb 2018 13:03:50 +0530 Message-ID: <1518766434-7911-6-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518766434-7911-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1518766434-7911-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)(376002)(39860400002)(346002)(39380400002)(396003)(2980300002)(428003)(189003)(199004)(316002)(26005)(76176011)(54906003)(16586007)(110136005)(36756003)(86362001)(77096007)(2201001)(186003)(336011)(39060400002)(53936002)(305945005)(478600001)(5660300001)(72206003)(4326008)(68736007)(8676002)(356003)(8936002)(105586002)(51416003)(7696005)(81166006)(81156014)(2950100002)(97736004)(2906002)(48376002)(6666003)(106466001)(53416004)(50466002)(50226002)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0257; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2NAM03FT063; 1:TFdUzgsAySIcrEo027O63ZQlRQ6b1l7tNNa5P0bTQjRocKsOJbn9WzjE0DxQhCF0byBjc54Cc3d1dfiqGtPAkkpSRO5wVZKV28U2F+92KOYytCp1tOgFC5qHCqLiuYvm X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2b848038-3c7c-470e-e463-08d5750f68f2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:BY2PR12MB0257; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0257; 3:okwX3zv0lmlfMNMDFPLbHRK+2uxdGuZbrJA03eR2MvgjJlJP0FuOu8LivlnObvIwj6RBmVbe4TB+lOShtBwVpsXhKrsyHSdCaonzzCUFVmn+l6gv4kd2Wcr/Kvtx9Iu29FdSF/1u9+EEeE/dfPHOwUf4eLpt3G3VBEczKZVrQGYODnbyyEcSfCstC3ti4tUmUl2pFNtGkFW1dximqi+/LwcpxgMLo5FURVmorloryMH/96BT5RFqUMVy1a8R6tWIr89eAxOc4qvYVMgkE+Ktz99GVwRA0rC4/h8S4U2Gtjtawy4X7udo6P8FdslS2pnMYwSmtHlbeD+KNCzhOrjldBqA5cpZM6Xf2h5GSbIhxJ8=; 25:sWQ9dk47kGpB3IOXxbXhecFrgkGF+u/gVICe66Ms/qtspWTK7Mj+dUeLvHtikT0PEwIef2nB77xTrUvq0EYK5i8ewArKGJhcay/XUIvZeN9SPiZSYBuDbY1p2Q6WU+bJ5lCaptdmwo5hPuG1n6Uh3aTW5n6p3yg7ZeSvbgGTJDqAhF82IC6UILAp/cZvlxordZkKB+IblEKpOMnybN82aRxYHgkka5EUTA+3JexjVcH17MAOjBl8aYlhesRt3pjqVwUsALTrUR5/d6HPNOd36eOGk0DSa7/ru75u4Fe+ldxDYX2XGBuqLUEVMRmg7tGoxDri7cUoMuhrxRji9bPOeQ== X-MS-TrafficTypeDiagnostic: BY2PR12MB0257: X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0257; 31:0wM9YD/sgV9l+HPWODbxvWAMqByRaBY3XGjG4TmmiFTzurBisH23YCpaLl1Iu5agI/tVLRbG0k2g+GBKTdf7cI9SUjuCnWDFhw9qOWUmRyStnxtGi6ZQ9x8W7Je4aC0+LBcm1LkKZKRGh0nw101McO2h2DWYO0QS/7YlUrGiIky62WhocHfTxp4kQqzUQxy+tgQKDEeqYx0bCAWCvBp8oL259x/2Wm3wWzwXwfumDUg=; 20:likdhaCqU4e15ElLdvAktVm1vKybYjnkGxrqMG4R9f/jJhgl64yYgv3t4FiLod/a3i4vH/rbG5B5kJ2jB2GHmSQzKOVfaVaXAzKwm0MbZNj5hNNaJ5DzjwWsd3T8OsqghykAW+tAEz6StMXc70g1BK8ip47940BFycbGkGJIK5rx2ILcjpY3PoeSfFcKVbGtsXNWhGf8LnivdY0+9/D2HIfpBD+i/RMg5eX25VQg6/18Rfx08yK6/ErilZlq03bFCTBZCiSBIBZRNVnftJiXYoqsJROKU/i9RQbMszkCS7EDK83zhEgIb3aPwKPJcPTnjSeodMJslsa/rbK+93YQ/ZNoG1m+WXNAPTe4i9AMaqWcN4QNvM4UvVacHatskSm6FYd+MreqF2CqHb9Os9m7JRSIqXCygm0OHS9Ch8sZozHSNL0Np0R7FQ57bnz8ZDr2MLSPm0oByhIdJUKIRnpc25cqWLc2Nsrm/o5xi7XlLmWncRXwRhq4EnVaJMXv1szu X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3231101)(2400082)(944501161)(3002001)(10201501046)(93006095)(93003095)(6055026)(6041288)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BY2PR12MB0257; BCL:0; PCL:0; RULEID:; SRVR:BY2PR12MB0257; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0257; 4:RVBl/hGKQ39fqnVL0qa85kPWXFGp9vtK1UESmrCN85WtOAn3zFcrAn+wFqoXWCgdnj1ySUeUZSSAVFcTuiDZ4rwRItlBgBR5YJGWDKVfT1UW5yZdu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CQbSsDrdlP7pxVnz5nyfjcTwW6v4/zylDftjJx3piLJSQawWywbrTYTAScx8FusptrqQ80Ko=; 24:8R7VfZ39HpI5ruWR2OKo70/9GV+IfOJJEkp2yK8pG/Do1AZMPtvc869iq+hY1T3P5QUA+DjgapzcZM1253Ihq52mlrbB5+cNpRQy3eJ1WI8=; 7:hWyMI3oXRVuk8fF2hG9jFKMq1x0Kp3TNxMcHjCDhzEC51nD3dceO7r248F55P20hzpBkhk7z1BzAY30DiyxQyywT5cL2xD3Sv5I7vtvE/fqSZFFU9NuoUkP9di3nNDcmZFSvPjPlwFhuaAkYg5pTQuZAkT9+OHNJlQgJHI1QOJ4gmG6larVWT8MQ/TcnfT/MIkRtIRbXvqIwEh++Knq9noBMd8ALhMzVof6eHsHvmCX/pawrehehRUFBSpjj8wJv SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0257; 20:ng8ltJdbTkW6hzEJvgFCXy53BckkqFVMEKOW0c2NLmdHwvR97sqNCV3CGLbx+lkBptu1ULy0qZeo8u3WmnVHI4SZn94cvS7Qtkd74zp4rHRayZNexNrPDubSGD9Gl7yEBfK3h1Jr9n9yHeRhYkmDHZLUYVIy0Oad2/HpGq+k+ySy2aKVI8C6hEOW7uhWt5C75JGeoIbRA2UuxP6aRPb1jdHgY9PFuutLrJeHiERANf490QgrJBwFUVXxG4IiveA+ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2018 07:32:18.6938 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b848038-3c7c-470e-e463-08d5750f68f2 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=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0257 Cc: tiwai@suse.de, Alexander.Deucher@amd.com, lgirdwood@gmail.com, Vijendar Mukunda Subject: [alsa-devel] [PATCH 5/9] 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 | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index aaee70f..b1c1ff2 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -728,6 +728,21 @@ 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) == @@ -750,6 +765,27 @@ 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