From patchwork Wed May 9 04:26:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akshu Agrawal X-Patchwork-Id: 10388099 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 EDC6E60353 for ; Wed, 9 May 2018 04:29:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDE5C28D19 for ; Wed, 9 May 2018 04:29:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0D8628D52; Wed, 9 May 2018 04:29:55 +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 20CD428D19 for ; Wed, 9 May 2018 04:29:53 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4265F2676EF; Wed, 9 May 2018 06:29:51 +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 84CE22676F7; Wed, 9 May 2018 06:29:49 +0200 (CEST) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0083.outbound.protection.outlook.com [104.47.38.83]) by alsa0.perex.cz (Postfix) with ESMTP id 3DF95266F0F for ; Wed, 9 May 2018 06:29:45 +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=64CJt3reh52dADJr21aXthFyJe+jjrJq+qCKrgh/+z0=; b=lDnTJYtBNpWwgIk/UxgXVBSM63OpYIoTSc3N3c4MFelKIeXtqiUQIdg8B8NjtVqcc84ak7X3fvBafUY0StNYN4VSNJz5/Xv3918nHbYFEWVClBorFMgeYstSTM86+pWCisL3ipnk6+7S9Qo4KAUkPWsNTPnfkfe+VywboUmYf5w= 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 DM5PR12MB2357.namprd12.prod.outlook.com (2603:10b6:4:b4::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Wed, 9 May 2018 04:29:39 +0000 From: Akshu Agrawal To: Date: Wed, 9 May 2018 12:26:26 +0800 Message-Id: <1525840011-14077-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: MA1PR01CA0090.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00::30) To DM5PR12MB2357.namprd12.prod.outlook.com (2603:10b6:4:b4::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DM5PR12MB2357; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB2357; 3:YgGEXua9Yi0KfI2m8OnYDwSrpodL0PAT8PoWPf8VKOrOIPwIprpaln9doPAa/XIbHBisVHWWFWEDVS3NDdOHEzRoNuqRN0fyUvw/leDjYIBW7m0P0zikVGDGrJlwpzl6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zf1PVz0AiZ5Jb1d6S4XK5wnT7pWSqmuFVa4+lbPVeeFCSmQe3r3z88C5OFkGRItmsIl7cdg2VDQtZHq6RIbUjWfz4NM/l2hF6Pzc3dOPhg/M3uCSrVPE0hduO1KDp+1bciWRYJbPbVbUG8twsmXfbqNRvzst4q45rKQvRXSjKjBAZDsqGHz9jmnu3XwKg8OZ2Sk7nuOUihuB5c/RmX4wjauI6or5l8K; 4:bVafUkrSSM+gHAl+K4i7aDoFn3WZzouW2Nc3U4vHZ5pOl9FenlcDNyaR13gcDDVDZOpsbaOJjkNR8aDmWL8Og11Nr00RqvOCv6BiOqd8HOCJk9gEWVQnSe/h+ESzMPK5JXpE+ZNVIOvKdY3bHGvxlz0l5JaEpJdDrwsCIK4R+wwdIPXv6NVnxHidnsdh9RxIuNe0JdOiB2320h/P8hLyXmQUUqBVl9WACXnp2J/f5lU4CF5FzRMti0kIAHyN1bQELMgxkKNfRSnko8GgZVDappN8JIq3i2c5NogI1SdC8E60dIeiRqsHq5aPlzJJRjnV 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)(3002001)(93006095)(93001095)(10201501046)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR12MB2357; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB2357; X-Forefront-PRVS: 0667289FF8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39850400004)(366004)(376002)(396003)(39380400002)(346002)(199004)(189003)(106356001)(186003)(51416003)(97736004)(26005)(16526019)(68736007)(53416004)(47776003)(44832011)(66066001)(2616005)(6306002)(956004)(7696005)(476003)(5660300001)(36756003)(16586007)(105586002)(386003)(52116002)(316002)(54906003)(86362001)(1671002)(4326008)(6116002)(1857600001)(72206003)(109986005)(3846002)(486006)(53936002)(2906002)(8936002)(966005)(6486002)(39060400002)(6666003)(305945005)(50466002)(7736002)(81156014)(25786009)(50226002)(48376002)(478600001)(81166006)(8676002)(266003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB2357; H:akshu-HP-EliteBook-745-G2.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR12MB2357; 23:e209hZUuBrkUHEQfO7FIg3kyWbP7qNveeGfmPkP16?= =?us-ascii?Q?2J38BpydeSFlOH68YZCpd9nd5GuG0Q7pWMAR0d6pNe4MaE42oNjMH51dY370?= =?us-ascii?Q?4iegnXl823gh0kJOYj+wSe6pl5Asl4cl0GusTx3N31y0KHdLNdlPOTLmn1N4?= =?us-ascii?Q?9IA7QSRr1jm4yNuBDBLL9KaIQt7GshGaXWcxP0yMqXq8pcAlWUWuDOusal6K?= =?us-ascii?Q?y62hr0lK5i8QIHX7HSZT8Ek02eQVv43ACNMow3mwmP9wNcUoGya3Mj6R4Lk3?= =?us-ascii?Q?5mF8A5nL+QGSwZuPlT/gm8a3yxuDeHNQrHlXWexm0IeoX9m7mIE6qpqblohr?= =?us-ascii?Q?bvmKCHFgNl5+Qs0Y2heSKGtpSk640mph4JguBxqCNWC7BABVFownzXC0dAWA?= =?us-ascii?Q?wIOkKNcryXc7ApjDUT96Dc+fKjMRQLhXrKO7G3MPF037oQ1aGv9nY3FfVMGR?= =?us-ascii?Q?tH73q+rSKpkCoTPDpiqPdVDCXrERoqO+VCzNfWE+PDyvrgHg2z3otGkRPUdF?= =?us-ascii?Q?Yk4xWPWTuBW9Z5GZTpF/joC0qHAzVG36WqaXKsV3wtv9SavC7soVqEthTZYW?= =?us-ascii?Q?ndQM/xUeUcw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pnfr1zwarBfKAh3KKjVJGFJGs7DnGREKRbqrxJ3Blfc2NVb X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB2357; 6:An/QK4/ZFHyOm/fhrZVIYdyKMGeDOI5zdhvFy3n6zlgJyqFlldkQBOxx7mIPImTlcHRWXEqMb1MOZcFhBMRXuATv+upVYU4ngVyW5ghI52hM1GohD43AzP+p9MUiJOX0Gk8HgBSncf24s9D5Rhk9YymPzPHP5yu4LpGeCw4FjjTrIwp/tYQSYTAIKcP66JWzhrhJp4E6xU8ER9fNlxHMWlN0LZ1S6mWfMXW9iflSUbpWoYsj4ODkTLsD7Y7XlXMmJzGC5O++ghQydY7qQXGNz7UyhFOySiX0e1CEnCa97BcR787fvUvofjpSGken0v8pzKObPdG0Few1SCJ5q0GhxkK/EKYj7/Kt7dncRhWo0GuMWu2VkLiPn/bonq4c9jSkryzNaSvhzKP19J6tRHReu6p0zObWV19LXtPte7capHjVq3S9nhzSNZ+EP9L37TxwlGElwqxbEXJjIphcA56W+g==; 5:wMJ+9lZwH/bAF7bibl/MhZ9J5vX6LhLwsUXblESAt38uzrFGkEFrjKa7RW5dJ0TmBGGpYIUo+FlMhypaIbsVOEx+yp02ltl7dzQYcTFlygMvDab57zoCJU/bP7XL9I0n125HM8YddxX49dJ/BRnGHka7IXfwhEJu59gJC2QPHDk=; 24:DdeVsTUSudlzA9mZVtxuvwjVYok3uRi5meDEZHuofDK/dOxsdUgL+tJ7KbReSXgd45XfL6/H3tfkyUyIqzLTc2adQittX867g7A5DgHGQWk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB2357; 7:wujRTSulDZZeaCzzRn9fjAc97G8oJllfKCbcTqn31PNoMZiZHpyUQANugkRJevK76wZ79+tPVPvXPbAcMq6+dn6AIseNtQcQD1KUEmK8HW8vXbMFSh2G8R/rxBdYkyx/PqTe7Q6vxK6/7L+tir9dyV9jcBrOVPD8IQPBh9fluUWTGX489GeSxoBNAlNnqpx/5H99uB7np0fxxKsBcZn3BouQbMwvNRgst3Ls5bspg2sNM3BUuQ9ZkZF+I1uQrPSt; 20:fTIOSaFfFL1QyzBYkCX7I5TwMwALlQhXYwINQfPHWoiv83kUmNhcGOdOSjhO2rXlIzK+fCEEWlRNYO9MAwUB5V+VrIQEAvSulkzWfWRin3gyO0oLw1NR/cgq9m5tC5vfFPXaJ7HiCyx7F7nwuRb8SM8GPRea80fsgrd2B6aYSgqSsQ62HD9oWpSFuZZdEGrOrsvevOh8FeBO6unmsDDn51t8M1Y+zOf5oHlPkbDFEcR4f+v9TvJam7x5XpccgM+g X-MS-Office365-Filtering-Correlation-Id: ce682a0c-5ab8-420d-8c7c-08d5b5657c77 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2018 04:29:39.2892 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ce682a0c-5ab8-420d-8c7c-08d5b5657c77 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2357 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" , Alexander.Deucher@amd.com, akshu.agrawal@amd.com Subject: [alsa-devel] [PATCH] 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 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 --- This patch is dependent on [V4,10/10] ASoC: amd: dma driver changes for bt i2s instance https://patchwork.kernel.org/patch/10385381/ 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