From patchwork Wed Jun 14 00:20:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 693294 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 1D9F3EB64DA for ; Wed, 14 Jun 2023 00:22:02 +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 9E7E9839; Wed, 14 Jun 2023 02:21:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9E7E9839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686702119; bh=7I2IyxngwOWaqH99UNrfsn1UmhVvcEFgTjp+enRSlHU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QJY9RdTa0uDQwGGGKDRDletoOJLNImIiFD62VipbkXYJxNnTqc3v19q9U56RMgiO8 v6Dy5tGeRiOk0+g6Z+79s+Ra7c/iYswN0FC2QKnJNPQ5xlWOTIZhVTOYfLJt//jypI CrrVL/EPk9IaFm6+X9akwbiPhAuS2dFr2yPM64B0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 81381F80564; Wed, 14 Jun 2023 02:20:54 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0260BF80564; Wed, 14 Jun 2023 02:20:54 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 406DBF80552; Wed, 14 Jun 2023 02:20:50 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20714.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::714]) (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 709FCF8056F for ; Wed, 14 Jun 2023 02:20:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 709FCF8056F 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=g9+Wa5GN ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S5FE4UNcIcjQaEevdIhHbewduS4CPuVrK1BFxVhi6NxJGb17yWVK9YZdbENg8itbG3rRlu9YjpuRLQ4dQT/RvN/3qHL8OQYP/ChOfNjsbUUfmTdqZwI4VrSCpgIu6VEtJO3fIHqlU+Igwsmb5GpdLaWKh23HoabhIc7AScY5jARSEMtV1aquftvm2kphXsoS50+oZ3gEOH6ZvdPbCSAZFvSc10i6QRqKXW8/DKWiGtp7BqZhXsfmJ5XRAG54aUhxH6ArYbEcnxE4SsL8x21b7/d2obX5uY1zLjLv9Bx0LTs16peW4Tw+MM8MT1m3vk4bxuLH4irlm9NO1AKNafLDuQ== 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=8PmRy9U49Y2o4iYeFlNQ2p/dmJsSuUMQZjXgzyE3kiY=; b=UJXwFnawTM2bO9KBAr9zsH5eSPZxTO/s5OT9SZixLb03t1mtA3H+JF5EKrrz/LAFDLqOfn73CxW2JAFsZPupDivPrQd3X3Z1qnoJT/QLZNZeZZPfXmAdEMnT1LgQB9YTjk1S+WjTDX3Wqp+2LTGDoyOkNTtEebbs0chlzkTv4VNSe/dlpkAVqNiRlpi0rysIXrlVE/zM/RM08Ke22W6xm6d5cTjtk4qt8OxCBh76WpILLlkghfRVAwrul6Je2TVOSsBfQSVkWFJaeCws28f3G3bBN/d03G6x6AKAPcXPYgqAy2MJc+/kNkUp9I8XlRTMnpWgVn4wk9AjI5i7xl10zw== 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=8PmRy9U49Y2o4iYeFlNQ2p/dmJsSuUMQZjXgzyE3kiY=; b=g9+Wa5GNmQFG53UAj0vb58HFn80HTn8+NZ30Twu6pgaowW9foRiiGougppVUhsvW8HqjikPjb/v/7l8ldi0CRLBB7PlpCZGEpI6c90Yq9EPo5qbXrF6rIODHwBS9qcUOmwryQFuvyV2xI91F0DFEsJtlMMxE3wyFi5srzoj6uU0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by OS7PR01MB11570.jpnprd01.prod.outlook.com (2603:1096:604:241::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.46; Wed, 14 Jun 2023 00:20:30 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6477.028; Wed, 14 Jun 2023 00:20:30 +0000 Message-ID: <87bkhihp2p.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH 8/8] ASoC: simple-card.c: use snd_soc_{of_}get_dlc() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> References: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 14 Jun 2023 00:20:30 +0000 X-ClientProxiedBy: TY1PR01CA0191.jpnprd01.prod.outlook.com (2603:1096:403::21) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|OS7PR01MB11570:EE_ X-MS-Office365-Filtering-Correlation-Id: b6ccbdb0-ccb6-4257-7850-08db6c6d2987 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T6c4zJf1jFS05FFRHmyLPmfV0QSMYG0GlrDl8DsvGlPDLdkkZMPCveSj7O/EBFEZbmeCtCA1BL5LLesdxsXGOP8pvDne0pA197xnVt5f2caalYSZs870fdu29TeIsR+ao0N3KBPPg1utgCx2cQsvEt2tkix3aiRUnxO51uCjm3mCHtgRKAeKe8BlUCluClV6PecYEuRxr9inNLUXWewCG398wZctlb6KtS9qW/FTBS5K/YqBSTRvPEICiyXx9xWUX1xkr2EaJGUEw4Jn1aJTthOHLoGJWiyQ4M28lzImUtzUDNvc+WwmfYC83dVMcNkFZrrKiDal4Jx3UvAR3kmrMx+H1XMqVBpOxYXF+XE6zKbRRogLAWvWxZ3TlRz9bByJwm+YpkXzRiIjFbEcbl8UyHJz++uP9BDTbDeHKRT2fcXNIGSF2wKPOSgcasjpStZRSRZ5mbBQY1HZLL3y7fQIUBVcVvz+X6EnY6QHFG9COIKYiHDlhfGrgKsdNlqRXDOwQKWjMoSmaae8b5BNMPlMrJXeQdoWvobDOVhzXYfWZYQkG5j8YEGOJlsH5LG4k2c8swrdgsfSag0zCYW6dRQjMCI+sVCLVXjipfE1KE3c2lb9LIDCct5YNprabTnY3QT3 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(346002)(39860400002)(366004)(396003)(136003)(451199021)(2616005)(110136005)(6486002)(66946007)(478600001)(5660300002)(41300700001)(8676002)(8936002)(4326008)(66476007)(316002)(38100700002)(38350700002)(66556008)(83380400001)(186003)(52116002)(26005)(6506007)(6512007)(86362001)(2906002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZpYQ4jdYv3B4+VW8PNPaetEaoKy1yZUOwEedctTWMqxiJDUpuaFWhlnzBweQ+0AC8aQC9xC4Ohxcb8AlGai/Glzl2ctSuqByECd1akOIbseK4SjhkEc7FEjlVOhy5+WUSWeKtEjD7ioZz5LPfOAK6gtiR+ijTaoh1dEYujjhR55pXRzpAW2IgEkxr3/+8eQvvQfseDdHEUW7x1VcnEtXtWxD0wJMkyFNGr391qXvnobvNEqgyDaErnVjvn0x8Xli4juuyC9wc7VidK5DXWi66jeTzCGd4W03mqgVWwfPEnwKbKDMxFSJ9/uMQVsw9e55wEoI+ZLVKPia4dgTk80k9DHaWnE/GT+Cxu1NDbjwnybP94X5BzcJIL4IGvEBgBfUMKqfNVTv5MiMQf077ocPqpYcdL6NX+kITzA76L9k0aQET6qzcsQOPYsbbvMR/hfb9aino+ZXuw6qwtSthL403e0WqCtaK8+3qAhBJygbG4Efr7L9B4XraTQxEf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ml5TDlP6BBdhBsnOvbZpYiINfCPpd2K7IReX8NvSNgOEIyJLMDI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6ccbdb0-ccb6-4257-7850-08db6c6d2987 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2023 00:20:30.9050 (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: i/LtdW1RAuC2BULVItBvDW/rrwaAql6X3c8fuLpwkCIBu7Gn1e4qwTIM1+ElRY7fGaFkSRKSr0TZCYMv1G+DBgkWCvQptz66B23PUrhrwlEa8CUo6i+3fjwr6Q3PEu/8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS7PR01MB11570 Message-ID-Hash: GOMQK7UOLHL2PLOUHJKSPJP5ZPCLUZQM X-Message-ID-Hash: GOMQK7UOLHL2PLOUHJKSPJP5ZPCLUZQM 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 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: Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name for dlc (snd_soc_dai_link_component). But we now can use snd_soc_{of_}get_dlc() for it. Let's use it. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/simple-card-utils.c | 4 +--- sound/soc/generic/simple-card.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 6a3c9e4e1cfe..8ac8bc358a17 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -1109,14 +1109,12 @@ int asoc_graph_parse_dai(struct device_node *ep, * 2) user need to rebind Sound Card everytime * if he unbinded CPU or Codec. */ - ret = snd_soc_get_dai_name(&args, &dlc->dai_name); + ret = snd_soc_get_dlc(&args, dlc); if (ret < 0) { of_node_put(node); return ret; } - dlc->of_node = node; - if (is_single_link) *is_single_link = of_graph_get_endpoint_count(node) == 1; diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 9e1047b46b68..873434edd2a2 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -89,12 +89,10 @@ static int asoc_simple_parse_dai(struct device_node *node, * 2) user need to rebind Sound Card everytime * if he unbinded CPU or Codec. */ - ret = snd_soc_of_get_dai_name(node, &dlc->dai_name, 0); + ret = snd_soc_get_dlc(&args, dlc); if (ret < 0) return ret; - dlc->of_node = args.np; - if (is_single_link) *is_single_link = !args.args_count;