From patchwork Tue Jun 20 02:14:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 694526 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 67EEFEB64DA for ; Tue, 20 Jun 2023 02:17:28 +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 09840AE9; Tue, 20 Jun 2023 04:16:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 09840AE9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687227446; bh=GcBHaS25lGEJfkAavE7htpIoNLv94JyV+AORIOtE0tc=; 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=edMN8thg08Hp7D7NURuM7iAeUiT4B8gpkO6b4GQXB5eMt9mFk98+m6woin8YDwCz+ KkPtYktpo53VQWhPe/2TCgsBf4dAydENA7QTr9Dt5PlxNbjpjHe1F8CrORDq5bBlwN teiuFe4dE0Hr5n8EtGvUFfFx7inuVXW/YFuoyFqs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BEC9AF805CA; Tue, 20 Jun 2023 04:14:53 +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 1F731F80141; Tue, 20 Jun 2023 04:14:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 21386F805C0; Tue, 20 Jun 2023 04:14:49 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20709.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::709]) (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 22CDDF80141 for ; Tue, 20 Jun 2023 04:14:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 22CDDF80141 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=c410RCot ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aYYEha8K2lFeXo4svscpbZEAT7WALOZ1lpbiYRjzC+245fw0obExyqR1+3/ZhkNB+1fkZeTXUf8XGce9sjyygWIHu90colhieD8mpon15+jp6tvV5kt0N5GIgUjRryehuHu37XTs1m/7GYdwvIHwPWgHEPRdzM4NvbVB/mNHP8HAT1UKWdIvZef1jOLqxXfYN4sjxrVc2gb/m9gL18EnoLtzUir8M9PnS67zL+wSnVnpnA4IjltZJ9KI8lFbrFLwnEKv527VMnQ061UFVK/JC3+mzPFz1fCWP0P9jQbL5U79O1/in60iXqr6eVog6Lr3ALhw9rmZFLrgvDNA+V83pA== 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=P1coBhtUtGNyDCCRinhxlR6QNCLtYO0UYbRExXSwh+w=; b=eg3W4tU307l/oR0kztEiQSnRsi8mR1RGw3S8EelYu5qduWTVXbQlRsyPEivun4O9Lyi6ey0zaCniDoi1iQOyI2FePfkHmZ3QpFTKytId/w+86K7sZkZ3CK7OkxJMF1HoOq9cBOZ7fNJv48qoyj6np2s+LvbJ25wcjpC4Oisfqv6l0UbMFcNSIEEbqEDkpwa7KvfJkHKmkePGB31licAa/WY7NJBhP5azhIkNX55SMTrark4R2GlV8Bq0xIZTne3396lezBlw4Oj/Em1h+40SDROizqWLwYXL1wNFUijps0gR6XSaAZqWTLX6he2BJF9DWNL+r95CqzCIMeL8wyz8bw== 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=P1coBhtUtGNyDCCRinhxlR6QNCLtYO0UYbRExXSwh+w=; b=c410RCotSGHPyp/W45rBOqmZLRssBTnBG7KBUSbv7vr8+ovsPiII9R6QbrD+cnl8dERRB64K6gTJWbk0QYiORGelwd9BwGPDWJ82CzIwf5+ovgIRoqibFTKRg5J9SozqeSqH4m5n9ObSxWxxFm49EBcp09GX9fF4Q2K3EtSQN0c= 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.6500.37; Tue, 20 Jun 2023 02:14:19 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::3ac7:b366:51f:3e26]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::3ac7:b366:51f:3e26%6]) with mapi id 15.20.6500.029; Tue, 20 Jun 2023 02:14:19 +0000 Message-ID: <87o7ladgn9.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 , Nicolin Chen , Shengjiu Wang , alsa-devel@alsa-project.org Subject: [PATCH v3 3/9] ASoC: fsl: use snd_soc_{of_}get_dlc() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87sfamdgo1.wl-kuninori.morimoto.gx@renesas.com> References: <87sfamdgo1.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 20 Jun 2023 02:14:18 +0000 X-ClientProxiedBy: TYCPR01CA0043.jpnprd01.prod.outlook.com (2603:1096:405:1::31) 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: 50a20bc3-0422-48d7-9c20-08db71340e00 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oxClGZNrmudgdPFMeJGQvoR93fdvoTe4WLLgW/fQKfnYHfou982FzQkfaGXHBXhlm7T+L5Orp6R3+G2fudPV3JyQx4hPyuOaltfbAC33V2X/UgLEtdXNhWmLBrK78bzP2JahqjZvY3K4I71PzFEvLac29n2c1cM5Fq7wULQ6y7ANop/EDZLJzvMkMTLdWiJj/JtBFBZEr6ikA+kLE3qo9qnijDITOBUCW0NoiNpjnml5Xz6BBTgYqfQjYBnsrbkCfzHSoJ5HNXw3aXtE9SqiZxUDrIVF87dEcjXGi9dUoZ4oHFkt8OYylmABuoYpvRIxPMafdYUEHcVwrz5xCdNDj4FEOZ3056oiGFuIigJFfzX2SZywGBoWlYhYDiTtcyVYf74cqrpxI8WGxAjArcPYZU8KrXcEKQ+0mD09RrGQkXNQn0hiQ0aez3VooGGE7uY1oyrkEYDZGzv+IBAwD9HjT26fww97kme2Wcn0JvIbCi1a7AlmxBIziZ3586HU0bNEt1wNh/CeoRYJgcrjhcB2419WrqoijrxfSNuBBQUtx8rHXxOsrok8oR7+Y0Dww/cugVR0W8s0FpPbp7SYY+jI+UB6JodYVXA3WGGZIZGZrLoZ48Y+1rJjDRj/ZPlFq5mJ 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)(39860400002)(136003)(376002)(346002)(366004)(396003)(451199021)(2906002)(7416002)(5660300002)(8936002)(8676002)(36756003)(41300700001)(86362001)(478600001)(26005)(6506007)(6512007)(186003)(110136005)(54906003)(52116002)(6486002)(66946007)(66556008)(66476007)(4326008)(316002)(38100700002)(38350700002)(2616005)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JwOeNzCNkGN86mShRIC0Narumoss+LLujtc9PqbdKIq0o3/NzlUR7y8cQ79duNwWfp6qK2wcQ8m15DHniaKLqVz3kL+l1Oo64HyUF6hAHLTopVv3aGrdpXYsXkDwHdOrE0+hwOVPsIfIp4Pp7/5kttP+BNB6vzkr5QM6Kq8dlQT2J114gT2fiA6WLWJ2NeYS85wgMK/R30HD5fUmXbX5iWdVxm+PyQHOk2+RSTyu7sjxAiIu0TD9+/yIYKZVFDPM+9fxkGIT2a48N4NJJ/JiI6btzSPyBZSrgJ7Iu312fZmcUlx64M8tXzcfVTHYU8QXWMXCZhYy6t7TgpgV7txJjF1nFcmj5Jy6CSMTJtxbX3jrYP2zI49KBOCbmkLIeF9LVX9EQa6O1YPKmVnqIMu3pxpVl6JlUbN8HEDSF4dNYQqJSK3BfASgLbpxDT0wXIMU9PwcHT6Kpv803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fnuhIx9NymyRGz2jeOKL7HfSP2xY8Up/F10hSgB4KVXzMb3rG95PGOYvYxFCFVq6HH4N5u/tXvZYCrfE2XES+XYUF+f6pkR/aof4KXqBBhdoZRmCcFaQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50a20bc3-0422-48d7-9c20-08db71340e00 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 02:14:19.1118 (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: fCybFXSFSUELDngspDGYnWoyaXo7rEjNDdBBH72Or3mNKQJ5g91srG6mireSUe22h8rIyxgEN6bPT31uqnvbipkZ0vOYuON0hHQVTpXA1VVNNDokXyXWe5iImbaPRNQm X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS0PR01MB5665 Message-ID-Hash: 2P4IVSDZCFJH7YW6MX36D62JB4LUZVLX X-Message-ID-Hash: 2P4IVSDZCFJH7YW6MX36D62JB4LUZVLX 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/fsl/imx-card.c | 14 +++----------- sound/soc/fsl/imx-rpmsg.c | 3 +-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index 6f3b1428a5ba..356a0bc3b126 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -551,10 +551,10 @@ static int imx_card_parse_of(struct imx_card_data *data) goto err; } - ret = of_parse_phandle_with_args(cpu, "sound-dai", - "#sound-dai-cells", 0, &args); + ret = snd_soc_of_get_dlc(cpu, &args, link->cpus, 0); if (ret) { - dev_err(card->dev, "%s: error getting cpu phandle\n", link->name); + dev_err_probe(card->dev, ret, + "%s: error getting cpu dai info\n", link->name); goto err; } @@ -582,17 +582,9 @@ static int imx_card_parse_of(struct imx_card_data *data) } } - link->cpus->of_node = args.np; link->platforms->of_node = link->cpus->of_node; link->id = args.args[0]; - ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name, 0); - if (ret) { - dev_err_probe(card->dev, ret, - "%s: error getting cpu dai name\n", link->name); - goto err; - } - codec = of_get_child_by_name(np, "codec"); if (codec) { ret = snd_soc_of_get_dai_link_codecs(dev, codec, link); diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c index 93fc976e98dc..3c7b95db2eac 100644 --- a/sound/soc/fsl/imx-rpmsg.c +++ b/sound/soc/fsl/imx-rpmsg.c @@ -96,8 +96,7 @@ static int imx_rpmsg_probe(struct platform_device *pdev) } else { struct clk *clk; - data->dai.codecs->of_node = args.np; - ret = snd_soc_get_dai_name(&args, &data->dai.codecs->dai_name); + ret = snd_soc_get_dlc(&args, data->dai.codecs); if (ret) { dev_err(&pdev->dev, "Unable to get codec_dai_name\n"); goto fail;