From patchwork Thu Nov 23 16:06:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 746515 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 EAC07C61D97 for ; Thu, 23 Nov 2023 16:08:32 +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 3A7A3E76; Thu, 23 Nov 2023 17:08:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3A7A3E76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1700755711; bh=46KmYg4P5waGvF/F7Nu1/1Ow9d8p5jb2uqWHQyJLSj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Cl99NeFxaUj6fsl184yvRjDL59jhVNiJ5zyY3zu+KpVM/Xd9Wb5D6n7vw0WPToNsE 9BSbth7TuYu37Js9xyEy0TF5VyDyRNKFDm+0FkwzzQCSEs6bDzSvpjGj4AMS5OaVG9 4oWefjvA4oyRXV/+nQy0KJakuYBmUMsfMKpL2RMA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A4FAFF805E9; Thu, 23 Nov 2023 17:07: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 31098F805B4; Thu, 23 Nov 2023 17:07:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 53B35F80166; Thu, 23 Nov 2023 17:07:24 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20620.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::620]) (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 E6845F80166 for ; Thu, 23 Nov 2023 17:07:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E6845F80166 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=KLYMVDtw ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h24skFTIQvDD+2ZPelxQQ7ZheIusWE+bTKv4TDyywItkE8TdKrKktLOAoFZnhlEzG2/rCnHIbmLrPwEM5sbRATd9UmDMbjB7VDjYO/x/lQnE2MKtVGZCfwhfKjqW/s4yib7FjKMw/4IUcthlIlDXnLsBcglda4y2rqxUSL4SkcHI0KxpqqdDp6fzHmHnmgt7EaxBw9M9+sEdumhoEGvMi0IdUIfWKcOz577DGHlmZVzCUxj4bZNgg45pOjHpJjvRTVwBauMBk8smswi+A/wDdG9FnKEi2nNN1pyrq4A35P8eKiTXAfigCQ5KvXbnlR2mGuzraiJe2rDTpAhj2Bs/Pg== 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=/H2VP17dgAu1wWSI+Qvs2YKovPiyKKYFumKe+HuuTD0=; b=AKAp1KsDtCTNSR/7HlvApE5QXzJBDFB8jAPojUWuejkjd+FznuMwr5sWR3/UfLykTff0uvmCVYvHfMlsa7bv7bjOfrOAGIhXbROkGNG4XDHPV1oqhu0NIK1MX9bkMiYtZlAFvb/ntpwYoVAycx7kJ6FmbhpMPlMVVgmrLb0Ol7GKka45ckBFn6RHtAv6Ajli8DR5IbgD7z9ODF9E2T/6fNDzu4er5iVdr6SvLF01HJp7Gs6/bnq/3D7D9t4aeCkFeLWUsIsoGXx1+t9uckUGHFGip6BQbNoFmrBNKLCuFsajjIxWVvvguQoA6lkcIxze3CL9VRZlVeA7SGR/fV/LKQ== 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=/H2VP17dgAu1wWSI+Qvs2YKovPiyKKYFumKe+HuuTD0=; b=KLYMVDtwFu2BQxkcuxxKbUbIXerL/TSj2Kf2V5Gwo37IbgWKvj+hRKsv1+MHO2jX7iayAbzhXt1I6WEk4A0/ZQ5bn2us+tYo2xGPn/kJcaSuVXW+T78VRDhC7W28zL93DN9fzwqMlc5QcyEBUyMqWmF17CgWdoLNsskq1qM3rfw= 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 PAXPR04MB9399.eurprd04.prod.outlook.com (2603:10a6:102:2b3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.12; Thu, 23 Nov 2023 16:07:14 +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.019; Thu, 23 Nov 2023 16:07:14 +0000 From: Daniel Baluta To: broonie@kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, kuninori.morimoto.gx@renesas.com, daniel.baluta@gmail.com, robh+dt@kernel.org, iuliana.prodan@nxp.com, shengjiu.wang@nxp.com, linux-imx@nxp.com Subject: [PATCH v3 1/2] ASoC: audio-graph-card2: Introduce playback-only/capture only DAI link flags Date: Thu, 23 Nov 2023 18:06:54 +0200 Message-Id: <20231123160655.188428-2-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231123160655.188428-1-daniel.baluta@oss.nxp.com> References: <20231123160655.188428-1-daniel.baluta@oss.nxp.com> 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_|PAXPR04MB9399:EE_ X-MS-Office365-Filtering-Correlation-Id: 60b72a40-64a6-4583-da6b-08dbec3e41ee 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: iZ6dYxhhx1HQ2PBqkgWMxJcwFBx2ZmS7uI7hO4T0658YN1S+BJ1vut8GXxa7NA4CLqzAF5L47LA5KrSyJfGvOotcIIkfjpRZrPByBxw/LViE37aeFuK0s/VXzYHQfvO5QpwVa98xbnvwg31J2ScFa+CSpVLRU9XE9MU2WvWU/zjxlmwODEjV0eHpmaxy6GG+CrxFSGC0Wp9X/9EKmhFnupd/c1cwATxGi1hgMeW3YSLFWIw9et0rBge4ueljA1OXVTf1krKaQgGtDD2ON0tEYNP7zctmVKJJhQ8x+vD3nO4BrX/+Z66+zXFAP0U3Ms/rlz0FYGHzZ/jdsTEnBogwbliSfg5KNsC1eH4oSMRylZIsQeC3rQS5j6SJ1H0ZYxyqtJQ0YOGd2yyuwmQE4QW5WKflwxJ7HR06DZbCZHlN70WmxG8wvIZJR7oYb5jwEdFng7JVvFe9mG5/CjHZMSN5itU75txc0Q8b5msPg66L44Yrm8eA4wjxYMFw+VDk/5HZNiUZArpJl0NcxRp4yuHrv5na2euq3+Ml6RIpW6hYSg9lwqPcXqcsYQFiuuoH9nVd3FPCpQB1sgRIpcgYULMA//rpIMCCDWRBUSklfR45DV10OXtVTcdEQJxarXry4q+PUlQG+kBt670+mmHJ+WnHAg== 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)(39860400002)(346002)(376002)(136003)(366004)(396003)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(86362001)(44832011)(5660300002)(38100700002)(1076003)(26005)(83380400001)(6666004)(6506007)(316002)(52116002)(6512007)(2616005)(4326008)(66476007)(66556008)(66946007)(8676002)(8936002)(38350700005)(41300700001)(2013699003)(6486002)(478600001)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YeKLJ4ZW3nfCqWQZDqKgRWk/UIijh3RdLzNdlRsW18rdtjc+/Mf6rXw9AMzeUvsJ9AqWI9K4chXFvrWaOBm1YPav+HOo4fwZiIDOQLtC5JClLOMxiUtRahPf8r8et7kWRTN0eJjx+CFbFf2+w4F9kKRgiqAmcKvZpb9o8Bd7nbM3ct6AG7jl4hDcLUs5y5M5ezYUd6lfnob/mCu45RINUW5Lfrk3KNL1b8nEXXBnovWN+uwsPvNMka3g564mfE2SFUebDfSqL08WJjS/LXWSk/k4vHI21bXH0iUzCssAPyD13J0txvr378dZ/CqLd+LtKbjIJ4hizozrlpQOJ4z5IyWfo1V1Hj+Fd0IMzqXmmJgZMaFpe7YCs4mQDUPNkgZ8fctpZSuIQYb1/Ff9ke+aWxrvg2opBA43P/ZhU2IRmdJfckGC+931MN5FbRUzkf8JWoS7h1HYqskYFFzi3dGethR2a37EwbKcCpoHFn76oF64Q4mueyc9hFQdB+xGjmCApO1SPMzTvbWOcRElqtgKaQWGZwR3/TMs7mMc3XG9n0vEPQT372Ec7h0FYE9w6+59fA7oYVtEISedUqj+qHByg1oRzfPKTgl7iFyDo+auJ2osGGWkjF4XXA6HtYwllGRtgLFe18O6LpDFjhQW4waXZlgV7JvsaaCOWC+cJ9tp/tfeC61DIuqAlgtzfiRCWYp5+7CoaoaV+kvU/39TEay4Kpk/siOBS0V0k8djrJiujil7qgZGzAKg9dGTSbEOyvF0w0nmOAngnOjJiwQueyApJrFH0oSEp0yO5Lhx57i/LhuepyFx8xaZfyRuDRpF1gCL34iQuU76EkmUfG26H0TpbvV9AS1kEdycefNifd1niznHxnh7osQmZdB1juD/ASiOYZ+dTUEVLGz77GaFJFS9L6vYCJJ6E+DGtaU3SQjRd6A19w447ZEiP4SJ7udOl9+wmQQWmvmxz8cx07tmXfnnRbwXGu1ebNCyDpiVB5A7bF2//9RCiNvPHXzn6mtvRA13NJ2FY8odocdLQH9crCOKXTcU+8EqIIpMoGmV06KHqeBNTzeOggb3vR9yY7XjAMIijpnw41LGWekEYlHcsCEmmnynPsXr42oyp0rYdcOBTH5hbxwM9BfRkLScQYzmLBkMZrzLvGdL9H0zlLTf4Wb70SCW4b7aosmqWPEi83pf103lsmlT9lw5y+6NhrQ9Doo7NxEjpKpGe4oSeLxClDjC3J63KMDetSXoXmyGh7d4w9qMufkr+sbEQ9Qe2oduxBEfiASwCC8zIDkw1lzkbvyTcH3BV0kCGTREXIOfTvlo33uSpWOZMXaJyVlAd19ru6sKIlq/xDmIdrYxXvt6A+x2OX6ID+uRhdukOfbCesRBARQiOB+2ajALQQ0/EgpX+nBKroPK6Xkm8LYGnUi1nF39H7lA74yNhnPMby1WVb2cpblBGrRxgUM7ZWdYTER8sxNnk/XXiHkMP9/dDf3VthS0u8ok90qUJ1rkpvk/adjJu9zi2ma2KeFJhi8BUKJZdnKjDKcwC47T/teCVTfUAPHYdueSd7aTQxGpNg7nYsTCGWi61wxeqnCqWxc90ZXYxVif X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60b72a40-64a6-4583-da6b-08dbec3e41ee X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2023 16:07:14.4094 (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: pjVNQ1K1dj3niuIPWvGaq/w29NtpTc1IEBLlXEmpHaGEVXezx3sJq6Jv7GRBVeXkkzhEMGJgYYClu4RDv6RYyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9399 Message-ID-Hash: O77GIVQCXY2O5OX7JFTTO6JMR5FHFE2B X-Message-ID-Hash: O77GIVQCXY2O5OX7JFTTO6JMR5FHFE2B 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.9 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 need this to signal that DAI link supports only one direction that can only be either playback or capture. --- include/sound/simple_card_utils.h | 3 +++ sound/soc/generic/audio-graph-card2.c | 6 ++++++ sound/soc/generic/simple-card-utils.c | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index e5da10b4c43b..ad67957b7b48 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -195,6 +195,9 @@ int graph_util_is_ports0(struct device_node *port); int graph_util_parse_dai(struct device *dev, struct device_node *ep, struct snd_soc_dai_link_component *dlc, int *is_single_link); +int graph_util_parse_link_direction(struct device_node *np, + bool *is_playback_only, bool *is_capture_only); + #ifdef DEBUG static inline void simple_util_debug_dai(struct simple_util_priv *priv, char *name, diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 7146611df730..04c2eac881c2 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -597,6 +597,7 @@ static void graph_link_init(struct simple_util_priv *priv, struct device_node *ep; struct device_node *ports; unsigned int daifmt = 0, daiclk = 0; + bool playback_only = 0, capture_only = 0; unsigned int bit_frame = 0; if (graph_lnk_is_multi(port)) { @@ -635,6 +636,11 @@ static void graph_link_init(struct simple_util_priv *priv, if (is_cpu_node) daiclk = snd_soc_daifmt_clock_provider_flipped(daiclk); + graph_util_parse_link_direction(port, &playback_only, &capture_only); + + dai_link->playback_only = playback_only; + dai_link->capture_only = capture_only; + dai_link->dai_fmt = daifmt | daiclk; dai_link->init = simple_util_dai_init; dai_link->ops = &graph_ops; diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index cfa70a56ff0f..9006ef5e95f5 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -1129,6 +1129,25 @@ int graph_util_parse_dai(struct device *dev, struct device_node *ep, } EXPORT_SYMBOL_GPL(graph_util_parse_dai); +int graph_util_parse_link_direction(struct device_node *np, + bool *playback_only, bool *capture_only) +{ + bool is_playback_only = false; + bool is_capture_only = false; + + is_playback_only = of_property_read_bool(np, "playback-only"); + is_capture_only = of_property_read_bool(np, "capture-only"); + + if (is_playback_only && is_capture_only) + return -EINVAL; + + *playback_only = is_playback_only; + *capture_only = is_capture_only; + + return 0; +} +EXPORT_SYMBOL_GPL(graph_util_parse_link_direction); + /* Module information */ MODULE_AUTHOR("Kuninori Morimoto "); MODULE_DESCRIPTION("ALSA SoC Simple Card Utils"); From patchwork Thu Nov 23 16:06:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 746820 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 6BA55C5AD4C for ; Thu, 23 Nov 2023 16:08:22 +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 CD703A4B; Thu, 23 Nov 2023 17:08:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CD703A4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1700755699; bh=SLdv1Wu/iWUFqtI2GoageWNEwb9p1DxB7RCbE1O+upk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mytYu0D+UO97Ad8UpJeQKad8mYTFUytDkOUK5qliblzglIjsCtOgr+Ktkv3EIQTpE ivNHGbHCkS1KLb9TEOkgjKQw5O1Vm22XrhxfBLD2xaNOUEFenqGxUwRWRhNUa8YFrl mEraoDCU/EzZc7zCalYVjnHGbUpwSB/fRjYFi76Y= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5CF1AF805D2; Thu, 23 Nov 2023 17:07:29 +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 18CBDF805BB; Thu, 23 Nov 2023 17:07:29 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 545FFF80310; Thu, 23 Nov 2023 17:07:21 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20620.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::620]) (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 6E645F80254 for ; Thu, 23 Nov 2023 17:07:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6E645F80254 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=YGLyWM1F ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rq8x+Unnp0IYi15mT9qwLPcVQgEU6Td9SJWyoauqOZUqKcp8U8HhUzmYO17ZV0hbMxFbpIoUM78nmBF4/tRn4lOgsJcxmvuRyVnPBtE2UyVU9ocGT+mzb/dN4WY/hSoJrqJ10Ngar1i9+jghOxcr4bQBLrO8S1GIXkA0GEtfbeTSzh3ExcXyskyHQvJgvLGP31Z6Ux58oAgLBSLPsiU3qx4d26oz3Lnk/FyOEIAYCUSl2GD3qhpKJRW+LGlNA7ePFoDJXFWxvH5LEehcmcgFUWoM+bMTaJvJqxyGlH0aghPQ68ptIAswmhtVG9nRW5bqxaMX+R2hDT2A+qYHV8L9qg== 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=dm2FDg0t+Tna5IV6r/T026XdzCOt13LyOTVstv9GeGg=; b=PfPdUsn3h5HsF0VbBxiBCt9vzlzn89M3XgySCa1VM8edKuKEGvCtnux+eIXaN+APVvbUKDauCKhCCZjomHGML2PC97orOkV3DLaUSl7psodBPJHNzoNbJP4pwKeO2Y1YBkd+cyqNQdbLPmOoN504bH+stzG3PUtMOgXalp2GCKBZecg4+fqzRUnVIZxmOPXxUGa68VEpV/Q5Jft29AjQoJRhWJ2QU7Sj7ERuQ83xIHeS4EhKHGAHBFR6B3Xvv12dHFaAMVOnizgssKJQXXsvPprf59lk/H7BY2edzuCsByg3fZp1eEsPpYK9ZrmrlIY9ukjdvSgtXt8oXghDRZ4zTg== 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=dm2FDg0t+Tna5IV6r/T026XdzCOt13LyOTVstv9GeGg=; b=YGLyWM1FfwH6B35G6Z0pqPuWV33s4RotuUPXuj+o1BCSHOBdoemhGHbYUVeYT6JQp1Hz2nVACoroqfF3YYDazzrnOVRuGZQbOJVrSZbbIob1PMkSBsH9VY8E3wYlusfOFcMQOSxr2HT+jqgwFPkfoVJCEUeWf/pQYEs1eUW68Lg= 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 PAXPR04MB9399.eurprd04.prod.outlook.com (2603:10a6:102:2b3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.12; Thu, 23 Nov 2023 16:07:16 +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.019; Thu, 23 Nov 2023 16:07:15 +0000 From: Daniel Baluta To: broonie@kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, kuninori.morimoto.gx@renesas.com, daniel.baluta@gmail.com, robh+dt@kernel.org, iuliana.prodan@nxp.com, shengjiu.wang@nxp.com, linux-imx@nxp.com Subject: [PATCH v3 2/2] ASoC: dt-bindings: audio-graph-port: Document new DAI link flags playback-only/capture-only Date: Thu, 23 Nov 2023 18:06:55 +0200 Message-Id: <20231123160655.188428-3-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231123160655.188428-1-daniel.baluta@oss.nxp.com> References: <20231123160655.188428-1-daniel.baluta@oss.nxp.com> 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_|PAXPR04MB9399:EE_ X-MS-Office365-Filtering-Correlation-Id: ab27261a-3d8c-431c-80b7-08dbec3e42d8 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: nSmR/Np0XEuhSUssyP2BekUNLGFXwrKeQDkWa+54cbiTdnFoGbV2CA+M1Jpzd2VCo1O5spcP1gT/Abw4uMfE+oEINCM5z8N7i57v7ZorW3kGsros4KmQnslzHfyJxZXHg4w5sYTydh9Fg99r7Xc06XNMuoM20UAyas4PCC6j3MscyfmlTwN3YQ969t1nBvGjzjXSz70UW7ABNMLtZAge0tKERrdCrhv9vy8c6TYhNr+gcvqaO51IGxAJ8rHA74H0tJBMs4Wo91BemVrlozeRB0gawH3YvPvQK+dX83d3Vq81YPe2lslqXtK2AhVkk6QngEYFKit4DGc+htK7VK/UC+Wl/dyVzQ5g7ElUvtiDZizmLKZqXb0BhHJMWQx+SA218WNj15gm4bhiGEqtrkfve3qOlitoXCtQaV6obEvOhV+asBA97HNxchuGmL5MxBgU6IKksAHIRqf5Bx4P1AhX42pTJLlvEYmd+fqcM0wMHr9YRrKDNxgpgDm1TbSYzBo+YBqVv+0PPDdUoCh/NHKhX39ZXNRHkP7mm4OgyVs/Jhsw5FvERgFxpYNi36C4qxtqfH8VsTjzHMaOTAR2kmPjjp9y3i611RMXQi8C6QE+ZHBC04fkC1VU5Ltie0SyY3/WzqDL+5YyY9OoPriNXH3qJA== 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)(39860400002)(346002)(376002)(136003)(366004)(396003)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(86362001)(44832011)(5660300002)(38100700002)(1076003)(26005)(6666004)(6506007)(316002)(52116002)(6512007)(2616005)(4326008)(66476007)(66556008)(66946007)(8676002)(8936002)(38350700005)(41300700001)(2013699003)(6486002)(478600001)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3g5oI7KdzI8xW/bxkkYUuUqP3HMJ2lj/W7bkvjBQRIC96fC4Ym01USr44eoZr8sVdScE19dO/OoAOYgASUskYEolu9xSrVVcOMubUS3dhdhINsOyrVkaSAGmVq6Da2+wSZP9D49vrxuPGCSsU+sRe1V/TylRwqZAZjyb2IgrEk+2ayKGrRO2vGJutLugge27DTKPRY7U3zJ4SnFTQk0BnJ6Tog/vyvBnFxiQ4t1eYxUXUBpeKBEBBbtlqTw+4Z5A3Z9h5JGhNKwyybzn3cCjvd/lzgf0BwhUyJaK/pLkHBR3v73OaQJm4DYudNpWd66HREKdThHSRaxvcDAY2WJBg4bNyF9OnRrEgWsY4s5iBWlHeH1hZLm5cQsJQmfnBstIGRlUSjPzsFZpINMOZVPAbeT9EBHMrXC49wJTrb33V+HZGlI64uEgvylh/C2QX7xheMpBsLVGmWpA1cWZPVi1KjZL8MbI750yGiW9loTHQ8Ri/dFpCfvgN94hzhkIcIIRrwlRPDDy0GaXEtSnxjkbRPijjAXaJSNnZ1Nzkx555TEARgsf7fXt9A52r0NMzTwcu47EWbKt4DnuCppu2cAZTklnow7ePk91p6WHH0Wuk20L8IEX6xqJBu2Ou0YEbkI15dO9OCAFwJYtpEJslrdavTZo79VK7OEzNfik0wBPJHumqbqMOwfsmrAB/+/X/nwgLTrY74L7fW3RQrM9Gq6o597D6pFKWMiPKkQTQyipSRM1N3L4Ku9ivFRQNPXhx4jqISfqT21oezr39IwGK8fzlkf4JqKeGeh1rwlh0x6a+CE5KfXaOH4ZKMDsRDE4TLWC5Faz1WW4x8kUuB8Zo6kd4xSTYaZDEwa1Sasiy0PLp9v+2Y2zp/Mu6BzTMzqD2zJhcLHYz+XSiTTSxIQGms8Lu28RbVme19WqwSpkIZ+0c/5u9wStd3bWo+0PjSd3bbH8LD5YOKlV0tFSd07JMV4IAnC9TMqqZ2Q40RXB0M9pZD7a+wYtyVDz5rWBrHXwq0rRrlhqvDhnx6ZBzYk5v5NkLsv5MHb6p/NVbUzxyf4TMjsY6odmtbJmYGQVzn5bRJT5RKFnAajqE1ocvbZLewdagZGiu2Zg/+CEld0zqu2YDbki0f8/4KuZzJzFDtAoanbOVgYLl1RCvKZJOjwRLiWArrkEgHEdiDnTcMWTttCgwNGt89fBLfpiGM9Lv1W22XYPIePtabXQD9D61gUo8FiIswV4XgVHAuN1Xhtopv6scXZMLAOhhGs5pchLF/48Fh/MUkDhUmSpFiC693TBesh5HUf0FK6y1sJbz0ENF20DNxrxxAc8RQEMxJ2Yla+2B93QbjRO3p1y3uGSn/xLpcHqf9j8EQpya1lvVz+R7vCd8lT3tGBO+7qMe/rDUdMAEU41aWiTVdx8Q7CfishKGBVTldShBSb/2zP4irP9QLZnHUZ0po3SW1qqq6YOuTPVnvQlEPnGebo1pHp7ry1FsYw2lc3cjiaXw8wJqwnYHzyJsNo14B7dCxRSGqls8t7AIeWwYYjl15SdwU8mtHEUHm2k2pSuwk+iIJj1hBB80aSSd2dt/ov0m231chj4/lTUFkp7 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ab27261a-3d8c-431c-80b7-08dbec3e42d8 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2023 16:07:15.9216 (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: XPpmTALa1bryTHXdj1rcazCFLwZ1iBTth8tbvPCGCxlByXm5v1MEKr/yqDMI9r8i5ToucLvd7J/T+3XbkMAKZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9399 Message-ID-Hash: 3NKU6VARAP4VJ56GDZ26CS3VNUYIHH2M X-Message-ID-Hash: 3NKU6VARAP4VJ56GDZ26CS3VNUYIHH2M 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.9 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 Document new playback-only and capture-only flags which can be used when dai link can only support just one direction: playback or capture but not both. Signed-off-by: Daniel Baluta --- .../devicetree/bindings/sound/audio-graph-port.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml index 60b5e3fd1115..b13c08de505e 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml @@ -19,6 +19,12 @@ definitions: properties: mclk-fs: $ref: simple-card.yaml#/definitions/mclk-fs + playback-only: + description: port connection used only for playback + $ref: /schemas/types.yaml#/definitions/flag + capture-only: + description: port connection used only for capture + $ref: /schemas/types.yaml#/definitions/flag endpoint-base: allOf: