From patchwork Mon Mar 12 06:34:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 10275499 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 664476038F for ; Mon, 12 Mar 2018 06:33:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5510E28AC1 for ; Mon, 12 Mar 2018 06:33:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49E9228AC7; Mon, 12 Mar 2018 06:33:11 +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 8143828AC1 for ; Mon, 12 Mar 2018 06:33:10 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 6725D267321; Mon, 12 Mar 2018 07:33:09 +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 BF1B526737C; Mon, 12 Mar 2018 07:33:07 +0100 (CET) Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0072.outbound.protection.outlook.com [104.47.32.72]) by alsa0.perex.cz (Postfix) with ESMTP id 8F003266E77 for ; Mon, 12 Mar 2018 07:33:05 +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=4dCGEniYoUcDmxBIzdWGm3gjDM9/GLHmUeZRUfahKHc=; b=nel/b2M1+xFE4PcZvnTVENIiWgdcbUMcsYciak0JxewKW0kjykQvL3IMgj0Lwh06RTL4jqN3lSMzQ3x3aj6bLIqSQvooi/MeG0HtEtEdKKZ0J1INeRDVKOQTEpKuA+lWCmbXTKzSadrK6ZngILz6nBSRoinoFjFzGhbdV152YcQ= Received: from MWHPR12CA0029.namprd12.prod.outlook.com (10.172.49.15) by CY1PR12MB0108.namprd12.prod.outlook.com (10.160.159.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Mon, 12 Mar 2018 06:33:02 +0000 Received: from CO1NAM03FT045.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::206) by MWHPR12CA0029.outlook.office365.com (2603:10b6:301:2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.567.14 via Frontend Transport; Mon, 12 Mar 2018 06:33:02 +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 CO1NAM03FT045.mail.protection.outlook.com (10.152.81.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.18 via Frontend Transport; Mon, 12 Mar 2018 06:33:01 +0000 Received: from LinuxHost.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.382.0; Mon, 12 Mar 2018 01:33:00 -0500 From: Vijendar Mukunda To: , , Date: Mon, 12 Mar 2018 12:04:16 +0530 Message-ID: <1520836460-21809-4-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520836460-21809-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1520836460-21809-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)(346002)(396003)(39380400002)(39860400002)(376002)(2980300002)(428003)(199004)(189003)(68736007)(51416003)(7696005)(39060400002)(50226002)(104016004)(36756003)(81156014)(81166006)(8676002)(105586002)(53416004)(76176011)(53936002)(316002)(5660300001)(8936002)(106466001)(336012)(54906003)(4326008)(110136005)(16586007)(2950100002)(6666003)(478600001)(50466002)(48376002)(97736004)(86362001)(72206003)(77096007)(26005)(356003)(186003)(47776003)(2906002)(2201001)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0108; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT045; 1:0S8Gw6xhvvtwMe9jhn9hH9U+8cTTN5cFAVHMoCgIrnbWuItwD3Mi3IB2FlrQFngBHU2rx0hNDtxHx8JyNhIV4lH/wPlE46Jf4lHiMJ0BvJHCeNAO7M0XOuLeN3ibJsJv X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8771196a-6503-433b-f9c6-08d587e31acd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:CY1PR12MB0108; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0108; 3:B4oocdpdy2UknmF7KEZ18Q1SFeE1kDdC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KflzYDXxNyFAliOOm2DUtaB8u1Tmc5NyB+0tC/jFJt38blLSppReT1Tg9EPBtoYcQ0hd1Ie/To426ePYYDrCsNK3KkpMptvMWaROGGEhvcwTr/TlgJI8y3gKcnf4XXf2vireU1L+MAlxgwYxAl9R3mf/ibYCJssnQmdcF4iF7gH3iaCx8Yybie2sGPO/YOMCWdgtX4xgPfj6Miey9WkImi8A4yiC7txMOWh4xFnaw4NGbwoaL0xSCsZZ6RBWOJfH5bGHgzQgEg/wg0yRWagFc108W5Cn3+ez+tfmj/ur4/ySTqmCCHiKFuh8oRUbQFZrFmLsqqndLZF9GMl2Dc2m+rVY5nMK32tIGc16/IALoi8hvEzWAIRyAPGZOxkazj4xZSmQENW/XVsvJGgguaptzbTQ4f0G1navBYKE9TkWJZGFGRtZ7 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)(3002001)(93006095)(93003095)(10201501046)(3231220)(944501244)(52105095)(6055026)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:CY1PR12MB0108; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0108; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0108; 4:XY4IULeJQ1iEF+SQvtJ3yJQGHsn8UQNiiM1Kyub8OcwyRRlHC5aMvE4R5muHkuBLglF/SgdssVybQea7BpQ96KlyS0Wo0JiOPL4VBM+FQh8qIBievxwxtJrgqdfQA3c0Ihf/HkEphCNtyuaoUCUoBbOy9jAGLAoauS+Zvk8Sm5tDVzRYjuy0nro+8BPodDfUSB133WFoWzvj9gPQe020dAAVNkfQLq3RytFcUH2snszMXyHKafBVsIeajc2d7XASHKhU3wryTAoeP+EZ26vZmdE9weaYxE1Cy0+aHBnGhXqG0K1G/txXMWEmPlinEEaZ X-Forefront-PRVS: 06098A2863 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR12MB0108; 23:lHXFAve4/EIgQT4AHU20HfU7tHWXnvLRx4Enps9ZJ?= =?us-ascii?Q?2m2x7J5biyl7k9PePD4zMPjSca1h4l2asZff19KqheULc6iKOy/KeesIzgCB?= =?us-ascii?Q?q2jLlZ3njo46llKyutl5ZnUnnwx6LJXRFYXrw8nGYdbNbo4q9/xer7klnJ8f?= =?us-ascii?Q?JcsPd80QXH8Km6ZCPBx4+w3V0E11sArI1xxMqRHLJevMzekCIP8kSCpUaOrq?= =?us-ascii?Q?J7vNHisZ7TzT3e8DcEdFETFId45N+rehqf405LrNo3YTWOs6zj7Pv5KzzK5D?= =?us-ascii?Q?r34w8AqiZskfiKanD6MeC5u8x09tvgO591Z6zRAb33POaqUI6RYqIFQ/+wb4?= =?us-ascii?Q?8s8ZuW4Kp3W4isXamK2mInkBtp9CpXCfchBRecKm0yjw3cXqbnWtzYWKf46R?= =?us-ascii?Q?pyEIih1Fc46YMI8iQmBYVO0H/6h2IKMbuFMW3fVCsP+JiJj831xyecyEgRxA?= =?us-ascii?Q?u0zudJpzdICNpt29vMckqBXTlOAgq53FYuv4qFhufrvOEAjoOUe8d07f9pDH?= =?us-ascii?Q?vB5Fa1UqQbqtKJzhJ8IwgkbtMey+aF4C8xp781GJ1L0xdjpKsEqmXREYw9Vj?= =?us-ascii?Q?1L6TJc6RbXHxyG1HpaK5L9yIN6xiwTSEvwYYZ2tjkObsSvxKfG/zDPkbaSbv?= =?us-ascii?Q?zTeJb//irUsK1Na1owyoF5qI98xP10CderXrDwELcBgW3HcAnlBB2+ZZ84T9?= =?us-ascii?Q?7aq7eQeCBFLtcH8X5V63/mKcm/2eiUyYel+5tnxcwc+k5hDvKyuxebTgvSGP?= =?us-ascii?Q?zRp6xnjlsaf1/GDmi23F+07fmQQwluWavPT7OzZuqI8NykKkEYrShSKNqxP4?= =?us-ascii?Q?fNx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zCjOx5gwKDJUa/uVB8ty//KjMeQv+UYbO4VJY54Je1E1pdrVKp+oKXjzy2qVd6goZJPq11/dJ093m8Nrd1s1f1o6eGqD9AuP3UqbdO35e9BUVkE=; 24:ez9ZfN6CMwoD7EIauabQUV+B7pyX88cD9MkU+o5W7hQILBVDYAkx4057RJm9cQ247dcmAJ1stcOiC02Vwx9EwVTyRHwN5cteFwkzu2sthVs=; 7:4e5hH1sWe1yDlV21r/LeIDqhnctethHZ+m8itc411WOg5wrdeFnWXINDYca/pOjRA9HTFiMpHC8PYm4T6GJa0bQTYDmI7pmBDtq0M8ZUN5DI7jCHbyZLa+9gU82P97UgXmucWUr9cWDOHdUkEgIYW+ZrICe8DaxZ7g9KYLiG/t9qdV0qoa9NeVHd0wiU5eivLYu3GKmGgUvR0SCF9v1E5mBHlv9FhuU97fIYZV+Q/h3XGsVh7NFVWYejpzQJ5zBu SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0108; 20:QTkFk+Bs0G5P3c0MVs+oiCtenehLTMaLjlx9n2/WMCfuLrwug2ia3kuWaguRjYGTpeQLxh45zF0ppUtguazmUbYWjELF8nRJzodbwTrjkQ+p7yWqpgiq85vDlv8QqLr7z5dDVFusdgiBy7I+gqO1qN59NcVnLbN3u590fqZARaZ7YQ6RnJCWxOIuYoMSWre8Iy2LZw7Ly61v8ogXWyvhCeZ4BTRP+DY74Zu9S4YRqXvNku0r74lqpcYRIi1uRcVA X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2018 06:33:01.7013 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8771196a-6503-433b-f9c6-08d587e31acd 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: CY1PR12MB0108 Cc: tiwai@suse.de, Alexander.Deucher@amd.com, lgirdwood@gmail.com, Vijendar Mukunda Subject: [alsa-devel] [PATCH 3/7] 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 f401006..8660f36 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -721,6 +721,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) == @@ -743,6 +758,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