From patchwork Tue Apr 18 00:24:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13214890 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA162C77B76 for ; Tue, 18 Apr 2023 00:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Subject:Cc:References :In-Reply-To:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GvtTGOI3vljj9fEkFmFMlpYjd6poVmPQBSU+u5Py2g4=; b=tgfisKt45Nl+g8 +uLBXd2rAmGb4lBmLSAB11CCx7vtB3csrDVYcBgqXocav20Se12eavRe9o2u/itNebe0ortbY+PKV icOf3OHlcI9kprjmkvMOdz79vV5a4wOsjqu+ubxe7aT6ySu+0hkT3VPBdiAtwbAd766EE6YKM/CJN YBQ17nrlfXkc+Fh09nLVYQyQCXKqxGImlB47+iYJHEk0KbcTfy7wZQlUI5L5b5l3TXjhtmkjTeG8K QmsjMKCksHRBxUI4rBurHVG0APpqhhuSYHPEsqIHjbFcL+5M1XvGhDS9hELygaBm1rjTSGKLVrjV3 Pa/Lwnsiq2vsXAYNtrHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1poZ9q-000UHz-36; Tue, 18 Apr 2023 00:25:18 +0000 Received: from [40.107.113.107] (helo=JPN01-OS0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1poZ9g-000UFP-1R for linux-arm-kernel@lists.infradead.org; Tue, 18 Apr 2023 00:25:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lWvBS9BSawDiXueb7b9mdSwE2WAG5iInoZ5zcJecHEgbHaypMnzPhPo0Ckfyr5AAcXrm6v75r893qlo5CJpASTvp+2UKjTxzPBmP/DszR5Hp1EgLQfjev/veY0nLT8LndxC4lWcFozaLNDV7Q3z43TzoKipe/WgoZs4y2tgyDagjN5jJSdWRRadh4T1L5ChNY0KEJ7dEliocaiNeh4R4KjSCWl0uEbr4V95FekTzHHwZZatJ2xilHTOvYvl5THCiptDiaYoQ4ZveSfqiwugxdYdsrp1FngiY0LNFofCrv3s+pt0/SBgci1v3tyU/fIEgS/1OTqKWi1/DisgA6STYiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7T8mCwmGzA7AsQ5pc9Mxi8wfsvjLsAWDSfYHUpyYH7Q=; b=b1rZPj0RTblQTxkL7G477fG1TagovLxQf6/VmxVX4GXOkbfvG2DYynlSs0IUwuxrFrk1wIcDi0nOfgVDDjq86B3Y+pJJF2onr6M4cAo7SFT4MM66hDBJSZWMoxC++LIWIfHUFYtRvoXRwSlWr/LRI2vepNnrTcMYM60mUFWpluVFFqRB8TPH+ycbfFInTyC7cS84RvdferCbcE7cg+iQgoOfWe7dT//2fqFHl0MiaZUGjroMVphANy9XoE4NyX4exTMeLdyw/F9fwgizX/cA6IeuHd4slBgmoB2bmE7HgIm1IqWkZMF7Iqx5/vDPKyWub61Ls1getLD6EKftFUyFIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7T8mCwmGzA7AsQ5pc9Mxi8wfsvjLsAWDSfYHUpyYH7Q=; b=BXFv3je28ic7RYikYU0t6uSLFo+lqaQP4jpq4pZpFDehncbWPYAGzR92E5MfRPPif0C/z/CdOufn95ZTjIcdtmsawWMEdRa2EiLe1c47Pox0U6RU5ykdthYeLVfmc/LmBsS51KToGRwiji7jl09YTtLCeHvG8XKu/ERLA1ML4dw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYWPR01MB8855.jpnprd01.prod.outlook.com (2603:1096:400:17c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Tue, 18 Apr 2023 00:24:37 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::b005:5b0f:6ad8:3eb1]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::b005:5b0f:6ad8:3eb1%3]) with mapi id 15.20.6298.045; Tue, 18 Apr 2023 00:24:37 +0000 Message-ID: <87v8hu2g1n.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Mark Brown In-Reply-To: <874jpe3uqh.wl-kuninori.morimoto.gx@renesas.com> References: <874jpe3uqh.wl-kuninori.morimoto.gx@renesas.com> Cc: Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 06/11] ASoC: fsl: use asoc_dummy_dlc User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 18 Apr 2023 00:24:37 +0000 X-ClientProxiedBy: TYCP286CA0086.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b3::12) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB8855:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c6b6275-c0e3-4fb5-bde5-08db3fa34b00 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /JPQIKyJWyQd/tcO4BBZ4a2WRxwxnvkNfOtnKpk3xyjuGJgXCcwGw0bZVfoNLQUN0CwoTOcCpnKW5TGAdMyTmugIGdsqW1tSeHS3FuBKHYkdFaEYdC0oBc7mCKXkiTcCt1z+uJv7LiMLAi0klfLFaK5eZy0z46EEVCgo+/C90o3GI2bNyR07FskRAv52xqwr+byuyu0qnCAh7DFcjidHq1cjHSf8jKUjRiMTZH9TiiR8RGzYAGLkpevOGeWj5Jn9+JwuuxSLhsLLW8yKL243vsznR38SYESrZk4VxG1IHBaBHn2yL0+3TJrMZGi8HnpSW1b0wg8ulcMLuitxVkT8B/WF1veJ7RY4Mx2LO8TMRAydNzjA6iLCBQ3gjI99Gk4jL5zxmWdocVPLZibkONCIo1UjTNfpP2pT3J8heRfnX6ZPC1w3RUKtw27ZjkiwyhrADYLIjAEJiJop2w2ewp7feVZL2EkLB+zR2kXidEZ+NAf+YPpdMfARUqBkxkQFX2TD8opNGES+vRW8x7KQE7ljaYDaFmi8HDW9CprBU+nTt9iQKRdHJT40SGCfxJMaeMDI0ExW4ZkwXSNpZyUB2CBugrP6jVEFA3j9+Vs18PEPC3KEAtJge8t8lJrBIgGy2Utc X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8426.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(346002)(396003)(39860400002)(366004)(451199021)(6486002)(478600001)(86362001)(2616005)(36756003)(26005)(83380400001)(6512007)(6506007)(186003)(38100700002)(38350700002)(52116002)(66556008)(66946007)(66476007)(316002)(2906002)(4326008)(6916009)(8936002)(5660300002)(8676002)(7416002)(41300700001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3rdLZyY6M1kuVZAFkmR6ud458CsEIXCGuRBPQSzJacedayAZSqIdl3vtKzdmx2GbtxVDwUvGhUgsevSjcD2AYYnVPci5eXmHKw/NJgMFLTnlrfCSr/SMOrZikZX+M5zali3YDZ3ku0Wc04PTh1YI2zHW4niGBJeiaJK3houRJYNpoWsRe1zfw4ijR+WZU1vvmJJ4xIYog4AZ/fAbp2yhcvmxnIsQc/MDih4ppuzbeotYtAbkLiXXchKwzz3idcFNGgyydJSb3AtBFnWIfrki+svjRgBCtZINsg+KFxnW5/QUvYavIX7bzL41qHf3XS2jh6AXFFZx8+uf5B+LX9KJfwkTpq/4egnc8E5MWx3sIpd4FjU2qu1yVbe1Kv8mKtikXssPZBdelbZ678EcwD9apmXtcRTQMJWat9e4/2FaB72lcspZngMtpE5xALoLIC/9AWfzCQGp9twSR1DM9I6MiNFiQ4yFkYHZJoVXGWtMlb5dtM3sRIngzEXPokiobhJ6TqAj+VUhYsTmPC5jQ3FQWB5ih/pmkzUBf879fF8b70U29C3yAIhOMIRuJiFa2ppZOoP0f8aROS5JVFlrgeGJiUt6/axUjEeU6pkQ+qnuL9y/BnsUGsw8jR6orUsiBmFV9/CpWI6ppqV6HidFoMvQIsLiFLShwU0zTe09B/vC4vSGP+i9YEeDvK8fsBV8QoRDEraqZwkKrcaiNEMp3zTn/jBdhWk/DWqW65rMsLxPFFR4iRcxeiLD85Hs3ocilc8ccmXoawfEzqNmnYW5hUOO9mTkqjNmEJQ65hWEzQPrV9GdVPTI1tuIbEz/RKvQeFLrudWR9zsbxG7JxnCsYrlXzoIyGe/51a9nbWpfYX6PoBiLYWJYYWq0Fxfmmaz94C79M7TIO1BuOcg7r2EF1Dc58Xs9zAT+EImayl4/as5v/SfclGciDz/u5L6Uqrees+zrkoqqef5s++07uqYQJq9mC0kqPFMqnGyy6IAcJ5cRxL3OpmZ5VOpvSvG62yeYeZkP/jlykfTaRp/iFUUjwUCaHmQM++tz6yk7Hkz/tnNn1iW0WiKrYtm0WnaykUawqxrUYTJFLTlZTGwOeAF6ndklzunnDpnXXdgDJUbkahFFLUtCJqh3ZtYWTLL47zUkgXzdITXq8sha86gW6/IlweoyXwhAxa+M7IPb5ken/10Zkvg0bYT26UScH1bVP+fnpIcSXYcckEJGiqo2FPkdpmka4Q+5Y0Jp0eouMDBAG/v+Sg+4utxULqDpwN3wLNsquT4R+oB7P0PfQxhRho1f7ZVy+ywMCEfLUix0xxZ0uUz6XvUEbW0ku780/L9yHkJx5JjO6Z0hIFqFwvTqUZhok000+h55FQxKAMyctaHFRsrEnxd01TPOtnfCXXD+nI9d4Pg2LARyi/VXC2L8AczvRGlTd+C7YmodY4CmcJPgvwHJ6gBYVG+zSVq8R3hPdW+ItmHb9JiUzRaXOP/UjscDmkwj5dQMDtYyXJ5Q1a9kXMqVgWB5izAXUtW8MF1z8ZpiRhHsvA9JG4ulbyCuq4+P71FVH2k9MKZ9rgJ42XCs1ytaFYIUXGlThMlK4+xJjRwVpCmwrxm1sYpAWgNALiqEej+7P/3GCYHoV1YJdQEFkVXQuC8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c6b6275-c0e3-4fb5-bde5-08db3fa34b00 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2023 00:24:37.4358 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Q5kOVKsXT8FzB4H77RoJHHFAtv4c7Pxqj3796XxU+xlieebz2Vw7k7E8X7M78e/iBPcaFgjfkOS4AX4sE9ADmAeeVHGhLmwmKr8pla2ogtZtBfWaX2ETRmXED6ZUgGFJ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB8855 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230417_172508_512877_1D982C15 X-CRM114-Status: GOOD ( 13.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now we can share asoc_dummy_dlc. This patch use it. Signed-off-by: Kuninori Morimoto --- sound/soc/fsl/imx-audmix.c | 14 +++++--------- sound/soc/fsl/imx-card.c | 11 +---------- sound/soc/fsl/imx-rpmsg.c | 3 +-- sound/soc/fsl/imx-spdif.c | 6 ++---- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c index 2c57fe9d2d08..8287b366eea1 100644 --- a/sound/soc/fsl/imx-audmix.c +++ b/sound/soc/fsl/imx-audmix.c @@ -207,8 +207,8 @@ static int imx_audmix_probe(struct platform_device *pdev) for (i = 0; i < num_dai; i++) { struct snd_soc_dai_link_component *dlc; - /* for CPU/Codec x 2 */ - dlc = devm_kcalloc(&pdev->dev, 4, sizeof(*dlc), GFP_KERNEL); + /* for CPU x 2 */ + dlc = devm_kcalloc(&pdev->dev, 2, sizeof(*dlc), GFP_KERNEL); if (!dlc) return -ENOMEM; @@ -239,15 +239,13 @@ static int imx_audmix_probe(struct platform_device *pdev) } priv->dai[i].cpus = &dlc[0]; - priv->dai[i].codecs = &dlc[1]; + priv->dai[i].codecs = &asoc_dummy_dlc; priv->dai[i].num_cpus = 1; priv->dai[i].num_codecs = 1; priv->dai[i].name = dai_name; priv->dai[i].stream_name = "HiFi-AUDMIX-FE"; - priv->dai[i].codecs->dai_name = "snd-soc-dummy-dai"; - priv->dai[i].codecs->name = "snd-soc-dummy"; priv->dai[i].cpus->of_node = args.np; priv->dai[i].cpus->dai_name = dev_name(&cpu_pdev->dev); priv->dai[i].dynamic = 1; @@ -264,15 +262,13 @@ static int imx_audmix_probe(struct platform_device *pdev) be_cp = devm_kasprintf(&pdev->dev, GFP_KERNEL, "AUDMIX-Capture-%d", i); - priv->dai[num_dai + i].cpus = &dlc[2]; - priv->dai[num_dai + i].codecs = &dlc[3]; + priv->dai[num_dai + i].cpus = &dlc[1]; + priv->dai[num_dai + i].codecs = &asoc_dummy_dlc; priv->dai[num_dai + i].num_cpus = 1; priv->dai[num_dai + i].num_codecs = 1; priv->dai[num_dai + i].name = be_name; - priv->dai[num_dai + i].codecs->dai_name = "snd-soc-dummy-dai"; - priv->dai[num_dai + i].codecs->name = "snd-soc-dummy"; priv->dai[num_dai + i].cpus->of_node = audmix_np; priv->dai[num_dai + i].cpus->dai_name = be_name; priv->dai[num_dai + i].no_pcm = 1; diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index 64a4d7e9db60..78e2e3932ba5 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -615,17 +615,8 @@ static int imx_card_parse_of(struct imx_card_data *data) plat_data->type = CODEC_AK5552; } else { - dlc = devm_kzalloc(dev, sizeof(*dlc), GFP_KERNEL); - if (!dlc) { - ret = -ENOMEM; - goto err; - } - - link->codecs = dlc; + link->codecs = &asoc_dummy_dlc; link->num_codecs = 1; - - link->codecs->dai_name = "snd-soc-dummy-dai"; - link->codecs->name = "snd-soc-dummy"; } if (!strncmp(link->name, "HiFi-ASRC-FE", 12)) { diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c index 89178106fe2c..93fc976e98dc 100644 --- a/sound/soc/fsl/imx-rpmsg.c +++ b/sound/soc/fsl/imx-rpmsg.c @@ -92,8 +92,7 @@ static int imx_rpmsg_probe(struct platform_device *pdev) /* Optional codec node */ ret = of_parse_phandle_with_fixed_args(np, "audio-codec", 0, 0, &args); if (ret) { - data->dai.codecs->dai_name = "snd-soc-dummy-dai"; - data->dai.codecs->name = "snd-soc-dummy"; + *data->dai.codecs = asoc_dummy_dlc; } else { struct clk *clk; diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c index 114b49660193..547be9438333 100644 --- a/sound/soc/fsl/imx-spdif.c +++ b/sound/soc/fsl/imx-spdif.c @@ -26,22 +26,20 @@ static int imx_spdif_audio_probe(struct platform_device *pdev) } data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); - comp = devm_kzalloc(&pdev->dev, 2 * sizeof(*comp), GFP_KERNEL); + comp = devm_kzalloc(&pdev->dev, sizeof(*comp), GFP_KERNEL); if (!data || !comp) { ret = -ENOMEM; goto end; } data->dai.cpus = &comp[0]; - data->dai.codecs = &comp[1]; + data->dai.codecs = &asoc_dummy_dlc; data->dai.num_cpus = 1; data->dai.num_codecs = 1; data->dai.name = "S/PDIF PCM"; data->dai.stream_name = "S/PDIF PCM"; - data->dai.codecs->dai_name = "snd-soc-dummy-dai"; - data->dai.codecs->name = "snd-soc-dummy"; data->dai.cpus->of_node = spdif_np; data->dai.playback_only = true; data->dai.capture_only = true; From patchwork Tue Apr 18 00:24:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13214891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD9DEC77B72 for ; Tue, 18 Apr 2023 00:27:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Subject:References: In-Reply-To:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zqoQ1ecocCTX5Xwi4JYrkzWT8btEjfe+dN1NfoUWbOc=; b=Ua+aPSiFJwKw7A o2wDu3Nd6PEdwf+X1y8FUb4Fcou5Lwjfd/wjF/x8YNDOzas/tRpwJ8iX3veVQupH4JMl2zJ23BImD 8ve1u2KfSjkjDzjlteTV0s1q5/W3TbIRcQ1tYXcwqnAe1DPCu6kwxy7YqORQ7QrOmtHNBNRHMTg8x jnbUNnbguBaqknY295BZdfRCOeesVm7pWX1EsjKvWmYWvtCULWzrkoqtidV3Y9VHMPOJDSObioR+0 7NGIvskl6IvoZclMrqs5lPO/zBTGDd4yOPxm1FGcQiwGNafzDUocLloTkatfKGbXfDmW+8K6tWiHg XHMA9IB0P1PnaGdZmiHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1poZ9w-000UIK-0H; Tue, 18 Apr 2023 00:25:24 +0000 Received: from mail-os0jpn01on2107.outbound.protection.outlook.com ([40.107.113.107] helo=JPN01-OS0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1poZ9p-000UFP-1z for linux-arm-kernel@lists.infradead.org; Tue, 18 Apr 2023 00:25:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SDChEHLQUGE56pg0HvjJtmqA0fVWbaaS/0ncmraIYhqSOAO1CRAkPw+dZ+FTgx7mn4VoomLQqlRgsdBIlTzWsQug3RMKS6PPZif3JyZ5w+XFMwuPoKqCo/KwZoB25l6iO8fB5icor0WULAlSEVc2M7EAP0uTEzkoXWjQScRJZV6GP6muL3XONIGOfryLRR+pMaThgmLd1mSiATcWOpfYUb1owg5Ed6Lj5Z9hof5EG64E8ISkZl3lPgoFpTJSrwX5u+YXUF6C6NO8G0FRYeqbNyNeU96GBkH96F+9GOJJYzYtX2dc7poiYx2fp0PJHuujAunEHwbEmPsmDaomMez7BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HFtqxj9wVAMvKAU/U1S2aAG7wPeT2lGiGrBx+NcqQxE=; b=Oxs6/M8KTjIeqOUaHwrPSX+lgzk22VIpOu/tgAeicEA9CTxxdrRwdDjzeB+3s2Pvi3itTaFou/+4C98Gu5pvyBmCyjgFCVar7kDcSbmtTkEKRGsSRSFsT4wWR6BtJV4KnSh9tHjKkswP1SmNlduROB65I51S3wWRQzPPjaIdt1qshg04SJpAtvVtI0U9Un9IUwoBuZuq94hi0iT2El5G3hOdDmJ6JwdyB3mfHJeiUjt9DW3JQoJd6Suj92X52O4Ov1EGD9/ouR267EqLeaTzz1/bvKhyuXWAOHFjdMvR8QXvKrbw0Bj2GrH/BT/4zuhE94p5miuQQt47wZSJupM1Hw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HFtqxj9wVAMvKAU/U1S2aAG7wPeT2lGiGrBx+NcqQxE=; b=Q1jJLSEkQ+DnBH/jciKUFXoW+S8mtvq9dWXCOrRMxkhzJsoDbMBpv6IY2yWNag83EDDjkkhVhKF4TgoorZKxZAo6HeyrwLwRAfDB1kpM6LnYJMyRJZnePIo2iSx7kfymTQpo+gl9MnXowLs2lyUONVF+r6rdNZL5S+Jc/1upMg4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYWPR01MB8855.jpnprd01.prod.outlook.com (2603:1096:400:17c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Tue, 18 Apr 2023 00:24:55 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::b005:5b0f:6ad8:3eb1]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::b005:5b0f:6ad8:3eb1%3]) with mapi id 15.20.6298.045; Tue, 18 Apr 2023 00:24:55 +0000 Message-ID: <87sfcy2g15.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Mark Brown In-Reply-To: <874jpe3uqh.wl-kuninori.morimoto.gx@renesas.com> References: <874jpe3uqh.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 08/11] ASoC: atmel: use asoc_dummy_dlc User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 18 Apr 2023 00:24:55 +0000 X-ClientProxiedBy: TYCP301CA0047.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:384::11) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB8855:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f5d4ff4-ef7b-45c9-74a1-08db3fa355c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xPKqbUcxerc7QMSLXSi1sBANV3Ez28RU9/Xmmph3aMQvIzTHqkL7uQkrSoJSXLsL395EhiacKChOu15MEzq+dH0VtUKi8AJrtG8M+Q9VZCcxGaRNW9vAcs5SDXWej/023yMT9oC3EYYzxGa5FOprl+OASzLwWR/JVWQHXTWBKjkiBlE6rjw7Ox+SplqLC+ZfMyOaqP6KIhMFCXtiEwi7o6SwjXNC5RrBwwHcWPQqgdhS3NasnACUrpOHEXOyYqpdXPzbhr4/UW8QX3283G09Vss5X3LNBFQVvFj0ZMNyHHHEq2srCMKwj6dJfKM0ZQ+Smcz1I67hKtW10je7W/LKACuxIZMgJSt98vHhiY8dJ8JQQN2iwG3usIPY0imc7Kbgt7R+Kae5i2O3GVD/YBHWV882kVnuLGmfvq/0xd06NLXg9quye7cyusSnpqlY6qd6YvEhczXpnaIGYWRA7uzRSQK1J5tuIYxbNJtsYc6tSHL3NCIyiogY2S3NsGG0zN6TTuI4F7XL8vLtZbjUhucYIhpideMn5cHndkkMAaNibINDkfeDc9Rd3TYCyaKGofKauLHJtYmR2XZIZ12TdW9vBhlhIK/FuvasZF9k3DWSJVpZ26XJxyMh01S5BZTLb46r X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8426.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(346002)(396003)(39860400002)(366004)(451199021)(6486002)(478600001)(86362001)(2616005)(36756003)(26005)(83380400001)(6512007)(6506007)(186003)(38100700002)(38350700002)(52116002)(66556008)(66946007)(66476007)(316002)(2906002)(4326008)(6916009)(8936002)(5660300002)(8676002)(41300700001)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cGjM/WdiBLEkRbwhnOaPAvtepWmovl+7dFKajVTOA0woaMlXoVt7evPrnmXKWmfRkOzMO9Am5P8rav7oeCfsluxtrmPcHMVNMGQkIfM3o/aKY/tRnQNfTfPD+j+lTZEDEAX6x0moW4euHKLRDj9JkzKruqd/IIML6Rb9jeE7oS23/2gPo8FGm1FMU05rCCe+4sSD6Rs1np3WWhGeEXsfnJ2IEKboNEPYb688wWhvw3aeLWV1kr6wGk56MGiYl52sf5TO3NsqB/Jpfm/wPhdHoLAmfzXSish3at0Zc1fJeTLOqJO3sj+fH5QWidW/Dd9cZ3/CQyNBbOz/XOR2lZAxFDv3Y/q0vGlX1+pL8GCCyLLvgEerHamrV6aBZmGWkRVhcABiWZwBUc/IPtJVHjYkcZjcEpRcCzP8VNW5ArW2MBxOUi7U9zTMQVUNmYPgNIegwbAkvYhusQqF6si+WsBnVZ56yUMMl2oR/NM2+wmhFnbJs6hDW6aJhAXZAarOHQc8OrmiZq0K1cPCI79CNB4nRAOuPHLo22VTGCHtCqarjwgkdkUQQXiwig6fQvLcvM76EX8k1X72nmX3vtbiAobxZcKVa6uvz4K0kqFYt2nJutrKU4Gp9M81v/D0ntCxYpTRT7zjJQ/s5v/s7t0cbB3RWWra0dOWjQR2eFUWsgeQDKg8nnki8O99JJSomgkBx15vTg7twK3p8+JNlrWuQfpvGJAEtElH8ZXpKXy56FiCIPlkg5PUPnabMC55skVP1wVCJXV/OnUFcKKI4PbvkhsfPMJqWz0J7fXmQ62wty93tQeyjqsr5pD4tR6guPRoZQCrV34QmybHCwdJ9CFCHLWKqM7B9cVBz03pWXThJ2VjHuZqSPuJGodzmMwTpThPNWGGwq8x8ALIODHhkNGsQ80fhZwD67Dv4PMlXKdiJUDz03Xo5Zqzjej3/gwNk+WXLKLHC2A2SjkqfPfQ9OTykdqEfKIr2UDFARcMHJG28iEdyfEFAj2DtVa+htR63CvMp82yVhBbbdgor6NYAcwF8TkNLBBImOdiKjznBK6YtFffn9a1nhayOo+0qPLLVPOWXe51BVW8VUxu2FpANAKKvZ4B9OSQA5xiN7C0sG+uK632jH6ldFoMw+hI+n63XLhiM1o1pls4Qsc97qbbdaKcLNneVLVYdagA5jxZsBgsjKWK08urvsZ2U8EGyiqzeKOWIi7O7aCUAAsq6rvtKYo0fAU6sV+dCiSKdoTcX7YfGw6V+70vHo0V6l5KeUo6v2mj40IPXC8pWnlKys3llstjyye1HiJJzCj+RNVew4YcA4wF0ApgmQhckmC+QD95cNmEd1fz1CFZQR9qB/6dDM/5q2qHhcIugZvx7VshfNb8u1BqrrWjS8wOjRGaKC1FK8sptRVNcGc4ZsrSxl0r87DhEISdPGyvSin8OtUewHn4TOve1kUwB5IcKTAlWlQenqXcxsBSWn4dkEzSSeVzFh2hMDSoS5KKjMcNBKK7fT0PO1Rp0JI+KXV9HunMpVKROc/OS9ayWWJMl7Rox1zz+wsuiyEjzDGrQ1bOS/zvkwU19v9ijrMxA7P24djdekbncJXSFQDc4GSV9psV5RwiWYQVNWAQgsWj2k67rA07GQ178FzRJh8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f5d4ff4-ef7b-45c9-74a1-08db3fa355c0 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2023 00:24:55.6305 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MJxuMudvgWYEIwCBYZpIQCocXLVO9/pRsGH5kfaQ7S+IOsRzuR/Lo4aTsr78JUr73yXWywNQgJQaM0me2GFaJtAmSTPA6vvop1KO62upXaPykPl3FAgHfFyKpgQ9S6eJ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB8855 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230417_172517_661470_959B20CB X-CRM114-Status: UNSURE ( 8.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Alexandre Belloni , Claudiu Beznea , alsa-devel@alsa-project.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now we can share asoc_dummy_dlc. This patch use it. Signed-off-by: Kuninori Morimoto --- sound/soc/atmel/atmel-classd.c | 6 ++---- sound/soc/atmel/atmel-pdmic.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index 007ab746973d..0fe42543a47a 100644 --- a/sound/soc/atmel/atmel-classd.c +++ b/sound/soc/atmel/atmel-classd.c @@ -473,21 +473,19 @@ static int atmel_classd_asoc_card_init(struct device *dev, if (!dai_link) return -ENOMEM; - comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL); + comp = devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL); if (!comp) return -ENOMEM; dai_link->cpus = &comp[0]; - dai_link->codecs = &comp[1]; + dai_link->codecs = &asoc_dummy_dlc; dai_link->num_cpus = 1; dai_link->num_codecs = 1; dai_link->name = "CLASSD"; dai_link->stream_name = "CLASSD PCM"; - dai_link->codecs->dai_name = "snd-soc-dummy-dai"; dai_link->cpus->dai_name = dev_name(dev); - dai_link->codecs->name = "snd-soc-dummy"; card->dai_link = dai_link; card->num_links = 1; diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c index 00c7b3a34ef5..133f17ae24a5 100644 --- a/sound/soc/atmel/atmel-pdmic.c +++ b/sound/soc/atmel/atmel-pdmic.c @@ -496,21 +496,19 @@ static int atmel_pdmic_asoc_card_init(struct device *dev, if (!dai_link) return -ENOMEM; - comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL); + comp = devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL); if (!comp) return -ENOMEM; dai_link->cpus = &comp[0]; - dai_link->codecs = &comp[1]; + dai_link->codecs = &asoc_dummy_dlc; dai_link->num_cpus = 1; dai_link->num_codecs = 1; dai_link->name = "PDMIC"; dai_link->stream_name = "PDMIC PCM"; - dai_link->codecs->dai_name = "snd-soc-dummy-dai"; dai_link->cpus->dai_name = dev_name(dev); - dai_link->codecs->name = "snd-soc-dummy"; card->dai_link = dai_link; card->num_links = 1; From patchwork Tue Apr 18 00:28:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13214892 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2FF9C77B75 for ; Tue, 18 Apr 2023 00:29:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Subject:Cc:References :In-Reply-To:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JrjMCWyxSg8Anv5XoVKnMRNjrnanpK2NGibCKjBJRgM=; b=G+kbnJB/WBm299 UUZnA7uHKrpG2mcBala7e9/wxrFsX2lFgjuG7bX2O8lRki/ysH5oknz2pdQu1P5UAkLEhbOgXvdNy /QBmYFdP0XjOVqgzAeq72RN02v1Am6lf/4fpxkv1LW4f6c3cB6vhvTPbEjBjnXMopI0xoZlBftmQh uFWO9sc7FVZaatUO6YZfgpJoSjcU7wUV7SOTD4SzvncHSgSGpTHCNeJNQyezq1tfErGPYab2yc6+c qfMrUvyrXo/5pInj0/CmGxXvlgrOtgDCWHR3tnIAdEd/VYGrfWQuccp6SfH7l/kk9SosGVrxxd+vR Kzl9nd8f2NSZ2ealu5aQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1poZCg-000V8I-0N; Tue, 18 Apr 2023 00:28:14 +0000 Received: from mail-os0jpn01on20724.outbound.protection.outlook.com ([2a01:111:f403:700c::724] helo=JPN01-OS0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1poZCd-000V7T-1y; Tue, 18 Apr 2023 00:28:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EWYzgOPSEn/YRXZWvT1zAu9DsXrT5T4kwayDan1Bj01DA1XQpoHbuS5vz3iWnfcwcDPcF2HOiWQcqqn2o8Hv+V36b4BWSp8Ny3yAK4KJUeZY02EczkJsERksl1KAFGTWlxVB+n6vKJXHYsckNHNUKx161ko9H6jrcpRR/J8VITM5qtHAYK2/6WFz05QCugZwyWvrAVsW5g6Qqa4K2Dyggq+tb6hSfppDgMK/IIrPYoQc36hanZtVKuSFngcy7U6fcaefKYIR5qL/AU/rWcti3ORVaeT331/V/jZ28K+GEhriRFqoS8dVGpAIru7Qcdx6cc/MkbZnKR6NfV8wobvHDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=toPofxRYG5O42jQiDJA/TzsU3o8U1GGGFIcrip1VUOk=; b=G9qK8/rM/ll1m6ocUjvzKfsidDFPCn0gPktFpF8MiY/H2Q4v6pUXAfFoE2hAmvjc4VOh3gmx+Qfy17Wa67BNcVSo8095yVXaL6I/YT1O6oeKLMy42OjObDlQiix5EmLcKEiF7MLWYrT2oK668NO1W5SiCwHyuRYWFBXGqcYZPo5U0dLCpsSO5iLdPibbgQLdAgycJiTAIRqDELl83MbvceCddzBqZZgKWedmpPlb00rzOm1TwCuPmMpj2ydd8pxvbX0IHEh01HgZOzDpCA3x2RfhYPCKxr/tXstr9i3MENmw2mzpbZsG3BxAnORI2E1DxxFGwrJgAv2jY3lMLPtGIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=toPofxRYG5O42jQiDJA/TzsU3o8U1GGGFIcrip1VUOk=; b=YZQK8MhSVOqLBJfPyO8VT1Ypl40nsdKGgE8kcgTPoh+8EFcwiWpJGq/EV9aFXK/qY33TLZccSCajyIes44FWHlUJpo6VVkjTBrRpvr22NoMhlggUA/H/DqffD4iDCgSkXKRSrvkXDAdPj2xXna6DM1X8j601EaQRXoXwAe02Pm8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by OS0PR01MB5665.jpnprd01.prod.outlook.com (2603:1096:604:b3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Tue, 18 Apr 2023 00:28:06 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::b005:5b0f:6ad8:3eb1]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::b005:5b0f:6ad8:3eb1%3]) with mapi id 15.20.6298.045; Tue, 18 Apr 2023 00:28:06 +0000 Message-ID: <87pm822fvu.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Mark Brown In-Reply-To: <874jpe3uqh.wl-kuninori.morimoto.gx@renesas.com> References: <874jpe3uqh.wl-kuninori.morimoto.gx@renesas.com> Cc: Jerome Brunet , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Subject: [PATCH 10/11] ASoC: meson: use asoc_dummy_dlc User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Tue, 18 Apr 2023 00:28:05 +0000 X-ClientProxiedBy: TYCP286CA0238.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c7::11) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|OS0PR01MB5665:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c847da6-00b1-428e-438d-08db3fa3c75f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jQO5huvuj6woWbyVgiJKb2dCqPxj4wfYqHSnHMkn0gTeI/RTNilb9+FK4/gqqcNtioBIcRb1ySo83sEZj/J7sqQ/4dLcPpaCbU/JXAFwaofnJBY2XqvslGax3GLJYKqF14VYYDfKloLzch9ynM7xNVEtwwxxioK1hxsJZJemmjiNcSRD5O7wlOwe7hGuqowYYfuKWea1045PADvPMM/LnStS4AKV+JV95gBzCemWaKGcQf+PoSvKkTGQKCy8+askRTjt9+dt/9lRhOE8cLLpq5T4fQ6S7CsRBJiS3C3ArSg8knjdFPsNBMiojA1vyPGfvYBRCf+ouKfV75Re+sePMkD2a7Ra9YQomxBOpsX2qBveodBkeyik8Mwh5XAyakDn886KYay4TmyCfzo8EqHLqHUaY9qrl8RZ4aNZaPzzo+Gsdk8+owz8erhUDjqotquAh57BLwyJ7yooPxLGpbzzzpyHaOajRJiRcPH1DmT+luv7hcW553OebK4ylgOt23CI+56WzM+QY9u9SLobrIfbZzV6l8YjPC2YY4JVFS7zpXfr0Is7OfMwV2xQ8o0CDxwMn8UQla4sn0rmpzcOJshXN27l5VQlOlwqjDFbmwUNG46/jSG8aUsvoWcuagD4jOBG X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8426.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(366004)(136003)(346002)(376002)(39860400002)(451199021)(5660300002)(2616005)(83380400001)(86362001)(186003)(26005)(6512007)(6506007)(38100700002)(38350700002)(8936002)(8676002)(54906003)(478600001)(6486002)(52116002)(41300700001)(316002)(36756003)(66556008)(66476007)(4326008)(66946007)(6916009)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ddsSPMRYGm9fNWlCSjqubmRtGtcb24Ne5tluTg667CK9Ai6Ag0WC9UDXs+GqgWHKUJuEgxUMZDwahFfCSVctsQZ+SIjKjn4byaDdfXVRG1pCLSoqKvmepUTVYMFSPeHCRxwRGLM7W3F+7Daeh+hgHU9BF5dCGZuq3vUE72iHxapcv42oEDU7NLmWzrOWiFHltFUEgz5NUuioC2jMQBh+XX9yy0/LQ2gmptxQBDzzg2P9BW3OIs2Drto34eCxzJsLRvEk4smth4Zp6IOoavE+SuBqEl9dBRphd4nszbVOpWV2w3Z+AJANZy8bdCZdIczVZRYuuyPR/C24xktV9PerrizzT34FEV99v1XIj7E32EqrBVPEprlT5dzuHhKkNBDwYZPRTAnQUagdIexsvfNQY421OZj2UO4FAdeowdzsfah0Xm/aPkbSCYCnrUN5EuMBldeiA27WRFQIvgRLTvrjB46USca8gJa7hUp4fbBkU87wVwda0c2dUBkryQqP8zgs8eD20CdWLY/jvodXqIiCaL+wf/6fHt120Fzlo48w2QbmNqguDKdZsoFSi003qPtR3qRLNp+CmuIqJ1pPrvOaKyIR72TxWPCUTx8UhfcNpAiHsHpLOCI9b2nRI/HSmFxFGyoo5zkdn+ZoL/+GsAO9BWdoLgyaPacB6m5FUOaEU28vW4vUbJR84RFXMNhNHVd9s+qbiaz6lN7aFBTpYh/SuKB2/Ti7dZyuvnt3edhl0uBj3xqyNUSEOkKm/+WHHhRJhXR9LmNdngkcpD/vNRAtoZPJvFzPFUkhQsZ0uMBPZFGbOZftzeVtqkEjX+wjp6w2yfB25Dc9OCB+BuNRCD0PsfCsIlYm0diGKZfIqtf6ose4ltinOxySDsCRyPTxJkSYFpX/n4OTNvD9SRuXjZ+6F9NbwrnEUeTQXWIU3jxkUKHBQ2UeJHuCbLi4XCtQchOABGzx8YvmuRa9gSD77zL2J7i0CDZ7R4DBGSEtTHYZN1IDrehT0lMs3EenFKB6r/5jX7PitZVvRccmJdJDaQR8Q46fl/mufOZA5d30/0zQFLyUs/gRTtEwX68pwgNU6pLxHuVomlv4D7goc9C2qRtE92BQFUlabGcHzxdpMREw32SiwMihhwaJMRYVUaH68siaZ2lzM45HoVOPTFKbdOa8fpELGYylYdJx2yTtaJ/kTxwQePZZg2muzBjaCl+iAvKIvp1ZkZSEt/NNlhYNaB/vGbv/OfACsvSxwHOckxWOwwGsNHWn4GTj4hH5voR0R5Nd/dU1ndNTzCl8bGvMkyGStGMtCIAnirIoE9SOl6BbQ2lKcTcrBiITpQW8n8kZWRL6GFGDmaIWLCpdJPOt4C5qWobebIsP+tzSURSvKfhcbk4vy3v9nEf44YoBB9+ufxXxsy1XmdrMqeO26yVTRyIYoxXhY3FCfcj3Jh9lwOlVjpJO1kHkYhfgO7vM9tFS3Rtb+BOMGP/xMUIEJlpJMzkIXrPhRJyaUN8a8htN6ZOtEhmv2NOxOY17VVbXKA4fJ2DNB5YKK3XXK4LIu3HjegytbSmLGSmM9zKZ5LKzLJL2AE7X7AqB99Ifbq/haSdEmxHAUMZ0ThpQXSzIgAK2NqhOZd8DvyrhB3zmLOh34brmlxM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c847da6-00b1-428e-438d-08db3fa3c75f X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2023 00:28:06.1346 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iTGRC8y//5qVuup294OdPRn3PABiKFNIwz3IbJO31EIqOEGQ0p5Pc7jlAIAH6ehK15y6ESC03Xg5h7ktONDzD0yzZVufPeFyRhdOYIEGx7A5BbaXwng8w1b8BggGfF/a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS0PR01MB5665 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230417_172811_651022_22D46C45 X-CRM114-Status: UNSURE ( 8.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now we can share asoc_dummy_dlc. This patch use it. Signed-off-by: Kuninori Morimoto --- sound/soc/meson/axg-card.c | 6 ++---- sound/soc/meson/meson-card-utils.c | 10 +--------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index a25c397c66c5..5c2fff1ff607 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -120,20 +120,18 @@ static int axg_card_add_tdm_loopback(struct snd_soc_card *card, if (!lb->name) return -ENOMEM; - dlc = devm_kzalloc(card->dev, 2 * sizeof(*dlc), GFP_KERNEL); + dlc = devm_kzalloc(card->dev, sizeof(*dlc), GFP_KERNEL); if (!dlc) return -ENOMEM; lb->cpus = &dlc[0]; - lb->codecs = &dlc[1]; + lb->codecs = &asoc_dummy_dlc; lb->num_cpus = 1; lb->num_codecs = 1; lb->stream_name = lb->name; lb->cpus->of_node = pad->cpus->of_node; lb->cpus->dai_name = "TDM Loopback"; - lb->codecs->name = "snd-soc-dummy"; - lb->codecs->dai_name = "snd-soc-dummy-dai"; lb->dpcm_capture = 1; lb->no_pcm = 1; lb->ops = &axg_card_tdm_be_ops; diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c index 2d8d5717fd8b..ffc5111f9e3c 100644 --- a/sound/soc/meson/meson-card-utils.c +++ b/sound/soc/meson/meson-card-utils.c @@ -183,21 +183,13 @@ int meson_card_set_fe_link(struct snd_soc_card *card, struct device_node *node, bool is_playback) { - struct snd_soc_dai_link_component *codec; - - codec = devm_kzalloc(card->dev, sizeof(*codec), GFP_KERNEL); - if (!codec) - return -ENOMEM; - - link->codecs = codec; + link->codecs = &asoc_dummy_dlc; link->num_codecs = 1; link->dynamic = 1; link->dpcm_merged_format = 1; link->dpcm_merged_chan = 1; link->dpcm_merged_rate = 1; - link->codecs->dai_name = "snd-soc-dummy-dai"; - link->codecs->name = "snd-soc-dummy"; if (is_playback) link->dpcm_playback = 1;