From patchwork Tue Mar 20 07:12:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 10296597 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 7B11B600F6 for ; Tue, 20 Mar 2018 07:10:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 681FD288BD for ; Tue, 20 Mar 2018 07:10:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CADB29499; Tue, 20 Mar 2018 07:10:28 +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 44AA2288BD for ; Tue, 20 Mar 2018 07:10:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D4F982672A7; Tue, 20 Mar 2018 08:10:22 +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 14D292672AF; Tue, 20 Mar 2018 08:10:21 +0100 (CET) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0075.outbound.protection.outlook.com [104.47.34.75]) by alsa0.perex.cz (Postfix) with ESMTP id C530C2671F9 for ; Tue, 20 Mar 2018 08:10:17 +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=zyFpB3JWcTDZZbVlRRTQ5eJa3WOUU3P44Y9bdbkRHWk=; b=PB8y2o2KIT7c2R4Gj8MsMat2Qo+2TZnSmnvm65vyTrYtbVT6YMOFx74LkTDFkodi0UsjvAVNR0XxpQ3ez9ab6k6aAyZrex1OJGvtfj/rpJ10N2VCgDF76utwU7cDJVbqfCMosRJsC1hVK6+RTFrdpCGSoLxvOxBjHe7LO3cNQLc= Received: from MWHPR12CA0043.namprd12.prod.outlook.com (2603:10b6:301:2::29) by CY4PR1201MB2548.namprd12.prod.outlook.com (2603:10b6:903:da::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Tue, 20 Mar 2018 07:10:13 +0000 Received: from CO1NAM03FT026.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::205) by MWHPR12CA0043.outlook.office365.com (2603:10b6:301:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.14 via Frontend Transport; Tue, 20 Mar 2018 07:10:13 +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 CO1NAM03FT026.mail.protection.outlook.com (10.152.80.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.567.18 via Frontend Transport; Tue, 20 Mar 2018 07:10:12 +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; Tue, 20 Mar 2018 02:10:11 -0500 From: Vijendar Mukunda To: , , Date: Tue, 20 Mar 2018 12:42:22 +0530 Message-ID: <1521529942-21262-1-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 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)(376002)(346002)(39380400002)(396003)(39860400002)(2980300002)(428003)(189003)(199004)(316002)(186003)(48376002)(16586007)(50226002)(2906002)(77096007)(336012)(305945005)(26005)(36756003)(478600001)(68736007)(356003)(8936002)(7696005)(53936002)(51416003)(81166006)(72206003)(5660300001)(50466002)(97736004)(106466001)(39060400002)(6666003)(4326008)(53416004)(105586002)(81156014)(426003)(47776003)(8676002)(86362001)(104016004)(2201001)(54906003)(110136005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1201MB2548; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT026; 1:PIaJ7Zg8utvHi7Wd9avhQoQT4OdGdmxzhoEgePoOzL/ZH7AMTXcs1gedZLuxYvQJKBG5RU6HD1b0f8lwxyD5GJe5qY2TqqFgjgy9igmJpBD5U276Qde2WxMFJUORisY4 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5a710f13-4cbc-47a4-b3a1-08d58e31a00f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:CY4PR1201MB2548; X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB2548; 3:msWP5tffAcVcXHPJtPGC6P5Rx9RU6rIVjzVJJad6UtwIreJ6TGO2qDAw/0sEiDChubUesd6gczuN/hdKAV+QP9A612+IjprE3vapuhp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blcv3EqHyzGa+DZTC/C94jy/v59cuVwNsm6kxdUHLLFIG+FGZR3/b5xUIqB3im73XUkJ8R25WZRYFDNL2TSMmRSjC5grFVoXRu9r6D7CrzHmhSvPhKK7jZRqI+8ZHBjfqGqzIUEd6LgauE3U7tRImG1QqeyI+SY7yDqdfwRwv3CkjpEOSLKN1VNR8uNGzbgckI5sOlctn8R+howWsqLH2+hlyXJ8pFUHqHxYMlDzg6B30dZ6tes7WUSYFQnUhDKypURO8vN0OTE9bk5mnK8fzPAgt5lDpFL/9RxaDrEKawFBZgorTABX5y+OOI4KEjxVh+eBStbnuAoNAxZjWQBi8DygAkTl1GT 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)(944501308)(52105095)(93006095)(93003095)(3002001)(10201501046)(6055026)(6041310)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:CY4PR1201MB2548; BCL:0; PCL:0; RULEID:; SRVR:CY4PR1201MB2548; X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB2548; 4:J6DuC8Jtqu36VPWeTDJwr92ra7QKL7ZhWrCO6dAi84dqJhsg9RPpHzWNsntZqOa3nEr+RuQ24TSHGW96QvpWFeQMcgpscsO0fB18JiHjqoq2wBEN9tI4Py9rM+AiNVFf1vqtJODULM48fg8JTHlbnlrEWDywm8OwzAq3J58tucBF6d94bn5/HxjqWx3YMY0s4je5ZALe2SyyQpFd5H35rPk47En5QbGwXbZzPS/fsdswD/wHdJWPQqEd+hcyisOBAY27BQG/iDGbILjw20gAAMpFs0gLNMaXIU9iEVOifV16iGwGuioIygV3d6o/UoZf X-Forefront-PRVS: 061725F016 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR1201MB2548; 23:9Rm6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MLTiP7rHQ2uN+I135Hc=; 24:0ob/8K1VJhAPUd8KahWCgMAWgqFqLBST+RpO4jAieOAAYj8wOyiH19+1EV4JTTFn9RcnQApIKABSPXNQr64USGyRjWMxKVtMc2HnBzS6rVw=; 7:TUeEAvf28NY9j4xkjKlr7k8d0oQziuyDj6dzjZgNaVWul3m41zX01VxGvM6fyPE+NSKgUPvDdxVFoP04HP3KXxqxj9MfA2CmRKlo+VrrDIO/Ynhm/t6UvT0Hyey4kqvSJ+EX69zn6rZu1gWWxVOmuqdeLNP67cdEqgjdr2ckf/tDtzSTWc7hnuzEQbOVaAkzg5yRfHU0vl8hEyojuS+YneKFCRTuqRnBYnjKHDedXLAQR1TfUsFGcmvQVv9byhKr SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB2548; 20:0/rZwR6SQ9P4hkxaLqqdT1CkCSgY/M2Bmb/t9qWP5IFwJOkVRuuL8/LFlTJUoLZX7qImY3zaqZwWDznVTO3KWPU7pcMS0NDO5q3pI5O4hocTFppWuylTY+BTyapt1l6qK8L0cGTbEtwJP3YlpBG5fyCuH98gghSI/9k4fUtdW+XmTIVvZXh4x8wCRFu+uDejfx4cwkBIOSKkEqBEUL+Xy7RCyYz3fBvfMYHzGADFnmeQQBtssFzFl3qWMgoRcFY0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2018 07:10:12.9437 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5a710f13-4cbc-47a4-b3a1-08d58e31a00f 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: CY4PR1201MB2548 Cc: tiwai@suse.de, Vijendar Mukunda , lgirdwood@gmail.com, Akshu.Agrawal@amd.com Subject: [alsa-devel] [PATCH V2] 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 --- v1->v2: defined I2S instance macros in designware header file 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;