From patchwork Tue May 8 04:47:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 10385361 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 E1EF760159 for ; Tue, 8 May 2018 04:46:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D194E28CA9 for ; Tue, 8 May 2018 04:46:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C63BA28CBF; Tue, 8 May 2018 04:46:30 +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 AFB7328CBD for ; Tue, 8 May 2018 04:46:29 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 84F11267686; Tue, 8 May 2018 06:46:28 +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 C3B982676A2; Tue, 8 May 2018 06:46:26 +0200 (CEST) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0069.outbound.protection.outlook.com [104.47.38.69]) by alsa0.perex.cz (Postfix) with ESMTP id 72273267686 for ; Tue, 8 May 2018 06:46:24 +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=hug+f1PkxHWLTcZAPsvjEKEapIGc7tyVWeUuwvIOarw=; b=RqFitHnIHUnsmSPzLGYV3luWchgnOGzZfiHe7BJSIssXC1Y7pyRVxauGVH5dRoopFINr1fmnTFr7VA/2+CFBVZJBz/p/vQBMh1AH8DkyW7oNK9o9oMV6MRq0bwhePDsCtxrlxY/aqZN4MJW4smm9MZv24JIJH2pWM+QAm7yAy3w= Received: from DM3PR12CA0072.namprd12.prod.outlook.com (2603:10b6:0:57::16) by DM3PR12MB0761.namprd12.prod.outlook.com (2a01:111:e400:5984::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.19; Tue, 8 May 2018 04:46:22 +0000 Received: from DM3NAM03FT039.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::207) by DM3PR12CA0072.outlook.office365.com (2603:10b6:0:57::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.735.17 via Frontend Transport; Tue, 8 May 2018 04:46:22 +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 SATLEXCHOV02.amd.com (165.204.84.17) by DM3NAM03FT039.mail.protection.outlook.com (10.152.83.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.735.16 via Frontend Transport; Tue, 8 May 2018 04:46:21 +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, 7 May 2018 23:46:13 -0500 From: Vijendar Mukunda To: Date: Tue, 8 May 2018 10:17:48 +0530 Message-ID: <1525754888-14124-5-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525754888-14124-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1525754888-14124-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)(376002)(396003)(346002)(39860400002)(2980300002)(428003)(199004)(189003)(11346002)(47776003)(316002)(53936002)(105586002)(50226002)(76176011)(2906002)(36756003)(51416003)(86362001)(7696005)(104016004)(6666003)(53416004)(426003)(72206003)(97736004)(5660300001)(478600001)(106466001)(486006)(476003)(2616005)(446003)(81156014)(15650500001)(4326008)(77096007)(26005)(48376002)(16586007)(336012)(1671002)(356003)(54906003)(186003)(8936002)(305945005)(50466002)(39060400002)(68736007)(81166006)(126002)(8676002)(109986005)(172123003)(266003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR12MB0761; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT039; 1:14YQ39Ep3UYSS73jFfKZ7zCZ1XulOOxtTmi5KIIZzsTfbJ6C6vJPRPNlduBaIzKQ+fYU1FiOhkkrrNoIWi8uP/V90VF0963y7wn1jOy98sJlYr4/jDhOPZ9+OWJD2/LZ X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:DM3PR12MB0761; X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0761; 3:qZIoqbAepT0s0/MBui6XXFLPiQMRMahh3r3Zm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BP4NS95hKfkeZJPp1O/GpYqibWOebBvoFMzpS91vpm40RNqR7E4TYBgygIueB7PGciRUSNkznpp8p7xiNsaivCu6XvYqX65D0VJJknoNVlLKjJLAjLua3OeIrxm9UVQVBrQrwjByXvGAUC0GEgUugr3iCmiZYGvH+tRDIeisqcpvWzXxK9EN1WPpAoJ4qJiOvedg0LsMQk9O+GoyO2xyq4hAZMSxLTynNfYludIM3tvxUHq6hBtdTYJCWjy3NvOl2zllWEo3D2xkSUb9UjDJwv1+5/oMiHCwYgH4JOfxkzp/d5/nIKX3VFJoCFOabvS44kifi+v29icxvgZEL5cOyBsOU1ehZeFqzmE1PPa9xbvbjiwNq73jXonWYflWGpx/loTT5Zn2cZRs9jJa2DEK+pBkeSTgCt/0/BL0l0 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)(8121501046)(5005006)(10201501046)(3231254)(944501410)(52105095)(3002001)(93006095)(93003095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM3PR12MB0761; BCL:0; PCL:0; RULEID:; SRVR:DM3PR12MB0761; X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0761; 4:iH94U5CjBKjeh4YhphmGjkl1dwaqtnkxTcJSjcGZebfoaz0LyIFWbsHztkXaz39Ikg7cQqkN5RlHkPHOtaxvxXgmByh/HyGOst16NwG4vGRh1xkXIEvYgaDf+rVgk6u9iCmqMlUKRb1KMo4bl1vN4zE1BXjZJDGK1+fvrPUm31Fcxy4H9/G12IkgdCbD8jiNGbL0Xkye84K2UeS5J4bMrMkXXA6OfLObitCapcQH/qGNvs89DVH5F7VNXeggaZWoppSfrZIkDcyK2HP/MrzTOCQY0Dh6qyCVvq3IG5mN+86wNCECrbpnQ4hARcE4r9zE X-Forefront-PRVS: 0666E15D35 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR12MB0761; 23:E1YBi+sNBdSWx5DV8o/R3dZsFT1juHZKuSaEYJtSK?= =?us-ascii?Q?g33NAJfvDMDhzuuzisWWYcxJeZ1Gbm9RkV+SOc6EcdnJt4KOLW/Q3+W73rsK?= =?us-ascii?Q?SPHWcWmq4sUPajxxGF8hMU7wrZKsPLdSUIMx9lUSfOSXzZINXVDFd2ZIwLy8?= =?us-ascii?Q?U19y+DE6au+MXZ9ng8vTzxFTUK5yjgpS3zIrXXshEbvgNSixTbQMINJ44Tr9?= =?us-ascii?Q?xS86TX5XBqFxiTZbXy9gyYy2tQ3k+U709rVy6YlnYgRnoTTAVFH3F97z+XGb?= =?us-ascii?Q?wLIcKeQmDCUXsfZPyii7xM3Jd53Ztqx2POc0yHRAWcUQSpLvmiTPL5k1jF0b?= =?us-ascii?Q?Boh5CwReP3soJ+9R4PzONCspTzCH7UVhtMzD8W07bEd5hM8r4wyRCrvnZW/J?= =?us-ascii?Q?cwCSlxAK76YvkrI7wKH3Y9IXj7F79sFEgW33p3Y9+gvlev9AlfEMaM+7qYfH?= =?us-ascii?Q?hDcZdT/a2ODGGFux8+xMYQ7g6w4UQNErn7bGeu7X8pcjNH75um7VOOOKgVeQ?= =?us-ascii?Q?a6sYvw34KQiene22bFgdcHjZD7dBSSlpqIL5uBKSt6CwcDqOCVyBuj63eNME?= =?us-ascii?Q?joT35zAIaYPR/FbzYgqNFH0J3P5cjZsVd9EgiiC6dNOCND2W37mhEpU8oRlb?= =?us-ascii?Q?bkpv67WW2X6vJjG1hw3eoW61SSpT99U0kV/p6JGP2nJ7b3HUao88r9HYvKQa?= =?us-ascii?Q?1SCYq367T+R9VQbkrzsKQN27+ORCw2NH9IcHj8EsI9Ji50V123yAoymCYfCl?= =?us-ascii?Q?13N8z+5HT6h9O11F1AIrUEE8IPd8UsLp6v/wlkEdNzs4yJuksEBK5m8Q/ew4?= =?us-ascii?Q?Z8wD9J23xfcVxuK0pNOc1/4kSjU7fY20i9yksKqycApcQuI2USdWi9ofJI+s?= =?us-ascii?Q?ObfFbiIUNcAfkrjSnovWzLAoUDoZhF66hs8VuJ5y1rkqpuOUBz76b56j07hS?= =?us-ascii?Q?dbG88LlTYoi6qZvtrH1WIXLjTRQv17zaKafDu0cNmQJpv2GELEbIvurj/+m5?= =?us-ascii?Q?d7H0RaFAw54yl+kgXLSOlXrjw5salllQCKiM7CIu+QcDbFzUz+R9ingAMI2O?= =?us-ascii?Q?6/X9XAzAdvW5pKwjZFyn6dQrPWQx0pSlY0Jd4an6cGacAIpks0/tnLhBPcqv?= =?us-ascii?Q?GXXMeE/wg64wJSg7USAcX2gqof300PnAmkV6R4LE/38r4KYa+Fmih1oP011V?= =?us-ascii?Q?w6qQk/yzubmEiEAg2SctUHxuo3fKiSxBtzvuN4BZQYzopz+/uMmCDw73NLxU?= =?us-ascii?Q?EX3dDVREHvIofTHyIj43nKzzexMaEG8Z2b9kFgO?= X-Microsoft-Antispam-Message-Info: xSnW5cc98+iast08Lw/m6ogmJdW7JNIUlZ/sawtrTA/gOkFxZKdGIMOqE5vfWhTXb9610aWf/jB6MmJ1t5I9cGMjZxL4ik55bqVdUupa2GhD9k/nNGdyCH9MFRiuIP+lTv0G0OJ79j4siCLRg62ivNwsHysItlWtAJYYS5GpRtYEhd4r/TKIDRuds7WiTjaR X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0761; 6:t0uErKRaMrjpcLuhXuHkjDK15hsmQklJejW35zw8McIcQuGlV93mba7nVlLdF1hI3I+MRxdSfz8JTfoBvYvrJo4qVgOznWFUHi1HLgPaq6JQpw90+oRyoUuens9SYDdxjv+AuoEukiO9RijY5OZRrBeYApJ+sGs7p8d7yR0tKnZaqW7SwNOrKmHpYtMdU/5lQhrybr90apm0C6gHKW+HwwRWVCiX6qrpPyH1eTEAk3SvKECGSghaW1N2uS5qFAAvsF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0jwvkg/XU0KSy7r6 X-MS-Office365-Filtering-Correlation-Id: 93192a2c-ad72-480b-d5e9-08d5b49ea5e1 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2018 04:46:21.7572 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93192a2c-ad72-480b-d5e9-08d5b49ea5e1 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: DM3PR12MB0761 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list , Liam Girdwood , Greg Kroah-Hartman , Takashi Iwai , Daniel Kurtz , Mark Brown , Vijendar Mukunda , Alex Deucher , Akshu Agrawal , Guenter Roeck Subject: [alsa-devel] [PATCH 05/10] ASoC: amd: sram bank update changes 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 Added sram bank variable to audio_substream_data structure. Signed-off-by: Vijendar Mukunda Reviewed-by: Daniel Kurtz --- 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 39597fb..8236116 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 = ACP_TO_SYSRAM_CH_NUM; rtd->ch2 = I2S_TO_ACP_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;