From patchwork Wed Jun 14 00:18:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 692583 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 E4B47EB64D7 for ; Wed, 14 Jun 2023 00:19:54 +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 9136082C; Wed, 14 Jun 2023 02:19:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9136082C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686701992; bh=NCjS/YPRnuHoKO1aTYBZWs1EcVZVTAvrAsok5jRz960=; 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=cArmZWgX1qCcO5ldEvzLd3iDzZdGomviP4tbfN4XWxhBbfXWC0ht0RcFD2PZDfaXz QC9qJ2xeW5LbTcS1rjDdWo/1vsG9eKNqNXB+qjMU5Sosmb0ilajPuzx+lI1BOb2162 MWn3KiECaMNx1jkxE7751jgkuOw9zfq6XJiAErkU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A0322F80551; Wed, 14 Jun 2023 02:18:35 +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 E8BA1F80548; Wed, 14 Jun 2023 02:18:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D55A1F80549; Wed, 14 Jun 2023 02:18:31 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20701.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::701]) (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 A547CF80544 for ; Wed, 14 Jun 2023 02:18:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A547CF80544 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=dz8li03j ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zn3DtT1qxL41EItohb3ScxORKr8D0sbwWasMWt33te0uThxi1pLo8BUOYCkcUXBqoeis0CXgvf5T69hU4Kl+5NMnOcvsI/zbDawUaIGKJGoWFj93yf8FetmmOldGRJvl2TE3xNWaLBK+6m9VE6AAlzwYYiRRMC2GEvPu/IfNisotm2LFkc+sZMFDfTiBLDvhSw4lGhU2Dce9V9fpa20GC7915b7aqrPRtjsQ3kAzavhqte9dIxIOFT4SxouAz4lZ6OKTiYDjM41n5eJBxdzJ5bRxm6D2/Y1+n2bnO1NFwqOopoDrlnQYOw72VyuHbvzTTSV0l7re/7FI0BT+/G0Tyg== 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=iAlbCYgCeCbGe3efzHql2xZxCvCdP1T+YxOFYXxA+1E=; b=EuLftFw7CmCTA6UBKS0TUSZKQKyQm10uxBmVvA08SfusKsLnxwoCJbH5u8aI/a//5IWlIMPzCfD+Qy6X3rZK2TXi/J0ih1YLyoH2K3lCU5/A1m44tq6bZ1nPtV6zmeE1R/FITrGU/HV3oHacV5VsvtPQrbT6QnVKpPZPNJ2FHeGTgnGS5WM0XKiVMs8uXKjzTAcqT22KkE4llJWmjPsWaDKvQxUClx1p+DgUbPhuZW1UqUBAOPNdQKiM1k4wtPYP8Bx+bue2eZrwV/FHX/Lt4+pzCKcqZEupfus/tq+p+W0R6YKopoorR23ap9qezO4fzwrH2adatv4ott2a0ivV6g== 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=iAlbCYgCeCbGe3efzHql2xZxCvCdP1T+YxOFYXxA+1E=; b=dz8li03jqdVEoNMlqsYOPaKjMawfS+23rYq/1kwrXRQeqUe/BiNlI9izGWJtXkUgXkqrGCLO+V3ZjTXhhbQho8zCqDS7g6aQ37FlyHJ9vm0Zr4uKkAzLiwYE3Chq37SDZC4nPmUUAczEw6mJP/bK+B+YeLUjKUUxl+XZOjbLTro= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by OS3PR01MB6276.jpnprd01.prod.outlook.com (2603:1096:604:f5::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Wed, 14 Jun 2023 00:18:21 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6477.028; Wed, 14 Jun 2023 00:18:20 +0000 Message-ID: <87legmhp6b.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 1/8] 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: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> References: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 14 Jun 2023 00:18:20 +0000 X-ClientProxiedBy: TY2PR0101CA0027.apcprd01.prod.exchangelabs.com (2603:1096:404:8000::13) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|OS3PR01MB6276:EE_ X-MS-Office365-Filtering-Correlation-Id: f87e51db-3e77-4530-2f10-08db6c6cdc24 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EO3aEmokSE0i1oQMQQlRJaYGtKWu8HD/IZULwTGMgh8oWdAt3la/DYtbX1qhAqfJSA30ph6N3q9mnlWR3bBmT8nRsW/HR6MWYmUJS93WWe1aWd6FID2JpEhe5rkP4RC4dsKbLb/syTUgwn0ZFweZKUw4RTJeAmOM4jdRz2ci0HakqQ8Q/HprLs5d8yaCR2ZAs9e3dTnua3fn4/CDmbYkuFABFHcL3zWhRx8WaEc8vTRiOEtRzol9Pj9fJwBD+qaMytylMOKDPzhPAr9jRZT9BNmHYa29x5XIiHr0LuPXtaOLwku8nvCELcSiWotMOskrm0IgNILjlssh5N0apunAUArKMqGnSavsZw3NIGa78OUhCgFkeG1OFLRZ9L1Y4IXK59AB0XoA+wOkPhitXHpLerUMe11I/iKGACI0NwlDSDYIHenv0OGQxf7nt+Ky+zRKfcUDg6YWKdY6dcJ0Yn1vHBiV4Fs20d7WtD4p6Cg2xSi7f6NMOvgIaKJl2qsfzem8a6vCLeJGuoxM1s62I2rpMUlugdZtb9H0cNtXwlh+GNpmZHjXSWNzConc5fiWMR1WTg4RHPwHxtU2963ksvqQuVudPPkifmyzPw6baBWuxdMSaE91m1UG1fuCcUkCwPST X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(39860400002)(346002)(396003)(376002)(366004)(451199021)(83380400001)(66476007)(4326008)(36756003)(66946007)(66556008)(38350700002)(38100700002)(316002)(41300700001)(6512007)(26005)(6486002)(6506007)(52116002)(478600001)(86362001)(5660300002)(8936002)(2906002)(8676002)(2616005)(186003)(110136005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Vvz8aryCFCiVK3pe+OOh+aHTDUK3seGe5hKQqniVbarAS9LlsE0IxHvHz2gZBoaJQYKInsfk/46X3vGtVnItWbZLiZwD0N6Q8JktzfZMqL9f6AHvWPuze/GvU3nAEmMMHjx9KlDGlfN4DhOCkCKyPGsaw1z+Hg+T5vk+nBo/hYwBqhhWe6nDcCc+1nsoO8Zv/s2VmsnZBO9+6rcYP+5sE1qdaXzypmnOGw5Bq4tCWJdnRxUUVa40aknC38crMXTKggy3952MSo/qFwePpcRKj0hT6X8hkSNqSpyFqeSy2NyBs36jsmfL6LHkRVXMEfEsYbeRW60wTmUbCSV/N6kBkLSOzgvSinsXcX19OBaO6t47Ts8aOPJ+09xFAS/p4/0QePkyXQvVTrldIsPRpwOBZRe/pAg5Du2GbyNI4jJdXx5m4+/H3rVGYeqrKa5P41UIJ+Bzs1YPzth3b9LfE/Iw7b5kz8H6+EF6R976YYPHMDr84GJl9QdYEwu6ERb2A9YV0nUPT2Bjo+CTLJ9Y35//wEc7Mbc84tzFu6YIOgcVtFnQMAE4QSkvKBBmSglWmFrTuFtcYUrtM2IcRk8s7e+YndYRh8P8ms0hcxL55f5m4Yn0Wz8zW9mHeNcrTfzwnjJ+LbXY/5C1Zu6sddoWag0oO5D9Xyv/GobV6YEO72iDMf9eMd0qa+Lf5athWSW2t0V3ohWprkab2q0akSpJC3oNJmdlNS7lCWqEGK7i71kSFKG1qWFTNE/VArgR107pGDEujF/71S6uvtuk9cWRlwAL3LPE7sSZq4X9Pb5UNCNoXvJubNDazKkov7shzuwlIEppNrO52G9TR+u1sQ7Sn/9pXGRIfNnnuT3CjIF/25anuXiTid3FKSJ6IOtfww+JkcFCByCVkIibPU++Ma068iJiOJtKHTyFUKUInRJt0EwJWyI6IYQOWU80dS6l9mgCkP3/r0iplQvX2YnzkzHFX45m/7YCS1kH9faRwErOQ2X78V2CHN3ug/ClEdIvtX62/TX+R/8OhFeHktdt8scvWkDy4ooQkMyTYDEzg/gLgqasOBupArLmlsieGAsPAyKl5pEW8VANYjWNbbfjvI5u1HZDRMGZyj9EW1ZeiQYjpjpRM1V3TsbGn/kU3Plb1ENEyn7W3hCc76OihUGqkgk53NKbBPdsLUoVLxtHPAR3nI+5bu+ozjScq6f14F8dU35pVYqienF59DoU4g0GkOAsgR0BE/EtDGo/F9j4cTi72lWksUCvLMKppdf9QAPhWwswKpsJh2zpfvqD5LPXNJ15WjZ0mH7Wi7vZnMrycrZh8/Dl0Wg99W0rhtzA0AtYgdFURR6A+1gO97y1Cu42pFhogZhe/mkpGsSL67nN4cZSmIqZFxIJSYcxWB2sDMdOMkrXuU/rPJwusBTKeav5SGmSQx74eLtoD9XZVHR/DC/zGvkGXoO6aP4zD2XfrhqJI+OHM1RQEl0RXs3oZa3kRadbiIPfSN9jPOhtXQSP1p2zGrOBj8wSN2ZBoJMQ3H5AmcGKOoTCMuxfdyBHyHRufq+H7GBuI1xGy4pqemI+a6599yVdBYmWlSim0OkNyHWfX6cpRbNx755hJODtLVZxW8zG7WlWGaJzb8qWyClR2t3gDTJS8Kk= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: f87e51db-3e77-4530-2f10-08db6c6cdc24 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2023 00:18:20.9576 (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: liPfE3tYpDMVl0BxKq/2xbQDjs4bWjA2SAQ1mwOJ1wwMw5cVq4X6ALCE5aemS2ZwsqByj2BmgwNQN3jsIYuwL+2QrLh4OgDFsZmRugKaxR5GD5XS35qG6lFLmv/gcJH7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB6276 Message-ID-Hash: I6Q27S6HUMRM4UKCBCJ7VWLDHWNPYIRE X-Message-ID-Hash: I6Q27S6HUMRM4UKCBCJ7VWLDHWNPYIRE 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 convert to use 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 Wed Jun 14 00:18:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 693297 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 C228DEB64D7 for ; Wed, 14 Jun 2023 00:20:11 +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 7EFBDFA; Wed, 14 Jun 2023 02:19:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7EFBDFA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686702009; bh=9rFdktD7E5X5O0S67o9jUTIn4+JsIcI6ClcRCRrTpcw=; 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=puFPTOszC+bF06O6TR8wygCACY2OXszVgftgQnFh3jIwYNUhsqyLrUrihGThAu8WH 7yZMC10IJw7ic+WaEhww5V12qfacE7LZ4kDeKXT8Z4/HPgfVbkAKf/rsFt+/A4dmm1 ZTWtj0QvgvnJ6i7lwhayxZS1seadvOD5aq8Ka9XA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E0261F8055A; Wed, 14 Jun 2023 02:19:11 +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 5B92AF8052E; Wed, 14 Jun 2023 02:19:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1207AF8052E; Wed, 14 Jun 2023 02:19:08 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20703.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::703]) (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 C2FC6F80246 for ; Wed, 14 Jun 2023 02:19:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C2FC6F80246 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=Q9kHSOHU ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FyL1Y5QkTsDsN5vXfBmKeAo1kqTezq9Rzgm0PdPPHz3kQOMvpP/0D6G6QNTDCkq12xlNE2IsOav0tJ2zr6MXwfRhbqZP/d8BVxjVnuxH+xipDzFUgmeVew78N7bFCYoB78TfnlRuUaiQuKIGf0W0I6RRODbzoEypveOXYi0ZThlPaMSxUeuj/RBWxFDeV6Dgh/Q7I6U1HYpQTaowaLOjkgmnbF14UtcLj6YE1nvcsRCO2l3aqD2pou/9D0dhyRnS08Ltf8uwdPR3mDMNMXxLRelP+sapnn3AbrDPOT3bf2EzfpVMNnEL3Zm4V2vG0HaGVhjEaG3elzSMPafxtCexwg== 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=ZrVk32mh+HwdhB8jEL9qBnzfVfQZwjPpRuXQUA1srz4=; b=PlHew39wsWt5L1IkLJdd7bhgXie3F2Zhv2mZoKyD9UsgVOVpVbzAm3L0sO3evztCkv/F7Y3xyLSbh5rquU6w5Bw+icbqi7kcmNUNQcln3S9mHjR3b/JihehWk8P+Vd3TvuThWBD8uZdYZ6nKCUts3kwFPt/wJex7ksT3mlobHmmplQfH4ak0n94rP/Y+e1Ykeg7jHGz4r7ifhSHHrlgDa8L+CKyYk4CF38xdGHCyt9CrNJ+amkpenVCQfsI8kdI8jd89zgsvz52EXm4oOOCRT4m3m+fDJnFCv2G7r4Dmj0a0Ujz6+GS0gve9EXSopXnToLOo06YOjr4dRfm0HnfvZQ== 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=ZrVk32mh+HwdhB8jEL9qBnzfVfQZwjPpRuXQUA1srz4=; b=Q9kHSOHUwjp3McOqT8l2jKw7F/5iybs/NVsvE2rK/KHfkuc9E7c4/3SpMbX7Iul+QNSz5pCA23yQ1hQNioTcpO0sJzxe2FBAcNxWtfJK2TtvShxLj1PitqgZ57A7VMddzjI/1usaBFg8u6bto2nW4bedBeO7NXQZHlhdfdU0hL8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by OS3PR01MB6276.jpnprd01.prod.outlook.com (2603:1096:604:f5::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Wed, 14 Jun 2023 00:18:56 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6477.028; Wed, 14 Jun 2023 00:18:56 +0000 Message-ID: <87jzw6hp5c.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 Cc: AngeloGioacchino Del Regno , Fabio Estevam , Nicolin Chen , Shengjiu Wang , alsa-devel@alsa-project.org Subject: [PATCH 2/8] 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: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> References: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 14 Jun 2023 00:18:55 +0000 X-ClientProxiedBy: TYCP286CA0201.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:385::15) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|OS3PR01MB6276:EE_ X-MS-Office365-Filtering-Correlation-Id: 700a05c4-fb5a-4fed-0f05-08db6c6cf12d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z7wznyY1x+ATXGAsOik0Z9jgI6D14AnZpw4DJzm2QMcJCSQRWXwx5aNB07N5Q+r0GifnVyJ/xc8dG7gAyPXnjYceqa4e0eSQxmW/6XOk9Fcm5E31v1kaI44Bt/IAxncwD8YAH3QTWuPmh/qGbyyGEeLDq50lR77NqUO8/ihXPoAH/sOPPOkd4vNJOg6XPT7zXfH5viR7AfXMoWgMr1uZ2fYwnS8F3xWykYQt5pC/EQIsiatT6NEfgXdmYJahslN1I+oY7cNkdk3x7T0fs7pd0dcrGKgUNRAMociFdfN1RKyIm5t9yPLJWmyEtF7zS3urZJcs6u5aAGAAHAEZZxOR2VtsVCYoGq57Cn3RkP2Kcv6rexkVGyDmES+CGZlGhXo24VMg7nDwjomtLgmSWJakOOTz2Ay4UOkJVvTUAXSXJCuNZAA5oeLESWujA3LuQDThbTTBi6XiTRGTwpH4l4pbyaR/Wyj5OANbT8MMdKGssn0CEA2F7gQ4pvC4/Ug93fKP6egwiOUpLuUwtwYum34xUDQR4C9B7ozt9FQTkGUlY+xKCK+5tOZIg3lkKhnSKzgLJ0t4WqlGeze4PmMici/x0Htz80EK3JLpuD2CUVnliNwCnaqps4utidluGavQgID7oT0woccC0MwJ1s1vJlNvcQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(136003)(39860400002)(346002)(396003)(376002)(366004)(451199021)(83380400001)(66476007)(921005)(4326008)(36756003)(66946007)(66556008)(38350700002)(38100700002)(316002)(41300700001)(6512007)(26005)(6486002)(6506007)(52116002)(478600001)(86362001)(5660300002)(8936002)(2906002)(8676002)(2616005)(54906003)(186003)(7416002)(110136005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0CO28TG+3oxGae8VYcFSAQHd8/245IpO1dbUzDWmdpdE+HV6B220sH/3U3seC83KAuDiPU6pBk3N/ouZzu0kgChcfV0JTSdQ18pg8gP9L1EFXcXSiByxSwnvcWjP3+9zYmypf7Uu7AcRCToPRtr4sKq7Rsuvox8kRODzqxbEN36u8rZEOf51cymSNLKGaXMSeSQ/qlxxWDPsxZi84tr6/5kk2WLqOpsQMByPzHaImWZnIphjEXCHGefJ5PsqSBGire+RpvwKepI/km/GeSu0Bk6rzQs5ourJ1INg/3+qTldZyyCcZvsyb3p9ANyG7B+7GTS97sHkWlsL1f9Am3BztEUIwIavqMnVmOSpqyH2pvI9xd0zT3eNx9sDDGba7v16urOLonmkWucPs1djb7Q02TT8e7BEkruGHuGn4LHNFCg/+fnqvW0jalFXpK6A/JXhXk0h9dc61TlBenBWCOBvNpsilHljmdP0+HMi3mub0AvKnvY100cOaDPQ58uuOG2OcgqFvYn85zVTFi0cOO/sbJ0Q3Fol0pB+xDMdA3+rwM2XYiLqygO+rEDvy1iwslBYBdXFHE2ZTpbNUyrmX3QirYAzXOgIuclqy61IoPrCHEqprQjt5hYDAVRaZImN2lZG3fVd2QiGPD9Xpd9U5gTTO1iY9a56n12LhU3nfogI8U0+KgqO6D5yK+11Q031aC94jFfLH8j3y7+YSfjJfixszKntKujEWzH/ZPfASkK2MkbJHHSqXpnMJFIxK0n2gTODC4EzvkcCVO/PLNBerXSo88ZtrLvGulsp3uVRjnm1+tC/pZnhWvs3CPXr7KwFC+vjDkcnE55UUYl6BA1YxZQghON47W/j3c2dqyj6uF1vzBYSigSYckByAS+ek+yd8Hceoknt+7lQTC4/9kUzBXI1OZ4Fs9omsmbEsDY3LLYYHWGKGH7I1OjTOggX42lLvR2lnTf1tNoeq5dyOIlxbCajuwekDFx0vwNTc9v+3QfE8IYDEHt0THREC84CD1JiI2i2pcLHtXO71QedeWwG3qadePOUjMMRPWMaB1ikSjs1PpWErHIHNhu3dCNLrtRfh8kpMybichT7JmoVbUYiXvmSWModR97glKTnSf7L8uY/wuRHIK8YH4K8zprE8+56rYVjcgWfiGjiBwOsKBHtmtgxhrgRuBAVYnILiNTaMVj2Rf9CWfgE12XZ03Xlrpff58GhCUZ8GpZ1CO0+XVJupGNwZXo9EGMsBbWeRFp6+GdrSwK5IjwFq7bkvsxlht3M5P91Z6TFi7SDm+5mwo0uXPrmiac8PIr94deH5CDthAY0l1UXe8FYp8v/EPsFC6naDbVIaqxmLT5O0mX/QUY7wcaByGWXk4ibhw3ej7YQ2aL04HBbX1gTnmLmYsRdcbh/gho+Sb0oKOvXVWcroQbDcKGNlbE76G1fhorWPFU8wc3gHXDkAzNvqNGI1Rq03c8d51HCOrwQTJ6qT9bg2q2M7tKozQd0MOHpMJDUKTDKtDxWvX09qXDLgHREsuYPq9OJBG3C3DHv3xEydw28p4XkDzQOiQ0iSKDxSvdFaBJiKuF6yJhALJiMwmAp+lb171shXmRW5iwHyrq4rZQ9sJZdRJZ1GYXtPmSECYS3QWWYWD8+nbg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 700a05c4-fb5a-4fed-0f05-08db6c6cf12d X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2023 00:18:56.2712 (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: X7aRpa8QcIEo5JHqbnz781yYoV/Y2erHaVOyT45prc6myn6DWBz6/gztL0AuIxJOG/2rMJUIZGlyS0N9CWrE82n1AGGFs8p9oKmRNWymxZaIttRDqnOq1WuO6FX1qJ0M X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB6276 Message-ID-Hash: 747O3NH75M4UDOUCKJJIG3HX75T3S5IL X-Message-ID-Hash: 747O3NH75M4UDOUCKJJIG3HX75T3S5IL 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/mediatek/mt8173/mt8173-rt5650.c | 2 +- sound/soc/qcom/common.c | 2 +- sound/soc/soc-core.c | 4 ++-- 6 files changed, 7 insertions(+), 7 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 6f044cc8357e..9e1047b46b68 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/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 Wed Jun 14 00:19:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 692582 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 AEA8CEB64D8 for ; Wed, 14 Jun 2023 00:20:41 +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 7973883E; Wed, 14 Jun 2023 02:19:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7973883E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686702039; 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=eEY+LO+2Tbo0lfgS1ozs0aIVWJBNSTqqL6YBpkpMF421P/CKTdx2rFLmSzrDrir8n KXvA/spS2J0nPmCfwjIHCOXzRkCAM4HH7Lwn6AMCUGTmvMPZDyoNibnUESCXLHScsQ E4HITwDVPbVAx/ju5CuguE1YyodwTqdjnVbDmChg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3EA7FF80548; Wed, 14 Jun 2023 02:19:49 +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 3E64AF80246; Wed, 14 Jun 2023 02:19:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7F5F0F8025E; Wed, 14 Jun 2023 02:19:43 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20708.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::708]) (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 52045F800BA for ; Wed, 14 Jun 2023 02:19:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 52045F800BA 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=oOmQ9dsV ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l9atrO2Lqd8zq5ZU1WHzt9sB5mcsHu5h23p9HMWH0jDYk1pdVfg89HECObEivytNZHey8bj5/sJCqF4uQyd+5670rFCzi3b+Qlea4Vfga3H+UEK0mPBQ90j5Qb4y9+nvpJ62bkZx5xxEKvKJk1fIDs1CmiaGitiErj9UwTbGFYD//kYcRakRv5Og9PWjgtRyvRYHLHdNMxUq29Jir7mHcgM1JUdX9CWs8VTpZHSJJANa3N0rpF6djxINKMezkbUmNld7Oev9//+6k5fYdE3hpfvYXr+9/2LeHYLIZ1k7uHH9Akas9mMMhWAxqiQC70+CE1e6cZZH/GRbk9em6mLSfQ== 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=gVqWa/zgg0zf0oudbPPx3NJPLYDFxNfi7BpJidaJxMekdgqgka4EyXgOIez2f80WnjeNAx6GZwvM4IkKnmXlEKgtHpE8KaVg9Y9JGT/NZbu3Ko14EnfN0Pm2D3E5lI8+jeZPYST0X69pYg/gJ+gCsFWm0Il9zfLcr5tFERkaG+YCw9gJyMWRvGEuBxsrQPx2+iu2dwAmJrB9VwcS6qdz66DklQ2qmYeRM6g3Sl2miWlWiv6grzfFYJIwLB1bq+cHtgE1vq6gCXZVB9wU0xAuI+wlHKGV+F7bOb+vapOksws/JfCQ0a2+36szt9Dj0tlt0KzgwS17544HbGE+iw8oKQ== 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=oOmQ9dsVZ8EFml8YN11uIn8i8YovtynT0mUSZMdd/B8pLaTRnOCJYVUfbu95ItDBK2bdfiuz83JchebxV+C4RdEDLUoifjnq2VC6ZNejGhFxnv77NgVhTxJP1rtjHSjMe4kLWplibaLY+Pzf25sD9k/FZmHh95YjF/oOZkFx6Xk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYCPR01MB11658.jpnprd01.prod.outlook.com (2603:1096:400:378::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Wed, 14 Jun 2023 00:19:28 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6477.028; Wed, 14 Jun 2023 00:19:28 +0000 Message-ID: <87ilbqhp4g.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 3/8] ASoC: fsl: use snd_soc_{of_}get_dlc() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> References: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 14 Jun 2023 00:19:28 +0000 X-ClientProxiedBy: TYCP286CA0225.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c5::13) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYCPR01MB11658:EE_ X-MS-Office365-Filtering-Correlation-Id: d53d9509-4a65-4be7-4641-08db6c6d044d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3zPvHuHB2xAobd5coQj20GosTnnbMsb+xqqhL18q8uzoZvUQjiOMdF/y1G3vwxdslEfqhIAY9TFuj+57O8w3PaGX2VKpd3/ULI7VzEAAmb+MeAel5+XGEfnJ+XKUYJYVMF8x35RAF5WgAXb0LRxYVLyMMpKR0gr5NLYSohvTzS1ZESODKjAxmEgYXjx7orwkQ6NT22i7k/tK8J+tSp+KOhhi4VbshWRUU+W9iaudDVi43Kf7w3QZwbwHsDJAnH0l2hIs8ex3/fpr2X+nHRXKttobIwYGVChZ7YTsM/s151G5DRjjEV5EQbBqxE6kOeYIBw5YWuwsbuxGs89sa7QguFcngChUVk7cYBaFg7ZNBiZvLlII//OhfTv7a5wC4DVGsOfm5iN0r08RAw2MRGRnGSsX1NArjSNqOQqEhmN3t+tKfRv6G8adex4sg+GJKqUJ/0+T/822JKkfqMZYsUw+IkIP/ViyTQecM7q1ZuGV0Kpp9imVfFFO5D0wIGmwB7MTF2A+3di7x/YIcNxhXe+av14S/Wx0O1NYtGenz8SHrQXlSfQOBwLJ2javNi+rsBuoFpS252LUJiobEyGG+Wcc3CKJo5eD0T+c0HkPdISpFzkr244W2giVoacJouiJ3zQn X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(136003)(39860400002)(376002)(396003)(366004)(451199021)(6486002)(316002)(52116002)(41300700001)(83380400001)(86362001)(2616005)(7416002)(6506007)(26005)(2906002)(6512007)(38350700002)(38100700002)(186003)(36756003)(5660300002)(8676002)(8936002)(66946007)(66556008)(54906003)(110136005)(478600001)(66476007)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1/duMo9RdjTFvBFxGnmCUBbjS9OKnA/JWgdnMEjYStSvqiv7Uyo1roJnrKeDH19pmrsq/GtSxDu+FmC7t1qZNtUJR9ikesuT/bjmxHZK53+r9GEP+p2Tdh3xC+nfkDu3ptejhVTHrifSMLZmImaWqIjImAOhCbGbUvMwfzJgCfCCkH25zlrYAW9iqH28AmDCuXkJSw7/Uqpr2jB35DOUIUAGpjWM/+6wjdK2IjNsy5dA5JZ8GHKbkwvFmidQr5Q39W+f6bxMG1YiDtXPtzgefUpAap5Msh3XXMPxT+WM92sV0oiPgDq0uJX/YbQxa9JVDO4HSXiGEVu6qST5HWt5BtrR3tINnHLFuO/hxVJF/Rat5ThXTYmMFnQDvCI6YbSQMhktG23fLDmuLWls43kJB+cyTo+Cvq6ofepcsPwDePwX/JnvYWfZB9kAWnwA+eUFXWWw2l3gTKWtxy5wnvxVpKjrG41txEwYPSbSM2BnwLpemWSlm0pxRSxtDYl0oM9RmFfIoQnD9UZo2hhNSmO8i7MqnSDUzEu31Y/qc67Lpf/7+e63KS/xOQqqG3f+RhS48WzdTI/f+zB/jRle+Q6q6WH2PGrOS69ASk1ml+7lEzzdwzv8LgjyEo4llixd7pVMEKrLo917z0EOKVauvwWclK05a2vIUE3c7JgXer9SX5ZCNhjvxz+ZlV7ahn5ZZUEmUYTlFEoflzLSeQ2qb/h+adEqRe/1cFXf1Kn3Qz3Hiz5QeKLmrliivoViqwiNQYFCHvKeMePe2uFhyauN/PIV4h2YMZ9z1zoKal477HiI6i1dtKrWbbh5Sur3+dMbXX4uRAZu369vo0QPG61Za+XbSjKl16o4kF3WgCNckErf/GNISmN6u6BpQ+yWnBQvTm4/08pLLc/Jg6awIqENBAL7j1Dcf9yVvgK36s30d8f6KvTLE39o8JS0L9Cj52Y+2n0VyIYCbJ1iSmlxE8gE778CR1yk4z9nPYml9gKVz3GefISi9BoDCcMGKbf1tDrs9/N8N+C3FcWyFr+XFUDe8aiMnXWF2Xw5O9tjjgGWTfGJbg9OXVCYflO2j3J6vXA3t9opncM1ulp9BJi39OB3O5a8SMW5pxQNbk/xBE++vR9KHcSfpOQyFK5tMG/xDx7+kduIncv7L+m67IK3EvzmBvU8ALsb3da0cmcusnRWLFf3IUsWpqyM4t/ETWZqQIWSQfSQ1F/JO5shzCaROl9bcWd9OYPC0m4j8aTzS95XbApwbNta9WtgU6/7DiW3g1RbJKdopUiSopPQDpCuyYDAjjsMKwwz8sv6N5vv8lCkaFyJ3IJI8IZCO8RRcMGulQpL0K2nW/ziSr9UMue/ZtmH4oQkjLQYHr96R4xL6DjZeEDyhNfbqtxSUUXCpW35BD9OD/bQhxjGiBIKCnty996/CTwZ3j3wD0cNsVVWQ8L9vlNNK5GQ2oFdh6lZVS//cFEXuqyBJBO8yKB7zQczTM4bC055cvwPPoetpoh3g/Z5Jx9zCebTe6Xc2qiZ1mlRg+Xdx313yPKQb6DkheA86UKTKA9dvLJ958q9Ff4H2dd4yncm8agrPyLCzg4V5HzlujpHgD+gPqkoCUlHGBpbUc/pe5AgHD62/OHCuxE1nZOmXImeVOg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: d53d9509-4a65-4be7-4641-08db6c6d044d X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2023 00:19:28.3453 (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: 1LfqhRJbyu0zpmIeLewgktueq9ibZc0k9fRW8KPOWaC5Qio2OauKHg2FmUX5XcO4e5QVfmsPrtWodSenVMNrQzeQIHPVjgbd9lmFSkSxnqqAIA4JQJg7xS7XVx1AYSUz X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11658 Message-ID-Hash: YDVIXH5CSFDPVLMXNKRPW6W7V3HEIM2U X-Message-ID-Hash: YDVIXH5CSFDPVLMXNKRPW6W7V3HEIM2U 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 Wed Jun 14 00:19:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 693296 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 986B1EB64D7 for ; Wed, 14 Jun 2023 00:20:58 +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 4AA3984C; Wed, 14 Jun 2023 02:20:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4AA3984C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686702056; 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=QYsqWVH3vOsWFq5Sw4E2YmRtvQptkZX+iieSdrtDe2/qBXXx3wKkEn6+kjrTsKS6H BICMHv+VJO87RbBAvNmiF73Achox4xo1ImEhREpzDDwVbkRUgDMLi4WyL0hsrAeex0 v+zQcu0UEXzwy6VbucWJ3GKiIk0qMl+ecslOTKZQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 18633F8055C; Wed, 14 Jun 2023 02:20: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 B3F63F80549; Wed, 14 Jun 2023 02:20:05 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CDC7FF80551; Wed, 14 Jun 2023 02:20:01 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2070a.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::70a]) (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 4571BF80246 for ; Wed, 14 Jun 2023 02:19:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4571BF80246 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=IsPNm3nO ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KqV2wIItuW+RnYi4okLAf5BbCsl2msqSOBIFSEBWGdjFfoiRthT8Slfc6qjawOz9AJPyls8I3j3ZrsaN06fMml09WfeHRZ11MubbTSKl9Up+EwVww0NnB8wiYq/weWtKH9GebMwpE+sAYaEX744YGVdO9ECRTJEb7C+Zc5pnwMs6dWMoI+xtsyjP5ndiYoIQpGQK56gX+aH0c8WzUKiHthE5s8geAuB5fUdc4o75xGcEXmTCIUWhxxMxo1LLC0ShtVPHXboGpQhabZPFqCFjJ4I6EodeP185hCffaF+gTHJYzw5TCqwd+jN8IDFfWlMc+U7jbNHCvEEWwcWAUeHr6A== 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=JVXiKsbR2kfCzfdqo7V48lCh/b9jyR61SAGLgYLJkWMqCEDZ6KlJg5xmKzz0LPI01avq1kBsAOHS1LtWgBLSSkccr2VRqPdasKO/f7CZ/7xcJkjswNLW6fPg8f/szgrdh1JXXyyzcxheEZvFThDjRCwo0FQSAF4hqxPnmNzf7IyZJC7fs1+Un4YScgqvUO19cgsIFvRieawYdFcZIR9PDbRabFxk+yCP0Yqo1Kah9+oM+fw3YfIZGvGbW7rN1g9OGwy9RgIa+vqfzGi30k5GuWC6HWrT502SEVtTgfi2IojWAn0gdCos1URiuTYMUQEwN+PPItyzEu3ND8k5RuCTfg== 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=IsPNm3nODZZnFHdNT23KWorzX3Ly2fWZPjVDyv7snAu2BdTM7qgK25LSFcI5b1W68QOfwPjrFPQG3EykgA5BCp0dehNQbxSFWs4rs+T+IM/S7CFSVY1JLkPuuTWMgGoZ1QGIMXthfYN1mHz3xBLVc1iCBUebZteKqbuky3yomlU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYCPR01MB11658.jpnprd01.prod.outlook.com (2603:1096:400:378::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Wed, 14 Jun 2023 00:19:45 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6477.028; Wed, 14 Jun 2023 00:19:45 +0000 Message-ID: <87h6rahp3z.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 4/8] ASoC: qcom: use snd_soc_{of_}get_dlc() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> References: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 14 Jun 2023 00:19:44 +0000 X-ClientProxiedBy: TY2PR02CA0017.apcprd02.prod.outlook.com (2603:1096:404:56::29) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYCPR01MB11658:EE_ X-MS-Office365-Filtering-Correlation-Id: 17ee576e-3a05-4d03-f109-08db6c6d0e56 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: plryk2IyYtygsBdrLPc5On6XNXzprLzFUYO7Ys+lwd+FDFsayZTUUhpz/TpClh0iVhp3Eh/6Ie+ulv0YvU14mtYaNMN0A9MXuPE0o38h0zIQaYTf8ofC5wmO24u98dsHnhNUUEh/DelblEr4eEtwmVe0aZHbZGZ9Qd21yStOcpYEX0+z7U40TJGY2j02bxPvhj9THawaP2fOgzDsxF18qUkf1yxitfA42PzwcVlpuDxzANLKEQwNYzp0NXD2EYPAFC9/6KLmr2TwRU4SYnkMm38kxOe8erzc7eV4u7ANsBZceX/MdfK/ms6HZ3xApuUkxvWIjUbCXGcqdHa4nExVGoNiUsOgOFp2G0mYUfPo7BEt5nqeqAIITCMCjBm6oT2V7W2ECmgHsV6m9He25ckb6z8K47Qb8lf2Xq0pjS4zfsUvolOMqAWzTc3sFpnuIN7TPoLnkCNwiMhgwHXBIDR+iAtnPnu1HK0r5pCBooQNpegwCEOH8rw7FkS1xM9i2WFBuLJE85B2qhEPrESe95pOP+dGvn8mHxFTpx+NElzG1nS4798PnO8CUPrBVgTOIjN80yRbsSYlikT7pUNo/XSpt5X3ilHozvZZ8UbWuFPQ2Au2qhnRcSWJOJK/IRA4qq6T X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(136003)(39860400002)(376002)(396003)(366004)(451199021)(6486002)(316002)(52116002)(41300700001)(83380400001)(86362001)(2616005)(6506007)(26005)(2906002)(6512007)(38350700002)(38100700002)(186003)(36756003)(5660300002)(8676002)(8936002)(66946007)(66556008)(110136005)(478600001)(66476007)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dA19G/Fj7qcJMwpxhw7F13ag3pFtCHxFUxAZ99QuLngPg41hYkjxC2I4fUp6hU3hmRi5/6doIgneI8wVIxk46/9qtLhWDzWb5xsCx7Xozj8ZsCvRgANh25IsPuPIYHSMY4i8S1/cCqF+ffSsgRjA9PJhYYlZDUbk76yNIiuBJkjp+A+/y/dce0AfAQjqExf+vgisGIxemXJjp5OWHGkr2Cdt233A35zF8o6BQ6OVLpK9t89FJ4C8cq+KAQBNh4NX/oIFM1sCvk9zT7cSiNQHo+xdmdE+Vzb/NAhOUpDCbhO1c9deYFLvlarFGHrHg0sipsYvVz44r3w6q3Q1Lc/dI3LjL6pzrTYH26PKP7+fYGHqvs0pZKjGpqBd2QrKnqhglYpzmouyqljkP5fogozFQMJQ5x4LLPb4MNgPeKapy5Pyxyd4x3W8jRmKxT2q9wTLgde5PLf4uEnoaM+rcooYoxzBtlgApWm8px8W1ebLRWJP2zmtDKNm7YPFDoFuWs9/6Gg7Lp7JxR2XnRiR/y7L/waQdXqQ+d2tIt7Ncq3HzOH4lHqvkiXj2QT0SnTFlGjcS6dgxEYJa7s5H1of3XdnC/CCKWb6XKiq3olZfcRxC1BWMnuzonKehUCEP5kEmXid5dCesb3c4mB3k/8XGw1XxMh0WhxYvJoYJ7qWr8Var4fwYW8JMYGFeunCLwUm1wyC+e5SoR+cqdmBZBIXk0FcNgPa72H/DMqp9PFRvc1ej6lILqFHst7QReddpI33A+FZENtvCDI74r+F+Ra+RkmjldBZKQ0XtWpFyCx/H/ZWYRcUmz8tTKEgrEUe8N3AyswZOH3b4fqMCPQXmgjAKp07IL8GLlQLUlRR5SSpuviZUc1e9AvsH6itZb4XPhHqFKI2yqm+25x27bmJ4rp7DC8SKzPhTOGBMC+JQfIbqwb1eFOkTy/vwmMUV4Fqz8p/anPRZ9Ch6G36ANAD0Rq/uk7nHovqgXYhihVRxdA/fDQ1cCy85ld1qdmkAHt3ymIkOxn8fTrcZtHhZ8pLldRpMubLNLrR4EQd8K1eKNM0QttGkkf2GpuuPvO6rubGcSZmuxfJpQGo8h37UOxug4nmOijPgLQREpN+tzE7x6y5+jexnIEN5hBJqa7Sy9I5/ntRGWMwTxvLCftmu8R51CviwZ56uylZpnFiszLgCRJEn/pRtH09vvADszPN2PRrICBfR1hn2Eu5uoxTKOkDIEI/f4bSWvNPbitwQFDDZ56VAKR+yrKiQuedewVjBa183UUvovUMSIx3JMfwBtyLfbaqiazgygTLFOxTfzv9t47x5KmFTyqjy4S86pPeR5oy+RBZ9KXntJeOTmHyTWSUE/Cl4dDJrYB57WJG7o3DFv0NETYB+cXY92pqNdVZTqVkTWwuyZUMi6E/Zqj0LlrdBvVt3qm0Pnsr4krL/TlX99CHVYWHmWsMl0Xg8LJi8bx6WAXTG8TvmNFWvIEohqWdN4LrYWcLuz9EAb52ZAfLoAkMF6cM9o6e/56FsvgxC8bB3qXizXfcHdm56u6ZpRZRtRGja3J8BSdMabrz7E2h9gcgxxT+sV2KWsnuzQiQZ7+8WNRAhD7HDn4IZewWKdnii5F41KCauXVYef49Pan8/WzN6YD1rfg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17ee576e-3a05-4d03-f109-08db6c6d0e56 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2023 00:19:45.1938 (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: 1nYa9xxxtmcAIePObEiill7QbLwVVbOtO9jxMxDdprw9gmnf+KzZTU6/8TW1RLyqBi1uFJhVaNSi8YY8sVD5hpoQfolKwNSsnNoJS5MJ1TGenl6A6XO1bj9GYpXcwNfg X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11658 Message-ID-Hash: FGEJC3227IF5OBS2AKGK5TC7ZWZFXQVX X-Message-ID-Hash: FGEJC3227IF5OBS2AKGK5TC7ZWZFXQVX 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 Wed Jun 14 00:19:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 692581 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 9E796EB64D7 for ; Wed, 14 Jun 2023 00:21:13 +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 831486C1; Wed, 14 Jun 2023 02:20:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 831486C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686702071; 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=n+SuzDA9hS7B5VgLQJK4TZgXIsSfWXZb5zoISaMNMCwfCG9BrJ+RbxS2KCuWlcMge bQs1I4Uqc60AUF48+Vk+Dmun2zD/EfwFCVxIB4oKEDojGvj4KUNUzbwZU/kXou9u4H mlCCP8A+q+AaBVyePC/EcDUul2I+3M/fK3ysF8BQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 47A4CF80533; Wed, 14 Jun 2023 02:20:19 +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 70D2CF80130; Wed, 14 Jun 2023 02:20:18 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E6039F80544; Wed, 14 Jun 2023 02:20:14 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20706.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::706]) (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 1495EF8025E for ; Wed, 14 Jun 2023 02:20:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1495EF8025E 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=ErrnQ7sH ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f6Dt2JH4H6rnFKV5lmDhMhvryQN5Yj4oyuJzV5YriFdXHkppOh6JH/jreLLJrPTIGoR1GASjAanIyycWx0BpcZ84IlLe6SUY0ZekiSg3/8bJsbDmoNo1wgVzdcwwkvK99mJrq6EG5Tbh3fBpAQVp1/6MwP7ZzkcFwrB8QJD8ZeCR2kHrdaUbIXe2HrRvxYcgkMiWQkmi8ytPmM+FFlhoUcVsTXfWEUHtvHwia4elfTmd9WklF0nK1BHB85Y7QyhhxdYpZtI2CBfCCFz9SeCxI9KHVE4aBV/pWnAt7njLdxHUGt3SOCqL9Ow/FhY+BDBisE9TqgYwKD+d2G1xj/QDkw== 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=cw0t+Amm0mXetuFkAwOxf2SNWlcX7sC2UzgmLcPepnMpdgn2Yo5kkgH1bPFZY+PsRMUwoybIu/DRGxdTi+tz6MnjoYGf3pgzp1cgesk2k5NLtp5P18BYkg+fRR9YZWQ+z1MYKiSTxMtzMTdwz17A9OslHRpHWmzQjaxVkxY8PholPpkvLx1Su4M1+8H/GNO640ftoTd48QlkohKnN9MuUQmmugUicB2jV9RtkZnwCF6tkTB2SUKoWZxLqjS0CiH1S3TQ8KR4fFmqeFgiPeDaUuGEPIAbXRiLcOUdWfgfmDyZGBzbfZN6vonD+n41mr/FSJlkiI+Wpk+I5FtQ2AL+FA== 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=ErrnQ7sHQfr7lqKqpI8SzSB68zALfo1agXtnBRAOP2j8nEZYqOTsOVogU9XKq8F/Q2G/fBYDXGCRGBtbmwgBUqCWmS855HHGZmLxbK79Lp6EjMGTJ51MVFQSxeCacTwPkc3Lt03ITsbzC1g/Ce/FNgZXHH9CI3R3+jYEoUVi1KE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYCPR01MB11658.jpnprd01.prod.outlook.com (2603:1096:400:378::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Wed, 14 Jun 2023 00:19:57 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6477.028; Wed, 14 Jun 2023 00:19:56 +0000 Message-ID: <87fs6uhp3n.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 5/8] ASoC: meson: use snd_soc_{of_}get_dlc() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> References: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 14 Jun 2023 00:19:56 +0000 X-ClientProxiedBy: TY2PR02CA0005.apcprd02.prod.outlook.com (2603:1096:404:56::17) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYCPR01MB11658:EE_ X-MS-Office365-Filtering-Correlation-Id: 19e50b83-207d-4c0a-36ab-08db6c6d1549 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lbbChOUNIsE+3yyCieCsAK8oiJjRwnLHvhXFr1Wa4oUbcouy6XKpZietp5ssshK6WHTmrYB24/NWzd14cHiMshkLdx5WgEQkMjHhtuYB1RDIlGJybD41505Tvu+h1iWOY2UeNHpzEBcP3thAEDoCuvMpqEXKH9lJLc/16qNjX1LJ32ozVsgEhKysulrAZAKxzYBQIrfN+30q/ANkYAAr5W1Fmm1BED/n6fPR92tiQ01hVDKRppPxVr39QFIqoiNESkZqoLWMGXGFfQUIM1JHoRqndFbPg+3ue/mV/qIkoNRx0qXMBcueatj1aR47bVy2kTO+cKqFBQkffWOd/QHyX55R902NbAmsugjaVSp1uRzerQ8IUz+dTK8xJSY2Zd47xbJxRhJ6I3yV7xjTHLbonab7HoWDTB/SbZdBVhJmuBPpEDCHps1s7Zim2ynLVZ4XtXpOKf+7/6M0tlgEzcY07yrLEfz0/l+joYPkfcLowlY7qbW4if1t6Hb2HAgSxQPqKICPyiMltgutyHizfqd8kkZsefKldzz9f1WfeZrHWOuFB/zBR3mvUxKA/pGnUOoIp8lbeFB0sdprub4iV4Ehiob3fpB/cj0kpIK2fosGe6wK4qdWELP6Dc8tffgoGICm X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(396003)(376002)(136003)(346002)(39860400002)(451199021)(66556008)(66946007)(8936002)(36756003)(8676002)(5660300002)(478600001)(66476007)(4326008)(110136005)(52116002)(316002)(6486002)(41300700001)(38350700002)(38100700002)(186003)(26005)(2616005)(83380400001)(86362001)(6506007)(6512007)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c4B45+wHNkzM47qf5u/F0NknXaJMdGXi8HuR4PRrCGHJ8dQG6eSVKvLyymSEOR+v55eSwb8Ew/ue69McI3FkTvsENJoVkosppvo7HdeQuFNtKk7JQOA0cPoqRK/vx6RrhysLLyY6cZRw3IWTgA6wBnrmlT5j5oQc1sRx90kCQQmNQqAq/fyR3qG22d5LpOPPZkZhmY/hE+ZePvnSJI3BaOp+YsPXUYwSacayD0MwjC5wESyVCE7QnlbKMVmCyZ9DbXIrcKlbdbQjn8AHElDi+hpJixrxWkCE/BnNkRKjx2n68wbdljC0YKZTI9+QyxS70T8Bx3jK0x77w1ScNnPO6xKZvW6mtk/W/iQXSRMNo2SfgVAfrmLOvg1f+7sZuV1Z1VHvy7dsxBw5IG5YDzwuWQJ0bu4cw//ktA51ht5sff07ftInOdaQVkp6JTEvNYremYq22WyiJtp4eMUaCCTgfbPLIOY4T4LYbd9kHVJrM73UQ1pKjS0orWl3BUkqB9aOdvjgqfzXCJkWb/wgNxcT2AQFX08fXScJXkHro81rvY+ng1vSjEap8ADeAr5PYeyTrvAoVfc/WcSFnPouJQfv8j0tMedNPLZsHRdhE1JiPNWrajFeQXH8aS/vgZzpRGyeHpHpMEfiu/+sOu27z6MKx7DaYXsoDJEr95y2nOLIIudfMiFKQmCIww27N98IXAc9Z/CKiXywi4uAWfrdBEEqc1Hsk8Ntl3oeZzqI3BklLq8hay5vHZtbIVi0tw/NzRnrc1jQiPLdbZlMrR4DYSn7v5kexSUUqOnta1aTlwVCXKFqoK32iG2h7T7cgX6LGJSXXt5RdhWpFEfrpJe31ZHrhSP//6lKjt+fux9apw/ws8Sr0u1OfyZOPpVI0WzD8M3iCr2dDtW11rmibUYY5xe0ZKmyzHm4yWaZaevgLWv/nB7iSs9+NznZbj0t2MJGnwK/ZxQvEoESnW1rrjQ9tWGz2xJ2/pbjki6tiheivM4O5cpmw52+b+NFKsjPS9oUJ0qlV1ul7sixC+cnm4HpeyR0UmTuLV0JreQsIRLpw4C1ybeGwDMxB/V4o56pzc0QuLQtdlOcu0QesuhQBTFvmH7gQLkYzxR9cTfFE1KcgekMpk8Na2F4Mxe2HhkaSHrTGpwg57SLpW45QbSKHnoqqcNjfJrKUFQVeEzARBPatxpyZ8TW0eRJAuvwPaB8G+zItcq8s8UCYC5CJhoQUXwFvs8oyNeV36c9OcJAzoOuHgIhbulfRS7U/Uy/q5iBQiXnAafh9H/pLv7znl+2cZcuqeSRHlAepzufDV6vSjj0qvf8VefsbwXq8gAaUoeTE67Z+W9PYq1xiRHLlpEj1vC0WHJdBmZ4rRskrONI3IjtgHOSrv5WqG3Y6hzwtXzN218Z9tPOWT6UCV/Eetd33FAQ/ONZILio/H5qBfuHDC4Eav6GWr5gn1Dqn4LZDroa2PlAIVpt39JYLP+JvTkU/toaiFFZNJNGemboGnGVp8CYUhTIbYY/VWC1rTyYgcGu50ItvYJaUbbwGM6CI00LY3MJ+z/Ga9JvlN9ruDrf+UFu3R2RwfG8ST4W6M/Ejpmu/oocFPwx07U8YUX+w+UE66gXDyAibr4acn6RL2ZuSmzSftY1hMQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19e50b83-207d-4c0a-36ab-08db6c6d1549 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2023 00:19:56.9237 (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: e6FI5TpVitDSuKqb4ROa41WHdpcrH2d4ObIHA+y3B716B4+XHxgAaTQxQIU6rrohVg031yAcFs2VjrQjo3EJOzkfJXYJf50HoywsKgWMcOgpMRNOiOK18/amvPUicbZh X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11658 Message-ID-Hash: 6OLOMLAQRDERS4VG5K7TNVCXE2Q4O4ER X-Message-ID-Hash: 6OLOMLAQRDERS4VG5K7TNVCXE2Q4O4ER 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 Wed Jun 14 00:20: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: 693295 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 0E55EEB64D7 for ; Wed, 14 Jun 2023 00:21:33 +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 E435786E; Wed, 14 Jun 2023 02:20:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E435786E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686702091; 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=pm3DBEgT8H9GpAjp0OBBrHiWlEfOgKN5bb3bjEZPOAR0Qgz5lFMrWf8m4et2DQRXr AupOsuKpb3njH2+2IbnbG5gGKJzfHaHQrVswgk2F2XOA9VV/3031fG6HXxA/1RKxRz WMZPDJ2Bf8DVsFMMxIEXgq6Ho7C85kYz6D0a/ivU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 34C38F80155; Wed, 14 Jun 2023 02:20:23 +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 290C9F80567; Wed, 14 Jun 2023 02:20:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 02A70F8056F; Wed, 14 Jun 2023 02:20:20 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20712.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::712]) (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 C3843F80149 for ; Wed, 14 Jun 2023 02:20:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C3843F80149 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=gcdyyvyt ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=beKHmWAiwgvT7EyrRVsgvAY1ZR+J4vhB0KmFg2Ethg7KvAgzJJS9s5xcG01uJoFs3tMpZ4QUUbqB7Ipi89U3THbVSJM+3uWYl2WtltYhwRsSXYFe7LJX7HKXfCkxdoPs35hsuRJPnS+lC/WNn59a+7D8nQuYZgyVrDWphKyI1uK5RDmeYVuRYgloLcxByots5D+CBFW4gK2bosd6Ace2a2h0xPnNUiRMbn3A6YHCU4etfVXx+pEfAZNwsE02bFyd34H/qxD959d2r7FYPvxaE0usiCdIETXATTAW4NrWJsUWgbxtYhiNnHM/JwencD847lGa8gz63h0lX+Q5X4v28Q== 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=YWXawhmI227ke0HyBU0y/1DqNOm9XgXpmpAr8V7iUpo0CtRcipBrDHc1nhdv6JiG6YP/RlVBO33w4KHYXgUjLQBFfIzRMUwm8ux4ZfqwGpo78c1UzdOuRvKEj4W9zLGSt7KFzTjCoewu1w4fix+4KemqKu0u/MF0SQC4hBd/BFtII/6dQsUXsztIU9+9BDSpLMiL9yLK85/+EmCZ7jbNK2LXuli3l0KKir3Dgezn44dF5tfRYZ3DKFUonuAF74hiq/03yxI/3tfO/O185OXYRbLa0xrD+yo6oBGZ3MxWl0zIWhOUBpd9+Y53nrATOktuUer1tZuoNtC6UGl5sFIGAw== 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=gcdyyvytYCZgUjbgl0JvgdIKoVKPHlc/FazZ9dFLjCzx9NJ1z4BuCsxPCuetxwdQVe8C/jp+P8pCrXJXszQM4HFfCXH4QL0taWOWRHSLrfgVZ2VxxAtiY59846ryINApE9VjDhxqarI2BAPwfIPfEtKbFwuAT13oB2GNxL1rTT4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYCPR01MB11658.jpnprd01.prod.outlook.com (2603:1096:400:378::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Wed, 14 Jun 2023 00:20:06 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6477.028; Wed, 14 Jun 2023 00:20:06 +0000 Message-ID: <87edmehp3f.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 6/8] ASoC: samsung: use snd_soc_{of_}get_dlc() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> References: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 14 Jun 2023 00:20:06 +0000 X-ClientProxiedBy: TYAPR01CA0223.jpnprd01.prod.outlook.com (2603:1096:404:11e::19) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYCPR01MB11658:EE_ X-MS-Office365-Filtering-Correlation-Id: 1607c534-0c6c-4c56-609e-08db6c6d1aeb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1IH2lLp5mdSo532S3oY03GhlpRw66mfP8DQfS1wvjvSaPPuMmn+7OGvRyR7y3I1zcs242eDhgszm6yKtRZtTXT1WJAVJ4UxH6KoCcbd0rMbjKjDIWSh7KzKn+elXdkMCfrTikWDs39V0btUfCaWeFl4D+LnOcAhNCF6xABB2bzSeeAaCWzGYW2D3zTO7/0nC3kiA4mwU7yZG0C+GrttHzIMisilqzNV7B8YrAnlKQhIwFaJ0ctcTPoA/h7JYli2VXn44fx5MasXmpkrIRMLg3bNq5xw4oGBpYBPRGREyeI//G8FPZ2KKY3GOjonPIUHIXACSVlPeoKKbBYKnTSOTLBt5i8DTVFCj5+lo//+vCCmgL7HBgBK+xq/2L37m+g8J8sqdiaO93pUeyDMuuf4mNxUCSwUL9wqqK2zCE94eqQhwTjHKy74bEVTWwW02SogyK5mpmGZqDvbMPmflUrjeDH2HZRNHlfTF395bW3AXGhZBtgybK1+J+fDKK5fFbNSpaag2ii+EbyENBoNc774r6k2KvUdppCd66tQjHrxb9OQErw43NlnbLqS2Cm2mHy0ZCLqBmBjOKZKF7jq0KiIYsggfSePh6pN7Tp7cTfao957iGE66VNb2UAyXz5jgB0bt X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(396003)(376002)(136003)(346002)(39860400002)(451199021)(66556008)(66946007)(8936002)(36756003)(8676002)(5660300002)(478600001)(66476007)(4326008)(110136005)(52116002)(316002)(6486002)(41300700001)(38350700002)(38100700002)(186003)(26005)(2616005)(83380400001)(86362001)(6506007)(6512007)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5oFRrrf2igNIpr/jPT5r2R4BaeyuGH1BiyOC3nt11bDUr8DDbm3d9fxCux9z/XrfeppeHgT6CrcpW+R9LuHjGE9f//4ndlo5f359+SLbniHwmmXwJB19Oj3aCbGpsV6s3ThJ2dFrd/b3clz1m1B6STOCP6R9NSWGmMaJZuqWxbfxzp0KYkVU75gZwIZnpwi7lSfvcmCHxXEY2hXLpsXRFdV+hCZjx4qTqYcr/BdrNS6MXwzRCOd4J6yI9C5uOtoOGnElltltNtBjtZCM9rYRbExmkGGdi7wFkwH11qLUUFQkyEeNCJpRMdwzN86mQ+PyxVaj8grQadeEurXiQ3qHZZSByDD+VUYW9PiD0BZQrX9665Gfn4QJT81+8qn65PpwPC096dOjgJMZ756FZtO3bC3A0I/QN/agyleP2lR3n49HuFpwwdjs2IZzST8mQv9gel4G9J++GgzgIxJea9tCimmMvUNZXmqwUMYHEj5x3vBzsnWMbuDmsrEWjM+Lu0itBjMiuFJax11X1U9Nu+WyNvWE+uXDvnFrwQKphwlWI+WUOqU6Y4h7RrllkhrlwyMvW2SnQ+R/GPTJpNcBNBFYzsBhin6u7vOuTjZVk1LDvcr7/nvP4sK0M7biABOI2TtwLVMA7X5zo3XG6xfrL8bIu+EoxmN4dlBaoJsTmi77ivk0mkW2fmXtPERthfqH3zGAeyqHKRU+MnYYlhZy1st318XsNZGn2BMII31mcRIKTT3DAmXNfkJML66eB9Rsq4fcPmvzOxlxe4kOMK70iYB0q7GsRes0b2FnOpi98Ae4dJpwjQZPwhCXhs11VFafx8LAnHJnG4NnEaaWkQ6NZzcxybS55T6VyLS3qNf990oWtgrGeSOqTUhIlK9k40AT99ldrQmRfF0l7lScDVnvU/zamWAKFNh+5gOvBvwM73Os1qMqpOKDABFrtzuJyMSRyhgn2BPbIeHjHasR4GlWpRbnrHdo6I4Ba84KeBUVN2RSJ9le0UmaocANcsGAKHJ+umjfAIQL8Di4ZzWjs9y3jcxLGXSfnwVmoEhmvGLsDBXr7xaHulDmNL9XkCRFtMmw7CzedNA8z6gq1A8IqOPhBritgpTQQtPqNxIzuMtwbQRmmsxoGXGVM+1/ZKAOJDt4Wa+4dDa6d71XbLpGnqg8s7TuFU0DkBIC5rSCsrsnzNlU+G4x5kBjxScVj3WPd3U6AObJEB6xAbKvnsTU4d5pUGHYCQST4JoT8q/E+LtrkSY8yulLKl6/FTeypvodiCnHeubyr/2S19yoM4dY/wPvuKLGCfWokuZRGLviSEfKwTz/y+ZwZJsto8rGsQUUD4nfGXot1mGDZuSuPY8Ny7etBOHT0YVJWP9vy/9FuYBPbxGA5m+iZbjlbV2fHyL7QPp66fXXvukUgpeRHKbUTWHVPZkkQDu7mURZrwoflO/W2ntVQmcs6xDxe1AXzsLxRB4+Lh0jSMVjgLZdiQc5QILMnYXz5eellTR+7Zejg/IAd+joWBTwsqH1XiS1UkSe7540SUcOP0WJTS7GYitcW3bXfs9g34WTXzHgptlwl9Us0MHBE98q2CIFs4y3plGysWXk5EMXh+8pBtT0EC5gUteux7qUH6fYBxIy+u5ufCm/c18BFIQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1607c534-0c6c-4c56-609e-08db6c6d1aeb X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2023 00:20:06.7568 (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: TzSFynKz4AjtolL9Cq1u1z6wcOnovw6WQDX35MomxsP2nYnKRWYeoH/Fu9nIwcwoxCavDjTwPACoKTGgtDUBuVC5cKGL0RbQzmTkwtCgaz+lcLtdQXkRbpHTWR/I7ZP7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11658 Message-ID-Hash: 2HDLXNFQWS2AVIQH7FUPTDFTUZWC3267 X-Message-ID-Hash: 2HDLXNFQWS2AVIQH7FUPTDFTUZWC3267 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 Wed Jun 14 00:20:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 692580 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 29F3BEB64D7 for ; Wed, 14 Jun 2023 00:21:54 +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 B8CDA846; Wed, 14 Jun 2023 02:21:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B8CDA846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686702111; 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=Nuz2XN4kssVbBw3FtW3YjrBEZEwj789eqNxRZT4CqPysq0ssY2FzK2FZVIyFd9s+n r2WZChuTzV7D8QwzVQAGB8agtikztwjTAGyUzMFf1f4jcufGGQOFqBwjkVC0PvPcDM gWSJATTgnXP4Pa3hQ4HzbzFG+Q4hEN+FxLH7wXcw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1EFAFF80587; Wed, 14 Jun 2023 02:20:26 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 89069F8057F; Wed, 14 Jun 2023 02:20:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 65D75F8055A; Wed, 14 Jun 2023 02:20:22 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20730.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::730]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1B8BEF80149 for ; Wed, 14 Jun 2023 02:20:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1B8BEF80149 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=R1Fy5Okl ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k+voAX8pqJBiNs+tzlmPLkl9BEPLk7zpsnDmQmZyBIAddn0MRt15nYDY0zv2d8qmjk/PQfbf6E4tCUd7aUYOYlbycXjXBHOwBR8+9vA/9XLOa6VZ4/T3d766y3bzmjOV1B9oUl9oJVXnM+15RQKVAEtuMUnUUdV9ukR3Eddgq+2vUOu7lVw1u/wOC0Lh2UOEzv/AB56n5q4ZTwiz+Q9O2oB9bOn+Z/OIMTBU/5MN5JZcoK/s6PMnIeScyUNpdEWVCZ+zpkiAzVLMbRYbYg6A+EXFVQnVQqUuxQlC663ns/vGG7KHaBGZS2GnkI8Eyjv1cssa8dn7zzdkN3Gen4GrRA== 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=PW40YiBMNDj3XQreR0t6UDmbm0c2otJMEcYCkVJGXHLpF/GxCIGsUDXE8i3WjzAjLnx57f8Me1KEm0jSQo261DFH3N1DUfuN/f4wGautmfD+Y+Uw6OLDZN+0jSg/jLHuClF1/GXfpVJUPzl0W+GuNaw8vUkXFYWY64HaqZEK30pGfh+JULXTI6BHnH0kNyb+/iw5LX79GcFkyfl5U+KbsSPpOetvnq+pxksNrkfryCedJCgfSPwiRdSG16qylRAUOVc6v80H939bs5f3XF6yQ/+UCuzkMQMp8OAx+y0XOeq8tNtmOcOnmALEBeulInAZjErufXjmkflYhofiuuxlmg== 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=R1Fy5OklXMXCbLhPBqQHbWqfOZ8B6zoNgNGvtWeVdrMEy2Sy2hRdOWfcRnhzcZXVZVyQk78ttTRwGOS/DwiNPzIB3ff80SDqZkyyoYUN5aZKewvMKgAFXTysYBIc359YnR0ycIF7GE6oqQgJyQATirkCDSALAEUrnrt8vK12Fws= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by OS7PR01MB11570.jpnprd01.prod.outlook.com (2603:1096:604:241::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.46; Wed, 14 Jun 2023 00:20:13 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6477.028; Wed, 14 Jun 2023 00:20:12 +0000 Message-ID: <87cz1yhp37.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 7/8] 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: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> References: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 14 Jun 2023 00:20:12 +0000 X-ClientProxiedBy: TYCPR01CA0022.jpnprd01.prod.outlook.com (2603:1096:405::34) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|OS7PR01MB11570:EE_ X-MS-Office365-Filtering-Correlation-Id: 88893e6c-e208-4ed9-56f2-08db6c6d1e9b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P9P69a9ds+mXimcXd54pqjGurof0mYma7yQo7lqJWV4PS2wBs7ED8OwlGFnjo6RsxsTRs1nCIh3D7L8I1IhtMIL+B0MZ+41ajoEXgAWbjt8f1tn2InN6jtp7Kh7W2cjXSmqUELYWNwuQgI562T6UYZU6PLuDA8XouTFTUYeR/o2ytaWpFHE2SxuuAbv4uvYvdv//77ttko5mB7HveqMCRvKGjKsBJTd7uUOWed5ao98SPPc+0kUBJP74qFVUG4uZ1/74fCbwgvGhVA3P8766I/fYFXkY1QqRCwmDyD2zlj3P7OR6DxJgWvEWOLCw4Takv6La6w6HQtW6+4djms6nKohmqgcK2xC5zX6DIX0Zkkd2w/iapFK45EQTszLje6k/PZxSnpcDxnQWmkQv+HA5EglLJytUvLEXr2l/W1gU8sbCDmD67IqOKxczel8WunTXqtv+AjnO5p8KfYtPNSCZ5ieYn3u6exm9ZYlQNFUqLBaN4dhTv17nUaT10zLbOi97bepSRjOcluwarZMgsME8IUMDW02kJPOdyrJ/gYcFRw55bFg0V67RooXDyp/p8HANQzxNDGKk0lR39PdP7bqs07TyLOpwMGfv/N3eRgoYZ4R+fqeIgr09gCrMRCpXpKTF X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(346002)(39860400002)(366004)(396003)(136003)(451199021)(2616005)(110136005)(6486002)(66946007)(478600001)(5660300002)(41300700001)(8676002)(8936002)(4326008)(66476007)(316002)(38100700002)(38350700002)(66556008)(83380400001)(186003)(52116002)(26005)(6506007)(6512007)(86362001)(2906002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TdvIup1fRvY+VGEGb/pPojN5glJACI9EVMQ7qaNhdkVc6cTS5l6dAj8qULV5TVn/lHaLIz4IowXMFG/BoyUJEBjMcioKkbps0dBMJzuhmIEpMpL/YDbsf8w0Ake3YVdMSHdlHYyeF/bkPvmiagbN3OrPeO1zLb5HEgTYzniR7CdL9hKJxxmIhjWJOX+84zZaRc0CBhsaXm6ItUDSqZq/Om5vp48e4erHml4wRM46oFsu3u2Mpg4ziGI9gE8bqR0cymoaLjFu5Eqrs5ZX5hYwijA67KtvU8FcyxQ0jfDgQQvRR1NMil96R9bZ7HFupzzB/lWeX6MIyTf6xcxp99A9wsTtacjiWJEPXP0zLsWUsf+sIo8w/ACqXx8iwxPpxj02tPwtKA3VwHVSfeF0Qxv7m0m8qb0BoXqzpy1CQZJ4OLD/vc8M+cS/V2q2T0uFeO1xfNn2oP7PEkuUbBK90hoJNh4I2PcJBrh6sumB0EJS7YR39BcLj4ElEpW82CKTs8tCyT6RF6IjJgyncBf6u06S0ozgBdem0IzV+dvwJ9ls5n2TJ9VrqJUYSIJ6cNrP1k+JpAe3tXLfNXJUF+y6AMF5vuc/3+VxniPE9ZKe8aT4fAFq6TYlyxZx29BPT3oxaM0rwuGmJKxJC3LwZNBxL98aGUInWUONW2f6icFHS1yemvHEOV3mA93HL/lyA7EPBFT3EPkmxkpnsQ655iXPa1crvsKdo1jGMSMIdazs6lP8kwomdt8G7zJUSIZzaG6xIDOQy2HHUhw6euETGcu8+hIXPJCoPKpzrJPzOA4KGpuLV5YNfGaUDsrTsHJHzpGHV5MDSVTcJrCY3Y6LyrKMAwRzpw6op3UjVaIaBr1jGMWsiDkO1nrTbPR4jtTRaeAzsxG3ZFU6smD1euxKd9eRTIzx/T2MTB7GJVyigShamjl+7qfXFs3tSXqHOVrvOwbqvePUSEIsbRhOJpvNovGu9CTdsCe43HuqcKcb7owmR7IZw0q4vwhJMgvNG6hXCXstBXsQa3o0n1ZllClXW3ESa0RCwfoQxsX4su97sPSkAt3hor2zf7voRllcRRPLMF/qw2MqUvn0C3K9qR+egTNCV62g9SIxWXb6UdQQeirodNv0G7SO6kqqoMvuoCA4ToiEKSd7i91zuKviIJwd7PMP+Vm1rbNXPoZZNvjolyQu+3ZWOhJMBCmxTkAJgPs56LchrZJ0xb5CHPYrryJJdPPVsdJgV3TCK0vwMU72ZT98plCfRRhgFZn0hobADVQGHGUxb2I5wrODV7PLuKtu4Ne44vCitCZj65nHeYIkzey9Z9d1e6wSLFJZitoHJbeWgR0CSk/I8BytxebcOLJK0tuGsUO4FeirKMi1GS9VI/14baH/R+YsdVpowsJhG+Tc+5A5o+1Uf5XZ+dCKy8EgTXv0+HaCkR8mfYIBEclvZXFCZ/1m6xG2UPCwchk3v3Mc4iA+Gb33AWnw+3KQZPEL4gkg/2i7DelgXPdbd+O8b56gTKlLHMlFMvLSazNRjmMAKND7lSZdfmyBJia7nip1G3UusPfUW0QBjy1Ygcb5gs605jWtxD5N8pW5D2/DBavbAIscg6aEG56PYce2kashcy2KEMYd52KcgrWjAIbG5BYqenq2gDE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88893e6c-e208-4ed9-56f2-08db6c6d1e9b X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2023 00:20:12.8015 (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: vlm8CF9ne8Vi9c45bp3TV/zBGJX/xiBSVYYabIJhfdVKJ4tgYIeTqn+iLWzDoywXhUGvSi2LGsnwS5bbHKrVnjIIt3AzSbn2gSyin8L6W7mkTmfc4rZvtQqoo9dC3bPg X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS7PR01MB11570 Message-ID-Hash: 4T4PWNSBWE2QZF5WULXTATNVVTBWRFST X-Message-ID-Hash: 4T4PWNSBWE2QZF5WULXTATNVVTBWRFST 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 Wed Jun 14 00:20:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 693294 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D9F3EB64DA for ; Wed, 14 Jun 2023 00:22:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9E7E9839; Wed, 14 Jun 2023 02:21:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9E7E9839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686702119; bh=7I2IyxngwOWaqH99UNrfsn1UmhVvcEFgTjp+enRSlHU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QJY9RdTa0uDQwGGGKDRDletoOJLNImIiFD62VipbkXYJxNnTqc3v19q9U56RMgiO8 v6Dy5tGeRiOk0+g6Z+79s+Ra7c/iYswN0FC2QKnJNPQ5xlWOTIZhVTOYfLJt//jypI CrrVL/EPk9IaFm6+X9akwbiPhAuS2dFr2yPM64B0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 81381F80564; Wed, 14 Jun 2023 02:20:54 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0260BF80564; Wed, 14 Jun 2023 02:20:54 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 406DBF80552; Wed, 14 Jun 2023 02:20:50 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20714.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::714]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 709FCF8056F for ; Wed, 14 Jun 2023 02:20:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 709FCF8056F Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=g9+Wa5GN ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S5FE4UNcIcjQaEevdIhHbewduS4CPuVrK1BFxVhi6NxJGb17yWVK9YZdbENg8itbG3rRlu9YjpuRLQ4dQT/RvN/3qHL8OQYP/ChOfNjsbUUfmTdqZwI4VrSCpgIu6VEtJO3fIHqlU+Igwsmb5GpdLaWKh23HoabhIc7AScY5jARSEMtV1aquftvm2kphXsoS50+oZ3gEOH6ZvdPbCSAZFvSc10i6QRqKXW8/DKWiGtp7BqZhXsfmJ5XRAG54aUhxH6ArYbEcnxE4SsL8x21b7/d2obX5uY1zLjLv9Bx0LTs16peW4Tw+MM8MT1m3vk4bxuLH4irlm9NO1AKNafLDuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8PmRy9U49Y2o4iYeFlNQ2p/dmJsSuUMQZjXgzyE3kiY=; b=UJXwFnawTM2bO9KBAr9zsH5eSPZxTO/s5OT9SZixLb03t1mtA3H+JF5EKrrz/LAFDLqOfn73CxW2JAFsZPupDivPrQd3X3Z1qnoJT/QLZNZeZZPfXmAdEMnT1LgQB9YTjk1S+WjTDX3Wqp+2LTGDoyOkNTtEebbs0chlzkTv4VNSe/dlpkAVqNiRlpi0rysIXrlVE/zM/RM08Ke22W6xm6d5cTjtk4qt8OxCBh76WpILLlkghfRVAwrul6Je2TVOSsBfQSVkWFJaeCws28f3G3bBN/d03G6x6AKAPcXPYgqAy2MJc+/kNkUp9I8XlRTMnpWgVn4wk9AjI5i7xl10zw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8PmRy9U49Y2o4iYeFlNQ2p/dmJsSuUMQZjXgzyE3kiY=; b=g9+Wa5GNmQFG53UAj0vb58HFn80HTn8+NZ30Twu6pgaowW9foRiiGougppVUhsvW8HqjikPjb/v/7l8ldi0CRLBB7PlpCZGEpI6c90Yq9EPo5qbXrF6rIODHwBS9qcUOmwryQFuvyV2xI91F0DFEsJtlMMxE3wyFi5srzoj6uU0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by OS7PR01MB11570.jpnprd01.prod.outlook.com (2603:1096:604:241::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.46; Wed, 14 Jun 2023 00:20:30 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6477.028; Wed, 14 Jun 2023 00:20:30 +0000 Message-ID: <87bkhihp2p.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH 8/8] ASoC: simple-card.c: use snd_soc_{of_}get_dlc() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> References: <87mt12hp75.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 14 Jun 2023 00:20:30 +0000 X-ClientProxiedBy: TY1PR01CA0191.jpnprd01.prod.outlook.com (2603:1096:403::21) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|OS7PR01MB11570:EE_ X-MS-Office365-Filtering-Correlation-Id: b6ccbdb0-ccb6-4257-7850-08db6c6d2987 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T6c4zJf1jFS05FFRHmyLPmfV0QSMYG0GlrDl8DsvGlPDLdkkZMPCveSj7O/EBFEZbmeCtCA1BL5LLesdxsXGOP8pvDne0pA197xnVt5f2caalYSZs870fdu29TeIsR+ao0N3KBPPg1utgCx2cQsvEt2tkix3aiRUnxO51uCjm3mCHtgRKAeKe8BlUCluClV6PecYEuRxr9inNLUXWewCG398wZctlb6KtS9qW/FTBS5K/YqBSTRvPEICiyXx9xWUX1xkr2EaJGUEw4Jn1aJTthOHLoGJWiyQ4M28lzImUtzUDNvc+WwmfYC83dVMcNkFZrrKiDal4Jx3UvAR3kmrMx+H1XMqVBpOxYXF+XE6zKbRRogLAWvWxZ3TlRz9bByJwm+YpkXzRiIjFbEcbl8UyHJz++uP9BDTbDeHKRT2fcXNIGSF2wKPOSgcasjpStZRSRZ5mbBQY1HZLL3y7fQIUBVcVvz+X6EnY6QHFG9COIKYiHDlhfGrgKsdNlqRXDOwQKWjMoSmaae8b5BNMPlMrJXeQdoWvobDOVhzXYfWZYQkG5j8YEGOJlsH5LG4k2c8swrdgsfSag0zCYW6dRQjMCI+sVCLVXjipfE1KE3c2lb9LIDCct5YNprabTnY3QT3 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(346002)(39860400002)(366004)(396003)(136003)(451199021)(2616005)(110136005)(6486002)(66946007)(478600001)(5660300002)(41300700001)(8676002)(8936002)(4326008)(66476007)(316002)(38100700002)(38350700002)(66556008)(83380400001)(186003)(52116002)(26005)(6506007)(6512007)(86362001)(2906002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZpYQ4jdYv3B4+VW8PNPaetEaoKy1yZUOwEedctTWMqxiJDUpuaFWhlnzBweQ+0AC8aQC9xC4Ohxcb8AlGai/Glzl2ctSuqByECd1akOIbseK4SjhkEc7FEjlVOhy5+WUSWeKtEjD7ioZz5LPfOAK6gtiR+ijTaoh1dEYujjhR55pXRzpAW2IgEkxr3/+8eQvvQfseDdHEUW7x1VcnEtXtWxD0wJMkyFNGr391qXvnobvNEqgyDaErnVjvn0x8Xli4juuyC9wc7VidK5DXWi66jeTzCGd4W03mqgVWwfPEnwKbKDMxFSJ9/uMQVsw9e55wEoI+ZLVKPia4dgTk80k9DHaWnE/GT+Cxu1NDbjwnybP94X5BzcJIL4IGvEBgBfUMKqfNVTv5MiMQf077ocPqpYcdL6NX+kITzA76L9k0aQET6qzcsQOPYsbbvMR/hfb9aino+ZXuw6qwtSthL403e0WqCtaK8+3qAhBJygbG4Efr7L9B4XraTQxEfXtr9TnbKUiOFKpORn74eWUkneOMkFtoE7NUwYskrzHfZvh1ciIneEAGwLj6zUyLTzxp8LpOMARpjE1M7qsVNlhfLAsserHUNCfNPObMUlnTL2NIuL3qE48JlPib1D73GwxNGK01zGuncG1erIBwlzolSj4SaqqkKiyjr9qSzX/ktpmio8y+M+Q7MpVE71EZCvGjWENlgAazOTdLFNC3qDSV3+B9isqHqykVzabvzM6b76SMLlywrwpL5yiKG4crXbEsV4rHdH7N9PT7HH3jhfI5dkIZO+MA6TjySGbDBcpm9IG9s3Q1xGh+4Aw1cBP/FD3Vk318UiildMNsGLmRADCoKKwkcWqzppSjgAb1gq3Ua/QqUwFIX7BlCQ6Rbztz7qOqrZfn8Ums1kq8CtQJoYC8NgYj7xy5bX2kXSgCv4cfQdkU5qKbyvTFqEPVbDhxl9p7cnk5jI79MkhkuHHcAvX0pMHrgA7Wq87jtyUiTecnk0zXduRVXVe84xA6EEBIO7XkplgLiMqlccxNySeyj01A5CQa7A7ijxJcWGy1e5ZFE/DXX9XtQtoMHUMWPRDlth975KeJArSqbCHxm9y21gzqimKEibvfK5sx7JdJqSLDgg+R/SuxdqaNFsz6e9pejunQ+wwlixS3xi6W/jDLtghh+Jfg5aPc/DGpyBP8lRXxOjW+wQYQjkLbISi6eJ/748VhJk2K1OAabCaEvYRnuunuJUXMx8JUZaMDg++7fipHo5U/0enyKezbdg5GjZG8U7uZ4p8wdZ8VWc6Y3FhUEWAQsg1k1icezZSrZTmq96rrZ8M7qiJn1HsnF7/Ta0oOoDFzMAW5wn8nM2GCYQaATLFa4IsgPBMfGDE6t7pdUaqJW/yAUuGyW6giDcUPkKX91roZfse54gshQBZFYSM/+g7Lf1xncmhF+vjHM+tdsG9E2fv/i+eyJgXY936KKzMYqbIpQxgyBww/xg1pcKMF1Mt3OoUJCqHtqGXIUFFALfuoWdFutyiGIyQ/vD6fYVdV3D7FZV/eY+AygZM8kSdLeZZn+VtRSJV74gXDMCxxI9M4xlLD+cppNDpO7x3/+6cml5TDlP6BBdhBsnOvbZpYiINfCPpd2K7IReX8NvSNgOEIyJLMDI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6ccbdb0-ccb6-4257-7850-08db6c6d2987 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2023 00:20:30.9050 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: i/LtdW1RAuC2BULVItBvDW/rrwaAql6X3c8fuLpwkCIBu7Gn1e4qwTIM1+ElRY7fGaFkSRKSr0TZCYMv1G+DBgkWCvQptz66B23PUrhrwlEa8CUo6i+3fjwr6Q3PEu/8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS7PR01MB11570 Message-ID-Hash: GOMQK7UOLHL2PLOUHJKSPJP5ZPCLUZQM X-Message-ID-Hash: GOMQK7UOLHL2PLOUHJKSPJP5ZPCLUZQM X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name for dlc (snd_soc_dai_link_component). But we now can use snd_soc_{of_}get_dlc() for it. Let's use it. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/simple-card-utils.c | 4 +--- sound/soc/generic/simple-card.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 6a3c9e4e1cfe..8ac8bc358a17 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -1109,14 +1109,12 @@ int asoc_graph_parse_dai(struct device_node *ep, * 2) user need to rebind Sound Card everytime * if he unbinded CPU or Codec. */ - ret = snd_soc_get_dai_name(&args, &dlc->dai_name); + ret = snd_soc_get_dlc(&args, dlc); if (ret < 0) { of_node_put(node); return ret; } - dlc->of_node = node; - if (is_single_link) *is_single_link = of_graph_get_endpoint_count(node) == 1; diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 9e1047b46b68..873434edd2a2 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -89,12 +89,10 @@ static int asoc_simple_parse_dai(struct device_node *node, * 2) user need to rebind Sound Card everytime * if he unbinded CPU or Codec. */ - ret = snd_soc_of_get_dai_name(node, &dlc->dai_name, 0); + ret = snd_soc_get_dlc(&args, dlc); if (ret < 0) return ret; - dlc->of_node = args.np; - if (is_single_link) *is_single_link = !args.args_count;