From patchwork Tue Apr 17 04:59:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 10344353 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 2196160365 for ; Tue, 17 Apr 2018 04:58:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 130A4288AA for ; Tue, 17 Apr 2018 04:58:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05D352899D; Tue, 17 Apr 2018 04:58: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=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 B78F0288AA for ; Tue, 17 Apr 2018 04:58:28 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CC1BC2673FE; Tue, 17 Apr 2018 06:58:24 +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 A03DA2675E7; Tue, 17 Apr 2018 06:58:22 +0200 (CEST) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0064.outbound.protection.outlook.com [104.47.42.64]) by alsa0.perex.cz (Postfix) with ESMTP id 130502673FE for ; Tue, 17 Apr 2018 06:58:17 +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=Prf30/W4rMSH4PV5LLWmouf356XpDMD3+s3GvsWmkSk=; b=XlK2LNXErWQtG1bdxP1oGcGJ7dcodwec5ybIIDPmQRDEX4uS+h3UVPMFB0otyNUFrycBksX5lGJ15enivZq5mwQfzOLxNa0NSZMwchJLkufZx0paaHxys4I0JLNS5tMMSdK1ae21wswvfTJOFOmkWtOsRkbrZZ0qvswWF2x1nzE= Received: from DM5PR12CA0012.namprd12.prod.outlook.com (2603:10b6:4:1::22) by SN1PR12MB2431.namprd12.prod.outlook.com (2603:10b6:802:27::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.10; Tue, 17 Apr 2018 04:58:13 +0000 Received: from CO1NAM03FT012.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::203) 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.675.10 via Frontend Transport; Tue, 17 Apr 2018 04:58:13 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; synopsys.com; dkim=none (message not signed) header.d=none; synopsys.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 CO1NAM03FT012.mail.protection.outlook.com (10.152.80.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.675.14 via Frontend Transport; Tue, 17 Apr 2018 04:58: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; Mon, 16 Apr 2018 23:58:10 -0500 From: Vijendar Mukunda To: Date: Tue, 17 Apr 2018 10:29:51 +0530 Message-ID: <1523941201-15665-2-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523941201-15665-1-git-send-email-Vijendar.Mukunda@amd.com> References: <1523941201-15665-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)(346002)(39860400002)(376002)(396003)(2980300002)(428003)(199004)(189003)(72206003)(5660300001)(39060400002)(48376002)(68736007)(356003)(86362001)(2906002)(50466002)(305945005)(7416002)(1671002)(106466001)(16586007)(6666003)(2616005)(97736004)(316002)(54906003)(11346002)(446003)(426003)(47776003)(36756003)(53416004)(105586002)(109986005)(81166006)(478600001)(53936002)(4326008)(104016004)(81156014)(51416003)(7696005)(8676002)(486006)(476003)(126002)(8936002)(26005)(186003)(336012)(76176011)(50226002)(77096007)(266003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB2431; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT012; 1:OdVVG1d/9sJTcGKiwp0WRrF2SSEtgehkime6+wmrEC83+V/im4tPl4NYbS7aAV20yadfPNqeMMoWPhB+PnJ+9Srb/zSLoL5Q7lmZl/C7KYK4J9EMK3E7A9sMZSSaXQDj X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:SN1PR12MB2431; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2431; 3:NWltbvwitJet6vpTMzHeFnT3i+sbleEsUlcCJb9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3ffx+0DHsD8zVAgp2rgqGdkRHXKUVzsqfgj6PFsxTO6gVZ9/JaoKVw2HqHxoSbI7qyrQKYm77DB73bO+yNiAB8molyz/AqCoOpDnah+r9ieKYFskdHsNpNjilHZ3nLOMx7W+1L8Sj+kQ/NVi2Q7bEMrSnH61fbAox9AhTuZottkMMNe0O9g9LFi9o3XSf3AcVV8pBhtcZG4g5yE+iV51j3LznAC+FVPniK57NjnKISYyUfd0O/U4MGLi/Xh5qLlU26ouqveOMi9s4lid1wKqkGWCysnvkso83c+9wvBgkZQNMqXfmXwqSLkghAGeQeNKT+xSzI7NyC7lDmC2fBd9qzhby/c6nmLRs0Q2i1ZUFsdWf53XkrxKfSnDd81HpPg9Vzar8n+cq3/OYBhjEXRnve+ve1JatIqwuEWPlFni 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)(3231232)(944501359)(52105095)(93006095)(93003095)(10201501046)(3002001)(6055026)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:SN1PR12MB2431; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB2431; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB2431; 4:/XyxrKs69iwIsQYnRvUmZXzk5i+sczhTreSJ08l0axJJDBUwzC/jFEt/MbL/Sr/WTWS8MOtZ+nQBBwJBRxekjbl79wtODOsT6+Yd5MLnEVl8TyAxZX0fRdt0j2N0D5ELVAFNMfAJVXLCEDAjXRDgksT+WT1C6y1Czc9uWRbYfoZWMge9hZAGsyFttGv7gOP8BMdl+jlsFkjzHapaZ5JVhKod9LmAZAQBXNWea2+SojNxENHgeIZ0rKMJxZwfBDV5LmTiuTvtrzH0o2OonE6pfLlgxkKflkAnMVy3TWVl+LiCMfFI9z9Zr2lJHxBjhANv X-Forefront-PRVS: 0645BEB7AA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB2431; 23:XfxyKX6+E7yyF7aqLmusPhF+p/ahVQ5TLNkrr4eeO?= =?us-ascii?Q?xWbDm8XGk+libnLQI1yzGdsCPje/1rQS7An4kJ2+FqK6pw7VYzFaHWdsGX4o?= =?us-ascii?Q?JLUomvl2Cx6HzT0QmCrfpgiVbHHgYw17BIEK7qQqbHEqbH/ucO9gJCwLtDx1?= =?us-ascii?Q?wfz9XhjsZz2BQFPPNYOP4llI4KY2lj4V7S6bL/JC23NBFEKQUEG+aSO0YBBU?= =?us-ascii?Q?o0TmUCOM/yT8FthMH34sEwHFpkmd8d2mjGcaPD0930/Sv5DxxRG0h8rXFzvn?= =?us-ascii?Q?GU+6ZgjF60oBla2xRePljJ0vQJcUEkFoVltYLbGipF0UbWEU20f6e793t4ea?= =?us-ascii?Q?5MCoWmW9HHymUFywoKyZw6dwarjSdoRN2tVGxlmDVo3PDuHH0iIFyya6BPCn?= =?us-ascii?Q?xFq1FijHYr1a/2PuY6fQaIxVh1s19nYjW1uxCjN6VOYr3ldh7GuQR2wikVif?= =?us-ascii?Q?arxuMuXs0VP65qZUgpD42lwGbVKyMUb/3Vc5otlzXF9KSPKW2cWqMSgGhb4S?= =?us-ascii?Q?9k0AXQvnA17sh5iTzhPQGjHm6oESm6IHyKEn676PyBGPggjoh9Wt59L4ZfHC?= =?us-ascii?Q?A5HypjorULaqB63FoG0aalGktNqWF2ZOr38pohFUsJyYSOzswSalTeUVb9UO?= =?us-ascii?Q?rMuNU0WYaZCgK4CIXGH2LQ5v7CN+dIup65ANpF9QE5NApi/66OQaGFcgPUxC?= =?us-ascii?Q?PNqnv5/bN8EUMpqQFgLzkIGp/zV9Fs5FjQNRlEZX0fZfZogcPrW9Kib/CwzK?= =?us-ascii?Q?fF1znF+DOLLILFb1WriWS+jaUDyJSav5zl/W6tm/m6ENNEaEqkraGivYC2wK?= =?us-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Office365-Filtering-Correlation-Id: 78ba559c-8676-4fab-c467-08d5a41fd2a8 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2018 04:58:12.2853 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 78ba559c-8676-4fab-c467-08d5a41fd2a8 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: SN1PR12MB2431 Cc: Jose Abreu , "moderated list:SOUND" , open list , Takashi Iwai , Liam Girdwood , Lubomir Rintel , Mark Brown , "Gustavo A. R. Silva" , Vijendar Mukunda , Alex Deucher , Akshu Agrawal , Markus Elfring Subject: [alsa-devel] [PATCH 1/4] 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 65112b9..58f81a4 100644 --- a/sound/soc/dwc/dwc-i2s.c +++ b/sound/soc/dwc/dwc-i2s.c @@ -553,6 +553,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;