From patchwork Tue Jun 20 02:14:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 694528 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 1AA76EB64D9 for ; Tue, 20 Jun 2023 02:16:24 +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 6DF7784A; Tue, 20 Jun 2023 04:15:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6DF7784A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687227381; bh=2kpoU4/I8pyK+lknAm1k6eIZCMusikn8izPEo+u/KwU=; 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=BVQQF/mBWW68QPuq+W1azOWWne7BFVZbNm9tTxiw92ataMuhTLsWNFyBgXp2RUsY3 TOsdEAayCdyUSn8dVJUu2B6Dyhz/787vtwz/Cy2PDWe6C6x6GajBG97Gt/NniulS1R rOfHVPQVR8HcBMQOHjX/7IdH6UCsvw0cVILjSQFo= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A4EB2F8056F; Tue, 20 Jun 2023 04:14:32 +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 DD0CEF8055C; Tue, 20 Jun 2023 04:14:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3B706F80130; Tue, 20 Jun 2023 04:14:28 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2070f.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::70f]) (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 4BE76F80130 for ; Tue, 20 Jun 2023 04:14:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4BE76F80130 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=lzGFbuNA ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gkUtCcSKZ1NuhqqXcMtcyvbSsKYPajU9l3s9SSGrSJ0ICECQVaIpZDh/ML/ilWkh63p9SXTN0eDNhYFDNNhMGPwZvx28pkHgzg18INUuzRZmjiCBjuS2nmaN/Zyi12ZebAdegedS4MlsB9QnWnu3cTtTchG8XHTbgbbPaAcyYYINLu6/msQLyKfrAuOsgEIAYXDbIcWLldwXoyhzMGPqZkXab3sITIXJGstfBdvtQ0T/uBuODRJwOSfqYE0kc/JLlG0+cFhj3ldJmHn4CnyLfHLBod0asi/eOaZbAIkC3ZLXC2D1uLKA45PGDMAnjTDCGCksu94mBO5LYzNHhFFBbw== 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=QoKuww/FI12vUeevXzjstCGoNGuZ6j8MvO42Bd9aZNQ=; b=aQHUU3k/c/lbd3kydBIHrgbKfMJynI2D8y1CdMqYzru84i38kfyfIWM3eImONsUdCLF9Q4vQlC8P8X7JNNsSTaQ+WPyjM1SDwXZpWMx7aku1QQG3bF1RVR/CcBTO2aD5OGyYJBSlYrDy9yfOZwAejY1WaSl9MXUUOb5YUNmpbPq3l1Gh+3x2uIFCInkK4M1mnlfZ+eX8mtgxoNZWe/LdBNkUDqZ268tnq8AUlHrssVuylx1cHdJBY2rCpxZmq9AbFDypRjcjXPH628KFFOTnwsm/cg2igyls4UtwekU7Jia+zjYBWQduRNY2ffJSx1xB7Xig4IpeA5tOZVPfvlFHxw== 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=QoKuww/FI12vUeevXzjstCGoNGuZ6j8MvO42Bd9aZNQ=; b=lzGFbuNAG5jr0gLeLQ45rqWVJmh1x8ixB0E9kMCKTu7lLwq6/wZUl+AtNFueftrpzDyFfhoGFNYGFsBM0SkZD6JJhARyyGucd1QLMgpPW84pUV4qFGN9w/iWssJwrEedea99l6nFvzPb9EeXsKqe8TAHo9n2yFvmzvp0pCDrXv8= 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:12 +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:12 +0000 Message-ID: <87pm5qdgng.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Banajit Goswami , Jaroslav Kysela , Liam Girdwood , Mark Brown , Matthias Brugger , Sascha Hauer , Shawn Guo , Shengjiu Wang , Srinivas Kandagatla , Stephan Gerhold , Takashi Iwai , Xiubo Li , Yingkun Meng Cc: AngeloGioacchino Del Regno , Fabio Estevam , Nicolin Chen , Shengjiu Wang , alsa-devel@alsa-project.org Subject: [PATCH v3 2/9] ASoC: soc-core.c: add index on snd_soc_of_get_dai_name() 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:11 +0000 X-ClientProxiedBy: TYCPR01CA0093.jpnprd01.prod.outlook.com (2603:1096:405:3::33) 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: eda5efbe-84b9-41e5-d3c8-08db713409fa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 37E8DtO+fLfmZUH6ucU7HSPk00dwFNZxn3kaUIxB4jHKMSCzdxMT2VE5nwgDbVHr6B8v+i+fkbsEWINJXVK/nig57Ri3epsT14UOpid+JGJsRPHp0inTrSLvPgoL+Xn1i8AKZFdow8bfkxsNAfmeYaWubhQrfn8zgTCJRIhEhFkHyv2WG69jTIjgpCcoqDnjpopZ2kos6E9s1OMMUvqUs3WuzRBen/uHcAOn/9Rzjenn1QnQYQa3/xWTmuURWZWJc4uLdo9fux9qB9wIWi+fh9J76Xd4oanD+fr/DfyiXYQdG/9BNo0U26gsp63OpW1fbYDyH5JvPo9/Mv0v0HRL5gAFkPMsRYj5nAnNj99IB583z1/CjqAmTtDrIkoFUEpJqeinCYxi36rlbNvV9hLlxshAG2i0hSmTDWv8dbXpt5aUf43+FzWVxu6EAhji4Ucravs/dP1fCrLdoKNqO3zNaVtlfKam5Aj99xoRndLGtWldwcQne1S3bbOb9LAKlg4u6zyu0xeei7NYlyyG4SVH64GrTwvqu8i4LNK9EWIfgKnD2kjMNIa8nkR/1ZQtT4dsLFrZ7ww9JG9ukXms+WHwxXR788wDtikDy5RDauI+AIg6KPLOe1EIyo3Y6LQ+r0pcbTyWGHjYiKkyLR8/hUf11Q== 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)(921005)(4326008)(316002)(38100700002)(38350700002)(2616005)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DLe04YSASZJ6Kc+uXu62Kh1b3Q3Hi3diU8wQYmZD1GCdLuJLjl71rJ4eXeT68naGS3pqlvDs7ZNkzTqz/AAkZOz+XmyZhddrr2/vDFfP3JYLh1nCKpZT5Zlm+50/e+lOvaL5UiyYMQ4NXxSWVdg7MGQwAd/4HDaLk8DPoN1zXuZxpZ/5pxb/iQ8WMqi/M1wVDW8OMkXygL8d4iwzSDysw/yfqI3jtoLzS7dGCe7QG+Dg0p6pQISSJqmVAhb3U4Q4vdroN/sUvtHfHAyG2qnaPGsbJYC4G4RZN8cVBuGFrqKSmLNEEEMBCJG2ixwqzUd/yxjK7poCFmnDEQ1FQ89f50aow1qQKT2nf/rgRapd/7A3+q+AzFYN6QDmODWCM5nBgDALgrcm6xvN7eWIgfAman1XkkZ2tJw9i7z25gNmiHNhh77Oufov1j80gMxqn40M1toL8FN/tzZx1TTKjfrF82U2Jj/QUDAGxqZO7fFH6iBGe3HyqdcVmmAKGXsHi3mLoLfg6AMm/NZP/afFklNn19XhLYfleJlq6P4IYSP9FKNsLMxUvvNCpmd1rhLDjmik29d739LR5grgi8vQ2UEJl4rfLLQAdzapw8vu6h91F6KX6h3Fr81rbyHjv2W8cTQuKzULXVFwaYgcjX90Bl8ngU4Y4qLSBSfIo3z0sO+nTyRY4mhIY+oTILvXbqa/zlLykGgbB/H0YCiTCBytzqdHSMcoyQSiHUUwmS5sK5YfcGPMySwtdBiSZPoypu68oaHwmzeWSnAepKvrTcRJXM2aZwpmDAuWfn6NtXsHQZtrpM3OSVxoRyVHzzi4wT/G/KmuRpId5xVv2JmJUGOUQJ/Rebh1tdFUc2cROV3MLEG8aOa9Us76kx2fjDdfGM8i7G2wiseEsXm32+J7gym6ngN8LAp4eB0eoCG7+cWpN1cjLSsWbFE2gmFHGqdlOwTKNgdH/7gGsY0SZFOn/rksz/S3qt0zNtttT7uXjAc81gSmQk3Vj5AP/DZYuDlSEa/6+VXgumQp30YtQZHDW/N1M/zLEyhHCp1O48hrzQxLheLfXyWNYebe0/EV6nrv2ZkYyabpxYHnSxkBH+2pQSDeBpdYnm7g+R0e0UeECnfzFsbWPS8K3XXOSlZFVVl8pabu6Gbc2Rz04Db/kGZDNvI2zKXdCliaPU/Bka2cTAYQMww+Ow8h2iuGNB5+Ac2J7AS/Rz3Cu4W7WQpVvS2Sd5AvAiVYI2Ge/b5aFaAlyuvokibF0ZLNX1amD90E6GuQFMZH2Sd5t373KgBPI3LML/zyG6PPArVBnMZdxcpOkcJ84HPI2kIvOIM9qrdTYO14zU8oqfxfkiHwpJxGB7Lzn3pxEKESR5jbUgtpFblu+aOo/ND0Zq5+kukCLQYlocBftMIq9whbNmTgCJQqN0UtbxWaT+Od6efzDbhO9664ETeW9KrAa4NJX2MZuUFESJRBMEWCi/kgMLYzWJUywtYdAopv03Sinm8+bczMhuvbyYKQeufBNOeiL14ZZK/BbvChDsKbFFS28bJUe9Ja8q0NYbV6tBXqRlDnh19FOU88OF4qgZC0NqqVkM7JuUq7YMZg0GSEKKJbG+mtVppRjfQchL8VuApDUCrn0CvGnG7HYDf9tAAlucY= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: eda5efbe-84b9-41e5-d3c8-08db713409fa 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:12.8775 (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: mcDTR3uBH2Rp/N9QDQXiAXftz10kYPTUi9kKUFjGiktq2Ez/wvezdH5jT99IvHGEcbzP2Nw0RXEgl4j4/4GQWvOGTlwsv5JneB68A+tekIEDPzM7OFYpE9Ma5Vnw+as7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS0PR01MB5665 Message-ID-Hash: P3OKFKDTN2GXJAB3KFJGYUZ6E5XTQ35B X-Message-ID-Hash: P3OKFKDTN2GXJAB3KFJGYUZ6E5XTQ35B 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 snd_soc_of_get_dai_name() doesn't accept index for #sound-dai-cells. It is not useful for user. This patch adds it. Signed-off-by: Kuninori Morimoto --- include/sound/soc.h | 2 +- sound/soc/fsl/imx-card.c | 2 +- sound/soc/generic/simple-card.c | 2 +- sound/soc/loongson/loongson_card.c | 4 ++-- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 2 +- sound/soc/qcom/common.c | 2 +- sound/soc/soc-core.c | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 943f0a1b2d27..b27f84580c5b 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1319,7 +1319,7 @@ int snd_soc_get_dai_id(struct device_node *ep); int snd_soc_get_dai_name(const struct of_phandle_args *args, const char **dai_name); int snd_soc_of_get_dai_name(struct device_node *of_node, - const char **dai_name); + const char **dai_name, int index); int snd_soc_of_get_dai_link_codecs(struct device *dev, struct device_node *of_node, struct snd_soc_dai_link *dai_link); diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index 78e2e3932ba5..6f3b1428a5ba 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -586,7 +586,7 @@ static int imx_card_parse_of(struct imx_card_data *data) 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); + 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); diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 5a5e4ecd0f61..5b59198a0384 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -89,7 +89,7 @@ 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); + ret = snd_soc_of_get_dai_name(node, &dlc->dai_name, 0); if (ret < 0) return ret; diff --git a/sound/soc/loongson/loongson_card.c b/sound/soc/loongson/loongson_card.c index 08df05cb4328..94f02b787c98 100644 --- a/sound/soc/loongson/loongson_card.c +++ b/sound/soc/loongson/loongson_card.c @@ -151,8 +151,8 @@ static int loongson_card_parse_of(struct loongson_card_data *data) for (i = 0; i < card->num_links; i++) loongson_dai_links[i].codecs->of_node = args.np; - snd_soc_of_get_dai_name(cpu, &cpu_dai_name); - snd_soc_of_get_dai_name(codec, &codec_dai_name); + snd_soc_of_get_dai_name(cpu, &cpu_dai_name, 0); + snd_soc_of_get_dai_name(codec, &codec_dai_name, 0); for (i = 0; i < card->num_links; i++) { loongson_dai_links[i].cpus->dai_name = cpu_dai_name; loongson_dai_links[i].codecs->dai_name = codec_dai_name; diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650.c b/sound/soc/mediatek/mt8173/mt8173-rt5650.c index e05f2b0231fe..3ece4b5eaca2 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c @@ -288,7 +288,7 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev) np = of_get_child_by_name(pdev->dev.of_node, "codec-capture"); if (np) { - ret = snd_soc_of_get_dai_name(np, &codec_capture_dai); + ret = snd_soc_of_get_dai_name(np, &codec_capture_dai, 0); of_node_put(np); if (ret < 0) { dev_err(&pdev->dev, diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index cab5a7937a57..d9ebb883b999 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -105,7 +105,7 @@ int qcom_snd_parse_of(struct snd_soc_card *card) link->cpus->of_node = args.np; link->id = args.args[0]; - ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name); + 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); diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 8dba5bb26ffe..7b13b1b232ef 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3355,10 +3355,10 @@ int snd_soc_get_dai_name(const struct of_phandle_args *args, EXPORT_SYMBOL_GPL(snd_soc_get_dai_name); int snd_soc_of_get_dai_name(struct device_node *of_node, - const char **dai_name) + const char **dai_name, int index) { struct snd_soc_dai_link_component dlc; - int ret = snd_soc_of_get_dlc(of_node, NULL, &dlc, 0); + int ret = snd_soc_of_get_dlc(of_node, NULL, &dlc, index); if (ret == 0) *dai_name = dlc.dai_name; 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/JiI6btzSPyBZSrgJ7Iu312fZmcUlx64M8tXzcfVTHYU8QXWMXCZhYy6t7TgpgV7txJjF1nFcmj5Jy6CSMTJtxbX3jrYP2zI49KBOCbmkLIeF9LVX9EQa6O1YPKmVnqIMu3pxpVl6JlUbN8HEDSF4dNYQqJSK3BfASgLbpxDT0wXIMU9PwcHT6Kpv803aYCm5K4nDF8Hf3LpkuzW5Ycb6l3i6wgZQJYfbDT40qFCrFw8f+C8+TQL7Is7bPcX3l/ae+fvBXObRA2qCFnylNBf8+6xJhWX4mbhp/lYQbm4GNbmDf2GWb65czEsYfWWTw528Ql+TgAk7dxtPhOYWtpkstbT7PaRm14RjfehJv5iPwBQLs9Sl4ECOW+bdYaPW1XDFtcjszwqGWrgEocTtYbhjCmkSxaddDecFRYUyuWJp+qVckcJKLWoDXs1JI3ugSKRC9nZRiINjI8qgxY7JLbsaozLbe3d5vTFXpVhZ3uAflRuNQjzZod2Da9+GchB6l8FiniT+Ls7XSRNhmpQhJO9WycGsVlXbR8+PIfiTBjF5StKI4VVjUV3Vck5HyNu3fcueWEqZYEcu3ZDUFpvAWWX8kj6uRyriuO6/ngj491Ol7EWUg3ioYXh8Z+vjzH1+y3sMpiBOt6R+rLYxf5Z+A7LqWbXfOu/dFrDH0di5dr8FpyilkklMJAKcAz3cRbMRH4w2E0zWFMtZuITkPQ45t4CRh6v2n9x6TjV42rPx+a1Cytlz3M8NDiWlknW322iiTnWvHs7lbnZ3IXeBMCrzmVysYFvxWntvdCF/q8W5NczksJOHJo6xzY2hQRk1Sv8ZF0jKUK5CFRJ8JjJJrSByym3lUsyes1FVXw9/ZhjCLSfXmC99+Sh9kVzMiUmEYepIGX7KEAQVS5AWvb7CySzoabYZCEG4E3uzH4IqvSQj9VGw8SN/EUHbEGnL9u/h9QKEZEOQS7ow7PlZ6Ocdhyumy/boA6G1r7LtimMWQnfDvXobJXZHhLxsukU0J7xixZ7lY04uTK9/YK0OvYXfdqp3Sp2UYL96xnYjyU7YX0D1t9MUc17wEtSyd5Qe9tK3ol/SZpSuQti7jNgBk8k0adLGfDTaLjpTSfETBdih68EGnriWn4i6vFkceTFkGMX/rhty1JmoBz9i/jFp9KA5ztkpG9/Hw9dCNcwpnkOsEQuutKgAeRf0Nh1hdvQtOMiH76uYgMv6KDK+2mJyFaCjUHqaHcOXyR2TjRVEHUTmYk0u0fnuhIx9NymyRGz2jeOKL7HfSP2xY8Up/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; From patchwork Tue Jun 20 02:14: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: 694527 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 EBA65EB64D9 for ; Tue, 20 Jun 2023 02:17:03 +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 CB94585D; Tue, 20 Jun 2023 04:16:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CB94585D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687227420; bh=TKMcsJdjDct6fxgU3yrn2J1Au9docZmnkPHOF040L48=; 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=JjWebX7+earmXbHs6UFBqocbyykqni4UvCt4JQAscjxbEQi2CCVWe8G9HVHMmrEGM FnVvFIN18a7ZBhjfc2qgI2fvP0qBBDJXCiq3TBKqJSpHj8gm9EkR+jfed03P4SoYsX TtRbcGlPDEKaHksvesRx3a/FInafGBnnX2TwO8wM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A0425F805B1; Tue, 20 Jun 2023 04:14:44 +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 187ABF805AA; Tue, 20 Jun 2023 04:14:44 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 28CA2F80589; Tue, 20 Jun 2023 04:14:39 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20716.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::716]) (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 59D81F8057A for ; Tue, 20 Jun 2023 04:14:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 59D81F8057A 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=Fj2Nh74b ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NtUrrl2lzQr3tzXO/zvNAUNdhnZnZXmGsnSJia6WjB4c7lsM9KH/OHyGhouUCFNqgIpfGV0/Pw4JKucwBKDpQJ0o1g8NWZIUxKMGGmBotbdkUdjdJkNG+yp8A/IBmdZCbPkgbnkcCMt+tNunIeSrAxxbED7Zm6RDb/YD10KQDjCnQW+Wi9ViXaFC+11NmwFBCdaWdjzoio70v/dhBIdzfzK19X10WZHdnICdT0cksyV+BwSWqKSTYNxnxdfxlo3v9G1LmXQsUy21vBaBg82Ff/OMg9m9QFki6WDsVnIT4Pa5bAW9A4FO3JjdY1DAQNhT5nsUKRyp5WnL8x2kbBAUAw== 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=CPkSwybPvWp/m43idPntF7ZIzkj+MnuR1p14B9pv4T8=; b=Oyj50EMFHKFyzoJG5aNSZyyKtcfAnTAuBjHdo6mHNOB3mbkrh0BaTIjqhaL7t57MShVMsmVGOm5TcK9Ln4dNCN8qXRerx+rbvzSYGAQS/76KvCv3u5arIAlS2pg0+oUv57sKedXml+lhrJkU2XMIxEHQEBGcvmIPozDNu+t1MBHEa3lZctjRG9UzajwyyZV9KCtQxYZw6L5MAh4TbH6kbLhvhslYeVppemEBVopkcL1UEg498QPInfA8OB3nmFMkTlmHz/j4aqh5PWKp4I0hbuKtMQ9NdyPBpcA/VqdATDNYPPc9TgfB8jVxO8w9/JyXF3giAQ86huOgG2CkB7VbvA== 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=CPkSwybPvWp/m43idPntF7ZIzkj+MnuR1p14B9pv4T8=; b=Fj2Nh74bhusaGVEQ3essJPhSUgK9MdGVS60ltXskVHqv/23pl1Md549jxU62ZjMdo/m2XC5zsf2ufyYjX8JMHK8WZoQpSdThJ6bbd6elzP50FsfBlViWfLTKBRWfBHzq0Cs5ECKKwPIj2I2hc4iYt3BUr7ghUCAz1PVnDE5myqI= 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:30 +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:30 +0000 Message-ID: <87legedgmy.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 Subject: [PATCH v3 5/9] ASoC: meson: 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:30 +0000 X-ClientProxiedBy: TYCPR01CA0040.jpnprd01.prod.outlook.com (2603:1096:405:1::28) 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: fab83e48-9c41-4a09-ae7d-08db713414b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0BGMKGIKr+sae3rcLLMBrcbZVltxvRpmPVc0jqwb6EnbO5LiQucngvKXyEcRQ8+LCDD8rOwJ1pyiZR/XbgKT9gl/z/ZoT26fwdoXNruXqLC+m+X8ZHTV7QOHeR2uVC1LhrRqbxbtMjMAfXhwBt5RZJoECss5UU3SpKwDWZu0s8n3+vnPlgOIXWCx7tswkqZa/oAkRL9bOs/RfBdHAYBIl2EBxYiIf+KWWXv2ozAfvbyXuxcR7yZYSfwbb6BuCh9tGJRVsaG9DwEnGpDQSCH8EFrS2hBmsL4WlTakQE8oKvyjLTFc9VO+tKSh3fGB4qtkWEm0W2XiMmuIXzBwdKLUFwY0REbJCiAC8rzNqXfvT6hXO5BJUnnI3lkZ4GqbUR7oBcXVP+EtBGmqX2q9tjKfVMHjKNdJneLbtvTtWkU6mOxYqelc7fJyb+NgFf+UrdeifHdoFCCa5TXEhQN/rpo4t6nCBx4H6TJPMRYWpn6Z0hylrPAQYfbi1DPXQRbwhwdNsf4ud8GAKsYaceEGZOIQXe4BMUzWOtN1iX+B24R+TcyJqJ4zvQpL1IZDVLWU8UUcsWYT9+a/V3haEYhSMDzOYdZO0nbBZiaS28Ph9eg0zfKX5cxmt973cTkzquB6YrSL 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)(5660300002)(8936002)(8676002)(36756003)(41300700001)(86362001)(478600001)(26005)(6506007)(6512007)(186003)(110136005)(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: qDEN6GbUCvqpCsZJ9SX+n6w8jzT0o2cWPwUAoGNUwz9sEfj58AVYMlXmpbs5wVNQvFZY6IPHVcytS657j58B/4GB9cwEkVWoSQ+T9NS8bF8TJMVewMJFk8UcaQ3cyFzI6ecvEJZO1i2BBYogZEvk85c0ORtBDinELguzOIb4AYTIXzLxvLpRj6D0E+L+AEFcbZePDnvReqb/f9MQfhgfPxk8/k8+IvMKZwbxX2hPg00m/nBuUO0hM6fbHHrj6hQL9u7GcZ1f0EtO83LTd8eCF9yOl/2gRWRfXifKbfrieD8qalonYHoX1C4ZqkhN+wofdulOj1+gfrPzxkJxudOvYXDVA53L/UB2KmBbx5xFOy9aIuQdgs5R+0rg0Bp4V4ZeTvKhl0Y7Io/RupV8tJ7TgzcmsXIrWcHhVhJsN+SNF4zFq2gwhZj11zwa9s7dwmmVU9TkgCUmhTUbbO8k2qSZ6eQ+jBIM7XTYTwBB+L21bP/UWbY/IpA5QD2vPiC24pNhbYZoeuUo9nZjkYO74k5qXcQFhs4SSQ+Ldu0f+69Fy624bZ8Ao8P2aGM7OLcDlhm0v2XDOMvhFiwO7Tg9m1vQhthOHND0hDJgOx0nazqLgHfzDHdI1YrBzSc5G01MUgcqBmgXKnbYtzEUFhoKHHR76A3nDPdUmCp4N8J7FPjvyP+j5zzOnqk7tJtLM9Wkh74rm/CbGSQE2q/eKjep862qxfnn1BPA9zX14mxul2wh1nM7VJ+W+NTcfhpClgyveU4xLU0WIObfXuLBPPZgJWzOVNXTnDJPh2qBVEuH9zn+PEViLsUXdvSHEN15f3hlpP8x4CB96JkDh+1bssc+RKlhHGfv283f8wlYJj1owx0T4hM4QwNOJZXAD6iuz9CEHEG3JQCInhe5l3tXXcjiZdi6Fc9vIiIhz/PofCFUKYOqWPATgJ6kN4fqrQp73yzWtm+P8djiXaU8UKgxJt4wmeKdkM02ysiNhElodrgsggOeRTCxhhXDBR5fNZFdb/Qb+/0ICo4KnObAUeH8W7D+VcxDSifPx8HLeI8WdwykpU+g9UPVbUDrYTNXYhEymTbI/rOStmgU1c40+4gXe8e6LA3VxGMGIyc2kMS3QUwR6dBp18Wbw9R3rrwRWZuIqnnxSBDKpZ+h/V5BAZlo1zf7073Q6qamvNbXYas0wtdiTml74nWE07leuDhHSn3xXZrP61LCBjnIKchyVN37Ccb3YrjINHx5otFomWozYXdie1sE2Dm694GOzoPzenQsy7Qq3dLOCgxsxC0dzj0ZZWXFDZhzY3itTOqtDe5k4smoz4cEMwd6hMmd3FvvZo9IaQTBDPwOX/xYWKFx8zUvFx1WJY+CAbC7M4FDMOhHn8ftPus6Fa5dT9C2qewY5hUv/3PFy0c59Jh6KHLncJArZuY7oB/K8JAyu++0BCHXUAECsHBzHudVSRKBIS/aZIXMRnR8Um3x42yOQvCTc50xal7tUpQuKbUx8NFhy2o9IO4pCQPHOiSRdqNvN9OeuXwp0mPid0rOOp1PphOV9/Ct8hofCJ90edw97PIGHcO/LV97GhDouql1h9fKfrtO3EG2uezQ6eDj2iqQupYJKyYqT8S7EuVGs3E5FmYSQYE3SMWXdzBKdGY= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: fab83e48-9c41-4a09-ae7d-08db713414b9 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:30.4012 (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: wrIAaDkBOsrLg/SVClMFuoCnwt9u4k6OPBxrHNTkL6AL9SNscaPSH0CkWt/CVKAB8KXUlvQ8arEewpwiHjkng0XjaCQlHo0MZu2Tfwm/HyliDt/uEWLpsnngyrfmx5HS X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS0PR01MB5665 Message-ID-Hash: TN3EKDWBCLSLV3QQLYYPCUIEFX6XEU2F X-Message-ID-Hash: TN3EKDWBCLSLV3QQLYYPCUIEFX6XEU2F 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/meson/axg-card.c | 3 +-- sound/soc/meson/gx-card.c | 3 +-- sound/soc/meson/meson-card-utils.c | 16 +++++----------- sound/soc/meson/meson-card.h | 3 +-- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 74e7cf0ef8d5..f10c0c17863e 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -319,8 +319,7 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np, dai_link->cpus = cpu; dai_link->num_cpus = 1; - ret = meson_card_parse_dai(card, np, &dai_link->cpus->of_node, - &dai_link->cpus->dai_name); + ret = meson_card_parse_dai(card, np, dai_link->cpus); if (ret) return ret; diff --git a/sound/soc/meson/gx-card.c b/sound/soc/meson/gx-card.c index 58c411d3c489..a26b620fc177 100644 --- a/sound/soc/meson/gx-card.c +++ b/sound/soc/meson/gx-card.c @@ -90,8 +90,7 @@ static int gx_card_add_link(struct snd_soc_card *card, struct device_node *np, dai_link->cpus = cpu; dai_link->num_cpus = 1; - ret = meson_card_parse_dai(card, np, &dai_link->cpus->of_node, - &dai_link->cpus->dai_name); + ret = meson_card_parse_dai(card, np, dai_link->cpus); if (ret) return ret; diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c index ffc5111f9e3c..f7fd9c013e19 100644 --- a/sound/soc/meson/meson-card-utils.c +++ b/sound/soc/meson/meson-card-utils.c @@ -74,23 +74,18 @@ EXPORT_SYMBOL_GPL(meson_card_reallocate_links); int meson_card_parse_dai(struct snd_soc_card *card, struct device_node *node, - struct device_node **dai_of_node, - const char **dai_name) + struct snd_soc_dai_link_component *dlc) { - struct of_phandle_args args; int ret; - if (!dai_name || !dai_of_node || !node) + if (!dlc || !node) return -EINVAL; - ret = of_parse_phandle_with_args(node, "sound-dai", - "#sound-dai-cells", 0, &args); + ret = snd_soc_of_get_dlc(node, NULL, dlc, 0); if (ret) return dev_err_probe(card->dev, ret, "can't parse dai\n"); - *dai_of_node = args.np; - - return snd_soc_get_dai_name(&args, dai_name); + return ret; } EXPORT_SYMBOL_GPL(meson_card_parse_dai); @@ -160,8 +155,7 @@ int meson_card_set_be_link(struct snd_soc_card *card, link->num_codecs = num_codecs; for_each_child_of_node(node, np) { - ret = meson_card_parse_dai(card, np, &codec->of_node, - &codec->dai_name); + ret = meson_card_parse_dai(card, np, codec); if (ret) { of_node_put(np); return ret; diff --git a/sound/soc/meson/meson-card.h b/sound/soc/meson/meson-card.h index 74314071c80d..a5374324a189 100644 --- a/sound/soc/meson/meson-card.h +++ b/sound/soc/meson/meson-card.h @@ -39,8 +39,7 @@ int meson_card_reallocate_links(struct snd_soc_card *card, unsigned int num_links); int meson_card_parse_dai(struct snd_soc_card *card, struct device_node *node, - struct device_node **dai_of_node, - const char **dai_name); + struct snd_soc_dai_link_component *dlc); int meson_card_set_be_link(struct snd_soc_card *card, struct snd_soc_dai_link *link, struct device_node *node); From patchwork Tue Jun 20 02:14:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 694525 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 D902CEB64D9 for ; Tue, 20 Jun 2023 02:18:08 +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 9C0F8839; Tue, 20 Jun 2023 04:17:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9C0F8839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687227486; bh=XK0ti3Ek5Ev6dC94EQFoYuIiwkiHzvg+4xJFrWOlkp0=; 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=BlqjiIONJ0y+n8IW91/qsTg3dfjwmnq/yHeDw72CRO9Ckc7YY45ozBj10aEXf6Hen KbrPfHaLiTgxa7j2W1ZipQPRUbXNnT+Qvbimluf59dQwWAHnMIG55nfzJ+IXOnFKe8 C3kRg07rzkg0379KwbKk/nR2/sOVh8wHzTtsDEiA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2755FF805E6; Tue, 20 Jun 2023 04:14:58 +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 3E977F805DF; Tue, 20 Jun 2023 04:14:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2ED52F805C7; Tue, 20 Jun 2023 04:14:53 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20724.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::724]) (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 95BECF805C3 for ; Tue, 20 Jun 2023 04:14:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 95BECF805C3 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=GGVkV8mS ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lHOnTgvlnLPJQBqix5kpI3Zc2Ebrh+iQ1Q2SwXT+uskXe0NTYvoqCwh5MoFFW6mAQHh+nvA0lEzOTPFHxwFKlqPGJ+7qR3T3bvrx9yBixEpAgbO6IwWMWw2Q7VOgTPpUR48t7NM7yILVAzK5Dl7vZ8wblDLKaX+JRfW/M6AmNimX59xlrwTohZwdDZbxUE4/9luALmviEOCNlLkSWycdeJx1Q1SsL1Mccb/7KD/XsLVQkoFmw1K4Vh2pwiIjQAJ8X/SFbnXJHTNHSKMPw5OdglqMdjR49hwIKu58GBgUSjAwU5gxaHF+AK6Vc9rZkjwV/Yv8T+5+sMgSi5PGGOD5EA== 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=rn5pqB2VD84GHdbCVnkJVfXyoIxigbqfHBdEUUFGO4Q=; b=jZ5Uq/V02jptTfQIeeZiuzEQJ/bTWs8Qr2N6VBuH5d4CnGJYBdVZaZp40/GR3mEvolcCFfo3Wp7SPBLx/ehL/C8q6Ris+yoyuw/LEK3HIcHcnQ3aERNaH589K6/1Ixbk8wZKuEVRf82VPJ8/SJl4klTdHefuAXYFkTyTFWKdZhVvj9C1Awidh9taWsqaIKxR/ipyPpB2BQXpFtTx0VnUqd/FJyvIHcKXHW/wR90P6TH8cbebW6ISbHs6yWf0T5egsxFNRMLmQw0YpldDSUclRywLf0qpPWheyRD2RmxwdlYA0zzUEp9dJVtOHSfvCyW0DBU56QngIcO+DzsTyOaZsQ== 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=rn5pqB2VD84GHdbCVnkJVfXyoIxigbqfHBdEUUFGO4Q=; b=GGVkV8mS0BkAtiPjLn+lRWAY/zRRXJC9375XPk+2dLmNawuiUG7TDl5lUy9Drh9pol/B0Mt2vthgUeWmtqGvXnhUYqXJif8XLk4P7zO4jhApyCvmr8dx04/pGxlmDYyiU0IBHAHbQAcH3LzBDmfmaG+xX73RpDlD8tlkz/L6iX8= 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 TY3PR01MB10965.jpnprd01.prod.outlook.com (2603:1096:400:3ad::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:46 +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:46 +0000 Message-ID: <87h6r2dgmi.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 v3 8/9] ASoC: soc-core.c: 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:46 +0000 X-ClientProxiedBy: TYAPR01CA0037.jpnprd01.prod.outlook.com (2603:1096:404:28::25) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TY3PR01MB10965:EE_ X-MS-Office365-Filtering-Correlation-Id: 828081d3-03fd-43b9-2ebf-08db71341e4c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WDGFCDO36x34xMql+pSrtpCNRHmpX0dzVotnBGdZ8zYVOd6G3nP3nDpHsL/kS5dGM9+cN4rFZGMTrIUBCg+YxKIP7nLCOf9jaGljTYVa2AuKU/AhGQuKHaZtye0iaXTIpTtJmEJLb67grNL9angmqt88IUSql1yfCq4zXakkBx8rS6CWIviCmACGK1fIGl0T9jocLRhD9KeD2mbaLdIXxtBRimzGpbmFMl+jXzr3MNbbQDFm8HTK8MuIzVdo6g1JY8wN4xZomK3iCR1bwTBBgGwJhi/4RaqL8iNPYhZz/HWy26q9fbHoOYhSNY6CXsLEP1RN5hkcU62GZiuUZ8WsxK22WOWgHvxv/64O0DDOerjxnd2hIYuC0rqjRSkhzHOXK6NIK5cOz+suLQ1Or4T2CW4YSuY9wr4+EJN2Y2AB7TPvdmfJvnazdeh3OWIMy/YSmcjMsWleEMo3NzP72yXBMrK4UMXFU+E19xipQ4pSXtk9acdqVpmh2cH8KMDvM8pjGDX5FtYZma99vQSfxNJDSZIbWezCYL1+47oBRuJT+NODFak8+O7JCOFNKRpdC4zKKcDAQCm3KcsAs5JwwWE8N1INF0F6b08rwzmufSO8XzYjJVn9V6T/0zDZC5iZjIAz 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)(376002)(39860400002)(346002)(136003)(451199021)(83380400001)(2906002)(66946007)(66476007)(2616005)(86362001)(41300700001)(5660300002)(66556008)(316002)(4326008)(6512007)(6506007)(26005)(186003)(52116002)(8676002)(8936002)(36756003)(478600001)(6486002)(38350700002)(110136005)(38100700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ckV+/aJMAjlZLFpsmkmEvWgKrwVxrxGnsNPTezYxaZd66TPruNz7ubRfIE8vvIIhNyRtN9cLwvsiMW+gLgdbAVgClT8dQq06Kr44uyNkJ5PhWRv0Me2fgDbAbc6xAWe+Tlf+OCPOzE3QG05uAq3+C8Sw0PzgFlS2c3rUgp49lq1e3G/XOJ41yAnT4THs7W8UL+mlsTY6XU/stUlFnzuFmTWXAeuIdLfuDt4dmdMmdLr/teTaGz+fs5d1nZXRJDEpIJc1QNq54jR8iyI8VFd6FQrjcoe78c4sDkBk6S15v4UqQsjRZVSjaxswVlaHozlIq0zdpJR2UjSvrTn24+NKQbLp85NnjeuFhf3ajF7cfzFcd/zkMKpt27TNASF1ZgO5mnQMr4LtMCPE4qX6SXKHB9WII4F7KbWF6pEm3sQLjc5et12pJKzw1VK0QLAipUBwkx90oxPd3Hn2BxZe1Aa+5MXBS4+z5/i/gmvSBKKInibKqLS6/XQJeM96nRuVnuGQNia1dBr5YhRbn2QjaCDBFhi72QZB14hWOMBjCQ21QYo8l/0RHao4HvlOfmLg/IuvDZt+o6zXI3h8XL5qVyG7CA+hJdIS/vYvxrmZVeIGGvE2hPBYV56m4lJ0YvIf52ToBAKrfE8+3CG3nVG0TYR2p+ogm+2gXBmpi4VPAKIkBusZ6529X4R9zoL1Y+gJuUK3IBnMVviLxYN6v9E7hRdU/ucKCYiBNn+iN/zlex8surillkQZjcJuVBO2/bI1EvBznmD3DuAfHVb0lGb5Tmxyz+VKKFT8wyObtk+h7DGjBOaqQUv54TRkYKPoaEc/5SnEuRcTBW7kxzxDTB+YaKEVqlNpla8Xf55BqoW6FK7qbBhKn/DC9xm3/MdgnjAnUrPokisrTE++JYo2ExxLmI4pCmi9gUKXb4z0i0+uAUmoCz8CXSyauqBmqd+c6nRh6g2hNonUIS/dHSMMIJN1XwB4fSQ2x6RCS4KQXHR5QtQpoZIRp9lZ/ad1TExHIHuCmsuqrvAZN72Uud31lrWpRURIOEqV/SZ2g4Kfi3S6mXxAfrI+/kc44tpl7rOkurS5V9vCgeM4trjul2OYKDbVpDO6QPXsrSYoAZ2YhDanjHE6nRttmYyruOuIsFs4gytXd5Uz9/3R9h/niodzoZuge7SIY918ZvBRf2c7nnPMq2J5qmio8wVTAFCqOdFe378FOc+M21jseythN39PEivGEwkFaHG5Q8GMBNSD9+M379pL4WGFEyWehuor9wTl8lZJOB8fAyQ0VC/bN/OuHHmtXPE2F5BTGc3IFJZj/hRJPtne9PhvfEqMSiHKXAMiKh3Cfpt1hK8/5yVrLN9tCCM00sKvVAXvg6RNr3+k9df1DJwARE1Cn/XVq0RhFI4KGEXWA33Z6tCX1p3zAM35S1tsKyIQabSkE+G2O6X/2LfoDmxUkX8p5mRIN+X+NxyRrGAbyiiG7Zlue3qKbTTKhxlBDAv3acM8UaFAWeMx2WPs2WPUuQoCfpd0DBj7epWolqUfS3DXY3mF5wvWGW9NrBoSHGrgs3DG/HDk8BwqKbou82d8XmzKqudALKBhww15oG1sgQfWBJIBDWLTttjFxtzAPOw9jwDMnpQ7iIWnJx19HlzTYxQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 828081d3-03fd-43b9-2ebf-08db71341e4c 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:46.4262 (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: eIbc0UOXJR6f4mtDFLyjec4LnMlxCDGoCrxHCJmQjNhOFKa0dE3xpDN8aZ7pSsKttDyOSl3RlzvINJcpqgArc6UlLcd973rLw0w0X206Xlus0YINCbXyACwQ6LG8x4p8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB10965 Message-ID-Hash: CGVUXFYZ6S32RVIC26JI3FSHKOX6MND6 X-Message-ID-Hash: CGVUXFYZ6S32RVIC26JI3FSHKOX6MND6 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/soc-core.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 7b13b1b232ef..f06a20773a34 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3402,26 +3402,6 @@ static int __snd_soc_of_get_dai_link_component_alloc( return 0; } -static int __snd_soc_of_get_dai_link_component_parse( - struct device_node *of_node, - struct snd_soc_dai_link_component *component, int index) -{ - struct of_phandle_args args; - int ret; - - ret = of_parse_phandle_with_args(of_node, "sound-dai", "#sound-dai-cells", - index, &args); - if (ret) - return ret; - - ret = snd_soc_get_dai_name(&args, &component->dai_name); - if (ret < 0) - return ret; - - component->of_node = args.np; - return 0; -} - /* * snd_soc_of_put_dai_link_codecs - Dereference device nodes in the codecs array * @dai_link: DAI link @@ -3466,7 +3446,7 @@ int snd_soc_of_get_dai_link_codecs(struct device *dev, /* Parse the list */ for_each_link_codecs(dai_link, index, component) { - ret = __snd_soc_of_get_dai_link_component_parse(of_node, component, index); + ret = snd_soc_of_get_dlc(of_node, NULL, component, index); if (ret) goto err; } @@ -3521,7 +3501,7 @@ int snd_soc_of_get_dai_link_cpus(struct device *dev, /* Parse the list */ for_each_link_cpus(dai_link, index, component) { - ret = __snd_soc_of_get_dai_link_component_parse(of_node, component, index); + ret = snd_soc_of_get_dlc(of_node, NULL, component, index); if (ret) goto err; }