From patchwork Tue Jun 20 00:04:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 694534 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 ADD22EB64D9 for ; Tue, 20 Jun 2023 00:05:50 +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 D713384C; Tue, 20 Jun 2023 02:04:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D713384C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687219547; bh=WRfM+EaUAJ/GF0wh5yn9rMJh3mLALDw2vTTZLQ9MrqY=; 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=UT15ZdRj5Ac6XV3ALN8Ho5G+XTlx5RqjizKCr2Dl16hCoDNrXqQA5tYTyBnS5NyRo Dpg9i31iqm78LgUlbYnkyE3tfIeKSReKH+JeBdXHrOixHPLHxtLGtbKS5UX+0mZ2jn GooOg4JOdt3Kig01/7Rc3orsZ+AgRdsFGfdZpVEU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6688CF80535; Tue, 20 Jun 2023 02:04:26 +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 CC96CF80535; Tue, 20 Jun 2023 02:04:25 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 87FF2F80549; Tue, 20 Jun 2023 02:04:21 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20705.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::705]) (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 6FCA4F80535 for ; Tue, 20 Jun 2023 02:04:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6FCA4F80535 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=NwlqtrTB ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FXdHJni5K3rXh/6S65uZRQ/eWdNWjgtQU5GlOR9l3oQXkJ8LeLtfQmI3OrZWTlO3ic7m4uJiSmC6KL8+j/7GQo2csT05gDiwI9UlOlMNcnzk8KL+Ry0n1aFg75hzqnLQfamjpmSpA9fa9akl9+gm1ewGbFa1/m7QCZHycpzXnT0LkIEqk37SzY4fpo6oIUMDem4I3K1LnjOcxNExD3Gv6cGgoFcFUgIDPEFSamLHO0CiNzNZw1oEa14QruJ3Rmb2Ua6EyZYEaTejDvGgn1ReJPMP97UgrDdP2dRnj5/tCez6vn5Sy23kbYm3SnPOfUnPpl4YpN8lhC+wYWMDe5zSkw== 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=Yj2ECRFYujO/ykjsLUAf4b2eXmEpGyJUMxJ5FDpRgDA=; b=KAVvV5w793UcHwFOBrflcBUm0fagvtHTKM3hAtrwwcTdml1xxmIrABFqC9xsSLAO7ehkDhSwMvhFJJuZuxyx+v+WCC7hIMSCoKqa37vtRqj16YNME+DQg2HPJ3lR567CQ8mpaA3OboX5S95iAnFvKq9K/QX2xqToCObwPM3+c3Gm6PuvoHtgLWc7SWF9icEzpdM8aYRvANpDwR6/7wV0J8aJE06FUlgSZXS9UFg2MpLiRi94ozOgwjXQctsezMB3kII4cPUA2WXP35u28CbjOEujgvSuNPQxp0aTAkrjDxuVONqt97YkOBXSnyx8dwZgHZTkM0C0wJ2YdwuJceuX3A== 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=Yj2ECRFYujO/ykjsLUAf4b2eXmEpGyJUMxJ5FDpRgDA=; b=NwlqtrTBk2gJKC7bG5eLnIm210yh9lNI3oHRdGm5rmDJMScdVe86WTq0BNOCpt+oBwJN5ylgVICi8aF6pPKkC+k73z9wfkCxj/vWU7TkK6tFYFxNc4iGw8kAne547IKq3H/aCb/V/CGZYM5SpPtfa4JTsPtsr1FpkidzdviyCTI= 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 TYAPR01MB6107.jpnprd01.prod.outlook.com (2603:1096:402:32::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.36; Tue, 20 Jun 2023 00:04:06 +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 00:04:06 +0000 Message-ID: <87bkhbdmoa.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 v2 1/9] ASoC: soc-core.c: add snd_soc_{of_}get_dlc() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87cz1rdmp0.wl-kuninori.morimoto.gx@renesas.com> References: <87cz1rdmp0.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 20 Jun 2023 00:04:05 +0000 X-ClientProxiedBy: TYWP286CA0031.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:262::19) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYAPR01MB6107:EE_ X-MS-Office365-Filtering-Correlation-Id: afefdb49-6547-488d-42a3-08db7121dcf4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DTdyjNRNsunk4Uejhu8L4rOcEKDPjM0m35aC5dhg5I083gcS+hyWwXU//4YBPkeYpybpxPhyT6J3hllH1qzdBSkkhtQEPQpgAEn/uA3TNlU0BTUgUUCL6UpD5zWaCjhuV8q/j2zInGrJsDVoHUKium9Sm1zDsnHMMXVjmReJB3X+quiE43UgC9APNJSCWIruWZOca4pqhJv6/uXrjllrqZGNTTJFocbPKfaAmvHAGN1znRziyyQnEN+f18jxG39RPP4naMsG5ab1n/V3OUplMrX6/c8Q1Fx/4ZsnE3zfjqe4amhXwyDjcr0MbYIdUqPLzBGrAswaYJp7ysz6pLi0r3VW3sHZy7rcJ2QDWDAdtRiXwzIQPJFZn1l3g1TP13w2EGTyVvHOv9k6vcBGDg0r6u+p7c66wlBhSiJbUBw8eYA2bw4dYpCGKFKvQRYu75TUxZHB+PsNN4RI0a1Aup1GehfnUOI7BT9KsQQJwAFVCmB8m68qAV+7n4ROs1/P3Xi/fX+PkpvRZr90FchpF0gstNFANQrFQpY9KQQ0hAC0cmwmp7XYYbPCxOU6O1GgeWUaZPtnRTECXubMEo3nIEVtmvH1rkIdloycs+/ZKB8GWO1Afvey4nIKTQK4j3AJjGdO 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)(39860400002)(136003)(376002)(346002)(451199021)(86362001)(41300700001)(8676002)(8936002)(5660300002)(66556008)(66476007)(66946007)(316002)(2616005)(38100700002)(38350700002)(83380400001)(36756003)(186003)(26005)(6512007)(6486002)(6506007)(478600001)(4326008)(110136005)(2906002)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: P3NJXZtRRhPGjv8ZGePawNAfOzYM8R2o0cWlMeGKJMiVJvpfGa57JM+viwzkZCJS99frDpwWh+EG0WFwsz+xbgeLzLE+aTCvjDJ0zVZXu3YzU93VKL7DOOdjhWNwxDEMOCt6tTASg/atW2iGv01Kq23xoeZJH0mSStycjgpY3VlNUJzAr45dG/2GYPZhmC8XmACPI7REDI8GDGZOGjtRU4dU+MIpEsEHE4N1Y1VYfjLefG0ZgEcOnaEra9pgQNt7His0ICa5o3uwzknhg1dL50a1ngDiopcDJMJ3egR6IRlQ+SRWwjefJyqAvj/UuuChWRJuB1Vy2c+/DsyeO9yvBMLD7UGQmJCfWuCICSelF0FVngcbvL1BrN+1l1NJr4esKun/Pp4kjYDsQy6XPN85yhHSiJKVKAf17RVDEHCqjrZ5/pQZDl9fJy7/DFN9AwlrqkjJC2MXd+gJdfFYt6cbLPitHIgSQqbQkyc9ncuJp8+g0SDEiRHQjPMlCBimk5OtPVq5socpUNVZqTuGHIJJFTPF5Ju0JJabBZqwzNzV2pIfzLhGNTOy9LMQg0YL6UpTmugwn1OoAgW/AVdTDHEhzVsxgtgKYvNC3mQXsUURZ4nmdqMGgiIGk5YNWfiCqAF5w3ZHtCv/O70TQM7UYqkDYQxJ5uwkzzxc3lsq1i9XAotRrGRJ7mhdvPQeRVbJ3sBfZ1sPLtt34NwFfMdlpDDFPTs9BBV9AGJwW4zaUuDduYQc4CgxV/nJrcYEHEyMXn4450mNqTMwtzQsSuHhHSzsq+CP+VMWXDQ+m4DuvWcvfCJwMj6NvnrGEmwTs4oNyoaZ4hJv/t83NW5HBGrP+Kw+9kd8CHrykICDPx4NGWa5//9NwOYgBahKBoOyGacIQh1+NZ65vrwdPTa2HeBkLkcLRNg+gTau6QcsAMeckrOz7ex1DvbKXD2HzPGXK7cIoVE2f9g5oXm0L3wjd2iInOfBTKzw26qNGSQL2G7oi0nUjVWeCFTIqdR/HbJaIaZwZhDI2cUDgXnrMxjbbjAj7ESTTEnXEzWhMv0EPMkuE16x3rDQqPj9AmeuUlergLM6yR1gOOxjXaFPDX/0RQOO4DW+ypkswtNekM/saeUUz5nOrTiW/9U18BsT54d146diqJGx1Rd8OwZIwVYLQrejW7M8+zyTzPr9Ux70iwIDXtguk4/0WoO4LwdBO8H5zm+BDBnONapKfu1rWY8zsVMMZrpQBuM/Sd4fsdXLchWnTEno6Kzhk9ypUZsL/iVw2YVmfR2kvibYlHCw222jV5ETGWpjsNstQ2LaD5O8zfvpVd6SWOpr6iq/baWvtLz96UXjnu+xP72iPSfLivjs9ESrzizutwkjGoLdiDOGFDcFrV8MLf8fKep5UmiYVO7Y5O7U/4GT9sjk/eLtqncSGPw28MdcYJ9Zd855goLJ3/r7rGX338s5zb1gD3vc59xuP2ZHcnjBocVDOf4SJw+9Ymiu8RdhdiilyACYhyEfKNtq5c29GypG+fb5puzxRd1gRkfdzaoy8Fo8HWnuJRvRgR1RMX7ta9SqKVy585Jt9anM746LFjyH/YHYnkHj6dZEq2FJ2y6iSKPg4XaRBi72+0wxjC4sXhPAbZzfdNcho9I2vUvPEVI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: afefdb49-6547-488d-42a3-08db7121dcf4 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 00:04:06.5590 (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: aDEpQm94tjN4wfc2+lU/fO3z5H9jDxDI2bpw8T0O0L/4C7M8hnLyzQVRYLrpmf11GJx+/Hws4jezJPV5sv2orWZUZMemYegouyM8QRioLSO+PntShKDIpVmB6HhTrNf6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB6107 Message-ID-Hash: YKUMU4ASEX7742TDDGJAUR5ZSSHZMMLA X-Message-ID-Hash: YKUMU4ASEX7742TDDGJAUR5ZSSHZMMLA 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 soc-core.c has snd_soc_{of_}get_dai_name() to get DAI name for dlc (snd_soc_dai_link_component). It gets .dai_name, but we need .of_node too. Therefor user need to arrange. It will be more useful if it gets both .dai_name and .of_node. This patch adds snd_soc_{of_}get_dlc() for it, and existing functions uses it. Signed-off-by: Kuninori Morimoto --- include/sound/soc.h | 6 +++++ sound/soc/soc-core.c | 53 +++++++++++++++++++++++++++++++++----------- 2 files changed, 46 insertions(+), 13 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index a7ae8b26737e..943f0a1b2d27 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1309,6 +1309,12 @@ unsigned int snd_soc_daifmt_parse_clock_provider_raw(struct device_node *np, snd_soc_daifmt_parse_clock_provider_as_bitmap(np, prefix)) int snd_soc_get_stream_cpu(struct snd_soc_dai_link *dai_link, int stream); +int snd_soc_get_dlc(const struct of_phandle_args *args, + struct snd_soc_dai_link_component *dlc); +int snd_soc_of_get_dlc(struct device_node *of_node, + struct of_phandle_args *args, + struct snd_soc_dai_link_component *dlc, + int index); 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); diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index e8308926bd98..8dba5bb26ffe 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3257,8 +3257,7 @@ int snd_soc_get_dai_id(struct device_node *ep) } EXPORT_SYMBOL_GPL(snd_soc_get_dai_id); -int snd_soc_get_dai_name(const struct of_phandle_args *args, - const char **dai_name) +int snd_soc_get_dlc(const struct of_phandle_args *args, struct snd_soc_dai_link_component *dlc) { struct snd_soc_component *pos; int ret = -EPROBE_DEFER; @@ -3270,7 +3269,7 @@ int snd_soc_get_dai_name(const struct of_phandle_args *args, if (component_of_node != args->np || !pos->num_dai) continue; - ret = snd_soc_component_of_xlate_dai_name(pos, args, dai_name); + ret = snd_soc_component_of_xlate_dai_name(pos, args, &dlc->dai_name); if (ret == -ENOTSUPP) { struct snd_soc_dai *dai; int id = -1; @@ -3301,9 +3300,10 @@ int snd_soc_get_dai_name(const struct of_phandle_args *args, id--; } - *dai_name = dai->driver->name; - if (!*dai_name) - *dai_name = pos->name; + dlc->of_node = args->np; + dlc->dai_name = dai->driver->name; + if (!dlc->dai_name) + dlc->dai_name = pos->name; } else if (ret) { /* * if another error than ENOTSUPP is returned go on and @@ -3319,22 +3319,49 @@ int snd_soc_get_dai_name(const struct of_phandle_args *args, mutex_unlock(&client_mutex); return ret; } -EXPORT_SYMBOL_GPL(snd_soc_get_dai_name); +EXPORT_SYMBOL_GPL(snd_soc_get_dlc); -int snd_soc_of_get_dai_name(struct device_node *of_node, - const char **dai_name) +int snd_soc_of_get_dlc(struct device_node *of_node, + struct of_phandle_args *args, + struct snd_soc_dai_link_component *dlc, + int index) { - struct of_phandle_args args; + struct of_phandle_args __args; int ret; + if (!args) + args = &__args; + ret = of_parse_phandle_with_args(of_node, "sound-dai", - "#sound-dai-cells", 0, &args); + "#sound-dai-cells", index, args); if (ret) return ret; - ret = snd_soc_get_dai_name(&args, dai_name); + return snd_soc_get_dlc(args, dlc); +} +EXPORT_SYMBOL_GPL(snd_soc_of_get_dlc); + +int snd_soc_get_dai_name(const struct of_phandle_args *args, + const char **dai_name) +{ + struct snd_soc_dai_link_component dlc; + int ret = snd_soc_get_dlc(args, &dlc); - of_node_put(args.np); + if (ret == 0) + *dai_name = dlc.dai_name; + + return ret; +} +EXPORT_SYMBOL_GPL(snd_soc_get_dai_name); + +int snd_soc_of_get_dai_name(struct device_node *of_node, + const char **dai_name) +{ + struct snd_soc_dai_link_component dlc; + int ret = snd_soc_of_get_dlc(of_node, NULL, &dlc, 0); + + if (ret == 0) + *dai_name = dlc.dai_name; return ret; } From patchwork Tue Jun 20 00:04:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 694533 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 18615EB64D9 for ; Tue, 20 Jun 2023 00:06:20 +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 2D534857; Tue, 20 Jun 2023 02:05:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2D534857 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687219577; 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=X9MWnXVI6Zgkksl161CUXLvSHwEtOaoNBWjwFzsiBWFUd80Szr7K6IiA9zxtgS48b r2lSTW6GivOdxV9LcOdQdBLX6u24K5FjOJgcRwPyg8lpGSlNkM4r/oGjzmkqkGyc6l 6uzwl40UB3QAXwHcqy5vcwKSsaEWR8PAMMIZnCT0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9836BF8058C; Tue, 20 Jun 2023 02:04:46 +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 5270DF8057D; Tue, 20 Jun 2023 02:04:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9BD7DF8057D; Tue, 20 Jun 2023 02:04:42 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20702.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::702]) (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 AF0A4F80124 for ; Tue, 20 Jun 2023 02:04:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AF0A4F80124 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=khKTBZRN ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E6h3s2lB+qU03mEAiRC5vXn1MD3szZ9QJ2wURkd8RYrHUPaSYpDLncogVN77norQr74vDVB7SkwIEC2QD+p0mnE/jLnIXR9WFFCGXp3l9r0qWX7On2BItzmiLIwBmEPKsSfR9Xw4+s/lZGt4BAi2WNDqEQhslVV4CsHldBs/7kObhnrCIFi2J/Q1bNWZG3pyrrhVkxqDxlY9+OxBJCZt2si+X2UqYQtmxTP5+NbqTF1VMx4262TaMfo8Al9akwS9n+n8m7oph2lpQMwsAtNoAJXhAiTG5oB0wSDub6nhDnsryh8EUHgXFHbJUEcI0Hznfc5dM4aB1iklLktXz0yWww== 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=LFHk1HpykbUtzNifphTj3oE0rzDNVfuszWJOVoeHSinsgvPlgu8FuHs2WS9H4H/a6MG8VDALN6TAAkwInDP2mgCU91z4iiblrDFsrpiaZ0256uW58TSR8Hpz3EQxliLF2QLWAf5XjDbsuHyKaqmPO3e6Cql0PsBV3QKg8WQf/Pq5GzXiKDz9E1yP/Iktp0A1R6VdbNtaLIHXeTXUgkXoGLANG0XZF4kCcnMFVDQ+Dzu0GaIz8pUhMbJSr6JkqPg/zpRjvs40CPiCNyF/1/9ZOAs/LzX+4YT8hVSgg8cruTXpZJZGuB8vsP8HTuOzZfqMPnrlV/JbOSIFGk4zcBDMeg== 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=khKTBZRNeAS13rdakedvEKuiSz7Tv+kmC1TcHgmdoGE94Azcg4dCdPZRttXHTlZheel3KOYKP7mBM07tZsaGG7HbdfoJxuUWVih4SO36+XwRep9N+V0H8zCOJ7WkLGZjzF15sRwdZgo7UTNtyedUr/yx9DHLTxE0WYw0fS56vcs= 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 TYWPR01MB10425.jpnprd01.prod.outlook.com (2603:1096:400:24d::8) 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 00:04:33 +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 00:04:33 +0000 Message-ID: <878rcfdmnj.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 v2 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: <87cz1rdmp0.wl-kuninori.morimoto.gx@renesas.com> References: <87cz1rdmp0.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 20 Jun 2023 00:04:32 +0000 X-ClientProxiedBy: TY2PR0101CA0018.apcprd01.prod.exchangelabs.com (2603:1096:404:92::30) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB10425:EE_ X-MS-Office365-Filtering-Correlation-Id: 2fe5c413-0887-4efc-c2ee-08db7121ed2c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nq0KBICqRwUwqQhIBGLxwSan2GWvVQnnvDWRioGhwvxtxZCDvFgdWSlJngHrHHeiVHLSPDI6X7K/RMRxuBRcjm0C1cDujJs79SWYojvVys8OtV12xsLkRI0oi2asayO9tNKWrPUh2Le6MTNoCFHMYmmVt9oVjVEXbaLUF3KvlFo42iAJSrC755IjRoyeXsenepvvfP9dfoL0J/TKvD2OKVcEFrTcPun5blD6s6u6t8tQWpAFtejGCou3y4VGrdxly+oqNkSzkqwoXzwW4bGreo0v7mfsnccAv5lAsdPhpmhemVfBC4l4dan2auMga7MRlVstCG1rmr7AwwDVr4EOId76pWlSXePUbRIx7TV/54Q3lx7ZwrpZonpI23xufHFqTtzPUF/vHy9psSwj6y8u5qC+sR/DX8Q61BjxwdtxgcO8o2vacShRVg+MOdbd9e0+QSxRxaPcG+PRVsiWu8VqQbjeTPFgPM1qJ9gdR8h6P+oY3U49IjXTRPrsyqtzedAw7C9k1taWD2mVJ+U6b001ssrgFj/GB8FMpsUMdM2CUq4+4W1IuEIWcLH6OkVAaT5cQ8rt8j8cSe/zDKAMsG8aoDhpWGuUCbhK6IERUbTry0rzXWtr5QfCU+0OGwPbuvwU 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)(346002)(376002)(396003)(136003)(366004)(451199021)(8676002)(8936002)(38350700002)(38100700002)(5660300002)(26005)(6506007)(6512007)(186003)(6486002)(52116002)(86362001)(2616005)(83380400001)(478600001)(54906003)(110136005)(316002)(41300700001)(36756003)(4326008)(66476007)(66556008)(66946007)(2906002)(7416002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Y/DhKFXl2NEFUXZ7ohJmdef4hMRM7hX0Wt1vZSlKDdwFS+qwIVcwqL0u6Mf9EgKI/JuttSMziqKtQnXcDVoIDR34TgiH0xa9/Yw3fGLmNRK7lMSvTjzObjgqrD8g9ouH78WDttZWiMXTRv6DXvffYdRz9j2LS0gylcCRrmAuecpLwxvcyq4bLsLnoxgrPdH0vqmHAB2YJobvbZEujjCCiIDn+wzzuDvtB7IW1HvPBKbSJOswLYFuNpunIXo9I3p1XNGYuoIO16P6tVCdLK7oKNLzFiRZa7fsjEvRCSmdH0ZZ3NaHAUZ/bCrUcNTMTDB9i8xNyDr8iW6M32rjpo5x/JDdUO6oxPSaTlZY5p+H2OIRN8UX2cbPom0zY5DAeY1q2IKv6TFxcH0twZS1TUI+MMCZnxtg0YOf1lgjegTgCKD+RrNEG9gH3lpyqJk4EhBKWCprrr3vK8ee6x+LRHLlHijDCfW2gJfJ2N/BIoEhue1v5zRpeB6ZCvIzTctjLVvr1jKBbuOdcs1i3dXEp53aXo18jgaYi9DOyLLzxp2ryojmxcovEywG7fTM1F1sE+WKXEEIgeUPiaHB4jMLzqQjBWw6OCCV/YjxtMHyqD5UFWjT+2G+WD6W3mkJPuHn7PokMwb1k2ITaMFB0+vI77P7tbF48AyZpZVC/A12BJgE3cbleHI1Ta3622mTGFeSgqk3ongP6TwjVNXy79SpXRyMSacoILUomnyjryNtMqyVRt9zzv3x9yeyQyJUDN0ldbiioTogGyq3eNIhG3eaNg/n8lsjD9qANu/DRxziONowlkBpvpkmKx83w1aZzP1vtWBK4tLA0V4YyO+HtzCK8+kdpYmo0KsxpUw6U0rMXSrS+lfVkCpYZkqsOfLXl3MzJMjdhSGRh5DLrlwexUqE1CilcvtmvSC27upr1E2gCbAW+YfRlsKJ/D3V43HMbiTWCr4pO+Ux/OpNG9ITBpEyUiAd+95+qsPKicsGZIeOqts/VS/l8o611SsHuUS+YF+cUsld1HrytJgpnElU5Rm55FTCa63cgOfG3G1YOy0b/d7en+gTw+HUZQ1XdblcJ+fGUOj4jh3fwGPrk/ums0uyvfmqr9IFewWdDFMq0slp88Fl6hzSAkc69r9c0zOFFGGWAbvBKG/Z3MITPRsASU+JHPrthspQmRHx7UXbh0izdq54GFwzbwxMpUYhfRtwUFFBGv1QXRIiqV8ae/q91KqP+o+LeyTn9pWe7n5DPwaoO9k5A+9f2rl7GL6r9rGa2c4PS+R3ERlzL/MV0h3DIBjzGjF8NYt9PSNRMlzxVaLLSLvorDWxukIr8uXbMOezHuUIL9ZySF3Aa+cUZw1LVkacyjjrZ24Ombhe7rO1M3eq4auyRWIN6Ug5P0oVrxQgmU1349BEezwyVVM/w0uRjLPnzUuxGdaMSWfKNcFWnr9VYQxVJwKX7mDFuTTrMyBWTSgheeDyJUPaSs724uC5sXlajJV9PlV4Wr1AKssUllM7zL/J6sI8fCd3e7vlEXj+KW3wAjRv/PNLh8+SMD4ISmvQpYhlyzojy64Ry/tBAEFuRQdJ6xPmgxICl54V28N2NsHWy65dcd9je1W60lrgG3pjSUTTkqTrdrceU9BX2CpvVhvbdqU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2fe5c413-0887-4efc-c2ee-08db7121ed2c X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 00:04:33.7900 (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: ZkFN0b/SZjbTsb89qr+XOE6vziXNZfWWauqjiQXujc8xcmAurj0GBLR8p2emx+xEqBEB7VvSD/zwhIUyB6vVEO7cFNpibo4xX1egxYYFtNzgjA1dAgb0iuJ5z7DJPNjT X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10425 Message-ID-Hash: HHV3QJ5742FVP3NKKFDZEGGRT37BSLNL X-Message-ID-Hash: HHV3QJ5742FVP3NKKFDZEGGRT37BSLNL 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 00:04:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 694532 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 16B8CEB64DA for ; Tue, 20 Jun 2023 00:06:45 +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 346B3BC0; Tue, 20 Jun 2023 02:05:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 346B3BC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687219603; 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=be+nD4Fqm8JxJwMOJmVwGneKGEcQAFpoAOMrpLhb9avYO21BFFkPF5yzhrtWon701 JcCxKA99sTS89k3dLBvDmH+4oY30w/ZwompEannyZsN9L6l+vnLpYRq4fq5baywOpz 2T6tXjMtfpVcxyqbKGAJ+qO/olSsM4aatYo9Ig/c= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2E29FF80563; Tue, 20 Jun 2023 02:05:15 +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 BFC46F80558; Tue, 20 Jun 2023 02:05:14 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1C84AF80553; Tue, 20 Jun 2023 02:05:11 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20730.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::730]) (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 C5682F80558 for ; Tue, 20 Jun 2023 02:05:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C5682F80558 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=Teid/Rev ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aShIEUzmHv9spgJHQVB9+kO7GYLwOww50Bn7qzhrL8R3Ov0xvpRSBzHnP5xGFqvgg10cZpOxbOq73eqKOwjdme5IFYRxLpsd2v3jy4JgnR72OEb9m8oaPYVHZN/7Be9xIUu+BmrWA7m9vp+3cZXvRwFNvezuLhZ+QgdL/I06S9WTBHIJ9FTADzSvWcldzOTkohv6ZBMXw15ijxCZMOwDAptt37eHYoy9QO5ZIGnnd+7wQvY3M+pZdEbuG/IJLgcoS8PS8OvQxHks9EkcVKtIgORbC5ie5iSxKryD9Wvi/MHNKXMJ2bi/Mz9iywRfToJF9hDuagsHITaxoF+jWGYNTw== 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=XLh5BcEoEWW1iNUc9Sd0bm0YTb+QDCPKgEDKcdOjJQXLNFzBQ+HtoayolQdsAlHGt/3yk+4LTf1ROTxBv0EiAEATcTqqndhOxVuY/WxxaDzoQ5sQ2cKAC6czdtHLLoZ0gczA9/aGEJU9kAqYsUUov4GqNIR597fpAdoUtSzupQznjVrBT2Z4b7utE3IIm1ulLSDFu9UMtTKN9Iekae48AenUYZLP+JYIRsOtUARBFPgPpggjr6cIdFhiVmLLt85Rql7VRGaorP3x6Urz8ydve/AVmspyf+nlLR9l1/+VkVmM84xGMMwgaqbsI+PM9FaaCc62p0R5E97++we9ofy1Tw== 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=Teid/RevZSm8ik5uXXYv6m+d0ItImEohXs3nDhUVDWoWieHQVzhm06nPfmQH1eytHA/zYDXUJ5Hey1LS3EsQbflz8xNjbPAeqEEzKAgJpSU48eg/KJPUH8hCoiUSGPamK2s+fcRq2yUbfIe3etBNQgBFKtVoQdm+HBvZ90vUF6U= 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 TYWPR01MB10425.jpnprd01.prod.outlook.com (2603:1096:400:24d::8) 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 00:04:58 +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 00:04:57 +0000 Message-ID: <875y7jdmmw.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 v2 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: <87cz1rdmp0.wl-kuninori.morimoto.gx@renesas.com> References: <87cz1rdmp0.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 20 Jun 2023 00:04:56 +0000 X-ClientProxiedBy: TYAPR01CA0033.jpnprd01.prod.outlook.com (2603:1096:404:28::21) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB10425:EE_ X-MS-Office365-Filtering-Correlation-Id: 97a46135-c948-427f-a065-08db7121fb1f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KNRIVkF/o2SSfxeybcxON2qlkKdqHqOwATDXZTS0sf33+8RGAnT5ssaiMZhEEVkT2h9qbABvOdAlNTFRiWwUFBW0iKp0y6io+cfimCOgB8p8ASJvmneJ7E7yhg9dJFHzKPM5UvWsY3JhUJNNhazPMLNiRsn9kbVKdy3DY6cNSSi88lx1vW+4W/vEsVggkXUFBG6KUhnPKzMBbd3m/U91njTfR1P+++n0bRRWV/4ifuiJTwxpBnckV1uBauiaMJJjZ203VZuHPZVw2Rcrr+VQnfcRZNfCxvdn3zNvPrt7fz0W2drNX+y4YkH7xi80DrM23XAct09ddzr0NhkgFisAhGOaHpo04expJUaDBBWyTWwoa3KPFAtd5aJVtjIwVlu1Lj7wrK0RNi3OZU0E5acm0jiE5ngxbOssE1PLwDykrrbroZ6R/Qfe7ty/wye8w7ur1kRg8hAmx5EwNMDWub0naq9kaSbM4AJSD9zlqapoXRViIw5YrXh1pX2mc8WNSk9wNuxHLdd6PTirhouFqDDygHWJbvluctwQA3lYI0nWO40xqWUtcvj/cV8NuOhcUCErCQx28KgoSk360v3LVts+HsePDfWpfClOAxHNI7UTCxS7FXk5uhcj5q5hAGc5Ciik 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)(346002)(376002)(396003)(136003)(366004)(451199021)(8676002)(8936002)(38350700002)(38100700002)(5660300002)(26005)(6506007)(6512007)(186003)(6486002)(52116002)(86362001)(2616005)(83380400001)(478600001)(110136005)(316002)(41300700001)(36756003)(4326008)(66476007)(66556008)(66946007)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: K4kq70Y/QuNR5mgqWRqIRSE41ate2zNB5MV2Jgj4k+TyFn0TlrHYSJKs9B3Gv9VVgDL3ctZm1pv+sl5BnJi10c+tNJOf0lS3Imc2SzpdewFEriaiU894sezw0fCzX34sk6iDHBoNf5IwQ7o0PDSew6jSB9dD++VFyHUNWa7NtaBz18PZyS4YUxpyXrBLsSwVnfhouEZQ5dG97H/i2SfnD0ZRgOI8OsFs7Hn0Tdyc2SWPfmnQRhtpS1vVnpwApWezqqlgXCque1Hhvn3c22BnxGlVAfJ2jQI0vdSvdq3EHhlZnIQ589wq4QS1sfde4ccz5Cx3P9hIawsH89nQGI4BEip1mIXlHJrlc3KseaGLe4/jxP/alPFDhJBWxncjMA3ZTvgqVyhqMeEJJ0BL+ZmsK3kPSTgz9SRwszfRVEFOtMMcf7YpOIOhu5r/awiEAT52WUg1B1lgz9n53IgvfCOPRxp/M5ETSDACz+hBd6BNmHUzXbbNWBtSKAXUUYIDMEN5FnKP9J/ReMtHO5c82ZbAtHZDAmNpL88FcraOROJqlekzMKVrmomk+c5zNF0m9S01T3lKhJRauu1WWg5i4duBB73ziTNfsDd7tLwW6GBrKiAjS/upnhnPheH3TdmOjug8Be9Lk5iISilVrRA+M3ogcFXFar98otYe9IzfE34vz75HbvgRMjKeZ0YHwl/8NkB3rlolHUiJl2jP7c6I7dRz9og3Z+DioC9PL6uS/vBOgPtF6aa9SQxDaAidz9oqAhs5xSeG2OY8awBMF+7xrBxh9OoY/pr0DP0330AWiPuObbpSvNvRLplPsc8WLP9/Gy9A8JsxTTIVXrHldA/E06rKCTtJmlBcHWTBjBa6oC+iZjT04BlC6YzzrBPEFaCyh4uJ8/RVeW57yQ6rx36xPCTpQYupR5LHWzx7X5wO7o6Dbzt4FLglY43oFWo+kp6hLhCiJAmvVYAZili4eAaC1zuXuFXqwGGVC3WATtWU68UlG3Ee+lSetH4aXDe8EnfrwobWes9uK16olT5Lr9+dMO1HLmz8lq1j+5skUNF7X3CxkQAON/HPm/pA0yq7lKd0j7uqkAAQKSAQuaJFSKrorzPzJLvcPj5ahqQUQKi3rTwIeqysbAV6T9Sw1BQaOqmntbCQUNrjZuJKUEi8FlgYDM4xupDIJKy52mO3lgzpe7J3NFs0GfKYy3s+SMl6XGEwSzuxboT0xHyd7ykAACatoh2kxfMi48KAnYy8K/wyVWRIjEs2agXYFWN6fUqpqyWKTA8BqMKaQqQJGKVRyrJWYawU7akcDWHcHkKKfMWL4ViWjo5bQLr3M3MjwquFZBeVKrp7iQpsp6pBRsT0LcJ1yxFwalcYmsL+xDVSWjDFsJz1c4+p1pG1zmnWACvJdl7J6Y2ibKYGXS2NEyimS9JUl5JW4e3YIMr4XVflvbR2y31d6CAS0+MQ4OiY2/SAdocK8olakWWCTRBOa8x2YoUh+e3IGjOPIQSPVPmX90IFdU+7GQUdm1b7jMd8sNfzO3ko3PD7f8Dc2mYVF4ro1ReP1mrBgiweL0jrPiZqfgkIhRwiXevtIQlFSePIrgV4o/qjvir+OZaquIiKMcvN79SPy+APP6tqEFQ5tPG+vFJ62bWl8qs= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97a46135-c948-427f-a065-08db7121fb1f X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 00:04:57.9273 (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: cakHX/v8q6DNF+gQhu9SlC9R66vvZZhuIBwXAX5QfR3QRwpXaXhG3NDwtRnKPoz+TJeeCcgR/fnXk9HemEF+pIO6pxRsRqj3swwLaXyReJT6VCgkdzZx9iHxoFFZcLQP X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10425 Message-ID-Hash: YG3TDLQXD72G3DKJZO6WQDKNF23APP3M X-Message-ID-Hash: YG3TDLQXD72G3DKJZO6WQDKNF23APP3M 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 00:05: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: 694531 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 7B585EB64DA for ; Tue, 20 Jun 2023 00:07:26 +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 62EBF84A; Tue, 20 Jun 2023 02:06:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 62EBF84A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687219644; bh=BLqmRJUn9F1nBCyX2JY7SsN8RIv1UIo3YK91Y/UcbXE=; 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=TNxmTRq4rEfMtiPmgzYrtfi1mKp181L//JKonBYZoJBeZabwGF97GzlpJIrxuaagK EE0Edl7S9nND3plWPBLBa8AMOfOT2ifTW4609LIzT+AaCaVwC73/UnSxZtJzGxdy2w xLs98PxID6DJ3k36sGXG74ApcXPIYGYhSFUWZe6E= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4309BF80548; Tue, 20 Jun 2023 02:06:01 +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 894BEF80568; Tue, 20 Jun 2023 02:06:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EE20CF80548; Tue, 20 Jun 2023 02:05:55 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20702.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::702]) (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 7CB64F8057D for ; Tue, 20 Jun 2023 02:05:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7CB64F8057D 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=BmHGAsLL ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hxBFrySZ5CcEsYidoU5RjUqNlVlrfZwbVPLH4bbd0OoUga6Mx/j5ftB/ajuIzRdZ2zqY8+xDumyEcjWJskBm/F4fZ3fZJnNE5nT167cVqlLPEUPut+NwHV3WDTf22aVttXtiOFsWAtgwhczUBiGjjZI9KdDYHkJOazZzo9M69DbrnX6cz2dAr+KtqZlr7+3Xn3n2ysbZjmHfYWxn7rmfnTDghrYQpKBHauErNLCBNd6RRQVB6efkSYkcZpuUs+ZIyFVs9rT4ZCFAIa8iBTE3C1oJCc+c30H6fp/AO1RHi5aZUxoOL3g0LYD30TRvakFUbl37wlSPuCh0HSm24vMH9w== 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=6iu6kPir9btboSwNg9Q7irlnTLvxdf78Kp7Djbicz90=; b=clBUJ4niTSf43bv21GUqC3NTRC6g5TWG7hjN0VCjVzLzKkXj/pkcoVaqRJqAXU5MFzPrwVsa75lFhjV6ap8qFyNblEkXGMXA8W30y0F4jeosWKNX7I0X1Ok2Hx75k162dktq0i1v/9APV3w9Vpv+wJb+2Y25DNC1azU3jTPkkJz+RubSUShhMXAxrC5XmICsfWMpVO+Vv7BleomwujyV9RTjFztHY+vNFmIgXXO/+X+7g2R+6koFNjtnzWFDOh0klwf+i+uKDtxlgPY87InhGV0XDE4VSGt6KJfzDUDlFNWDEp+wJBCC+OCoHpRCP7x+vum+MFHIu2XqkS2NomtVBA== 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=6iu6kPir9btboSwNg9Q7irlnTLvxdf78Kp7Djbicz90=; b=BmHGAsLLWhZofDmSKGx+SV0/SwUhO/BcZQNYQTy4sjq8hbP6qhH9VJioWZ/MzHF7nJP7LeFyig0Yb6D0NmutEBvhIgbeHSuYaQm4VGcGDZ23o0FqruaJdfR1yu5VWQ9EdDmoHQY6/OOt4Pk+7eIx9iBprWgkUHhwhPQbIlIlDZ4= 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 TYWPR01MB10176.jpnprd01.prod.outlook.com (2603:1096:400:1e4::5) 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 00:05:37 +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 00:05:37 +0000 Message-ID: <87352ndmlq.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai , Yingkun Meng Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 7/9] ASoC: loongson: use snd_soc_{of_}get_dlc() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87cz1rdmp0.wl-kuninori.morimoto.gx@renesas.com> References: <87cz1rdmp0.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 20 Jun 2023 00:05:37 +0000 X-ClientProxiedBy: TYCP286CA0138.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31b::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_|TYWPR01MB10176:EE_ X-MS-Office365-Filtering-Correlation-Id: 140990e7-c97b-4940-6d1f-08db712213c5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UQbZH50ndrKY39klO26h6JbDZzewhve9h7UhHNMYN7ecnTA2KXYKVsvBaDCCdGZ/bpqFRDGVUVgP5eMJpfRSJwKVcS7MF86GOkoEkNDirT0M2biT0yqvUtMSwAAeXSH12qiPdImoV+Q7DBcU2M4rVJ1sNicbnVbdPp5i3muoyyfb/y0nwVN+VvIdfM+ffHYhB3+CXeTwsZQyT7RdBqsAWd49dwOX/J6dPxdDAXfACDADGmWhCmtwbCTpZramAVLla7PxAGk4sz52RjJcGIAV8gKFNQoHckvfEQUDmxu399ckvhaKtSiXivt8UAtimOrVbEc7HGY1niFt5BAOPVkRhkv+gKISXD9xXP0e9t47fXEby3SYyrX/A+kmtF3wkSIYb2OJxVl0JN9317AACrpSzeHcJEDRtkWw5RASTI3Q/LMJbirq6B8K4W6rdUn+iY+X9wZTDzv2bEv1arut/wiJWmKyIg3/HwPfPZABexc7F+fqKF3AENE8ZjIgbicuLsbgqfpXqf0No8JbZspJkoVkF15gYXB3v8rGS4gQLukf5Q5TR6xrY1iD1XIUIDi88F/gl4jqtRY24JOfjXoH9j0OLhdvC526H0ohCzIcPt50qEhItY4oT+ZXtFZNR+SE3Lq5 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)(346002)(376002)(366004)(136003)(396003)(451199021)(2906002)(52116002)(6486002)(38100700002)(38350700002)(2616005)(83380400001)(26005)(6506007)(6512007)(186003)(41300700001)(110136005)(86362001)(478600001)(316002)(36756003)(4326008)(66476007)(66556008)(66946007)(5660300002)(8676002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LXWiBJe6Xt124iSRSqFf+1SFZzRDttdHaTbqXEtcKwZs16FXQ8Tvrd9MQvaKqTyvR3foT6AlpZIsx5cmtZvXPcDxwhRoZJ1SgDRDQNQrptAmby9SZaXGFfvV5R85o32c3vkCp707xhhwRDreANDwYh/d6+XQ6iwYfLSlRkMiVUokCWB6+V9exOm6NJlFYqfT7ImVOiOl4XsrK1Yzrbu2N+y9yi9uBc4wkwkSgRxODcz0/nQvMlTPUqCeSNVTxcv4E6Nj6icAKTd07riCfHmWrAicwj5SvgPsOA8q/cxqh5NhqYu3nX75Jj7Mw5oeZVO1ZC/n5QQbXe/Dowgv8g/+S1vsrHSNRNvxuGt1Ogc9xhMcRJR69bFmZDh6nib4fgkcbtkDoOod0hyKtDxWjiZD0BBxiu+c7w4rlkpsjew39JcfjCOzoNG3HLTz8MYOvWL7EdUW11UG+NPE6hfj2oq3VhSzFUHtpI8oB5++zM9Y3BrcryJZqZo6js1jBwnlVKc7vwXsYoggKtO8tLSsIS6dwB2stm/wTLL94HexNcZB+fJ3P//AhYPaq1mynyFILBwkg1NN3pRdzOLQJZ3Y99SXPg2Odc7idzlcarwnfYkimzlaj9Tb9CqdbyiU5mrN4FlJvB+KujT3i17E92t6DBFfMJZqt+Yhx+o1w3do1FshHp5wQUNuMjSayoZfuGhkG6VKQvcL9ZGI7vrbzm+KRlfESHEqJWblKGd4SvMROJeEsywPARseEPN1QI7DY9rIbmlTIFGqKfBSN+HMBovUlB4BDH5pDeQjrMfVHn+UYXioZCNZ1I/jyadhagkd9QqY9NSi04mxm8ymhCl2M1SoBAPhbiFhKrVZnVdJWjDGr+tuNKfPnKMZqFJytGNVqNPM6aACrRNqQ70oiGRJGSWYHLtlhpPUbEe8N4USYaZ/E+oqoTFl4lUmuJ62ac7PzpaPq/bieMfl20oUsPNnHuSTKGc7AB+xVXiMN8XGcziR5ZyC0AFq0OXx3ewAizO1Y3Giu1YkJQYAdukHzQXJMKFNyxFXOExC7LAtRMT5hgpaxqtu2iZvhtrbBrPpIYOa0zlTObyouMr/O6RXSiKwvR/vQJn7fLtvpuJeDi53xRlS5DKY0Ha1gvqlq/oiWySC2OZ51XSRGkyeIVIHWQ495cKZPByI5qL24Goqldftt6Gtitob8+wKrrItcG6IEn8QkzUqT/ibjM1/VSYhcG4Qr4gwLL1AJjKOahlU0pESTglbvSw2lc2GiK3lBvxBaqzDvONyLzXkcsS32+WOE/ofxDw2Yn/qKi/+soKHYh+D864tMl7RrkHls76OE95XECILF3cN3m+5L8sHb8WVzTeJqzFUEs4sAN1zafnmP9FlTT6rH+vaUUCWeofjJfl4IRbaELYpmo0Y+Up3keZ1L5HQiYrLm3GBIdKBVEEh0FzT2qUzQoLSEVTtg4OUGIYxHKC4kLQSr5fl49Zp8PAJlmfpCjq+uat5zpAX0IMj9/mWHaXL1xAsXojO3wbd0RPsgRo/TFLJkcrKJSyztJlWLa1DUN7Yv9ytFVXgZQKSBFwL95L2hbBpIOTuzkpy8sYs76ATIxrpVbfzDm3QfmSi35DPtuVNBU/qIj/qJ6+vGbEq3VUZ1MsqZkw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 140990e7-c97b-4940-6d1f-08db712213c5 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 00:05:37.8543 (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: m6wU586yidzhECPDmMnN3I5VEaJO/nSdBHOcGgJ/F8ETrLqF54AWuhLj6MUTezsLf3byRdpm/YIOKHiReDOjivyf3OlG6FccIDV2gIFJxm8NNgHr5bffkOA7wQZeW2AA X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10176 Message-ID-Hash: TWZBTXBOS7S6D3S3LL6YVTNLCJSFGLCV X-Message-ID-Hash: TWZBTXBOS7S6D3S3LL6YVTNLCJSFGLCV 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/loongson/loongson_card.c | 34 ++++++++++-------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/sound/soc/loongson/loongson_card.c b/sound/soc/loongson/loongson_card.c index 08df05cb4328..9ded16329747 100644 --- a/sound/soc/loongson/loongson_card.c +++ b/sound/soc/loongson/loongson_card.c @@ -114,11 +114,9 @@ static int loongson_card_parse_acpi(struct loongson_card_data *data) static int loongson_card_parse_of(struct loongson_card_data *data) { - const char *cpu_dai_name, *codec_dai_name; struct device_node *cpu, *codec; struct snd_soc_card *card = &data->snd_card; struct device *dev = card->dev; - struct of_phandle_args args; int ret, i; cpu = of_get_child_by_name(dev->of_node, "cpu"); @@ -133,30 +131,20 @@ static int loongson_card_parse_of(struct loongson_card_data *data) goto err; } - ret = of_parse_phandle_with_args(cpu, "sound-dai", - "#sound-dai-cells", 0, &args); - if (ret) { - dev_err(dev, "codec node missing #sound-dai-cells\n"); - goto err; - } - for (i = 0; i < card->num_links; i++) - loongson_dai_links[i].cpus->of_node = args.np; + for (i = 0; i < card->num_links; i++) { + ret = snd_soc_of_get_dlc(cpu, NULL, loongson_dai_links[i].cpus, 0); + if (ret < 0) { + dev_err(dev, "getting cpu dlc error (%d)\n", ret); + goto err; + } - ret = of_parse_phandle_with_args(codec, "sound-dai", - "#sound-dai-cells", 0, &args); - if (ret) { - dev_err(dev, "codec node missing #sound-dai-cells\n"); - goto err; + ret = snd_soc_of_get_dlc(codec, NULL, loongson_dai_links[i].codecs, 0); + if (ret < 0) { + dev_err(dev, "getting codec dlc error (%d)\n", ret); + goto err; + } } - 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); - 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; - } of_node_put(cpu); of_node_put(codec); From patchwork Tue Jun 20 00:05:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 694530 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 1712AEB64D9 for ; Tue, 20 Jun 2023 00:08:00 +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 1383F83B; Tue, 20 Jun 2023 02:07:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1383F83B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687219678; bh=9BKBGulGCbOYGXJkWSrEg+iBVboURmSwiobyw+YvO24=; 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=n6rish9ol8Olnzt8vu7lpCZP8Yz6V/gQVuEg5YXN6hZOkPBYEI2Lzzgunibju40p9 IeL+s67rDGMtuGEbXsNxTz5w9dlW8Z/ogsw/xt9gQkjf0KdVht+yUheraJcI+Lol4L cN3XXCEy6hGng2VZMt2aTm/oL+kgvWKJrguoSCHY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E2699F80587; Tue, 20 Jun 2023 02:06:17 +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 C9232F8057B; Tue, 20 Jun 2023 02:06:16 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BDCD0F80588; Tue, 20 Jun 2023 02:06:13 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20714.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::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 C0312F80557 for ; Tue, 20 Jun 2023 02:05:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C0312F80557 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=oq7BMqGb ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cTudu/RX8Yp3sfp8UBAWewzrC0N53RAgpuwgQsZmbVQGflrnZm0gLHpt96LMd7di8mK0S34dDEetRJh5C984Oj7n1jEVjKwafnX1FxJ5tToRzVa7rZ7/IwlbKvbXtrk5a5Vn9Awuhdfhc+b0uMoAYfS6Pi5z+Sy/ls8VPJJZMCzHJ4vmVHpFMRJB1Az7gjGiV5ETUNJ1kl3j+KCdyFBaI0tnGyA9U6FGHvdQYZrXGGV4N9rorwEDK2eJ/Cw14d078lQzsmi/SUhk9Aud28hagkgiM51juGWLooBhor30GKEG+2j8uNQdxo5WAtQZalqWPjMjKq1qzC4InDex4XZYBA== 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=MnLyVEW3ooA8MXrJUDwj5IFHjcFfz63prbt5eTdwE10=; b=BjBJ99TpIO9XUNV6wvLX/jJ2bP86RXfxOPu/Ex1nhb1lj5lni1qCp7wEv7vqt6OzjQT1kgYEy6dbXJooOkfpm6hnULuNvJvPNkQIW5x3NXTDqr2N9Om2hFZ+1SXq2LAm+dHLnhv1HYxJ6naGzaYPjIuwJOOpl96nf2iACwH80zQN1ICRgb/gCsSnT300tHp/ZLNo01N/4Y5HkazjQc9CkflD6+PFbSUnt8r54g5qg0kVWXu25/yXUh9mV/tBNJJE8q0IfBHihwjWnd6zqFO2PnkiMNXGo5yl3TWhlNgg6kiWlTekA4H2mkOfSouXZSdBzQb8ybzthpCeoXPf1at9sg== 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=MnLyVEW3ooA8MXrJUDwj5IFHjcFfz63prbt5eTdwE10=; b=oq7BMqGbAmkMdNZxiVWeQx3WreoERm3mB7JrUOwI/ztRCIciqTRLiXZT7XyZujFkfPSlFQd8ccuTgdxLTg2CBGAFSRjEIVUcSWrfDeFn5Wl/V9iX1QA0hYu9w4zjq8rRzIVbSL7Y24pxMzZxjN+5UVy573Bfhj2R0v/urR0wFaQ= 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 TYWPR01MB10176.jpnprd01.prod.outlook.com (2603:1096:400:1e4::5) 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 00:05:56 +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 00:05:56 +0000 Message-ID: <87zg4vc80r.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 v2 9/9] 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: <87cz1rdmp0.wl-kuninori.morimoto.gx@renesas.com> References: <87cz1rdmp0.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 20 Jun 2023 00:05:56 +0000 X-ClientProxiedBy: TYCP286CA0108.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:29c::14) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB10176:EE_ X-MS-Office365-Filtering-Correlation-Id: 4cfda9f6-43c7-4a05-b338-08db71221ef6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VWi8PyYFwJo84zyq+xDMPyt/Nb/gI5ipgytEyLBbWKEeOBgxxJUOAJ/lAvECCjvLeTKWz4TfIXrnLY3Gz2TAk3bTA6H5tybzICS5zvWIsCqD7StnLHw4tEXokxXUYDO9YXri8oC07ep4LkrbN8UIYGUhW+OWLfNtCDwMEqDsfHSaGLH+Bza8j9PA7T6zQ3xhMKhmIdL/ANfcwGufQVg81vN6AdKnpE1uNAg6yR1Z8iVgbS4h0LAeiX+35IXzE6KxwWpAu8ChblRWI3/QTrk8QTXvl3RJ3yIxItMjGNUHy9MzrPmrWfERKjUvQ517Nesdp6NjOFNemawazayIcX8BkLFfuImFGUH3094C3xC2BLxGtCQPsfXPXML6ZygtZ8BPlwn+5Gu1mDtI7gncogeKeAoVhAFZTAr87RRSbHssQPjnnDL2tnY2PABdiYqMpndIu85ChCaRZCDBEGpk8s2fLUNmveFxHa/hQYpLnR++6c9hcAMs9dpOQ7xmmuYlcc6f6/YW+bMZp0E0/sUF+jKOyunAQlf8G8UhR4C7EvAaAF/YrjBbjF0iFYSNJtR3Q9mu+3uBwaYloubeKuf9LQbVHIPYbpfzsCTrAZfgZU9Eko+D3cuzb37/KeZCjL7ZZD5V 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)(346002)(376002)(366004)(136003)(396003)(451199021)(2906002)(52116002)(6486002)(38100700002)(38350700002)(2616005)(83380400001)(26005)(6506007)(6512007)(186003)(41300700001)(110136005)(86362001)(478600001)(316002)(36756003)(4326008)(66476007)(66556008)(66946007)(5660300002)(8676002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QYSTNcHifdmmTPwKHCvsumXG3AuY2AejUbHab84UA2/tlWWSnNl7xk+zRMfmDOJmIOmRbVx+LoTo61AwDvEp5cLuUnsJUMiAlDCYN7BGszIYbJCQGutsMq9vTCj/tThtSWgbSo/808JhRJSK4W9STAB+eXa3UYdJP7tz9vsMMoALOpRX4cOhrSgS2XLgCeS6bNf+UNpoIn7LMr9SwZdIIkKvHZTHAU1F2q1up/CcKln8dKRKwkW1kg0xxitye0lmuQkZqh+YElQxVRKwlYN5Yb7qCkWwwooMOa9sQJuouBfVeWYHmh19rm5RcSutHete46jfaQW7Ancf/tiZ49K8W0sh1fBX0YLYD0Wd7VLIxUPH+Kde+TVZHHAov0GAJyREV+cNGzBGs6tixP17Ete1ABoQbpbK4hB4W4BoMV0g2YREHoUYmPIytY4rLkukoARsgBuQzITQ6V4uKNDB+YwdVLTlGFkQPiq9mjDeCqHDStLf4KXiyRNH9LNdZozrJTU18LQMMxosZ/cLBH1XuXYthnpi+LubH8FVprZ4jcR8o3TWtwVC1Tsr76zzY10/gJgx/ndgpa+czacrsdd+zUxHtXW1B6LcDBZeNSDe3Ni+fW0MyKIkDV8EqR0IuEUEzGhsSgikge+uS+qa2ifXmUm2Yv7YUJlRGufweLGVCD+842EE5uVBgXYzWTeNWn0e/JzWZxJTNHQing41ISxXEB/nhs08sI+mRLulYYDL4kWQjQiixycQQ/hwrLWX6j8/yqI4aQy0VDhebPMIKCqo36C+w2VHi69kToj4xCHyp3PNY5XQoIqEhcIFSGShanP0LpwgQIlL0YgXNajVw7XmpJabnCgATQhAbY0jginI1CNqkU0XAKwCIex5IgJDcdkP5OTxf8zTVjV2P1pkL3S0FwHwrug6/UinV8OpIUdaWk/77gEbthLW5iWC4mSRdoXEba57visEaKQOifxhGe9o944hwtB+lID2nFEz4Tingz5ABiFY7PRwluWDZlhyARYC0ZsvyinAA+QtwqO7kjCtER3FwYyTl+7b0/jNdOgZxrdaegEqrwXJ6j1gVBvLoWgsDQddzn+MYToi4fxo3EvsKf18zlLIcC3lkfqQXxby1krUo0rG9fJFz6qok2BrGnn/qsoFN3Pks7m5FBeU3mogsG2EgIFMykl62R41OVrGqsDNvxobUZuu06rXTI7X/1AHxu6joWzO7d8e7r/oNCojycKWr0UGPUE0YJKxn5cUfv4dEVA/o3dmsluxi0AgFxrPxAOs6j2R2P5bsGzYws2yCEKnGpyJ2TLFjGg3kzyMJqxXsz63/h0G+R9A6pevT3pZQ4VwaQ5S3unStWttuyEFciJ6Gdt1LWp5DucNMriiMXGeQpTKTVs4BOLhV/qU/waQdVXN78+KpPXKOZpsjB84LOa5BEmVi05B55VLUZyaGkCSNNPyh76wtQyoJwts5RQa6vFLrE4iicBO8DoJRYTg6ZdLnXR7Pl8d04o/S9t7BtyBMfcl3cuzywLIHsRDVOk/3Glq13YHKCP5A6MTLapDkJuHxNdywfHzRKI0VR4Fj1737l0cRbPoZgTp4SGuT6m8dq1YMtalzGH7Tx1F/4RzbVgdMlHcgQ8/1wk9LNZARwL5nPw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4cfda9f6-43c7-4a05-b338-08db71221ef6 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 00:05:56.7021 (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: MMEpfL7rhML2ErzrW5AxlcE0WuTq3q+jw9bEBl71i2eFaKU0YwYU14fVLUuXni74hxV8x9S4EEwAVbTDtNC4rTC8riJa0VV/m2TPZV2Kz7Rrm1elMht6LdvuMzUbmhTT X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10176 Message-ID-Hash: TRFVQVOPBIVVBZVARV26XJE6UKIZHJVZ X-Message-ID-Hash: TRFVQVOPBIVVBZVARV26XJE6UKIZHJVZ 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 3af056026fa2..3019626b0592 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -1103,14 +1103,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 5b59198a0384..0745bf6a09aa 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;