From patchwork Fri Nov 17 16:39:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 744905 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 EC1A7C072A2 for ; Fri, 17 Nov 2023 16:40:48 +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 E07DCAEA; Fri, 17 Nov 2023 17:39:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E07DCAEA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1700239246; bh=1YqDLA71CKQNcBz1EcCPyQxzL5frzNTMelU8OU+A8kA=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=l8ue7WTXq3R7lTawJQ3GQT+DVLPxwGIB2DJkeDN+MvYTKsPa8VduO14Y+AjvdAb25 QCjywx4bZxgQ8UhStHwRV0N2dxwZuzlpB+LPt7FV4io3+JopZtOwvst2gL6HZpnNaN eUgkls/jikeM4rdyR3gZWjocxVIbYgEn4qVLF+wQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 197C8F8055A; Fri, 17 Nov 2023 17:39:31 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9F983F8022B; Fri, 17 Nov 2023 17:39:30 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EC0CFF801D5; Fri, 17 Nov 2023 17:39:26 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2060a.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::60a]) (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 ADAA1F80093 for ; Fri, 17 Nov 2023 17:39:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ADAA1F80093 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-NXP1-onmicrosoft-com header.b=Eb/IhVd2 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CGd7wOmHLQ7faflKx1p7Ro9UPQCBhLutCUI4hRJWU6oxfyaIGhjWQntAzQ/FXt+ecpNaLn2BuEf29Pzv5DQkk8SeYYSTsQ0EFVdFaa6VlOpmv1mIFPIv41x2uT8D1gZPMIboBfE2oxOU3F5Xe90XmaWeGV/nPczrdzIlbAYZQFjkcKzZJUxdApzG8BrmaktpdTTu+LeA05zU5jamjNL07WkW4RSqH6Pu0cgsfqESElC3zw6lLm7Ej3gztfPINvpBgSMcBsSWoQt5yGSiip0W1pwVhtbQn8s59ZZ4ybUoboCzZard3XGJRZOMMa2oV6Dg+yB9RfPgEISQ7CjWXnvlVA== 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=0nKdxCzXHWz8BBftbGmwHfjwfjGMNM0tq2K64G+Q2lo=; b=bYtPOvwwD7XH6GMX+Psuh//utb9GUJntVUwWIrj/4ZUGO5onO80meH4OJBL9s2jaIM6ND4wum+wDWEjgctALsw1B8Dc3MbxMbP7QQuVRm3odEaDN5BHVr0t9dMubnExuxInAMBlFdZsALIj5Q77+oFxUUwT49wuYlAf5rsvpGrKqI60SSrUS9sAiVi/CKuCvphrWstsJA8b1PzLE7JyrY0+vPmkjgZ1BIgh1b6woq68E8N7K6FN0yySRW6Qbv+701ypShz+MhWZBB8tCSJJ5dH4lVuo05ZMcv++rVWLVCGa3nGcXcOyxlTBT3YEsmHT5IHTO6qbCaO0bg7yxh5WLwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0nKdxCzXHWz8BBftbGmwHfjwfjGMNM0tq2K64G+Q2lo=; b=Eb/IhVd2aIyEkdC0QeOhOGSY6vDC3OFIj2b8OVpUTfebjpTJNLL/0Pf9pJZLQQpdlFmAwnYv1mS7ISkepRLhVul92cn6zFGPXsCqMkX9QmFR6Y/1he6Fw2idGbQ8IuX423hLP6z3jTFsgcUu3FYUJENB6RoKfCoUBdbQ0n7yYQQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5151.eurprd04.prod.outlook.com (2603:10a6:803:61::28) by PAXPR04MB8176.eurprd04.prod.outlook.com (2603:10a6:102:1c9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.9; Fri, 17 Nov 2023 16:39:19 +0000 Received: from VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::c688:1f14:2ab1:c78a]) by VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::c688:1f14:2ab1:c78a%4]) with mapi id 15.20.7025.010; Fri, 17 Nov 2023 16:39:18 +0000 From: Daniel Baluta To: broonie@kernel.org Cc: kuninori.morimoto.gx@renesas.com, daniel.baluta@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, iuliana.prodan@nxp.com, shengjiu.wang@nxp.com Subject: [RFC PATCH] ASoC: simple-card: Use dai_id from node description Date: Fri, 17 Nov 2023 18:39:00 +0200 Message-Id: <20231117163900.766996-1-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: MR1P264CA0146.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:54::7) To VI1PR04MB5151.eurprd04.prod.outlook.com (2603:10a6:803:61::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5151:EE_|PAXPR04MB8176:EE_ X-MS-Office365-Filtering-Correlation-Id: 73a9bd3b-728f-419f-1fdd-08dbe78bbdf6 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bcngCrALcZih/CLNUT+IV0XFHABrx+GnlmFrUYNfcge20G1WF8WXWHuW/IBMVu64VxcyNb8XJyeIM4wNcpiDHODQx9tQfWPKaXwJTuEAUvGwSWia+O/3ZzXPH6XfGqShP/3yf3dmTwHdrJc4sZYHWzBymBo6dWE/DFL3+HhcxJ0TEj6VKM1b+OVHvhVOWLiyyF7FZIVsPCKoaIwEYlmrklT06Q5cNwoOKNEX7OE4hN3PU837qwO+4h+cm4Mz3p/nbcUmQg7IwAVlBT5d+kVW3OTZa17sVQK/9C3S57ESWgE9E99aGIgzBPeXFBlxYJqpEDJzVjP199sy/pggEykw4TtcBVUi01tB2tKYtQtUK9N/eJip/CB6VbXYuUt8fm6UDyL/OkQy0vB1pa04YxuTDfZ0X2Q0Fbrw0vm7SdqjkG8SOPlF9NpEvY89WbRDEHmqhJ6KOjEIRAx7VAiMElifXwYSSxSxJarOP/DY/aOQGM06PpT4/tbG5tIwc1ndnTNu6pxxThyqCxmxUIWvO1LcRHVH7QQOxdyHK2qhZBfMKIcth0FeoNc6fIO5Zprkr+6hVRYTKgSwNvUZCFUkSudTrrnx8TXt2hGRdGtS0yaARK2iKKNE014VemMvaKSefU8c X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5151.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(366004)(396003)(376002)(39860400002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(2616005)(38100700002)(6916009)(316002)(66476007)(66556008)(66946007)(41300700001)(4326008)(8676002)(1076003)(8936002)(38350700005)(44832011)(6486002)(83380400001)(478600001)(26005)(86362001)(5660300002)(2906002)(4744005)(6666004)(6512007)(52116002)(6506007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZE1Rj7GYt4ridCvJyKF2tuB7X0ArHJ9bsq/BU2mgBDVkVENIcbeki1FrOFEDaWagGevkpL3ozkL95j4HIUyOoj/8eHrKZ6fSuHOLFPZemqFoiDTIPXF36obvlhZiPR85rJJf6sf2FevLZEN/BrOUX2kejpLOVgtAxCjr+y8QD3tjHNcU5YHhNaMr8CFUV1Wt3aecyr4/MO3SUpyx6JY895T9cn0XE5VRGEW688IOpgh/wep56qf4fETVnPN2aIGdXmg79WbCR94FdvhT8CGCEkNvA+a6hCROLhnYRlaNXu82k61F9gWS92BYxYPcaEAp17bC2SpxB/39kCYkvRnzp2fT3YUGJ9KUSPVuONmBOFUjfmoKD9+oKP+5BxY4tDKnqsgtpfFU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h9o7Qgg1uBiP9nfK+XlVgIy7GSbk0N2QGSHkidoWudfSdnA1kV6X+W+gKmbQfC2AiLvagR69lBxxfdzuz+GACC471y3LWhmz3oQPf6sELBeQUr/58kKpuQot/PFKVF X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73a9bd3b-728f-419f-1fdd-08dbe78bbdf6 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2023 16:39:18.3485 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /LewyblOCJOyYoGugpG6VTDdviQxB6Ynua6OhSgOiMWul3KcK5Swg1ZKkNtM662c3Ob01LGOzA8F8fX6UU3Zyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8176 Message-ID-Hash: 6FFRXNCRWDCNZGD5IBSM2M6F35VYPIYN X-Message-ID-Hash: 6FFRXNCRWDCNZGD5IBSM2M6F35VYPIYN X-MailFrom: daniel.baluta@oss.nxp.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: From: Daniel Baluta We can specify DAI id using reg property. When dts node has only 1 DAI simple-card always assumes that DAI id is 0. But this is not correct in the case of SOF for example which adds DAIs staticaly (See definition of snd_soc_dai_driver in sound/soc/sof/imx/imx8m.c) Signed-off-by: Daniel Baluta --- sound/soc/generic/simple-card-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 8ec5d413e8e60..739cb71593a88 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -1121,7 +1121,7 @@ int asoc_graph_parse_dai(struct device *dev, struct device_node *ep, /* Get dai->name */ args.np = node; args.args[0] = graph_get_dai_id(ep); - args.args_count = (of_graph_get_endpoint_count(node) > 1); + args.args_count = (of_graph_get_endpoint_count(node) >= 1); /* * FIXME