From patchwork Thu Jun 21 04:58:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akshu Agrawal X-Patchwork-Id: 10479151 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 4C01060383 for ; Thu, 21 Jun 2018 04:59:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2ECD928D28 for ; Thu, 21 Jun 2018 04:59:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F48828D30; Thu, 21 Jun 2018 04:59:27 +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 42A4528D28 for ; Thu, 21 Jun 2018 04:59:26 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 866D22676BC; Thu, 21 Jun 2018 06:59: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 600292676C3; Thu, 21 Jun 2018 06:59:22 +0200 (CEST) Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690078.outbound.protection.outlook.com [40.107.69.78]) by alsa0.perex.cz (Postfix) with ESMTP id 451DB2676B2 for ; Thu, 21 Jun 2018 06:59:18 +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:X-MS-Exchange-SenderADCheck; bh=/i16SP9hAsGD0Anr9EhMsrsaVgu/aBWxXaunr/LWm5s=; b=qxwaQKVV8ZrJZtWqskakwm8mTTZo1VQtT6ZWWyo/eieH0bvBuKf9unt0vWxT19UfIllGfx2YlbxRozHj/f6rV5ytU/GcZtuecPp9CHGswif8o3LTs90xg7Dp20+ukHiP3igbhuEGGwVCp5ol1SqZgamiChnYfRLTATC29Q3hnS0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Akshu.Agrawal@amd.com; Received: from akshu-HP-EliteBook-745-G2.amd.com (202.56.249.162) by DM5PR12MB2360.namprd12.prod.outlook.com (2603:10b6:4:b4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.884.20; Thu, 21 Jun 2018 04:58:59 +0000 From: Akshu Agrawal To: Date: Thu, 21 Jun 2018 12:58:16 +0800 Message-Id: <1529557112-5525-1-git-send-email-akshu.agrawal@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [202.56.249.162] X-ClientProxiedBy: MAXPR0101CA0027.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::13) To DM5PR12MB2360.namprd12.prod.outlook.com (2603:10b6:4:b4::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f36fa7b0-05e5-49f6-fa46-08d5d733bb87 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DM5PR12MB2360; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB2360; 3:8h83g2NcsA8GebBBHUXudw5clTrDYzLE6S/P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uTIsTuBtwWl1p3QwlzILpujSa2l43U+bFGONh8GMaot1VK9spQz53fkAEpeCKVVBKJOqnte2w+cpWd0vNFNEbGLTTiZSyDBKxtKLDSURT/ew8LyQ5Vjb8lPwQZymCFWUEZpGix6Onyl8biTqP1xNi3VQEEF+T4K2mHayHneoCSWMtArB83H2QLNXtu6WVi11rFD/04Gm2zO08deALSy3lf8/tI4Jgi9AWr47DtycEvQIlkCNazQUq+JDo/+JiAZO2DtExBBtw4Ixvz+Uauj2I6SJjUclsfqmsOFXgBlfHZwvdYTZ4/lFomjfLGoaT; 4:8IUzq6mmhJ4KDyLA/CCi1qpvLjn7Spv2pbVQOdrvsADtMjmrKuY08JwtHhj+ywtECg5D4kqISq0Slvt7fQSeI/TXte1i5omw5IqvveLeNVI7wwX+0FER68eZkyoWtkx7KNJcPs6esnRg3zk32WCK4xqnuetbk8YuBq519TVXvjp4JT3ZXnZJVtBtx51FSyisF1AnjLEPGZ6Tcg4vG66sUa8qGRvCk7lRWa7PQbWsYNahrKRwNq8hDSXrMNUOIoj8Z7yl6gff73u18+zZY9ZzyCSKG/KdBHPOSoJL7X5Fl5+kepH+rXBWTBNkZOxwQoKc 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)(93001095)(10201501046)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:DM5PR12MB2360; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB2360; X-Forefront-PRVS: 07106EF9B9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(396003)(376002)(366004)(346002)(189003)(199004)(81156014)(1671002)(2906002)(81166006)(8676002)(8936002)(48376002)(50466002)(6116002)(3846002)(6666003)(47776003)(316002)(54906003)(36756003)(16586007)(109986005)(66066001)(5660300001)(39060400002)(97736004)(53936002)(4326008)(106356001)(2616005)(476003)(51416003)(7696005)(52116002)(956004)(105586002)(16526019)(86362001)(478600001)(68736007)(186003)(486006)(50226002)(26005)(386003)(72206003)(305945005)(44832011)(7736002)(25786009)(53416004)(6486002)(266003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB2360; H:akshu-HP-EliteBook-745-G2.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR12MB2360; 23:0choFSebLZzt3tE13S1ofCyh5tC1AvVuGuGeb4Gds?= =?us-ascii?Q?au3Zg1ufvp48/v296huPgA3S/J/aVKPXAzZ+qRim9ySdbjDtKa7Iq9RMIHDY?= =?us-ascii?Q?TYDZUcjfEqRFT6qEewjCPZej0R3tQuWcxOVLKsEdF0MwRyy/GYCBar47EGUG?= =?us-ascii?Q?thS8GLjFijNq4g1DQlyTCPgpDXZ9xnUIUWJ1iy7M8oYCRuEWxkVLF2XPkYzN?= =?us-ascii?Q?Y8R/ye9GcaadOIRm0tycmoZTwll4qEaAYqHuuj5dJEKHNz3X82Pn0eQJoyHg?= =?us-ascii?Q?au3MZKHI+uawDK+m76RKIO1hN4y40bF28KBT9ksy6juGqsIWgAXuvBRdfwak?= =?us-ascii?Q?JmqtTpI7WX5o+BGpAzQD5napKV3jDZd5jIBrf4vcvtsPfLKDqqg0/BE8yQ7N?= =?us-ascii?Q?kup4lG5FAfwiMZwlXF7D3rHyKHOEwc4HqQkuz9o458slGGL5y2oVFuFErRQk?= =?us-ascii?Q?6TuBuB1nCXtCuyqGOnGzttEycYnTMwhCUOmvx88BS6GpbDYGy8DAnRXLG8fp?= =?us-ascii?Q?0huWp4IowBY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UEtgvQ+jL1HYFcEVy9VbkLUBgw4Ai7iqRoy9JSH2TAYRpV4lN3LQzk24wcKz+7Ysz8jP2kFKIoNSxv72LzFmU0kZw80RXDNVsRPJbDoZncukw5/4psATzfamQOGf4QqDoopdeXs2lfxnfa+MVniXSy2euakeC5mrzGyM4dBmC9jKyA9PDxqQprqxClwvDWB9tG0tdwUk0gt8mT0n7tUJXtPkwNfmXZOC0KA8rceMjNejnNxqVy/kDNDpSgGK8Pad; 20:y55+ceMdlx7C8aefNJ+EAiDcZTIIeCyT+7vUHggQ8FyF3fwuQnex0ceUVQI2tJvJebfsKvNf7CbxLLd2QywxcFprQfsCfZGbPFWIhK6c2ZiMwGTRxg53fma8i1W6GvBy6g8xYUC0b0o1WvKW5afM0+O9zzK2Zc30z0It6o/r08xH8FUSiag1bmApCiaXWvskqtRVUSiaUhFUxTc6K8e2J4iiVEx4e6gA2tPgGDcIlr+HMNdOamvh1SwWpDrz5NPO X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2018 04:58:59.0940 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f36fa7b0-05e5-49f6-fa46-08d5d733bb87 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2360 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Kuninori Morimoto , open list , Takashi Iwai , Liam Girdwood , djkurtz@chromium.org, Mark Brown , Wei Yongjun , "Mukunda, Vijendar" , Alex Deucher , "Agrawal, Akshu" Subject: [alsa-devel] [PATCH 1/2] ASoC: AMD: Change codec to channel link as per hardware redesign 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 From: "Agrawal, Akshu" This is a correction to match acutal hardware configuration. The hardware configuration looks like: I2S_BT -> SPK(Max) + DMIC(Adau) I2S_SP -> DA7219 Headset No actual products have been shipped with previous configuration. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-da7219-max98357a.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c index ccddc66..566bd26 100644 --- a/sound/soc/amd/acp-da7219-max98357a.c +++ b/sound/soc/amd/acp-da7219-max98357a.c @@ -148,7 +148,7 @@ static int cz_da7219_startup(struct snd_pcm_substream *substream) snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &constraints_rates); - machine->i2s_instance = I2S_BT_INSTANCE; + machine->i2s_instance = I2S_SP_INSTANCE; return da7219_clk_enable(substream); } @@ -163,7 +163,7 @@ static int cz_max_startup(struct snd_pcm_substream *substream) struct snd_soc_card *card = rtd->card; struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); - machine->i2s_instance = I2S_SP_INSTANCE; + machine->i2s_instance = I2S_BT_INSTANCE; return da7219_clk_enable(substream); } @@ -178,7 +178,7 @@ static int cz_dmic_startup(struct snd_pcm_substream *substream) struct snd_soc_card *card = rtd->card; struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); - machine->i2s_instance = I2S_SP_INSTANCE; + machine->i2s_instance = I2S_BT_INSTANCE; return da7219_clk_enable(substream); } @@ -204,16 +204,27 @@ static void cz_dmic_shutdown(struct snd_pcm_substream *substream) static struct snd_soc_dai_link cz_dai_7219_98357[] = { { - .name = "amd-da7219-play-cap", - .stream_name = "Playback and Capture", + .name = "amd-da7219-play", + .stream_name = "Playback", .platform_name = "acp_audio_dma.0.auto", - .cpu_dai_name = "designware-i2s.3.auto", + .cpu_dai_name = "designware-i2s.1.auto", .codec_dai_name = "da7219-hifi", .codec_name = "i2c-DLGS7219:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .init = cz_da7219_init, .dpcm_playback = 1, + .ops = &cz_da7219_cap_ops, + }, + { + .name = "amd-da7219-cap", + .stream_name = "Capture", + .platform_name = "acp_audio_dma.0.auto", + .cpu_dai_name = "designware-i2s.2.auto", + .codec_dai_name = "da7219-hifi", + .codec_name = "i2c-DLGS7219:00", + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF + | SND_SOC_DAIFMT_CBM_CFM, .dpcm_capture = 1, .ops = &cz_da7219_cap_ops, }, @@ -221,7 +232,7 @@ static void cz_dmic_shutdown(struct snd_pcm_substream *substream) .name = "amd-max98357-play", .stream_name = "HiFi Playback", .platform_name = "acp_audio_dma.0.auto", - .cpu_dai_name = "designware-i2s.1.auto", + .cpu_dai_name = "designware-i2s.3.auto", .codec_dai_name = "HiFi", .codec_name = "MX98357A:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF @@ -233,7 +244,7 @@ static void cz_dmic_shutdown(struct snd_pcm_substream *substream) .name = "dmic", .stream_name = "DMIC Capture", .platform_name = "acp_audio_dma.0.auto", - .cpu_dai_name = "designware-i2s.2.auto", + .cpu_dai_name = "designware-i2s.3.auto", .codec_dai_name = "adau7002-hifi", .codec_name = "ADAU7002:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF