From patchwork Mon Apr 24 02:36: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: 13221512 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 B7832C6FD18 for ; Mon, 24 Apr 2023 02:38:02 +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:References: In-Reply-To:Cc: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=qNSpyqX4aSwa3WdELAOW1gw+2LoEs1BtawCvugAZ8qg=; b=zhQc5cloTOSIY4 ojRThsgEye7Vob5/EmwUx3uyFRu4Lfr/R0swjyXYioopHXKX3Xdnh3FK63sQrfA4XPlkZhU4Sgj+T UVu07BHPtB37my4YsJN+9yZEo2dpVqCuRG8t+tyYHJ82blBgEqDq1HCVN5FHf6YqaXYCkNOFDei4L 5JF21sfa/nlmQOp3FB6lF7GAU1sSIxGzHuPOXDRUf7P3YkNGXOrSZDOBl36A5yMZ4Vzn3SHspDrV1 zG5aBPVnuKqvTHybQwV6l09VHHVtYAQM/fec8RAr+zrNr2jkxsLBGu0PosIiMXQiGORiECcmgfITX JYQL3tI9X5nYtvNeb9hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pqm4W-00F7wM-1g; Mon, 24 Apr 2023 02:36:56 +0000 Received: from mail-os0jpn01on2070f.outbound.protection.outlook.com ([2a01:111:f403:700c::70f] helo=JPN01-OS0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pqm4P-00F7vT-1H for linux-arm-kernel@lists.infradead.org; Mon, 24 Apr 2023 02:36:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e+NaNPnLTX0+UYrdIrvP9PsHk95ang3CyYbBHPwE4iTSZydG3jur0K6redF4YUCOrrfIzXE29G1YknzcdWxUPr689bpxDFS6IXMPi3QuRIEDo68vdU939lpQxTM2GFQbKuf10uOxdpjAhAYXezHOjhMfUQFhP75Q6cP3B40xqPUnnu/jTa9pMtSv8sXwr1Hj89z50kHGgI05WZx/ImQRTRwFa2kvMVBcu5I3pAdExopEI72hbGNYxt0DdIzEAaq9RnVkF/hppacShKElJhXY3bCm4iuBGqedx6STWZ+kUhgtdAxi1wEvpsjNOAwMG72ZD3IE9biLCbiPFOmWVjh/Xw== 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=Kd2APHEbK+LWgfn/zoTh5Bk3d69NV1EG/b0RIT+4pU4=; b=I8QhHpsomWWNyFmD+pSbpHPd50D0Z8Cae1n+70iBF93q0pssVlNkc0ulf3OrGW9FWrS+6Nh7HlFMBwy//m5PSQdvAnT5ISOAsyfS2314fYS+gW4ASoyMRMH+gkLdKG6QxDZQ8hQLQAyNZ2PlxaZvQaRxmjqy8TUg2SYIN/X4NRbZDjDeOKP4A5VK4RbQbhZ10T9mS3aYZhRvHjykjaSgeN8vEiudmWw2hLYYP2tMLMFR3Rs3gcv0q4rWNdZ24etWyIfTv/Fd7UfOKlweZYB09pRKfkpP2Mo9EY9zd8jUfhQQc3cPjmLK/E4989xZP+6dzl2/7lplYZ9JO+5eOvXAIQ== 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=Kd2APHEbK+LWgfn/zoTh5Bk3d69NV1EG/b0RIT+4pU4=; b=DN8aWphtsVGgrDIbvLTrLF02kxTYeEjaJCMWe1vj6fiorT7qJ2JRhw4IqavruZOqW72OTNpJ3rPhrw4V0HFPhFgBP5SF/EIT5l+roD76DTxijqVtTHMy0ykUldO0Ey4yEIMsox/toWn85cDJoDuYQ5ovi0AmX5kJeNgSYUS56y4= 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 OS0PR01MB5681.jpnprd01.prod.outlook.com (2603:1096:604:b3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Mon, 24 Apr 2023 02:36:38 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%5]) with mapi id 15.20.6319.022; Mon, 24 Apr 2023 02:36:38 +0000 Message-ID: <874jp60zwq.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Sascha Hauer , Shawn Guo , Shengjiu Wang , Takashi Iwai , Xiubo Li Cc: Fabio Estevam , NXP Linux Team , Nicolin Chen , Pengutronix Kernel Team , Shengjiu Wang , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org In-Reply-To: <87bkje0zzf.wl-kuninori.morimoto.gx@renesas.com> References: <87bkje0zzf.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v2 05/13] ASoC: fsl: use asoc_dummy_dlc User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 24 Apr 2023 02:36:37 +0000 X-ClientProxiedBy: TY2PR0101CA0015.apcprd01.prod.exchangelabs.com (2603:1096:404:92::27) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|OS0PR01MB5681:EE_ X-MS-Office365-Filtering-Correlation-Id: f5a24478-0a88-4b2c-5ac4-08db446cbab5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s6pRuoXqhF2oYGgVk6xtfMC/pEDvXwo+9kl+WbB7/gg9S1sBidUYpoKxZ7P/5V0QHhFsCzvQ4cokGxw5ubJuBs3YkaXAmary4Gn0zIJYWTML5sSdW2TggKXxlN+WKM2xWNqlFCZVbXkrV6uwzAlU+7clwdLhNw8YhaCtPuLXVrdH+OATS/d3jOsEnD9Hqq9dItBIDWVltdndQuKuoBX95VCha80EwRzSlVRBf9G8yaxWxx3WuzsAPZtOuBCEAgkg3L4fwkY2fRgPMH3Fgs1sND7BCjpbg7sMG4GwaA4YcKjGUmgstZAwIGy2YwmYXj/3rDFNnCUxbIvW3zX1dHgQkfSV/vI4QudcC32B/+NnCUGfl38wPn3GsJ7pMxCht7F56Rvti/zM8N79wrzadoKzy8CWVTjAaNNPU6BiT8WC7WBOumH7JLsJhzSaYNFryLY7ya8likiYshPZAydnTMlfE2tl8iJWFZE4o4y4i2Oo8RPfbotC/OGgcWc8ofssTwEKKnST8P8H6/fNIxPIfT3UuSVNxmMg8s1oBMaGxKU3f63D/NJLOrI5xBpMBoMs5/zmHPH8lTwDhgS5xqnG5/3V0SW07ykM3K4BB327XCdfR3mZjSIr9WJBHBrpLKMz2nJ2 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)(376002)(346002)(136003)(39860400002)(366004)(451199021)(2906002)(52116002)(6486002)(2616005)(6512007)(6506007)(26005)(186003)(66946007)(66556008)(66476007)(8676002)(8936002)(316002)(41300700001)(4326008)(478600001)(5660300002)(7416002)(54906003)(110136005)(38350700002)(38100700002)(36756003)(86362001)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c2UuVCoA5HeL/gip56zdAIfm7cpwyvpa+IrQBr3n1GCRrFsijT8isXjLIFkMuf67ZGRnCDbBrjCQCUfTRB/P4kM8F7SbdGKOnOEhqjRuIWhu/1yaaSZiCYk7r9Ep6jrFLGv5057hQIiMzrGCfl/wxwEtUkXm/j7RQ3ozNkwxogfT7p+tfpY9TS+h7v5ZYhjD46lSN4f0FhzqN6XyAUMxYZFdM/1D7lmFZq7bLosSQOdmRqPKGP3aZNQq2PDxxx6CtR6qxJ0fGGnJ5ad7uzYYkcrtxlx3lDy5RafwzqTUpk+oWtyM56O/4oNNehXw6Xme5B4kuRqNQO07Ezh6O7UhEMuuJxuRWIjHuJHnWhzJjpzz92N5FzQp+yaLp+fFlE3viofEb6+2H/Hp/hM3l0UtTtLPfkEHSyirJQG5gzTQmMSogv8dOU0IwQ+PJ4DaaL42q54TUqmsenjMbcsKjBDDey0Y7qiVYS4+l5HessLq1VaVADP2Fn4UiAf/dAD9B7WgfTzMe2bXB4RSQLGOsL3SAxS4lol9Rg0ryYuLWvBFvxaFtWzLs6N3rYQ2spyU/RPZ4E02rmR+IeYGgakbGPyyWZ1suwgoiu45BorXDEMsJpt5ED7ewtCUBR+FpTkONoc3z4xriZ84NPVvPEnueVonAcGzq5j2WBWBGNQzJW3OPsrByZqGQPnhixMLwukKOzBvb0tAkfwspW8cugSpt2FCsJ8NzOWLXuqeGw70tpbNmuXOY6kYKTyaatLSc06JRuycEzA83tPGYKPxNPW49LdJJzB6a7aFoKnIWCuiSlKMZzdRJv9CwD3RpOV11NStT2Fe59UpP6vRuDJO7yo3olxG1KCDtzFqUbOJlkJ/nsal1uI03CVXu1sgZ8JUXWFfXaV4lntq0cPveum80djcXBo3sHlGWxEUIJxbQpNfXbAhy5GbMk63dQYHIg0ShE6VY5Yy0ML5xc05h4IM2uihaFMbH+zAfyHLZ1ihbXVdfSnvN7Ux2NpzUKzia0QDYqKfr8shHGYbUu5qH4UXn9VDRdisbbDVMYDYQzSPTvHsrCXelAHx/ughyuI3PScp5h2N5/N64rR6agxhjHRSlrHoP4/5bJAIhkr9zScKdr4Sid2gYnvUx34xFFMIiMLOPdI5jvmXH+xKM4BG1TRpTSplLfuIOYwZEnsGXqf1Shdff2s03LNA+cWtcXhvIsf8qYKwAVrDBMFjK00Jhd9k5dSg3gxclW+RBOLCzeFpdtrDM2i2g8kvFgRpBsf6VXlnqpDGN5m6Gd3/1rlJhjdvL4oZqAkMn/E1brszq9OZPqc/MMopcYgCVlSNh76YR2uTYdh2nccNP4DHOlOy4wXNGR5k90KwsVyl63cb8E1zQeU1i/s2/KH6ERpg6R7glCHQ/cnvKYPcN8v5zreeGJ5LHDseDEOScuP5tZiYesn/aRjNVZ+JAR0BntONxTC2PQGgJiuP2TUHOKOOEaj/BH4nUUSsLmgm3Wk2kDHkbgAn5McvCywMPoHVS5oUWzwINR5Xek+ineKhPVHqpshDyp+DpWehZVa4BHgKtlqv7k9/qWxlMy98lutfnSwH+SdwFkVlw7LcADohRkvaA54cNAxuqQ7CHwoUlAuHZ1GBmANf74iZxKWElhA= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5a24478-0a88-4b2c-5ac4-08db446cbab5 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2023 02:36:38.5521 (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: i5a+nrRfba1626Z8fFaua8J7lQFmkd2/yr/WMTWN2LBky5vQoia9v+Jgjg/XEFwT6AyUA8qaPi2QtdEim9FNCJBpAgFjnApNnltFwy+QrYqLm7jwRnL4uHbyZkfGsmDw X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS0PR01MB5681 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230423_193649_438460_98F26FA8 X-CRM114-Status: GOOD ( 14.06 ) 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 | 8 +++----- 4 files changed, 10 insertions(+), 26 deletions(-) diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c index b2c5aca92c6b..efbcd4a65ca8 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; @@ -244,7 +244,7 @@ static int imx_audmix_probe(struct platform_device *pdev) */ priv->dai[i].cpus = priv->dai[i].platforms = &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; @@ -252,8 +252,6 @@ static int imx_audmix_probe(struct platform_device *pdev) 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; @@ -270,15 +268,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 ab978431ac98..44463f92e522 100644 --- a/sound/soc/fsl/imx-spdif.c +++ b/sound/soc/fsl/imx-spdif.c @@ -26,7 +26,7 @@ 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; @@ -37,8 +37,8 @@ static int imx_spdif_audio_probe(struct platform_device *pdev) * platform is using soc-generic-dmaengine-pcm */ data->dai.cpus = - data->dai.platforms = &comp[0]; - data->dai.codecs = &comp[1]; + data->dai.platforms = comp; + data->dai.codecs = &asoc_dummy_dlc; data->dai.num_cpus = 1; data->dai.num_codecs = 1; @@ -46,8 +46,6 @@ static int imx_spdif_audio_probe(struct platform_device *pdev) 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 Mon Apr 24 02:36:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13221511 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 C07BCC77B60 for ; Mon, 24 Apr 2023 02:38: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:References: In-Reply-To:Cc: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=Xop6hXqLxQE4mss3XELz0jjWSF8vbH0B9Vwe/iPkpow=; b=z96bc/bRLhepnR d97psBOUL5oNUOlOsIwfPS5x092uh4NT+mRWjOh/65RUWDzyLF1yblyGgKL6bsEZPEZqs/UItidiL S8RpEADVgVsZqWb/0dCQqzU5ql63mKfQPY3ZSrYiXbTBvCm7oi0GL2bpySoS5sVco2j4+/CWU+c60 r8pX1ftCx1A6Jx1kZcN7B9KNzJdPvHj/+leXqbC+M1FGCjM6Stpv4GEytNRoUpwNzxbJ2aNSULZOk jHZBZjshLxDZb8JoGxdPtqq8MLy+iS++ta6TvpcJQqBMzXryZlA8dvlvmdrUL50Tj0S3Ft/PHCRQw u0eyBqZk2O5FVIr48svQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pqm4f-00F7yi-2C; Mon, 24 Apr 2023 02:37:05 +0000 Received: from mail-os0jpn01on2071a.outbound.protection.outlook.com ([2a01:111:f403:700c::71a] helo=JPN01-OS0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pqm4d-00F7wa-0X for linux-arm-kernel@lists.infradead.org; Mon, 24 Apr 2023 02:37:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hFqMdEewN9UQ/6BN7tFPKH3pbTxiL/uDG+sv9Nj8XoXCb+EyHhowTQNSw8gP0Jk4tKyc1PetOtzURCMZ6xe3stVwipRrtEUR8CcigIypFRpI9U8yKG7wsCM7l+9DWxRIdIFGzVs2Mc7rGG60wPoKEhS3+2UmESwfDFBe+0H5AXcQ1oHrHvRY2QB7Ls5wYI/g16WCDnixDl9wcRakg2J37Kaq92w7QNsr7sjqmY9HIREwuP/wVxxESNg/QvCAtpM9FguOg67sd2ukqbrmCJzX662KETXXacy0EpNFdq4k+h8Zhb+fG42WyyN2149/L/WuyBHnJZDiKO7Gj2bDtk9XSw== 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=brsO5m2NcuD7PSPK7lBj8uHBboetIwSFbmapRzxiUcg=; b=O1dh3UZ5ZNnAI5Uu+fkH8trXRris6s8gCOc5Huhh3hzl4Yg/FC3M+Su9NZQctt32YgClNx4Zo//v1tg6jVoZTnMV2pQPf8aR4T4KpaJ6Ir+tHakBE+EveGQMQnTEyx8iZldrEsKLGusovFGQt+p+IvSH9IsnYRNJnKUxz+wmDTMOgve6UnAJtW0rGfw3qbwe667ELociVJw2iiWVy2q/QisKLyV/bxo2FFKm07cIJPJBPfxVuKDXRo7L6f6tfZBwNmSCCo46jM8twwOHnP6k4TN+Y1oCSIqG26P5edXDWIcA0Zqr3AmWS7SsOqQX9zmSgMexxAGVKEfL9cznKrGaog== 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=brsO5m2NcuD7PSPK7lBj8uHBboetIwSFbmapRzxiUcg=; b=UKYflfAW5Su1weGZpCq7pquUE8QHXkukKiiTla93rFzRpEhSw1RYoWr+RzGiJ2XAYPbNAqdhvYIbEO/AOi26Fo6cFH5xg2Sx14FWxViir4OQ4hL3U45MwvbMnn2v1BQDGBwnc7O8xUhQ67hOA/PPUQ8oC/w2cJ2A65bYNz5yfDM= 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 TYCPR01MB11070.jpnprd01.prod.outlook.com (2603:1096:400:3a7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Mon, 24 Apr 2023 02:36:52 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%5]) with mapi id 15.20.6319.022; Mon, 24 Apr 2023 02:36:52 +0000 Message-ID: <871qka0zwb.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Alexandre Belloni , Claudiu Beznea , Jaroslav Kysela , Liam Girdwood , Mark Brown , Nicolas Ferre , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org In-Reply-To: <87bkje0zzf.wl-kuninori.morimoto.gx@renesas.com> References: <87bkje0zzf.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v2 07/13] ASoC: atmel: use asoc_dummy_dlc User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 24 Apr 2023 02:36:52 +0000 X-ClientProxiedBy: TYCP286CA0180.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c6::13) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYCPR01MB11070:EE_ X-MS-Office365-Filtering-Correlation-Id: 18b924fb-1d23-4fd0-b5e0-08db446cc354 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IJaLZdDGdAPZymKxHiz6fiDmyFttmhiVopcA4zRIhJlPoarTMP399/8K5ZIb1v2EV16fLEeB1j5t5H06dtliSHiaPcF8Pne/dSIqF5inItr+F4VcbWokm6Sh3j4yIDZhYlTiZNx1h2EIHToL9I3Ux4uzN4/LkXhmIoGTYDIf4qF/RM+nE+UBbDLKG9bRcU3w9mDAJU2IoTEpefbXwnSDuzCTrT+VTrhzJYCmsCcSd5hBDxkYEFsN4I65//s9tCUbJnEy1ZuJlKc4KA3YJyZkJiLCZpvTPYvb9pMHEMDc9NGDIxJ6vLVW4PoUd/L8voJtttJ1uSz9mmLZ2ktx1/VDAoNyuGuYXezw/X+VsLSFUYRcqb8H+gbfQh8nNBnzlDs0cWYbzzosTAUTeaXN7KLmCwzfTTNoN7F/NeHe43cxq08fQ/cUktXGRovXpw4WhyvwLYoMvc6iQOPIiacvYTl59kFFu2+hDU4OpnObGHy7viQpHyr4H+UPu/lSS7VEdJ8KqWVYOApwTZ052j1K0MaoG3a/qqHYrSajRR/G3ANb5bwvPEdi6WD1tCvG9KxoIwRphAoe2u/DGjyFv+C3pkN4YTQSiPSPqsxDJNEuO8Tm28+0DKZy2lTpkA3xmDkKXSi7 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)(136003)(39860400002)(366004)(376002)(346002)(396003)(451199021)(2906002)(66476007)(66556008)(66946007)(316002)(4326008)(8676002)(8936002)(5660300002)(41300700001)(36756003)(86362001)(6512007)(26005)(186003)(38100700002)(38350700002)(478600001)(52116002)(6486002)(83380400001)(2616005)(6506007)(110136005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4SQLTalXFZFQJagPcFIE4gEVVnc+7Tj16oCSSF24MXq+nGzbp7ecEvsjDjD60a25yiJ2vysTgOjf0tQPgtvqmu0JwVYhVYtuGrkeiiHfeae4SAIpMM8YlJoSknAqb/abbxSIF31nMY7jkezeskVWIAMuoppBP0vGz/J5r7UmVKSR3wvG/pWPqhCdY9vffzIqxaNyiMxsam5ck6QIc/cbTspF6wbmtZDJqoDfJNbe85yPLP4okzMqNHfaP0dPID6fP6HM//w558gnp7a/v06bC0sL+EXjKL0yP5YB8tLpBgo5Q3T5F3895GdUpNGGW+hXG2vZ/FoVgM/rGjrXtjLUXOy1wTqnvvTF3P/RBnvH7c9cBvbala5lgx14AHPjKiuZMkBgr+EqIdZdFeAbmKAaZnZfFYUL8XxCXpfAScbXylASsyKdW5aDcC4kt76aOhb5XJbNqNLupsWMigNR4wzvLqXc6s8H5Z2jdLy7M+rHG6U6Xrjx+HwqUZNYci9Ss3y7sFZRAnU5zZR92PGTnRMwfiJW/zVaHD+0lbbz2R5T1lFjxDoGxD/eMcDXG5a6XTcKal0oDmO+PpisLN6SovC2bOGt0DReKwj8FTAYgX9C3EExSjyCbMbVcYuFk8Iz2WiTqViUMbIjHWDbrubBuQaZ/obRvtk4kfYUQ1kMLYM7HhWgzZ25GyyMgT9LXkED5UgHv0igiJSgmV/iDGPT2nNoLrs1QXoqgdH1/fH0/mEchxX0J+wCiLSsW3yXzsraac2lKdSJRqflfsCbm0MRhs8x5zJ8TI3rH4SqoM5u4q5gTLtC4ooPRVCAmJz3HH5iwZpSTe2GxoIMTM6t24QPbpZUmi7tjYpk8FDTlKg0u/9N2nIz40Lwom+GVxeGJesqMgHjY9FhFFKNjNTsGEUbzV9leo/+g/MXeKS667swCwVo2bhW4p93sgZje/E+rQdR8FtYuf/42EHhnG7W/0SwmIbyxMsa0ZZKWHjodXPXB8vtSJlqHgEo24nscy6IPIwNj5JwmjVtWghiT/7SlhtfA/VrPdCSPW6M5G6hiQNeJVOZB+LPLef4/7aliVnNRYDWZeqx7Bl6jKfPCTQQ+wglbIL/pIavYet1t7yWWSJa0JQW1QVjMPp3Vh6tRh0hR1Usn3GvxReX8IRQExrzc4QNqR16dGSdJI5U/Zg5J23tUfFg6T26e6xgWi1W4f+gnRLBmDbGWf/DSOFQnPM4+FirrspkX54kkswsIV+kzblXACwFCzWefAVKV4npDsQOxhUBS/5pKYJ1AgwZ9Tw/YoS5Fbfka5aOGWPxTtJQmSXNhT09L37GMae8bR0WTb/OlTRYhu9jLorqBS2EH6QPb9E+NT5doRj1eeQvGXHoF69Tu/Qk/ybAMij8YHzJG0L33626PGmyUwvmckzPDOU47ppeS3lz2hDlaR3lgIeToWi18GCatGO3r9S5wncm+JdBjTYzCQ5mWpYoJ3Jm3DcV+4j8yDM1gEaActLet1351rWWonhmDWf5GEPqXRjxh3HsqzF2UEFCpbHwL/rfHdzX94E4IT6hYwn4ZQrFoePKcWR2pzH2QerTMBpWzIK0Nvbmuhe2cjJQvgbXlOyDvkQQLHsCxaQvLRF3SxUTlSn98nBF50+lS8o= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18b924fb-1d23-4fd0-b5e0-08db446cc354 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2023 02:36:52.8345 (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: xyPbJ2yhrBFkcBTSLKibBZo9Ra6dM8QhixuDE+1BwAmrojYpZURzqI3aWfmLItGP9J/x9p3tAAgj7kAeVJ2pu+pnoKGFZf9elPT5V25ZF2yEy0fyObZ8xh2j12dF7dR8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11070 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230423_193703_211359_A79296D1 X-CRM114-Status: GOOD ( 10.11 ) 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/atmel/atmel-classd.c | 8 +++----- sound/soc/atmel/atmel-pdmic.c | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index 007ab746973d..4c1985711218 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->cpus = comp; + 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..efcbdd1a629f 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->cpus = comp; + 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 Mon Apr 24 02:36:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13221513 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 45E3DC77B73 for ; Mon, 24 Apr 2023 02:38:03 +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:References: In-Reply-To:Cc: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=hOeNlrAIaF6m6n5xR4eTDhpcQJ/asHwTMdECDRYA/DA=; b=2FvbNn0L+FNRPH UpCj6qIPwt+KUPa4mfXLbhjlksDF7d9EG0vuV//TlqtA1HXhkMUUZgy2JaELRytOl8O5ykAL6OE3G QGk+FmxVDR+jNy/cExfgda3NxdhXL62FitkoXnCN9wF4fdFZADmV/6jaU73st4kV2ZAoG7exksgwy ohq852mIpi1nGDb46j++q/M4Rh/EMSkh3UNYuyDWtA83A0SDjWC4pEWxV193UHkBR7r2uTbIZFqTG 1CALsDJTFqa6yzwH62T4aQAhDafqrvQF/E1fjmpWhS7ULq+L6ilg+3ZrTK59MBwScUHVnWOxt3lTU X/JxNtFiXQP7+GcAXUpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pqm4m-00F80N-0i; Mon, 24 Apr 2023 02:37:12 +0000 Received: from mail-os0jpn01on2071a.outbound.protection.outlook.com ([2a01:111:f403:700c::71a] helo=JPN01-OS0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pqm4e-00F7wa-2W; Mon, 24 Apr 2023 02:37:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oGwG0PGDW49jRFKmNXGofoLEP3qq4J12WemiISrTPnHXLwVnvQERKe6crqQn7Qm7K/mOIzPr9lM7SvwjS7Q7CArUZn/oay8pMVLc73E5NoO7WZ23l4fKo57DxBb6G+woOoEpwmOT4JOpYkrmaxQpiI4Ljde0lMWaDOK9smnraiW6QaPO+MTMaJ6lqfzgJTXPrPBY/U5Bqpyl1oGlwSe6UKVRFIgMAmlUbT9teFOUtszOhzRvu8UyxNZX0fmHk0oHPAI2H3hWEQdnA3sX0pA0m/yz6AwzquD7WYdxF5le1APbeGwVr8VevuWHE4jdyX5wiRXmvkk3Vf5o2dowDm7GUg== 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=SJelzOKSG6hyaWuHYx6SIJ93S6WZv/09MTEXHcfo/pU=; b=X4sWx+ot0yj4peNCaAwBimzEIIKF0RRavRS01u1kB4PiyMIAVa8/sysbbPDFKaSMj1yBrwQwlncqbkh/F6nir7sJ5M6//uEQPXqbM/PHJ39vPGQ5Xc5mWJ7Xs79F2GooYBahhfy0qGXrl2jO6yJ9kXgH9l8XypQQDSbY2xGkPFCEJF2PDhkAsN4Rv46DgHa3vuP1aXQwtd3X56tUYnluevDTy2BhHktToFyvk7MMlkY2GiT8EcQX8AZXl8qILHKUibrDhmpNEeNK/qSdA6/r6aCFBHBNYItC50awFFzs8I6ofj9CurLNjHiFH329B2ecNouLnBh1UalEoR/0O1jOEA== 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=SJelzOKSG6hyaWuHYx6SIJ93S6WZv/09MTEXHcfo/pU=; b=ZNl7JFDFyyTxWygYWV3Rz5hJvtT5FUTyraKwGhNmx2EBo98cM4OpI/7weoWdsg3gQQ6Cp7ahhWOkbZ5gfA2z+lA8Ui+z8i02B0OSRDFzWk+HS9fi7QIDw9pU3HvBMjlbIbZIB50SFnRjLv6VScVjxa+0DW5I3BrrkVmZAsMgefE= 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 TYCPR01MB11070.jpnprd01.prod.outlook.com (2603:1096:400:3a7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Mon, 24 Apr 2023 02:36:59 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%5]) with mapi id 15.20.6319.022; Mon, 24 Apr 2023 02:36:59 +0000 Message-ID: <87zg6yypit.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Liam Girdwood , Mark Brown , Neil Armstrong , Takashi Iwai Cc: Martin Blumenstingl , alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org In-Reply-To: <87bkje0zzf.wl-kuninori.morimoto.gx@renesas.com> References: <87bkje0zzf.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v2 08/13] ASoC: meson: use asoc_dummy_dlc User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 24 Apr 2023 02:36:59 +0000 X-ClientProxiedBy: TYCP286CA0249.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:456::7) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYCPR01MB11070:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e4835e0-8c3c-4e98-a6c9-08db446cc742 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ldFIieaSU3gwe/ZU5SkNQ8XDchv8oJEwMgXLVAA7pQG2Slu95ZiCYoZ8+4XadEOxIcMZDGvwRaffymMg3FPc4l74GUQK5PzGbor5//O4AIAG2U+ApsutoFqvID1wCl8ufCWwEfsHPJfu/4arGOXjeTbf9dFmxDP215OClnKFRAiRPOzkUV1wSlelJOD9Ae6YqiIbS5OzVLiKBJ5Joyz6A5a5/rvs+wHaWvkEBVgT+HyA8Y4LGT3RlvSacmMLRqtDFn3SnjJBnOqNbFkAqJBMPSM7wI3jpE6AzarjtBcQSoCPogM/NzefmOmbcPkgx75U73zobmpzQAD12fdQ0AvdaHRsWg/f6F+nNwDuVeBdmWygbFkFzshr9NHnsofxC/uF2lQEySwCLkDl+Y6ZUmqdiOxU3IbIFlS+7vlSc1DZzibSbyVSp4sAHuAp4YS9LbJ8+Av6NU0BtBkCGc3+xpEa+y/GC0ZtXjQH52VBJCcVX4q9i8rW7tNMZ0JWV7QA0FafNP2Vs0wuiGDAMR74faAu+ODgxGgJgye4fxYMpdM25UT/NnDEOQFHVhtItZUbOonRjAIuepCvPwdUhHxL85Zb9xz5tXzOGPXbGQ+nacYghqW6S9YlEegW/+L86F5TLdHy 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)(136003)(39860400002)(366004)(376002)(346002)(396003)(451199021)(2906002)(66476007)(66556008)(66946007)(316002)(4326008)(7416002)(8676002)(8936002)(5660300002)(41300700001)(36756003)(86362001)(6512007)(26005)(186003)(38100700002)(38350700002)(478600001)(52116002)(6486002)(83380400001)(2616005)(6506007)(110136005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZFpaVkrdjR/G6uxRwXEBUT38ouP05SXaMynshO+oT40IDZ5j/EFRNIgKvWoaBfwBT/oanN9Y/9CXxlfgF4IZXY85OY/Zf2lvwe40qGrLWA4zvI4SYWyoEE0iazX15uEKlx1qy7LZgkWmmnP3Gjccww6v3m19wa2a+fUSyn6WybFhn+nD7c08VrNtCXu4ics2GNqzrUuSP7gaTNwN2IR+mjwjTIxi+ZAP2Gh5kD8vXX9OChW6wxdeRqW5th/9rl4J9+sln8OkLumM8VyMF6O/KuvMxreIs250yXLNL9BijNBZ41xjmzrDgGB6/jBdlym3UFtjzI31Uy++NqDYIY7Va3HAwQbgrWOAOpsP7LTSkpDeL1F+YhtvcK8mz9ljm+lR33jXs6H+Ws3dkANLRv0/RxmrCOvOZe9PCUlSzO6C+UesKPcyL3WH+TKeAcpG0Q3ZysgusVuWzZ9iLOrh3upNe9PMv5WrKBlpR0z1IGlWcZNEtfcwBpzRjyjqV65Z6Szffk5gWPvshtC9f+IEpxWiS0R0N6PFPDA8skCXZeVcgsWC5L8nCuLSP8V5aQ1G7PF18RBQiaMUcBgkNU+1AkZQDXlRw7jzs8Xt1rmy3zphdjuNu3ofP3aY6Mqmp/ZWGDSOFPFUhzHBOcAJ1q0YgZZcroLk1wspTbEjnw0KXvUJ4NErdBt6XDY5TDtJLVfnng0DO0t8PlA7/57UnXGi742qx6/Mkv30vdbaEncjVkC7WlopDeYxG0Bto7iNqyceq0lhcO4H1orFKcFLxGKFeP8iR8Ou5lbHhDaMWumjCw8N5kX7aBQies+9jdLMjtspjDj5WuG9km1yGrJaSSlk5RLpfiEg0vj6SjkKHEW/KwNnLTOjbb8g4lGSbEKKxjoktrvPbT8ZAnieJG0jaCxshuphSpkW3RJqT2LFrnebWBc/rnJXn+Jn5/mvfCu3oWbNyoN8CeDGwfgdlr5DN3uQvULZ5pDyFlgsWOcaR3i0FKGIc8itoTxt8Xo6dqRH5+xvHETsQvM8w7+D/vy+qDATz4zssP9ityN9EKtiFQIhCn5lrUSm61+mMEGWixrOkN3hjjO4ZspEiuu5s1JuERjPFL+He8IcAU1kzUrbPtUxwk0vIKgIY+NGQTm2wUcXxXJJgxIBA9hPFPByexwbVEymhpMql3HIf55om1JLCurn3xRUfMuxrRJKqzTSYXHX6dJyKsSO0gXKYHvmxw33v1zCeNVmay58IFubB3Iia4SLs/02sz63YIaNc+5duiSg3mAUUngruwm9fYtmYwApIk5yCCYvc6Hdavq53iADpgjOyHXnIdpNebLHEAQsa7boXlD+uwnl/rniRM4q3wywBl7NIJ0+74bymVNzHXR/8xcoQCXnsiNvv34Qtc4MT2PFiUGEOMi6tdr6LvNM2s0INpInGlARdYBKeUjHLpqwOhctBMeQk861962ocShPJ4Eg+6pDVe4gV4Rf6hPzFXqPFhEx9aIea8EqGHmTboPufSehLua0D5LJ4QEXqJaS9/3NLnNIUaCmPzR1smsFsoXB/GeChRCvJK4pQ3lpHu2A2htiNoxSZq4MTjK2WtdXSm1XUCUzPH1pQZz3UVAtzY5x5gy1oz2EesNyvAIw/VjUqJ0MsWRIunI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e4835e0-8c3c-4e98-a6c9-08db446cc742 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2023 02:36:59.4197 (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: tSE1s1WJ+lWOTw7PX6wIGEVrYoSbAH2MmziR560LexmLzUTKKu7Sa6oNgYSVN11otTjOgTO+nlvzZnQ7Ow5qf15rdZfMEqTvKgOBY4D4AUOKw4qgX1ZKztHhh92bi9MX X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11070 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230423_193704_821573_D1F67BED X-CRM114-Status: UNSURE ( 9.30 ) 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 | 8 +++----- sound/soc/meson/meson-card-utils.c | 10 +--------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index a25c397c66c5..74e7cf0ef8d5 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->cpus = dlc; + 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;