Received: by 10.192.165.148 with SMTP id m20csp1926476imm; Thu, 26 Apr 2018 04:18:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrejHIGbwYtoFeIXDoPCC3IBZ04RGg3ViFKlnkBOOyFChgt7gOSX8AHo/cY/d+B8zgahQLG X-Received: by 2002:a17:902:d68c:: with SMTP id v12-v6mr8453728ply.190.1524741508938; Thu, 26 Apr 2018 04:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524741508; cv=none; d=google.com; s=arc-20160816; b=ITqTP9kPIiX6JTjsnnfkt2vebciAjLlKEb1xN/nG7FSpnLkvjvuXYOG8HqFjbAqaR/ DdgRauNf4dnYGjwtJqTHwHgBWVuroyENstXxHSFt5/WtC3GHLLoq7c0z9qsodXf97qzw cm8mfpchgXoNX6Il1N5TNKh7kyIWt4/gQ8UP93cOPS4auYuCq7ASqrl+FsZNq8aV/MQB e8LDXDFOUSNGetQolwDpg+a6MLQKFR5QnyjWZFlFSXCVKtsxJSmfQXnJiFQnDcxm+TVa ++3jJyohhuSL6agTJlfDdTcT3s+Q11SCfTMu79SgOIKFRELpFnf/FUdRwf8O0B8STvxo HfFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:from:dkim-signature:arc-authentication-results; bh=z3f9G/k4ZYkSflOmieYIHglk4LiJpGzlnZN4f62t1J4=; b=d1zGE8RWrGqiD1p8aya6zlKCzsV9EvQ2wFXpnlHvD1B9CPVoOHWC8GpBKyrACDaVlt Eu2RB4CNIoTLCiUj/Ghf1dL57Hg6Bw4rufiyG+8MKNNrxnXuHR/R2TzyLUJxxFcc3yCH KMQpgzhMg2/lamDccOahA8hGwRMnGMnHRQQSHcLveIUoRLZpBBvx4xUmlP4YHKFJrvW+ bzPrOFYnyeFMwSGcG8fYXaGRfgDppA0s50320nZwkvTOXEA9hInTN9C24dElXyHoRaDA baRlntaXZvtjWm7461l7Miv/uWAQeS6E+zKVswQTi/EeUl2vL8qZuO8bEC9IjLlWaT+v PuoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=hQZYTUwi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9-v6si3793199pln.72.2018.04.26.04.18.14; Thu, 26 Apr 2018 04:18:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=hQZYTUwi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755661AbeDZLQj (ORCPT + 99 others); Thu, 26 Apr 2018 07:16:39 -0400 Received: from mail-bn3nam01on0062.outbound.protection.outlook.com ([104.47.33.62]:32608 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754277AbeDZLQh (ORCPT ); Thu, 26 Apr 2018 07:16:37 -0400 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=z3f9G/k4ZYkSflOmieYIHglk4LiJpGzlnZN4f62t1J4=; b=hQZYTUwiV1dmmrFY8GyLTUWEuuUYOp6um+TYtaOpA4T0L/tLpdE7GP2uEvH/f8rakcLlnGE0tSGQaechREpnwPRlGErBxZbwLra8yxTEAkN0+Dai0fJpRH4Syy2iNTDRVJvfMBgNQ2QeJoOcFLtkopLoIgc/OGw5GVk4V4ifKlE= Received: from DM5PR12CA0012.namprd12.prod.outlook.com (2603:10b6:4:1::22) by CY1PR12MB0325.namprd12.prod.outlook.com (2a01:111:e400:50f8::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Thu, 26 Apr 2018 11:16:35 +0000 Received: from CO1NAM03FT048.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::209) by DM5PR12CA0012.outlook.office365.com (2603:10b6:4:1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.715.18 via Frontend Transport; Thu, 26 Apr 2018 11:16:34 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; linuxfoundation.org; dkim=none (message not signed) header.d=none;linuxfoundation.org; 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 CO1NAM03FT048.mail.protection.outlook.com (10.152.81.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.696.11 via Frontend Transport; Thu, 26 Apr 2018 11:16:34 +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; Thu, 26 Apr 2018 06:16:31 -0500 From: Vijendar Mukunda CC: Vijendar Mukunda , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Alex Deucher , Akshu Agrawal , "Jason Clinton" , Guenter Roeck , "Kate Stewart" , Greg Kroah-Hartman , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 06/11] ASoC: amd: sram bank update changes Date: Thu, 26 Apr 2018 16:45:52 +0530 Message-ID: <1524741374-13523-6-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524741374-13523-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1524741374-13523-1-git-send-email-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 Content-Type: text/plain 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)(39850400004)(396003)(346002)(39380400002)(376002)(2980300002)(428003)(189003)(199004)(106466001)(356003)(104016004)(97736004)(86362001)(126002)(7696005)(4326008)(26005)(6666003)(336012)(446003)(2616005)(105586002)(53416004)(426003)(476003)(77096007)(486006)(50466002)(11346002)(186003)(36756003)(76176011)(1671002)(39060400002)(51416003)(68736007)(109986005)(15650500001)(81166006)(7416002)(305945005)(47776003)(50226002)(8936002)(72206003)(48376002)(5660300001)(478600001)(16586007)(53936002)(316002)(81156014)(2906002)(8676002)(54906003)(172123003)(266003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR12MB0325;H:SATLEXCHOV01.amd.com;FPR:;SPF:None;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM03FT048;1:7iRXNaTMNeDToan1+VPGh/zwuHWM54/TrEIDo2QUm24I3zslIlwkhHpjgp6IUwgNOH+/tDKrjN8yksNJPZs6IuacG/RtUjxNaExyIGBM8op7yYCcKz5fIwubr8FuQu9F X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060);SRVR:CY1PR12MB0325; X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0325;3:dBd6WnjW0Lr8+3VfF+bCqbrtpXWjIvZbd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6bgDc+JVk41G144sC+6spKPubNLfYOvLv+g2p5+c6oYcbZx5DNUlM336e4lNnVXy9tCPC17LH6tOUSBYakwJMygZvXxilPnFYjxwz7ugo1yxbNCWBcJgPHEvIS2A8Cx1a5cfONHus+qTHBIPl/qzMx5Ga5os8BYo5Go4CXRGYIPH5VJdroBxNu74d8tYNHXk0oJV/Kn43s21umibtUu15hFiU7o1mXWvBr7DS4iJZPhBkAZq94OKYoPqnxBlzVVVUIqEWKZoFfEpwKSgEinVmYau+dgPzls8eNarUoqbpFbr2IhGw9c2kH5tquOi6RSfh0+/Bqm1wsE9wVvrfF8kFbfOTMQKHI3V5Io6kmzekZ4HoaQgSnTiE34tWakKpxXsfPd1NIFi+IIYwH9JadUR/jri/Wzm63WiREcRJvrhTNfoOGq4ZIgoEdJ6c2hk 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)(5005006)(8121501046)(3231232)(944501410)(52105095)(3002001)(10201501046)(93006095)(93003095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011);SRVR:CY1PR12MB0325;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0325; X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0325;4:3KJGNzIUi2mS5niGXmAeFhs2vWLCeVO+oDcqkiB+1d9XtxfNcjGfgwjUDlfZAple6jmYa3VEsQRAjkQ7WWooNNd9sPRFaJnEErvo8St8pT7O/njJ+ff2zt6vqjP5KhFbXStqXIBf+yd75mXlpSrPVWRoThnwEq3hAg3YxaWny9lR4d2VttGahnBa0DrTysdaPnXRBL0gGGM55/+WPezKuoSuDz5OnE3HuOhj6un5ej/RO/W7vhM8wYDtZcOqsbkpHp2Vmf2OEVH81qobHaZjhmv3Xpj8SX0VmqV54ZOWPASdZKT2IKwkXeik8eBOEdsh X-Forefront-PRVS: 0654257CF5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR12MB0325;23:twU4ypO+XhuxdP+1CDe6eAFy6DohICskeOKtbiCDy?= =?us-ascii?Q?1FzZif572HjlgRoWgS8ET/yqIjMbvqBrBV5bL0nKlZ90A9p2p3qdgM1H2wbk?= =?us-ascii?Q?vkGC07ivgT0DaB/gAzYwTxvUo1sz3m1+JAEjSWK0dIC68E/woINSEbJeuDJw?= =?us-ascii?Q?kem7HEBXY8pL4WjtHXRiMUnQYfK4BRegVGqLrH+CQRUU/10WCKTFNeJwwlwI?= =?us-ascii?Q?9q+A2L5ChHkdkIjSHuxwa6nkziFWIGyySP1lcKmiLc/huyjC2R3gwK3HPkoA?= =?us-ascii?Q?edgVQKQCb7n1jDmZxgBKaz/sA7TpEpihvfR8NeZnCcNXP2RL4CqazFvYHoUL?= =?us-ascii?Q?OCy7WvduaGsOdymBrrNm4Qx3VGDG1nCDzhCSObTz6xsp/VDJEgz18QiDmIIK?= =?us-ascii?Q?RpiR4z9yZgHlDbAGxG2oTZPS6gKcOA8XWyQ2ixhhLftm6ufPdwq6+yfLLgMe?= =?us-ascii?Q?U1NZ+7xWY+XPKcs+s8ZkrmAVIzLQ/+9bFPJJxF44ZqozvJtLJkXV+Yq4vGom?= =?us-ascii?Q?WSbtKRo2EiBJisN19Sl9uP/Ej3YHgi248PFdW0OrZQq65PF2oTTfzS1K6gRJ?= =?us-ascii?Q?BJL8PfNIHWwQt1RQEX+0JaY5gqBSxmOIudp29AhiMHqFJwCHtK7w0+1rH2Zr?= =?us-ascii?Q?kaSpf/vOjPg905RyrRSdtHxkDM15ofmOWQ7d+Qs6KMrOdN2lT82J2ofCMKxv?= =?us-ascii?Q?RQ0s52UNP71M9UH3RibXQfoIv19x2fIk5HCX0VBTEqim/qyb309bTdv3cP7w?= =?us-ascii?Q?jukAvNytYF4Zq5JchPsp3jMDeGobY5+nggCtsyTCaSddlKXHktWm/t2vmWQ8?= =?us-ascii?Q?ez6R3xuZz9R/Swn76f/jbcjkwNLMeqMcBS4ITgPKF93ynRHViqxGWvUdX+At?= =?us-ascii?Q?iehVhZMOPMJLkE8qCQSliwFmse3H43V+mBqGzEwu5w6mjo0hrSYHwfq+lhh8?= =?us-ascii?Q?kGOriBsh0N+Ol+je1bk7audU/TM+PA6M9rXAhzRiJcR3+nzt6TKAyTuZS9UW?= =?us-ascii?Q?3GFMD0pIqqQBoK3wTPSA9rJ+0frqpzJV2Ud+KwDpDn2heEuJnlF7TMVGhAqU?= =?us-ascii?Q?mAPohExv8T4ovLX0Og0PM+i4IJB27p26QFbJk12w2KVOF7wlVPBj3Z97tWAe?= =?us-ascii?Q?TfSU6j2zlGmbz3C1hc66mBWDYlZ+41pEX7nnSBmPDbZb/6N9QalciiU1Nb6b?= =?us-ascii?Q?hI4KLhZPydj64qgI6uUlYoQhQ/fqBwfjzkcOgnGpGNcxYbRQ5FPrA8DaOp66?= =?us-ascii?Q?3DLQX2ABrDApZxbFHQyX0/m8nFL0Is33Ffvf0Hjp4GLzQDKgzNvbBHEQD1Vu?= =?us-ascii?B?dz09?= X-Microsoft-Antispam-Message-Info: 6A9kO2mbCc0xhy+5GP8l47HVYTr4ASN3avJ0NeqFlgvcKm+TaSCw5WSzv0qiks3t3ZZa8Xs6bKl7z7bLlqDBY0hdaJS/npcBLaAxbbRHgamoYfLoxdXYS0P4bL4knltDCn0aLmF+JVxnk66WpylbHdVkH04x0tZlM+L9lZnfyp06CIZgKdd5kbnCmzLZ5AsS X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0325;6:+yNN/GbowpamB1bZiemRk8UpWgTrclGjuGc1TKGYn+tkcK3DCFl7xBH6BVHa5/TeubpICISegVYxObtb2imIFk3zbQycAsSJzK2NdPThRDTPOniQIfLws0eMGNNnHmjigj4sMjMgk/U+cyQXtXnUQQ6HSZc8cTm1r5x6UqnYD1XeehsWXmtXHINJcdCfbBaml7nSssx0A+NP8j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NS7Tb+/Vy0gLFo7CHosT4iBIJUcqDZZrviEB49TT1JwZ6TwIkUXzPI9J0iTNN5Nlpqs8U+CTiAApAz X-MS-Office365-Filtering-Correlation-Id: 023f0a6b-88d2-4f7d-04be-08d5ab672b9a X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2018 11:16:34.0225 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 023f0a6b-88d2-4f7d-04be-08d5ab672b9a 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: CY1PR12MB0325 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Added sram bank variable to audio_substream_data structure. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp-pcm-dma.c | 20 +++++--------------- sound/soc/amd/acp.h | 20 ++++++++++++++------ 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index cb22653..b7bffc7 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -320,29 +320,16 @@ static void config_acp_dma(void __iomem *acp_mmio, struct audio_substream_data *rtd, u32 asic_type) { - u32 sram_bank; - - if (rtd->direction == SNDRV_PCM_STREAM_PLAYBACK) - sram_bank = ACP_SHARED_RAM_BANK_1_ADDRESS; - else { - switch (asic_type) { - case CHIP_STONEY: - sram_bank = ACP_SHARED_RAM_BANK_3_ADDRESS; - break; - default: - sram_bank = ACP_SHARED_RAM_BANK_5_ADDRESS; - } - } acp_pte_config(acp_mmio, rtd->pg, rtd->num_of_pages, rtd->pte_offset); /* Configure System memory <-> ACP SRAM DMA descriptors */ set_acp_sysmem_dma_descriptors(acp_mmio, rtd->size, rtd->direction, rtd->pte_offset, - rtd->ch1, sram_bank, + rtd->ch1, rtd->sram_bank, rtd->dma_dscr_idx_1, asic_type); /* Configure ACP SRAM <-> I2S DMA descriptors */ set_acp_to_i2s_dma_descriptors(acp_mmio, rtd->size, - rtd->direction, sram_bank, + rtd->direction, rtd->sram_bank, rtd->destination, rtd->ch2, rtd->dma_dscr_idx_2, asic_type); } @@ -795,6 +782,7 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream, } rtd->ch1 = SYSRAM_TO_ACP_CH_NUM; rtd->ch2 = ACP_TO_I2S_DMA_CH_NUM; + rtd->sram_bank = ACP_SRAM_BANK_1_ADDRESS; rtd->destination = TO_ACP_I2S_1; rtd->dma_dscr_idx_1 = PLAYBACK_START_DMA_DESCR_CH12; rtd->dma_dscr_idx_2 = PLAYBACK_START_DMA_DESCR_CH13; @@ -805,9 +793,11 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream, switch (adata->asic_type) { case CHIP_STONEY: rtd->pte_offset = ACP_ST_CAPTURE_PTE_OFFSET; + rtd->sram_bank = ACP_SRAM_BANK_2_ADDRESS; break; default: rtd->pte_offset = ACP_CAPTURE_PTE_OFFSET; + rtd->sram_bank = ACP_SRAM_BANK_5_ADDRESS; } rtd->ch1 = SYSRAM_TO_ACP_CH_NUM; rtd->ch2 = ACP_TO_I2S_DMA_CH_NUM; diff --git a/sound/soc/amd/acp.h b/sound/soc/amd/acp.h index 2f48d1d..62695ed 100644 --- a/sound/soc/amd/acp.h +++ b/sound/soc/amd/acp.h @@ -19,12 +19,19 @@ #define ACP_PHYSICAL_BASE 0x14000 -/* Playback SRAM address (as a destination in dma descriptor) */ -#define ACP_SHARED_RAM_BANK_1_ADDRESS 0x4002000 - -/* Capture SRAM address (as a source in dma descriptor) */ -#define ACP_SHARED_RAM_BANK_5_ADDRESS 0x400A000 -#define ACP_SHARED_RAM_BANK_3_ADDRESS 0x4006000 +/* + * In case of I2S SP controller instance, Stoney uses SRAM bank 1 for + * playback and SRAM Bank 2 for capture where as in case of BT I2S + * Instance, Stoney uses SRAM Bank 3 for playback & SRAM Bank 4 will + * be used for capture. Carrizo uses I2S SP controller instance. SRAM Banks + * 1, 2, 3, 4 will be used for playback & SRAM Banks 5, 6, 7, 8 will be used + * for capture scenario. + */ +#define ACP_SRAM_BANK_1_ADDRESS 0x4002000 +#define ACP_SRAM_BANK_2_ADDRESS 0x4004000 +#define ACP_SRAM_BANK_3_ADDRESS 0x4006000 +#define ACP_SRAM_BANK_4_ADDRESS 0x4008000 +#define ACP_SRAM_BANK_5_ADDRESS 0x400A000 #define ACP_DMA_RESET_TIME 10000 #define ACP_CLOCK_EN_TIME_OUT_VALUE 0x000000FF @@ -95,6 +102,7 @@ struct audio_substream_data { u16 dma_dscr_idx_1; u16 dma_dscr_idx_2; u32 pte_offset; + u32 sram_bank; u32 byte_cnt_high_reg_offset; u32 byte_cnt_low_reg_offset; uint64_t size; -- 2.7.4