From patchwork Mon May 8 23:52:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 680228 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 0E74CC77B7F for ; Mon, 8 May 2023 23:53:44 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BB92A118B; Tue, 9 May 2023 01:52:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BB92A118B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683590021; bh=cAkseY9REGZzhsULOT5Xw06VHi9a9VOc6xmFl+d177c=; h=From:To:In-Reply-To:References:Subject:Date:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Tp4v7T4W8QaqLA01PUineaN+ZxX00xXha2APFe9VcS38ywevYi1qN7KwbPPeKnJv6 jwFrq+Tg8z+o21zzgsprJWhRlXq9Bg1A5r7x+ieQDCz7pcAtwooHpPpd1Y8CjFS/nu q0731X+Jbdt6EN3wkj7XXp8XXRnppahKm1Uszyrg= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 04787F8056F; Tue, 9 May 2023 01:52:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EAE72F80563; Tue, 9 May 2023 01:52:06 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2072b.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::72b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 951A6F8055B for ; Tue, 9 May 2023 01:52:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 951A6F8055B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=LPD2wE9T ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cnuoec3yUyOd7nPgyIUCuPW8gk5Cmzk74hB1+Uma4jAQxjJ00SDxbSun45vmez5UeFc59QpoY/NWlRsou6T6u+oKsHZ5Hl4qo//maJ/lcgqdSya0wj3GxV1bXPDn2dZVBxgNL+hpnkm5cC3603MTBZulZeDUbChW1AM5v4Nr1vKd6O587Jgw7x8QTo4giuodPC27zflvFmvxIsFEiLBir2gQLXDtcgFYB+lQ8d+dVU4HESsh/V+M8mIANrN2+VypXNFQw9MoUlpbu/y48EwmXtRdE3EgJUb3O0HdEiwfYQe9dTQ/Y1j8h8m1ev3+zKs0YXUcwxyOHbK8Ct/kKA4dNw== 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=g97Li1TH4e8OTDjV5nv+XP2tMPyn3JYXZ3JrNJ5HHRWdh444QTmyzlxcZIhwhzsSvWBYKX4SuPrzc55s8rmWAjKkBV9N0wE1988V4BnQT0c6PIi6ZzFWof1fwPbdSSKqwW6KtU4qA6ZXWANVT4M7HGU7IZrvQk7GmfS/DW4bkG0/UxfT2bZzUxCsP/Mzs7lfzdYlmocJzkFyBVL39OlxOstblay4ylsNe7LPDEEFhOgD10B0NwikoufP04Ysl9gDa4OVt0oIq/QVLR9IlrMLszOlK4gc3XUnT+Y7R9ABKNY93mJK0qsfJuU/y9tHVXfmMtDX8sViF17t+xKASvnTyQ== 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=LPD2wE9TaSg/Vjm9n3heTacVz3KzfPzfO9yj7MAdq4KGUXmN3iBU7T6zc4623henHr5w9R4RLf7XzolAdjh0VZhpP4tgZs2jVNeW4pNMruZFbqw1G3S6B1hKxD49h9p7lyo9WA5SppbbJfmWXUSivb5AwIPCwrSjnMnfIgLu06Y= 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 TYCPR01MB8249.jpnprd01.prod.outlook.com (2603:1096:400:183::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Mon, 8 May 2023 23:52:02 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::91e7:a94f:9f75:d840%6]) with mapi id 15.20.6363.031; Mon, 8 May 2023 23:52:02 +0000 Message-ID: <874joml6u6.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Liam Girdwood , Mark Brown , Neil Armstrong , Takashi Iwai In-Reply-To: <87fs86l6y8.wl-kuninori.morimoto.gx@renesas.com> References: <87fs86l6y8.wl-kuninori.morimoto.gx@renesas.com> Subject: [RESEND][PATCH v2 08/13] ASoC: meson: use asoc_dummy_dlc User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Mon, 8 May 2023 23:52:01 +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_|TYCPR01MB8249:EE_ X-MS-Office365-Filtering-Correlation-Id: 3f1640b6-c5b7-4a78-54ed-08db501f3825 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OGvWzgljYRZAFnKZIqrCeSCqR4xuG0WuT7WHGjZQKo3cS2oGeegTiYCoydlRqCQg/vOt+fD3xWV3zfNwStaCd8a8vZ18ONuwdgMQ/yu8A3vPABt88KhTpS1hgWI4Bps0hXSZebfO6hXQ5ugDAnizohTI7SZZJyBRxLtzDSvF92rF8avF9VeWsLfUVGMrd1d3H+LPEVaefABJ+gwUq3Bszp2MqzASVWHmabIccV4A88/cCJRSfGUf2FhSmI0ibDpt1EvWDQezjdlfw5DJ37wcgFHhwvRSzXzVQarIDqd/UTPOEct352aZrThf5TYEHJBULLejxtsoqyKSjBw8tNexhUf8cHNAc9tPp08+JziGtWuAnAPzD72mSboiYjJHYtBUh7RUf2jJt9Ly9visoKILtJGSsJELwcEdOQ1J/C68l9eCf/BP1jnLhS2FQ200S3yte7UCsQkKgUWTmlCSrq+4+8XtTMTuJIm+pjCmygojVeToKk/T+fsjNSASOBsbS3EndzbSzPnwzJNepCoBYjBLaFva5CxkAzndpMGcAwYnf6UyjJYPgtFPIrsu+9tuwCaDmjhOrHU/yCej8h42CtbQYQd4dcVLMWxRinACambySKkOLHRQfxD6rsDkiKHXCcEv 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)(366004)(346002)(396003)(39860400002)(376002)(451199021)(4326008)(110136005)(52116002)(86362001)(316002)(66556008)(66476007)(41300700001)(6486002)(66946007)(8936002)(8676002)(5660300002)(478600001)(36756003)(6512007)(26005)(6506007)(38350700002)(2906002)(186003)(38100700002)(2616005)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OZCI1NjwGuv6IiQvuiY6C0MMvfTp4BxJzLIAZNYsu8ggieimXV71r/QGdO0LtzJERl9W2JE/Y3MbcGLFsez+AkatJlhrTeoTKZ6sgI/OW/1UK9IsCC0aEuzCnxpIFNJObThfJWV+aGjNkbhyTlom6aUGUo0UFwVF9/YKuQS+4bjN+S7NJku5gfMoUBp4Vz7MLufmUULAQGNnrBQgEOnauC8QqZa0LNgv54GTuIdjfNw+wboMiHz7sTkTNuobAk6WRnHlnHwCwAI0Kw3GU8UJ64v7DOjmkk1dIv8JmuI6dbNhlSiZVxVGOmPs4LgFlRD6wsGisypSQLxAtjFK5/OZH3fthjxMa7zSOvLWCvVw+IehUPd/Fej3YGdsDD2VUi0khvtgckmIM74KR7XBhnnnF8k/LtLcwZE+BmLtrTs5SKSE4luybkxbdcpRCTI3PVRiRzwZrws65D8yw7CgXMF5/eAYwaj5dnIDyjDRnNcICVR5jAujKureFWfelZr46IWsZqfCnpxt2KV9KzsNmFEKjdsGIf3LQpTfxrq1xbHseZ+h/0p9tnWLkva+OBIZmbjSeOVTjvMxWXPxt5x8sOHEzj4VHmB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network-Message-Id: 3f1640b6-c5b7-4a78-54ed-08db501f3825 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2023 23:52:02.0180 (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: kfKCIgTjzcnJKFSITg2eyIfG0gkGlFQ6upt841jsupLas7OtgYm8ihjE9CuySy5DdK1CtwZ10+oEy/yU5MDTKqSl2GRNIJHk94VCuAFhXUH9BhnqDDDsTCWYsH20ldvr X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8249 Message-ID-Hash: 2OCDLPI5M5N7HJ4OKLTWNRXTLCMKUSPE X-Message-ID-Hash: 2OCDLPI5M5N7HJ4OKLTWNRXTLCMKUSPE X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Martin Blumenstingl , alsa-devel@alsa-project.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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;