From patchwork Tue Jun 20 02:14:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13285133 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 76541EB64D9 for ; Tue, 20 Jun 2023 02:16:12 +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 F1D30847; Tue, 20 Jun 2023 04:15:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F1D30847 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687227370; 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=RpCTkuEoBagTsL5jYlPVxJ5gFNZdJnUvD+slNm/KOhmUjgDEeEO1GjpV+Sbu2k5gQ 4W1e0ztfpklRnHxktSGQ0sSDKDa3Hr617NtYOkN1xWCHcQO19ILTrpWykjiGkkqhXt taGG2M/M1A5II9ziKScMv6B0bnMkqwW5xR2itero= Received: by alsa1.perex.cz (Postfix, from userid 50401) id ED576F80552; Tue, 20 Jun 2023 04:14:29 +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 81C94F80551; Tue, 20 Jun 2023 04:14:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A4985F80169; Tue, 20 Jun 2023 04:14:25 +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 CE713F80132 for ; Tue, 20 Jun 2023 04:14:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CE713F80132 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=Aj30K4o9 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SyM7LXrVRfFVNXZxRKDdOZ6Oma2MR8j7hSPYpS+kxgVtYdl6bRDjZfvjItjUwKUGLep/wocG3xlfzXFOqR3n9WtW39Oo7zZuMjzSBZhiHMNaq3QsJX3k3kGCLEzzGU93gnvxDNNZJHz7AsAw8xMJ8ZeUk8TSzVeVkvGyzKupYBmJ0svXCBvjFh5+EebwYwI37bwq6kUvF4/iC03I4574DJgnpWpQebTElPLM4gMZQRChpTNfi+Tv4DzBuZ8ljR+wZzndIuImgDJ/lXYcjxbs1onWqeZpM5r4haWCwPAv3faC+omvCcW/ncFBG+0CdytcggJ2oR+Lq6dgY5M1o4iw3Q== 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=Wx9fwoIMwE30iBTiDgrnIqYar76mANycC7ny5NJxHn8rBX9ITyui8JTbho5XVpuyRRRl5n4pH44iewieAd5+bYFOO/nTz1umVKbgzUyhC0fby0K59LDLn7W1wrXOG0Ga0pUn0hu3n68GIWNFz5fVhYcZ2nUCnhjU5ycFtux9izGUWzh250GyGfM2EKyPyy8XYMTKWv3KUXBNL2sFIlorSAi+nNEYUWEzy/KYxPP/JilK/hUz/W6aJUGqtNduhn1cXZiGcEF+J+klm/nut+zHyhsOsfNqi3bswI3kkUrTGJSo25UuIGMtrTZc0nZEhRA2cklqNpeVTxxPKMiMTXZuZA== 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=Aj30K4o9AhuJnS2hpXRlx9QPmGx6c3TKZVtb+q5ELD2Trr+U6ff9Vbhxsu0+prrwQikgGasSYRBNUMTSP4jzBnORhO3oduotOzlvp3AN5YmxAJ3gBIFffjoRPwDx5dV/C7WrxM1Z05LttIQfjFtp8UcBg3/pKWJI+SDJ2J3uVIQ= 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: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 02:14:06 +0000 Message-ID: <87r0q6dgnm.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 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: <87sfamdgo1.wl-kuninori.morimoto.gx@renesas.com> References: <87sfamdgo1.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 20 Jun 2023 02:14:06 +0000 X-ClientProxiedBy: TYAPR01CA0161.jpnprd01.prod.outlook.com (2603:1096:404:7e::29) 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: 7cfb3167-1b08-4198-fd2e-08db7134068f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gB+pUm6J1ExpHQwMR55ZL2yfg5cTB3i6yxdYy1IzqJ4RIH6vwa6B9B7NovY6qtTKMKqfkXfaLCTRD8VxSMi9BbJRZZGGSCGAfGkIcx6gNWEbcu5iheD5/TSCv1KWCjmI0NDeTds2WSddCLduJJvfi2S8ilBkXD8cmkg9vnTUF5DlhZJ5oYcbLG4NFArITprjUpqfLsitVrlX+bbk8pA4JWdMcrO5g6/Vp9LZN8lZGQXzabLiS2/gl64evSjpNp0d95Gq2pDXwZITJScbhkE/0LssT91bWkjQZSE17R5GfSIkUJ9k/1STydKxzGGCy+AqgKvdM8hkK0DPk6vr40eCKjQWwjtbcPBSm4V16PWKGgyoRMlHYlJsS6btVhZqdjrEpvZ5XNP1FqzUs4wXBzCX8pq/Up+XzWUxyb6mSyCGWgOPlJFasgPqtj5dpu3cU5guNKBOnzW1Ly0E5PeKmsZ18mNO/E0Y9+7jDS3dAtvVU5OrPODxDlX+fc3VHt2zw5Zy63tcp+y60ZjlLhXT/gYrFw5P/y7ldYYOuqapCZCx3VVZCcLYums05gdZAmxszJyf6ZEgcP07qlpg48RZkqJWBi/EiL+RAB0C2I6QSpLzpaolD1mgMNKbbQgt+rgazGCb 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: XFvBv074Wh8OBOBdHH5ldgVtrShJYNsXfvcFU1H+LiXFS5itxIA0xRHowrQYXB+GhamL9fzd5qbLPZ7nsWcXbaScMynWnJZnL+dnVKXFgKT3mLS384BFCAdR5IWaXRfJQdT9lmPDJRdxAv4KrvqiW+bixs7/nP4zxMzhKTo2fZ1007jmNJO+MmMW3A/DXzTIZYs9JrAXAASTme4UGU5oBzPxgsHdulB89rxkPvopp0WpJoyZ7AGYs0YMcR3MvtAS9qf7g37qEwfj4bflsOTEpb1/JO2TCHzXf4c7NKx+mFr4rJqaekxnxXX+oZQSzojz8p4fgRfwh/u/jMi2BkMu+KmTm67RbutlwrIAO14TEWmcadu595gGEt1kDb3bil9GocPHXec6dv91tcG7TZrE6S7ECs1punQZ4ONFP5CBWx/FNn564zVLkdNUTtrUiLDx615wEsRXKN+v9kLX7QdQLeDlyBYs6aNB0eOLariY/B6kxXj0NbHH9ud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NtvEt4IP1bEPUb+x7+D6eKC3J+UWAtRgoWd9CaSkM/7ecn12Ddlqy1saPr4mtQTljGGvrso= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7cfb3167-1b08-4198-fd2e-08db7134068f 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:06.6555 (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: afR+N7C8k3ayjrVKatnqZRbuNZI8C4/28UtkF5vsR5p5ze8VE+RIG4thVenqVG4h1GuLqcOWzjF3asJ/uhOhqQAhgaZItGW8l7S9lt3K12rUnMeGrS01EfuWdibUx7Ku X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS0PR01MB5665 Message-ID-Hash: H23F3FWVD77Y3ZAX4UNN4VA7RUDG6HWL X-Message-ID-Hash: H23F3FWVD77Y3ZAX4UNN4VA7RUDG6HWL 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 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: 13285134 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/afFklNn19XhLYfleJlq6P4IYSP9FKN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GnG7HYDf9tAAlucY= 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: 13285138 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/JiI6btzSPyBZSrgJ7Iu312fZmcU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ti7jNgBk8k0adLGfDTaLjpTSfETBdih68EGnriWn4i6vFkceTFkGMX/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:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13285135 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 6C0B0EB64D9 for ; Tue, 20 Jun 2023 02:16:37 +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 880A083E; Tue, 20 Jun 2023 04:15:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 880A083E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687227395; bh=sThBh9CANAyFgEwOKlVIZMDiX8/Hi+yxljF6atV4/HY=; 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=mfwFIvB5TqOmx+akELM9IsZwcichgjXGlGlrJ9ZEl5ceu39ciaWtXByR/j6hxZQXH Ks5chhY58MK7TdUJHC6pXQQgyCvOHXFUrqQXCMp284hcAqWnIN8pvfY8Pt7/wm6Uhy lDEY0GQOANvNawriV9sGvhuh+B2IUAPmrQX2e9i0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1666FF80588; Tue, 20 Jun 2023 04:14:39 +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 99F53F80588; Tue, 20 Jun 2023 04:14:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C0F72F8057C; Tue, 20 Jun 2023 04:14:34 +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 CB7F8F80563 for ; Tue, 20 Jun 2023 04:14:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CB7F8F80563 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=lFs7w2GV ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CHv35i8KypesJT5+paPFj6yXgz1YLwvz5T6NsJ0LLNxR8MqCDi0B4/JUqbjbiaAsKUZ4BNwipn8R97hty23eklSErVRxbOe1NQTt/fbjIJe7mQnKHByZPwuBg04cUqqeKtQIKPmtGsZ2WmY3KXMdXhI0gANQS4JcPldG+r6rAgpAyY+FoABV5rKkSrYKkDkUm30GkDP/jPmCODgQjVs/y/pdBx1BlYkBmXM43Ea4gkXUbeeAsKaKq2yldhgnkD8Ur6VTLi5CXBJA2HUdUL2yqZF1iM/E2OA/OiKrq/tFnHWwBbDaiuVgt558uQ36iJkfBxtg2R7UPKedzuNMNzOnGw== 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=8XArk0njumHjOYVXHbxOAWfCFth7uv5h7+T2/ANYBKo=; b=LNb7vEK7QfL8+LJ4LDy/BZQ+udrp6m4/kDUYj2/wrRMxdrm6QbgPN3ETTGKUrrNOobNOL9NkgbFqyUNRjEfcXNFduubDyIgtIQir9ce9BaExwHQswBC9saEOhNopNYl81tLi9cktgdG34wouCUM1azvxT7ccGbPlsv+aC9lkhAmvCXOoDI1nszhEznKWrrqJT2cugoGucAM7CQpQbkQGO7/CBQ3l7LB4mZOW0vYT0d83son7Y/TBHE6X89CUtF8lDLHg5ioujoSPD/Jj+ifmMx1rlAkGZRjEX1K96cIsI6IuMgM7bLrwIkMyR8ulKfLWQ7HYFLmb76owIquCjfbxLg== 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=8XArk0njumHjOYVXHbxOAWfCFth7uv5h7+T2/ANYBKo=; b=lFs7w2GV7JzlixVgnB40EY/QlTg8u8e//TAwTmrRK3We/K3McZVbzhyTpPW2yEp7AzuuKx+doHyLpR7lmDwsLYi6/Z4ZBz3zsnBoYbh5hF6ODfZ/GK+B3QXmGKcmrbLRfDmhHmVlI2bGuqo2Wlpyln5sf/TuScj2skqFlFrETzU= 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:24 +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:24 +0000 Message-ID: <87mt0udgn3.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Banajit Goswami , Jaroslav Kysela , Liam Girdwood , Mark Brown , Srinivas Kandagatla , Stephan Gerhold , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v3 4/9] ASoC: qcom: 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:24 +0000 X-ClientProxiedBy: TYCPR01CA0042.jpnprd01.prod.outlook.com (2603:1096:405:1::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_|OS0PR01MB5665:EE_ X-MS-Office365-Filtering-Correlation-Id: 99c25988-21c6-4b51-fe9c-08db71341155 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OZ+Yyh7crsG54ydhItBfslLys5mwzoPf4NPu/PX9fsutOtu19hmupwk9ar3PXJ+loHbVfm7HazWqC5mEBF4E6l8Rym+NJzOpZOtisNfkjy7gtFIoq1yCVABx+4SSCQdiOWcQtipZdCZW1Xu31NILiINVHToDYeISncQAkatFpZEYC4E8bsAOYwIghtUSAqJfnKBQXYRmwnAdBewELNATWkLN/pGTZgy42bwLapPwcm5e3MYmWDUAG6YjymjT/epbRGa81kaDR5as+oz/6JpF8G0bBYOiFrcEQEW6G9ZwaBMdcO6HbP/PU4q15icjK/m5pjVxnXhkUvNPl57DErVCU+KVNXz+emK+vO5in+pWbBHNqq10+iAiZoAbHc+uCjQ/KlXVlmYLi8ivt443EhBnouxSLvxuYuhjC3lka7scnEK/BqZYcOt/7ccErxSTC3V53QT76ZoHNlDUmOPDGJZET7OMrd//KDA8y9WBf5EJgaLP7numcdy7G0Zz6BORRRKkPK/IOX2PLe8ZMEe71IgSXJ852lJ95UFheJhdNtTOgfo8FHiqHmevRt9O74WlEh+2OZ4VmuTituFymUVuKsCcmUS2A6M7byPhEGFfijtn8rpbyML0TFJHSWu3tufALdUb 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: xgIUsV3hmuDDLRSh7QebAnks8Iux1GBZ5joMWubCfwPCqifq7yH0zmWdVk/9hjw4ADBuj62Z6bSYu07I3NNxQkX3gLDshLE2LFIkd3wxscb6HtNs/vLqW26njh0NXeT/CPPs0+uDbGaoM50sjGUCq/4lVHoRF7m5c5aKpqICAyo/fGfOHZbD9562BftUPN89nNYRRJOQc+J4ZJku3eNY4puxk4cqoiBHOaZE+L0UEthpbd2otmk5/dz4VzLXmbCYEfuJY4gSX0u/9SQTV35ICbz94PRWc0BEqXpmcffKoFaPcE7Iymk7Z2NWq0Srqhg3HT+FA+5KpidiBDWJoRAX5RPmkezSe6hcPwCFqWbxF9EuUhvMAGkLEbe3m3RcfChw9d6GeGg0fpc+60ZifQfiOZ9qGOz/T4T66zr7QSWgTgVZ2PI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snhXeumKJNUVu4c+41/RyA2ye/hBzM11WP+aKvZvKrD7G1qU7Zc6R5RSmXra1v19xrizyk3RnwRVjdRyarvSJNAv45mVEhZV9sx0UtLwWrLDscNS06GqJ/f9JZi3MRNyo5Yt4tnw1Lc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99c25988-21c6-4b51-fe9c-08db71341155 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:24.7268 (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: BA1GQ3h0V9nV71nsUhdmY7MJMKC+5rMPWmzNAvxOVgipS+rVWlwfZwWE0PqHa9c5L3FxHTAutL62D00z0xo57DjWURlXRSmRvAYVA18B2koKW1QS03BTXyDc4gHZb69E X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS0PR01MB5665 Message-ID-Hash: 4GILRKLMUEAM2WG4OVVIKA2WWV3VMHZK X-Message-ID-Hash: 4GILRKLMUEAM2WG4OVVIKA2WWV3VMHZK 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/qcom/common.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index d9ebb883b999..43b0a888f1e8 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -96,22 +96,15 @@ int qcom_snd_parse_of(struct snd_soc_card *card) goto err; } - ret = of_parse_phandle_with_args(cpu, "sound-dai", - "#sound-dai-cells", 0, &args); - if (ret) { - dev_err(card->dev, "%s: error getting cpu phandle\n", link->name); - goto err; - } - link->cpus->of_node = args.np; - link->id = args.args[0]; - - ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name, 0); + ret = snd_soc_of_get_dlc(cpu, &args, link->cpus, 0); if (ret) { dev_err_probe(card->dev, ret, "%s: error getting cpu dai name\n", link->name); goto err; } + link->id = args.args[0]; + if (platform) { link->platforms->of_node = of_parse_phandle(platform, "sound-dai", 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: 13285136 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)(2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kM02ysiNhElodrgsggOeRTCxhhXDBR5fNZFdb/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:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13285137 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 F12E6EB64D9 for ; Tue, 20 Jun 2023 02:17:17 +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 C31F584C; Tue, 20 Jun 2023 04:16:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C31F584C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687227435; bh=Kk4hZgj2JBYUPWZxUcJkqUvvPBWN3bcxwIjTTi5PXKU=; 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=f9YhnIS3BclSEI82z3W/KWwscVWZnlVFfuWLENvqW9HlnJDITKpRCkIDHqgvVGHFn qq03pWIP4jgcArQ4gbQbsFXb2NpzQnUVC0attVt0RXFtjs1UrBIusGEMw4EsXO+vtE Ef/iEp7DB7gHC/f0pSqX9O9ebdQoiboYOgpDH+OY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 80FDEF805BF; Tue, 20 Jun 2023 04:14:48 +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 ECD83F805BB; Tue, 20 Jun 2023 04:14:47 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 33CB0F805AA; Tue, 20 Jun 2023 04:14:43 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2072a.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::72a]) (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 5FA49F8057E for ; Tue, 20 Jun 2023 04:14:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5FA49F8057E 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=ipSbSnvP ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kbtXIy0nTI/73thdPGPdfMaIeKqm9ys5ZQqAzqYf5KOFMThjM2Hyh30XWg6me+3uiRbeRPhSDALx3eTUxtqffF6EULQpwwOCrxvwU/aA1TozTePlJaLGJUP22G6XLTldPKSE0LUQaydBp2mwWE2xvSQanOEJQD3zTyUbXzpoU3X20vffEDdF2dr2s6tW817j+nQxsk/3CgNXt8FkDqtZNTC0wtYUYTSUEGIrZFLYzS9RVdVfCJy4VpLf06TXMSVvuu5suWk/KIjfpfdeKns6q0WJ9Vypk923WmsRWmWRlnXbaNJSYKIIfLAD+/YdRvzZh82zlMSUcm+4eIr6AmGNzg== 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=mW/EPAl/c4IJcKBS0EET6sZwcbjkC2xxga8RU+H815c=; b=oDHN6HbuK5w+WtZv6AirSywNK4cNVLjqIpCQNz/+wNPMPM4Dh056NPGhtrAgK5/emKabx5H6xlV1W/QkBXk1L0hUsV8Z5AgpIClEtlWIexJXudk7DcoiJe7xxgBJlnFOEIvstM9xQKUNeM7MW+5AFSgJ156ZAerLQcJxmdHoCHuNMKY4aYQXw3j5PnqfMPWUlNl3NL0N/8SN59UtApsdgCiImDUx7/n5oGJOutQjYid/ovhdKd1aMLMvHgJ29BKDY2aeCgZVRoDP7H7mlKo2aGymkGe3SyN20zfK9n7RU3Ok4udwhSHAOpRikWJ87T/yuAwJm03XibyfxjNlqgeafA== 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=mW/EPAl/c4IJcKBS0EET6sZwcbjkC2xxga8RU+H815c=; b=ipSbSnvPPEQq1XMbSP+HUwYRWV8+SYN3+9Uw5SpfZWE0SaYNyLpusvHbH7vKfCoYnOiRSMlgSWT/VjaICyOVGcEz33P3YHgWNbdgdU6XFven9fg9B3xa58xcyerEeAqn3SBHpHu6UYeVKt8pP41oV2MZUbSUHKRYZFGcp2lNMZw= 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:35 +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:35 +0000 Message-ID: <87jzvydgms.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Sylwester Nawrocki , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v3 6/9] ASoC: samsung: 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:35 +0000 X-ClientProxiedBy: TYCPR01CA0074.jpnprd01.prod.outlook.com (2603:1096:405:3::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_|OS0PR01MB5665:EE_ X-MS-Office365-Filtering-Correlation-Id: 8537d2d5-5ffd-4b33-8ae0-08db713417e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wxRNYsCVJoboM6lyck8vZ2rY8jNdCpnbUPg3akFbiCMFXLxJnx7pJPrNfMT1ueDZItjQ+X8m0ZQY+4VaKQVOXdM1ZzJtIRNqQ3QTta5dY4onrZVzqPODwWzqJjL9IHQLekkgcVmpELFGNnH7Yu0/iA1fWvOMcJvBJh5v6vjtlbNrAMOj1Zgjc4VnjUaPUTiagA5VgEdc6Q//Vrp0FyCso7+f5Um3U7sTCDA/TmlbyGkQOclmwI/BMFo6IDY7hF+1jN5BSkrdvhrGm4jhX9/Jbg/1CHBimq7BtoTOKdXbDPkaIVp1o0Le93qC1C6cXKgFkZHGybs1vREn3WoDiBetr855YXgAJ5UjMi9fRXUb1ohNAzZ5eZifVBYDLpsLq+r50r2mflvqMQxx5G0KXAAUWWI2s68pq5YPlDqC02jJwBNpr7ADkWRh0PbHbI2xfVJb+RmjKz5GsragyfE96Y15sGuaLwpk1L62wvLt2heSaON0W/O9CVafoH0HhKIuQ+h81j2rdeLGvY2U/5YPOFru3xYFcXa992DPrqCwdTr+3bn1t1927i6MWtH0XcPiyqDzw5c2qq2CPK4QSByScXIVFTOkwxgq6qBbdAP3TqBg9kbh4P4Jkh/4tdflc2i5+eVl 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: t2C7e4g3X7wN4Xd56y+wljnlhzoznQ4THT+kAsODgia/CDuPjOoHCbJeHuzAiwco9t4CMsKldVQ8XEbWiiLFpTVdd1SsCryJpAkGPYPqdTQeLDRHUVvSiedE5qH3oM2LSF4MkI3jdyqD2iKToD9vPenk85MCk9edQTmIpQvm2YJ3/PNCm5/7ucxj7DCMrT7y7ppcnpAyPlU/47SnIbc4LBrElG/il9LPHmEub70yWshHRGjHyoyz81Kj/+0OLyZ2IAjKf2VXXTUnZr4mAGQs++eeNUf4Xc8jZU6/nYrDGQYm/dH7vRjTn+S/QRA2ZBxwgYK5Mj/3Rhdzr/MB2Wg/3y8ttDyiYUU1fmNUVuvy25TK/hzAUsYIh95keVel1+EmEybS0Qt9GQIgks9C4Ku55pqlcYadxniZeBan8UzPkSMs3vbU7qZiQzgXTlILqgZYWi1zJ4BSy9+k0tI78Zid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lpPJhrW0UeMNbQc4otyv+ZjgzMVBfjab0U8C4+Fyi+a6PoP/wVEjK8OrK3YLo3cp4QiA+tYd78jxUeJnBfaNiw3VTQUNlLm8KEM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8537d2d5-5ffd-4b33-8ae0-08db713417e6 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:35.8189 (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: znfVu2fzIn95r5mOs/Qsw7061WhLcLENHsueiZOg8Vl+PqTTGnQkpcLCONJ4Dx1paqin76DEW2HexBW43g9DIx1cc6m8QRzRLrnXTBPcOAqozIi7VDpxBagK3nMxJuG9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS0PR01MB5665 Message-ID-Hash: BPQ6TKAYPUATUPJG3WZGIFS4CQGTSGSV X-Message-ID-Hash: BPQ6TKAYPUATUPJG3WZGIFS4CQGTSGSV 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. - note: need deep check Signed-off-by: Kuninori Morimoto --- sound/soc/samsung/odroid.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c index fd95a79cc9fa..a5442592bde4 100644 --- a/sound/soc/samsung/odroid.c +++ b/sound/soc/samsung/odroid.c @@ -205,7 +205,6 @@ static int odroid_audio_probe(struct platform_device *pdev) struct snd_soc_card *card; struct snd_soc_dai_link *link, *codec_link; int num_pcms, ret, i; - struct of_phandle_args args = {}; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -260,20 +259,7 @@ static int odroid_audio_probe(struct platform_device *pdev) } for (i = 0; i < num_pcms; i++, link += 2) { - ret = of_parse_phandle_with_args(cpu, "sound-dai", - "#sound-dai-cells", i, &args); - if (ret < 0) - break; - - if (!args.np) { - dev_err(dev, "sound-dai property parse error: %d\n", ret); - ret = -EINVAL; - break; - } - - ret = snd_soc_get_dai_name(&args, &link->cpus->dai_name); - of_node_put(args.np); - + ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name, i); if (ret < 0) break; } From patchwork Tue Jun 20 02:14:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13285139 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 94A01EB64DA for ; Tue, 20 Jun 2023 02:17:34 +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 99460850; Tue, 20 Jun 2023 04:16:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 99460850 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687227452; bh=jvgDBg5Pz6mFt6Aw8JP5kZwoH3rR8CB/o6/SJ09UzVM=; 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=mfXef1MIcwTbSPict66JTEw4pm7PLdXqBfvKUfSFfkGow/uwx8em0TexZXHC3n4Yz k59dKGduvZ/0wlgAfuXZlD8mPPGQh6Cc/46UNDlSAp/GxTJ7HK3ElYAhc53gb6IX9J 0yWqqAhsshtgmstZ441AV4gq5F9SsEvkiebZID5U= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 43465F805D5; Tue, 20 Jun 2023 04:14:55 +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 91511F805D3; Tue, 20 Jun 2023 04:14:54 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 86102F805C2; Tue, 20 Jun 2023 04:14:50 +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 6789EF805BB for ; Tue, 20 Jun 2023 04:14:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6789EF805BB 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=N9HlhLON ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K5+ZiUy6Q/lX4+WS/Q1sZzh6l7AUCRw32mI2cqWI+wuUXZss3qRQZ06LxSoNl6LT6dw44fnodcz2cGRvwZ4prWSq6asxNVExhjyynu5Cq6OwIwxrixY0CryakJDk9LrvjRewDGj/dZMvEZ1AgSHBOHPqA18ExJNX8zQcscF+t/wZcXZBO45DHIf1ZljXf1kKJrYUG+zB3L8nmVgGTfiPFsssk/08Q3WYF2tgodjnOOWLJo/uhwavaprN/rLZclv/OlaUgIigAflXl0VORdEllG2JyKBMVdKLCaTqagA1k62LruZA0I1R1vNiVpvK+ehjhcUgagrJG/Ou8RftLHztVQ== 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=bphrVSZ4WxVc0rmyDdaUG1FiCqsqCI9ix2XH/iQOpsE=; b=f1DVYQI0+sQbXcBO5qVIXaoybXE8bygJAswOICw/EtGBakfaHQTAHMww5J7gtLOaGFJLRT096/WnrPAyN8YPbFcMmbBFocp/9EFYWPxf9hTeYyJ9MQ89wqzURuoAbhtAhV6mRUHMOnkoGTKKKRRhCQJxpkO87+SK7fBFSPHdNGulgthHBp2iujOstdKfGdxBgkkmuXMzvGliAj+FghMQ9Z0vOYSlYhbv2LC1VxB/zP5PSsRP3L8eLc5AEVQR051jS+uYsgUwmzD3XM9JFhEemck9U4OdhG4c6wTyTskUHi2VeQtFIPUn4xdcuH4LBS3azHhKOwzT0xPFh7XaNj+96g== 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=bphrVSZ4WxVc0rmyDdaUG1FiCqsqCI9ix2XH/iQOpsE=; b=N9HlhLONmldRdXBULW/WijTs4/5yKo91udnRqgtYVcK/4h2looknJhwcEh1yHGe5UHdGjYdMcFDJWuRScZldqeTHhqLen4l+pLZDsCzTvMd1d+4o6i8j2iWQ6DVI1ViFg9qdhKURVrp03LJlxvNP6bfeF241vUrfWZZ2snZjfCw= 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:41 +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:41 +0000 Message-ID: <87ilbidgmn.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 v3 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: <87sfamdgo1.wl-kuninori.morimoto.gx@renesas.com> References: <87sfamdgo1.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 20 Jun 2023 02:14:40 +0000 X-ClientProxiedBy: TYCPR01CA0079.jpnprd01.prod.outlook.com (2603:1096:405:3::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_|TY3PR01MB10965:EE_ X-MS-Office365-Filtering-Correlation-Id: e822abd4-1056-4248-5277-08db71341b1f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s9y7qF6YU2rWDz0CrPbv9grOe2Kc1FBg3AlTf3CAK/DCTX3vbJvBrbjGEHiwISknVuEVO1PVjj9kK7D+mKuQ8IzZxzgUviqyY0+F6EV0Tp5v0mZam81SNuUdhuN6jYxnTbGM9JqYG398XYCeSPrjUHWTADSLmZQOGuItz4AASUhQXVBR3D0UaMVFisw0Qo5m0EHv/iDR1UsQGiT4UfsfNH27+ugB0u96MqEBHa5TkFbxKDblOWcLXokq53aFwqvP31DXtDZSN3mtcVFXWUJPaAbQ6t7aiAC2rM7aQRKE8QjOjVZAtVCVg6HyXqB1ha6bH41N2Xbuj0PWmOKfVXOf7Ai26p4A//1WKilYhaRB7XtE9ZoeR1W+irDWrAi52Fv/tk/yHFY3/Zx4SxC9IeSLB3dDUBC/PesYU+1jOCUSzqXYk+b6XuKhovuEUxSeQ9zR5isihYQUyOWY9w1RBhI/+FSVRCcJK+yjI7Nbui0KcT2D74A9JvsZaw84H2cmjet/ZipfDbc8jG/uuSJUba0lKwCskcjN8k/X9KU/DHPiKmv4ef/tcU92X+n/Uu88/FgA/txeRRaF5J/scSJhoqdQl/z+9U9uFcmNf5u/7F5iQq4Q8JpJT2z55729V01z/ToD 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)(6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DWcW5OTJN6WeL2sEghvTLfZGzvnqD9V4qDzF85i28T3cFCQ29nRTksOuOgYeVvOwujuvKvYiNSIqxDOvhMVNE08y3Tv5JpzZ4K7ygUZGLfRyjqPT52qFnvxa3VIJMMAGIVbPxNuKYC21gKz3NOXqJrXIjWLsoUURWkkcjTXsZaOlFZeuQEyW4kV7Xq7xf+/+l6K0GZnokbuhNrQhL/jsO8tUeQKchq+RHfSC0EfJqp4zWWa4F4ykCfVDoXvbSFS8IGZgfNDO6/lNHUEhdrRUy5pL4ZOGkbCxQBSOV118SjfMbqwcTbL/zs+lS/tPLeZJZz98ek6OetvAYN26myLcILt+r2HnSp7mJ/Iixrvv3cHQNdePY4O4uwe5j+IEhEX8EoLRmSzgIgsZs8Knh6Ey81s44EM13mFhemTqU/FvX8/oXaHGtFLHcltjiUMihaXtlF8p2Ds3LFxb6vFqDFrxDrZ1BV+1zESEdX9iY/YuRqBChZ0YYCqwG0fao41lLEbTFL3/Bheoqo+w7vkWtzr+GvZ0nus3XurBIiE8AYWmD72buOVF/ZwAMxwgN2RN2IXq6EsBHpHP08kiHS/6R0lQtJLe0o3fu6JS3j8igm4bzDx9mtD8f3Vw/rDyItlNBr9LkDF7gXhXd1sFdVfHA8doaIiE9pEzM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e822abd4-1056-4248-5277-08db71341b1f 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:41.1109 (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: 4zC1crX5qqwlrFOuPLDFxBK/a9Is6Y0nCOtfWpoI2szd1D3VtFqT3FBZlWDNCuKMLZEUc4DIXYTdgSHJZTh1EIYYdjz/Alvh5HmedHLV4iVRYDgN5PNcmD5QmVNoSWO7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB10965 Message-ID-Hash: JCKOYTSWNVRENOYF3Q7QEIC7VL7LCSRG X-Message-ID-Hash: JCKOYTSWNVRENOYF3Q7QEIC7VL7LCSRG 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 94f02b787c98..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, 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; - } of_node_put(cpu); of_node_put(codec); 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: 13285140 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; } From patchwork Tue Jun 20 02:14:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13285141 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 17575EB64D9 for ; Tue, 20 Jun 2023 02:18: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 0BA0ADEB; Tue, 20 Jun 2023 04:17:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0BA0ADEB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687227498; 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=IjKPIsvKdbe+YIM6M4jK/DiQA5rDIAtr4AXfQvYZADNiZ5EkvnPqUAo7ab0jThug+ GNJVDsL9A7WjdRfjAabwxpGpDTmPzgKp9vW+OOG8hwgKukhvaSnGo470t5dFPROwAm 8lXZSNj9vaBquULM9ZydeHYo8cqNSGVpQ5V5iHc8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7007CF805EF; Tue, 20 Jun 2023 04:15:05 +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 3ECC7F80163; Tue, 20 Jun 2023 04:15:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 90844F805E8; Tue, 20 Jun 2023 04:15:00 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20707.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::707]) (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 82F78F805D2 for ; Tue, 20 Jun 2023 04:14:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 82F78F805D2 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=TXzHgJo/ ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hh/98y878wjz/Ni4PeY/EveFGLUJrNln08sz2WUmAfc4YdodiReYxaolUTy17hFuAR0ioEvxsi3eABk7R/B4zPofwZ0uOhgyw6SJl8Y35f9hDWrm2P9+OGvPl0+MiBr61JSMuwBrez+QejEBLHD5RyMKvcCc+A5cJIWwiWkqpWpw7sryvHvOu0TeRSBtZ8qcx+fU7J28eKnVvFsdmmOm1I5c5dULAGjmecZJbDatipcdspy0/K4XUbOnTj6irLnGlV/LONdmKyG886lSrrnWhEqfTDdrZACgdKYe6OaAOxxan6HpNPEjRPv2BSGKuUohWMG8s2MmV9UmT0+Q/k9sHA== 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=gr/BzhPjg1hlhJ2K3Gut6OWKwBpZ/lzcWNYsdnHVC3+Zd172z7L/CFzPTqOUfR6r4ZCNQqA2JlqOV0gfWw0Ngc2SY2RwV2gLPgCJfZZdPNeuAAHMYSIbm4Fmuq0N2HmBmqR4rQ1ZZfIrCd2w8VXS7oJz3iERE6ddq1lZfQEjAXT9CeqXScyslIvv5RTmv3y67whD6VpyXluyCwN2vUgxmgqJtGh2yNojbByeWfAXYdHTzUunxcMG48JTQOo3xyzlT5XT8TTW7E9vjlYJ5kxBNFUE/kixfKGJWGouVNZ01zu+4PlH5Qc8ct/th/nO2Kk6u86mgX2FzfrWaSIY3sQgeQ== 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=TXzHgJo/YPWFaVIjtLoFfriTRkgwWuQSU7apZpxrNhyWU+0OQ00T7jnPtVLKUmEjdmXfNFjvBusvLyiUO2xgXpC/DZDifD+SfvmqvEHKCN6gXF5J6N9TH1GL/NiQZFoZr5lXZYUoZNwl7LjnAd0obC2w85GaS556PwA6MOKDp3Y= 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:52 +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:51 +0000 Message-ID: <87fs6mdgmc.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 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: <87sfamdgo1.wl-kuninori.morimoto.gx@renesas.com> References: <87sfamdgo1.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 20 Jun 2023 02:14:51 +0000 X-ClientProxiedBy: TYCP286CA0061.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31a::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_|TY3PR01MB10965:EE_ X-MS-Office365-Filtering-Correlation-Id: e5e5d910-97e3-4ae0-7f4f-08db7134218e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +2tG0AiBcfmVod3mJv4eNeQrRseJ+gAkZTpIpzlXOuQ/Ma8U2jo+XTrOEd+qaiNaNeYwSqZvLIAruQPUbN96JtHnnmnHHLeeBobCuVRrrnK/FbPn+6RD0oDLPTdAHS7aqgwqZRnKR4nxJ7vej1nGXHEpbf+vkuagybDVJDcM3RNLXgZwQV5s0Rw9y1mFWVx/XGpDIGIKZohpq9uUoNgPeN2q36lQhCAdobNQlDJDWXIAcckOlL54r6aRWrT2rMN4/aemefFKKxpKEKT9w8PSyxLkATswgm309DnVOH7al1ufuQx9j2IqybxsVDlCNL5MfFttwHF4rrVkvZT/a2SDZmGxBCcNnqF73ckx9peODeZM6AagNVcZ1jheeToChRMzazgJitk1EDMfLkcD0c/J1xbVv+xQq3bRDJQuHPWj0bGdh19eNHCEDNwil4gNYxzTQ7+f4cLd2RG35OvSWpgxtPpxmBzk3ILMNR3MLKUJoC4iwcXr7nAtAo/7wLFaJWLpJPXs+C+3v9EwTKS0+v33nwKXnR82xcL7P9JcGM+Uv6Rp50aVm8oBJRJcFO8AoqXNfXXmwv7yUibKz/A6bsRp3gZq1K2bS9qxeKIDaCM4GgNlcFnn6iPIyDsLHaVBU277 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: num6xQzbDCWlNCMFquXn4KnRLOfJ0mESf71yUFWYQK41EJYN3dG0+P9MhLsuIa+87nLx9RZtKJqCSiiatXwwiaYivCypBnN+LEO47mBhFjtH8mGJ9RBVeSepX1pG8qpLM3ff9bTImYtDMm1Lg58hQEu3Fa+ZPaZ1a2ifPnTT1St0ph7fmUdfYst36Obc1cKsQ9rT6UgMsP/q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fliOPjkKE/llxHvrfOvyJ9UNpD0mWp86M2/ftOFJnPGpqlAMz+4mkn7rKzh+N2u0mCyJfbxD+OZ9zWnfRigHqzM/+WuZGLh5LqtziXM5+itRTP/sbD7lhohFWl1wnY6B9y7w4OW9gSnW/QP5wk+8W1VF5dWFU5S386IS39Vw3LNuRaC6F6XoHH+9EtGmoY7P+HSEdw6ahvZkARPbH5cPk5gq7sF1wckMgoOiD6C8SeOkGvfdZn47PXb+d9iAu6dIh2l06g4Ccc4YswhWwhwiISWz+JPgrE4N62d+oIggJAsexNQrfeXrB/HEuUfQfMeV+IunPvaP0fx6X4zE6Zzl1o90X1VbKQwm9vE97S77rCG75A= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5e5d910-97e3-4ae0-7f4f-08db7134218e 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:51.9040 (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: LGaJLgvVY/kpdVBUoVBdJNQMg4D+YN9g2xGyIRFGbB/suAQzoiU3fkUeWLJ8QHIicTOOoXvGuQ3KTUTuWYo8DD+bFSItR0DU3g9FpT7MEEQ6LVNwlTpqteMZQ6cMyr9i X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB10965 Message-ID-Hash: LYZ5IGVMHVHLUTQZPCSTGUJ6436EHR52 X-Message-ID-Hash: LYZ5IGVMHVHLUTQZPCSTGUJ6436EHR52 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;