From patchwork Tue Jun 20 02:14:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13285135 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C0B0EB64D9 for ; Tue, 20 Jun 2023 02:16:37 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 880A083E; Tue, 20 Jun 2023 04:15:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 880A083E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687227395; bh=sThBh9CANAyFgEwOKlVIZMDiX8/Hi+yxljF6atV4/HY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mfwFIvB5TqOmx+akELM9IsZwcichgjXGlGlrJ9ZEl5ceu39ciaWtXByR/j6hxZQXH Ks5chhY58MK7TdUJHC6pXQQgyCvOHXFUrqQXCMp284hcAqWnIN8pvfY8Pt7/wm6Uhy lDEY0GQOANvNawriV9sGvhuh+B2IUAPmrQX2e9i0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1666FF80588; Tue, 20 Jun 2023 04:14:39 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 99F53F80588; Tue, 20 Jun 2023 04:14:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C0F72F8057C; Tue, 20 Jun 2023 04:14:34 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20716.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::716]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CB7F8F80563 for ; Tue, 20 Jun 2023 04:14:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CB7F8F80563 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=lFs7w2GV ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CHv35i8KypesJT5+paPFj6yXgz1YLwvz5T6NsJ0LLNxR8MqCDi0B4/JUqbjbiaAsKUZ4BNwipn8R97hty23eklSErVRxbOe1NQTt/fbjIJe7mQnKHByZPwuBg04cUqqeKtQIKPmtGsZ2WmY3KXMdXhI0gANQS4JcPldG+r6rAgpAyY+FoABV5rKkSrYKkDkUm30GkDP/jPmCODgQjVs/y/pdBx1BlYkBmXM43Ea4gkXUbeeAsKaKq2yldhgnkD8Ur6VTLi5CXBJA2HUdUL2yqZF1iM/E2OA/OiKrq/tFnHWwBbDaiuVgt558uQ36iJkfBxtg2R7UPKedzuNMNzOnGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8XArk0njumHjOYVXHbxOAWfCFth7uv5h7+T2/ANYBKo=; b=LNb7vEK7QfL8+LJ4LDy/BZQ+udrp6m4/kDUYj2/wrRMxdrm6QbgPN3ETTGKUrrNOobNOL9NkgbFqyUNRjEfcXNFduubDyIgtIQir9ce9BaExwHQswBC9saEOhNopNYl81tLi9cktgdG34wouCUM1azvxT7ccGbPlsv+aC9lkhAmvCXOoDI1nszhEznKWrrqJT2cugoGucAM7CQpQbkQGO7/CBQ3l7LB4mZOW0vYT0d83son7Y/TBHE6X89CUtF8lDLHg5ioujoSPD/Jj+ifmMx1rlAkGZRjEX1K96cIsI6IuMgM7bLrwIkMyR8ulKfLWQ7HYFLmb76owIquCjfbxLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8XArk0njumHjOYVXHbxOAWfCFth7uv5h7+T2/ANYBKo=; b=lFs7w2GV7JzlixVgnB40EY/QlTg8u8e//TAwTmrRK3We/K3McZVbzhyTpPW2yEp7AzuuKx+doHyLpR7lmDwsLYi6/Z4ZBz3zsnBoYbh5hF6ODfZ/GK+B3QXmGKcmrbLRfDmhHmVlI2bGuqo2Wlpyln5sf/TuScj2skqFlFrETzU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by OS0PR01MB5665.jpnprd01.prod.outlook.com (2603:1096:604:b3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Tue, 20 Jun 2023 02:14:24 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::3ac7:b366:51f:3e26]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::3ac7:b366:51f:3e26%6]) with mapi id 15.20.6500.029; Tue, 20 Jun 2023 02:14:24 +0000 Message-ID: <87mt0udgn3.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Banajit Goswami , Jaroslav Kysela , Liam Girdwood , Mark Brown , Srinivas Kandagatla , Stephan Gerhold , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v3 4/9] ASoC: qcom: use snd_soc_{of_}get_dlc() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87sfamdgo1.wl-kuninori.morimoto.gx@renesas.com> References: <87sfamdgo1.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 20 Jun 2023 02:14:24 +0000 X-ClientProxiedBy: TYCPR01CA0042.jpnprd01.prod.outlook.com (2603:1096:405:1::30) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|OS0PR01MB5665:EE_ X-MS-Office365-Filtering-Correlation-Id: 99c25988-21c6-4b51-fe9c-08db71341155 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OZ+Yyh7crsG54ydhItBfslLys5mwzoPf4NPu/PX9fsutOtu19hmupwk9ar3PXJ+loHbVfm7HazWqC5mEBF4E6l8Rym+NJzOpZOtisNfkjy7gtFIoq1yCVABx+4SSCQdiOWcQtipZdCZW1Xu31NILiINVHToDYeISncQAkatFpZEYC4E8bsAOYwIghtUSAqJfnKBQXYRmwnAdBewELNATWkLN/pGTZgy42bwLapPwcm5e3MYmWDUAG6YjymjT/epbRGa81kaDR5as+oz/6JpF8G0bBYOiFrcEQEW6G9ZwaBMdcO6HbP/PU4q15icjK/m5pjVxnXhkUvNPl57DErVCU+KVNXz+emK+vO5in+pWbBHNqq10+iAiZoAbHc+uCjQ/KlXVlmYLi8ivt443EhBnouxSLvxuYuhjC3lka7scnEK/BqZYcOt/7ccErxSTC3V53QT76ZoHNlDUmOPDGJZET7OMrd//KDA8y9WBf5EJgaLP7numcdy7G0Zz6BORRRKkPK/IOX2PLe8ZMEe71IgSXJ852lJ95UFheJhdNtTOgfo8FHiqHmevRt9O74WlEh+2OZ4VmuTituFymUVuKsCcmUS2A6M7byPhEGFfijtn8rpbyML0TFJHSWu3tufALdUb X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8426.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(136003)(376002)(346002)(366004)(396003)(451199021)(2906002)(5660300002)(8936002)(8676002)(36756003)(41300700001)(86362001)(478600001)(26005)(6506007)(6512007)(186003)(110136005)(52116002)(6486002)(66946007)(66556008)(66476007)(4326008)(316002)(38100700002)(38350700002)(2616005)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xgIUsV3hmuDDLRSh7QebAnks8Iux1GBZ5joMWubCfwPCqifq7yH0zmWdVk/9hjw4ADBuj62Z6bSYu07I3NNxQkX3gLDshLE2LFIkd3wxscb6HtNs/vLqW26njh0NXeT/CPPs0+uDbGaoM50sjGUCq/4lVHoRF7m5c5aKpqICAyo/fGfOHZbD9562BftUPN89nNYRRJOQc+J4ZJku3eNY4puxk4cqoiBHOaZE+L0UEthpbd2otmk5/dz4VzLXmbCYEfuJY4gSX0u/9SQTV35ICbz94PRWc0BEqXpmcffKoFaPcE7Iymk7Z2NWq0Srqhg3HT+FA+5KpidiBDWJoRAX5RPmkezSe6hcPwCFqWbxF9EuUhvMAGkLEbe3m3RcfChw9d6GeGg0fpc+60ZifQfiOZ9qGOz/T4T66zr7QSWgTgVZ2PIsYsE/KdYjrfSrZalhdqpzrHQiIi1hh3ak0hCA5RawrhHB2AXhsDd7p7obXf0G/7mc+xwKgKfN3HUf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yarvSJNAv45mVEhZV9sx0UtLwWrLDscNS06GqJ/f9JZi3MRNyo5Yt4tnw1Lc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99c25988-21c6-4b51-fe9c-08db71341155 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 02:14:24.7268 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BA1GQ3h0V9nV71nsUhdmY7MJMKC+5rMPWmzNAvxOVgipS+rVWlwfZwWE0PqHa9c5L3FxHTAutL62D00z0xo57DjWURlXRSmRvAYVA18B2koKW1QS03BTXyDc4gHZb69E X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS0PR01MB5665 Message-ID-Hash: 4GILRKLMUEAM2WG4OVVIKA2WWV3VMHZK X-Message-ID-Hash: 4GILRKLMUEAM2WG4OVVIKA2WWV3VMHZK X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name for dlc (snd_soc_dai_link_component). But we now can use snd_soc_{of_}get_dlc() for it. Let's use it. Signed-off-by: Kuninori Morimoto --- sound/soc/qcom/common.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index d9ebb883b999..43b0a888f1e8 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -96,22 +96,15 @@ int qcom_snd_parse_of(struct snd_soc_card *card) goto err; } - ret = of_parse_phandle_with_args(cpu, "sound-dai", - "#sound-dai-cells", 0, &args); - if (ret) { - dev_err(card->dev, "%s: error getting cpu phandle\n", link->name); - goto err; - } - link->cpus->of_node = args.np; - link->id = args.args[0]; - - ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name, 0); + ret = snd_soc_of_get_dlc(cpu, &args, link->cpus, 0); if (ret) { dev_err_probe(card->dev, ret, "%s: error getting cpu dai name\n", link->name); goto err; } + link->id = args.args[0]; + if (platform) { link->platforms->of_node = of_parse_phandle(platform, "sound-dai",