From patchwork Mon Nov 12 05:34: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: 10678129 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 642771709 for ; Mon, 12 Nov 2018 05:33:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5080929E28 for ; Mon, 12 Nov 2018 05:33:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3FE5129E3A; Mon, 12 Nov 2018 05:33:21 +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.7 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 6F5D029E28 for ; Mon, 12 Nov 2018 05:33:20 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 49A1A267A81; Mon, 12 Nov 2018 06:33:19 +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 F02B2267A81; Mon, 12 Nov 2018 06:33:17 +0100 (CET) Received: from NAM05-BY2-obe.outbound.protection.outlook.com (mail-eopbgr710076.outbound.protection.outlook.com [40.107.71.76]) by alsa0.perex.cz (Postfix) with ESMTP id 028FF2677E4 for ; Mon, 12 Nov 2018 06:33:15 +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:X-MS-Exchange-SenderADCheck; bh=cyttfU8y5bIYk4OKaX7A/lC1Oi9coxj8GT1DdtxTUAA=; b=KINVMD7Z6lsFA3icwJq/5pvrWBM4d/pJ3NfPdXfb0R+LC83fGSJIm/1o55pJkUE/GDJcLJzmUwibqZLNg4819wGUfjKC3/8gOtcUIYyeT0muMdGr5B9XaAvb9s5ve1q9Cf+xBXykoH7SSzvs3wsAJ+jmhSs+wDu7VSln88TiL5U= Received: from DM3PR12CA0059.namprd12.prod.outlook.com (2603:10b6:0:56::27) by BY1PR12MB0423.namprd12.prod.outlook.com (2a01:111:e400:51b2::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.25; Mon, 12 Nov 2018 05:33:13 +0000 Received: from CO1NAM03FT013.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::205) by DM3PR12CA0059.outlook.office365.com (2603:10b6:0:56::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1294.25 via Frontend Transport; Mon, 12 Nov 2018 05:33:12 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; suse.com; dkim=none (message not signed) header.d=none;suse.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 CO1NAM03FT013.mail.protection.outlook.com (10.152.80.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1339.10 via Frontend Transport; Mon, 12 Nov 2018 05:33:11 +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.389.1; Sun, 11 Nov 2018 23:33:10 -0600 From: Vijendar Mukunda To: Date: Mon, 12 Nov 2018 11:04:59 +0530 Message-ID: <1542000903-19020-9-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542000903-19020-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1542000903-19020-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)(396003)(376002)(39860400002)(136003)(346002)(2980300002)(428003)(199004)(189003)(106466001)(105586002)(81166006)(2906002)(356004)(6666004)(53416004)(104016004)(81156014)(305945005)(48376002)(1671002)(478600001)(50466002)(97736004)(47776003)(8676002)(39060400002)(186003)(2616005)(476003)(16586007)(8936002)(126002)(109986005)(11346002)(26005)(446003)(426003)(76176011)(7696005)(72206003)(77096007)(51416003)(36756003)(86362001)(5660300001)(4326008)(68736007)(316002)(53936002)(50226002)(486006)(336012)(54906003)(42413003)(266003)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR12MB0423; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT013; 1:QCTV3wJVNU6W/QXzYwiDSXYENeRQVYXlVOKxiT7ShonDocVnoDO33m16InlOhvi2d3PB1FQCwSyrK+y/lTBQ08NkuNi+rW6igJpWL4U1+Dn61Nta+Le/NuqS4xfSDF0U X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9901ff04-5ba4-4959-aca0-08d648605636 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390040)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060); SRVR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VLSkbfXRaznYvdQ/1k=; 20:LWGmrldHzZbacRtinWv00uhNobF4gbByi2ztMMMx+vvA0or1Xk+SVc9mSnQM++j0yq66qiamfOek3hpaF10Wt0IYQkFnpgVbqWTr7iO7SICxDvlJxHLUeeJwqG1RlL1xBr8dVPh7L9qptvOsX8BD+4Een75CEWBeKNaX9PQzubUISZgmFMwd3sIGhjj/YxDH++RGgkNHeiypP2nrIjcnAUq7CeYxx9PhcgKgnfzOFdyEBi1r7ovb+l3JSvbTwRVyrqHHieYwGpiMNOrXmOm6TBj46SJMVYAzorSeNR2ZKuNsRPdUeX2O/VTo0/eFypCDjsh8sr+cfdM+5uctwha/6MZRHbUkzeO3g0aIlm6174XHRpjixM3unjnBVZ1Hwz9Ta6fplfgvyPp/kWB8NQAXINsoryABzTOuELz61razYHwxTLOctiK+cKzBeZLGq5PkRm1KXAiu7gvspu0gauQ8HOv7AkEKpiF4sJDTKPdJd5aoUWZAKluFmF7dssp8IxCo 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)(93006095)(93003095)(3231382)(944501410)(52105112)(10201501046)(3002001)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:BY1PR12MB0423; BCL:0; PCL:0; RULEID:; SRVR:BY1PR12MB0423; X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0423; 4:Tod3c+fdYtDX1cODvySOD3w0tiOmKfIG5e2bIVZ7OI4hXsVXRR0BWOrj4qtZv/Pi0ALrOKG08+N/nYlVxM6tgVM+C2JYTi/aFo0IeW04ubBoDTIHrOktsVvQhrSp9PHubhDgxrV8RLl4X9seuqkKlHfndaer92OtY1+exqo0Ap4gjL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61djZny7f2e0oQCI1oBLDQuiJ1EUupesQ25qLCJAPO5Yy1CkuoERcXekJUgigUue4Crrlp6IAJ4okP9ZF8lOYfChV9MB7Rq+pqI7NyHZubC7ZaCWxw7zYLaOUuutPzRnKr2xjnKcxc6WY84kyMYQeQIzFNJMdg5dOF0FISOVQ1s634wWNWCp3i1xDLr9KQ0fNlYzfb49ovSsUv+2begPjCeWFtcuPzj209Xg==; 5:HMsI24dvaaaN7GmMRpfRl4sdX9CNOqKIj+7YzYCTGaAIP2ryZCHXoIYoVnoQTmU3OI6y0WrSl70RrIv9VLEZclQjmz13cvrDM/XIm1AHE3zGadc1B2viFeBAUoeb9PRZPXYby/P5Wv7WCCixngUbFiPsqip9al86u2M8g3hN7dU=; 7:aFVC2+E25wD+3KJlHf7GGEGt4JAZjc/1kN7D+nLFayqwNFEWdFZx7r9CbrVLpeZEzE6n4rZqgtflFavYEaUj3BR4dEtatL7SiNJdyPSG3tBumsiy5rLiq0N08D2gEdLy2F7BeZmYpHHXgNUskn5QjQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0423; 20:ZuLvle8aSeNV26qffgnlXlSLFkoOcEAtTjlNEbc50Imzx7IdMEAgtgtq9LS62Qq5cTAnZqUSeVRuHJSE3fwsy+HQpp4//Tb5KH/mjstr0tnSbbe7roY7vrP1C3313aflTjS9gMeKXebQ4ZnqGvbyKakyXQUw1AWUKr6XOWN0rwqgm/BOBetnXcaMAXHOQS45xjQ8oE+eyh3D4RFo1m6TjoqFnybcCC4EGYJMB9hw16jXxlk/8B5blX+yp+8GX22/ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Nov 2018 05:33:11.6550 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9901ff04-5ba4-4959-aca0-08d648605636 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: BY1PR12MB0423 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Maruthi Bayyavarapu , open list , Takashi Iwai , Liam Girdwood , Sanju R Mehta , Vishnuvardhanrao.Ravulapati@amd.com, Mark Brown , Vijendar Mukunda , Alexander.Deucher@amd.com Subject: [alsa-devel] [PATCH 08/11] ASoC: amd: add acp3x tdm mode support 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 ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support for TDM mode. Desired mode can be selected from ASoC machine driver. Signed-off-by: Maruthi Bayyavarapu Tested-by: Ravulapati Vishnu vardhan Rao Signed-off-by: Vijendar Mukunda --- sound/soc/amd/raven/acp3x-pcm-dma.c | 62 +++++++++++++++++++++++++++++++++++++ sound/soc/amd/raven/acp3x.h | 7 +++++ 2 files changed, 69 insertions(+) diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index ed2c163..15a5f3b 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -27,7 +27,9 @@ #define DRV_NAME "acp3x-i2s-audio" struct i2s_dev_data { + bool tdm_mode; unsigned int i2s_irq; + u32 tdm_fmt; void __iomem *acp3x_base; struct snd_pcm_substream *play_stream; struct snd_pcm_substream *capture_stream; @@ -423,6 +425,64 @@ static struct snd_pcm_ops acp3x_dma_ops = { .mmap = acp3x_dma_mmap, }; + +static int acp3x_dai_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) +{ + + struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai); + + switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_I2S: + adata->tdm_mode = false; + break; + case SND_SOC_DAIFMT_DSP_A: + adata->tdm_mode = true; + break; + default: + return -EINVAL; + } + + return 0; +} + +static int acp3x_dai_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask, + u32 rx_mask, int slots, int slot_width) +{ + u32 val = 0; + u16 slot_len; + + struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai); + + switch (slot_width) { + case SLOT_WIDTH_8: + slot_len = 8; + break; + case SLOT_WIDTH_16: + slot_len = 16; + break; + case SLOT_WIDTH_24: + slot_len = 24; + break; + case SLOT_WIDTH_32: + slot_len = 0; + break; + default: + return -EINVAL; + } + + val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER); + rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER); + val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER); + rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER); + + val = (FRM_LEN | (slots << 15) | (slot_len << 18)); + rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT); + rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT); + + adata->tdm_fmt = val; + return 0; +} + static int acp3x_dai_i2s_hwparams(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) @@ -510,6 +570,8 @@ static int acp3x_dai_i2s_trigger(struct snd_pcm_substream *substream, struct snd_soc_dai_ops acp3x_dai_i2s_ops = { .hw_params = acp3x_dai_i2s_hwparams, .trigger = acp3x_dai_i2s_trigger, + .set_fmt = acp3x_dai_i2s_set_fmt, + .set_tdm_slot = acp3x_dai_set_tdm_slot, }; static struct snd_soc_dai_driver acp3x_i2s_dai_driver = { diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h index 9f33e34..95fef85 100644 --- a/sound/soc/amd/raven/acp3x.h +++ b/sound/soc/amd/raven/acp3x.h @@ -32,6 +32,13 @@ #define MIN_BUFFER MAX_BUFFER #define FIFO_SIZE 0x100 #define DMA_SIZE 0x40 +#define FRM_LEN 0x100 + +#define SLOT_WIDTH_8 0x08 +#define SLOT_WIDTH_16 0x10 +#define SLOT_WIDTH_24 0x18 +#define SLOT_WIDTH_32 0x20 + static inline u32 rv_readl(void __iomem *base_addr) {