From patchwork Mon Mar 26 13:12:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 10307777 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 29442600F6 for ; Mon, 26 Mar 2018 13:11:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDDB7296B3 for ; Mon, 26 Mar 2018 13:11:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0CCD296B6; Mon, 26 Mar 2018 13:11:45 +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 E1B6F296B3 for ; Mon, 26 Mar 2018 13:11:44 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AA25B26705E; Mon, 26 Mar 2018 15:11:43 +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 871842670D5; Mon, 26 Mar 2018 15:11:41 +0200 (CEST) Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0069.outbound.protection.outlook.com [104.47.37.69]) by alsa0.perex.cz (Postfix) with ESMTP id 18F82266FA1 for ; Mon, 26 Mar 2018 15:11:37 +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=oef28DaWPziX84l9OSSzNEHy1bb5bijW3JxUvz0vD+g=; b=f4VaMb29Ijvpa/4KAvjBeZgDNKT7DCeefBdENJ+TcHHN9IxwqggLeZErFOVkeT2pMXDFmo499c8PYu0ZTGDNoMxLTPhFwiQZgaVhxeyA65duRB2L7P/Og6iA1HlJ5lpUVrl/eh44Rsz0IvinZMzxleAZHMXtLGJmCs9eRwbX2D0= Received: from BN6PR1201CA0001.namprd12.prod.outlook.com (2603:10b6:405:4c::11) by CY1PR12MB0760.namprd12.prod.outlook.com (2a01:111:e400:59d1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Mon, 26 Mar 2018 13:11:35 +0000 Received: from DM3NAM03FT003.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::201) by BN6PR1201CA0001.outlook.office365.com (2603:10b6:405:4c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.10 via Frontend Transport; Mon, 26 Mar 2018 13:11:35 +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 SATLEXCHOV01.amd.com (165.204.84.17) by DM3NAM03FT003.mail.protection.outlook.com (10.152.82.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.631.7 via Frontend Transport; Mon, 26 Mar 2018 13:11: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; Mon, 26 Mar 2018 08:11:33 -0500 From: Vijendar Mukunda To: , , Date: Mon, 26 Mar 2018 18:42:56 +0530 Message-ID: <1522069983-11381-2-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522069983-11381-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1522069983-11381-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)(346002)(396003)(39860400002)(2980300002)(428003)(189003)(199004)(81166006)(81156014)(8676002)(8936002)(76176011)(50226002)(478600001)(97736004)(7696005)(186003)(77096007)(26005)(104016004)(47776003)(105586002)(53936002)(53416004)(72206003)(51416003)(4326008)(39060400002)(54906003)(50466002)(48376002)(110136005)(16586007)(2616005)(446003)(316002)(11346002)(86362001)(36756003)(6666003)(2906002)(336012)(356003)(68736007)(2201001)(106466001)(426003)(5660300001)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0760; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT003; 1:25T+7CNO1/XQVpoy2jeCeEgyiDTViFjDrXHhL00BapMqPWT4AWP8YJ8nIsjnwdTgCDhWGlS1UT+YC0aztVkXgGwI/UnM7hkEBVGK0sVjQLCeWJVMSQQ6dGdHjKJNIrWP X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 29b75a47-a0a3-42fb-4784-08d5931b19d8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:CY1PR12MB0760; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0760; 3:nNJd/AgVeCER+wUrB460C6rWzELHKk9nHliM2WxYAcqDH5hVHe2AAkoJk6cSJeZS4SBvxy8C01WgIPdgVGLkr0kgg/2ggN+MZ9eiThlLVZSulihryC/uAoCg0VCqkJG85wlZEH0OLVkhEX1qugVeY+YyXksxAiNyKelxFJTeLMeM8kzFF2tTkoRjiHWA1i+G6Qsb6vKWN80G3ved8kHPnbk8Isvw9T20zxLsYquv1ZmDojh4ubKpwP2E1u2KwhaRP1ES5o+AQp/MBd9Ztau36NhpKpQVLAl66YIVIk06Q99grOozd4T9Ksw3z51Du9cPUiQx3PogIfxyiAYyTauYEzomD+3XsDY0UmpLineka5Y=; 25:ZoOUWwhVnd+jNtRpoScQS77z5vhviyYzgiDMSzwDrBbvLgEpHitHNbCuivYpnjPA0JAWIzQVKiQugrc3fKmBlckbq/QkuI8ngvq6hpDeAMFqpo6M2JVsaOH0ZF4l9OyDZsV1dakmq+wB75rOTKANLs1x936j3HASu7zAHF43M22uHap+OwIkM6GgHjQPncAvsGDqSxzukhRlCoVUK7t/S/my1XOKoL/QzQFERcTKdhoYGRqV3FdbIAq8Gym8ey+ywMkC7vd171TmSPZ6hGfogBVUIm4/WDKw3ffLxg6OG7S/ckEKsmBULOI7gB1p99kiroPAwS0E8GxaD9JjD7lBxg== X-MS-TrafficTypeDiagnostic: CY1PR12MB0760: X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0760; 31:QgS/7zhVGz+yOLZDLj7BWB9IuzLNXOiNhVGPwYdG35cA0C0uQSWRSa1AYcAT++r9gSxlm7XKC8RGGccKiAK/YCAddQiMBpPye633WDy1iYMm2dADcZHSWKWPvELLrerIoJjf43FXj4FnmuuuInA9fw4cwqI3nXtuNCsTIWumaMQrqTqeKSRhD4ah3tDMbim9n8UxSb5285O428UlwRasvPrqBpPl48jSQrXCoYFtexg=; 20:N0W5N2xBHueCmYi1FydUkttBl97rE6C0GaSjeh1xOxDGq8dIeIPD3Zz/H9GjqsrO8TrLPyuStoCNTZoSX9C5cyMBFE9u4X0iKqYHoK0D59OMrqeG51o+xl2K2uK1dRfB9J2diCT4LTUizch41tj1hjaKyMth1ExIxeZL6Efr6hjJJBh31aHT072NsM0Lhs32pASdXmH3/Hi8hSOtdiXZCLtiVWco3um880QEMKcsYiSRwayGtvwH6Mbh2yEJPRIXWgxJuAboWrvbp2QcvDDg31RRUbxduuHC4iwO/7/0we1FeRCVxJXBT0M9kmTGT9iCW+NDipe2hOF/7LMBvAZHtmgizuFl1rMnH4Czvp5rlFeOvyv1slp1wq6KbqWZ5rkp5Od+XEvDoH9CwKTHQyFzmHW+dWSYMsahcNm++9yboSLkwWNKjsV+P5ClJtzqz7NCiFmLzTurMv62xVXGyn2iP07OqeiJHYsCeRxUzYEoGiJTDdpdwZxen4n4+l2siyjI 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)(3231221)(944501327)(52105095)(93006095)(93003095)(3002001)(10201501046)(6055026)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011); SRVR:CY1PR12MB0760; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0760; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0760; 4:GhtjuoZKf7bynlb4FJ+HESmgGMbEPKOx6j6/9h5e/23rrjDnPbmSZWI4mmcm+dUN+hI6sfphNeSXy+6qL+ADKuNzjEFHJb9XHTOebYiEeNrNaefVR08Me9DuKRrndR6aL63SR0Tf8qmh76XpZ+w9VTX1YNfO8RWlhZyHTFkThtexFh+44X/FOm0oxU5+r3XPk6+uU2dxpzP99FgMUlscm4sM3CAO4qE2FD4tZcx7A2y59xE4G3VjStgl2E9Z/CE/BvJwCh9bh/Rk1KnkY3fHx8BibmH1AVyc744kxdjx9w+pgUAtTVtpkN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vzRWbgE6LZousoiaufHdNr2ESA2i/etrcKG0yWo2ZrQSDLnuOr1ms94Ler0j7xcf8HGOqQIybnGZQl+IdOetAaAvEiXIi5twR8A==; 5:p7CYaEJS7Hd4p3G8rPBiRl8ZF4pWCJdIhNQKW7Vnj3vJniOjl1ScLIPZ4eDRAviv9WvHiEaSO1Ku+WcXPvZKK0NiOuOBCiPGFa1Fiuzzp0mGk0YGV+igpRp0Sm+h+Yntsrv/ZQ2bRgTy5Rkp757oY7bGlOQXWgm/I02iBJ88nsY=; 24:wcScNEFT8Rd1JJ4KqXKZ9Fvyf1C58ycvV/I2ldg9GiOlYB3YUeB2z51jbObY8Zd3c6EvaHG6hRGFlMKT4jALQvCVxAKv1CuIDHviqDNRpHg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0760; 7:rBdV+hbBXZZ2IYpyaPwUaitHI7je5h0Y8Pv7JdkTFoSe7uSaEWtM8/cesoL1/nRhaqw4+MYTUVXgDRNRmyhQdm5OEHSoW3PcfLMOYUGk9iozSOZqBh83Ztkl3ovVhpAohbfZfVzjIMyRbs/KKb5CzD1AN4iQ+4w8vQdMNABUyMUHkUVibpcm6HEefj+wDM7XAt1FGWDAQxeyamsvbSMvq4lKjnwSi6na594duom+rAW60BnVY7O+2w8z+c4A7qiO; 20:aY4rEqLpjB5Lj1A3GDgybJvWVIWtmXSh4mBGUKFzzsINM9PM0SMrMqIFNu5oeoo9w+UsL4CUcA6vBwAZnBUqf833crdOGxWEMw5OpmdGnUcwxl5hMAr+SbYJVHkNY4RX8sGmBb/QXjxifT610iYuohmX4EXoaEP0op6MmontHtNHreiZmQv65WgsOfRR1PRZMY1fhgaAAJQTWCartcURqSD9yRrp215i6cQajAhDnCbhaajZaGPZj+FXYUK0wz2E X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2018 13:11:34.6829 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 29b75a47-a0a3-42fb-4784-08d5931b19d8 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: CY1PR12MB0760 Cc: tiwai@suse.de, Alexander.Deucher@amd.com, Vijendar Mukunda , lgirdwood@gmail.com, Akshu.Agrawal@amd.com Subject: [alsa-devel] [PATCH 1/8] ASoC: dwc: I2S Controller instance param added 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 When multiple I2S controller instances created, i2s_instance parameter refers to i2s controller instance value. Signed-off-by: Vijendar Mukunda Reviewed-by: Alex Deucher --- include/sound/designware_i2s.h | 6 ++++++ sound/soc/dwc/dwc-i2s.c | 1 + sound/soc/dwc/local.h | 1 + 3 files changed, 8 insertions(+) diff --git a/include/sound/designware_i2s.h b/include/sound/designware_i2s.h index 830f5ca..8113759 100644 --- a/include/sound/designware_i2s.h +++ b/include/sound/designware_i2s.h @@ -44,6 +44,10 @@ struct i2s_platform_data { int channel; u32 snd_fmts; u32 snd_rates; + /* i2s_instance parameter returns I2S controller instance value + * when multiple I2S controllers instantiated + */ + u32 i2s_instance; #define DW_I2S_QUIRK_COMP_REG_OFFSET (1 << 0) #define DW_I2S_QUIRK_COMP_PARAM1 (1 << 1) @@ -74,5 +78,7 @@ struct i2s_dma_data { #define FOUR_CHANNEL_SUPPORT 4 /* up to 3.1 */ #define SIX_CHANNEL_SUPPORT 6 /* up to 5.1 */ #define EIGHT_CHANNEL_SUPPORT 8 /* up to 7.1 */ +#define I2S_SP_INSTANCE 1 +#define I2S_BT_INSTANCE 2 #endif /* __SOUND_DESIGNWARE_I2S_H */ diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c index e27e21f..20145c0 100644 --- a/sound/soc/dwc/dwc-i2s.c +++ b/sound/soc/dwc/dwc-i2s.c @@ -549,6 +549,7 @@ static int dw_configure_dai_by_pd(struct dw_i2s_dev *dev, if (dev->quirks & DW_I2S_QUIRK_16BIT_IDX_OVERRIDE) idx = 1; + dev->i2s_instance = pdata->i2s_instance; /* Set DMA slaves info */ dev->play_dma_data.pd.data = pdata->play_dma_data; dev->capture_dma_data.pd.data = pdata->capture_dma_data; diff --git a/sound/soc/dwc/local.h b/sound/soc/dwc/local.h index 91dc70a..e89e464 100644 --- a/sound/soc/dwc/local.h +++ b/sound/soc/dwc/local.h @@ -98,6 +98,7 @@ struct dw_i2s_dev { u32 ccr; u32 xfer_resolution; u32 fifo_th; + u32 i2s_instance; /* data related to DMA transfers b/w i2s and DMAC */ union dw_i2s_snd_dma_data play_dma_data;