From patchwork Thu Nov 23 15:00:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 746821 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 0EE72C61DF7 for ; Thu, 23 Nov 2023 15:01:52 +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 6BF20E88; Thu, 23 Nov 2023 16:01:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6BF20E88 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1700751710; bh=lJYQq2MQX68tTj624Ecm1B79t6Pe4wj02YvcP/NRhlE=; 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=l7SDldw+qqrVE88Ya5HeJcvvzR5Nqr61PqS0SKyLExEFinkSE0om/w4o0dkOzkWaf uEh+epC+nOVJ9C0PknH0vEKwhPpTybvmsdIqdiiIoIqPqyiV/BEe6mILO32mJHOf5B e0pqmMYR5oWxlkmeWqrTAiRrn6wu+HIoG6BQtC9s= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2724DF805C6; Thu, 23 Nov 2023 16:01:01 +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 DCB82F805C6; Thu, 23 Nov 2023 16:01:00 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 94A63F80310; Thu, 23 Nov 2023 16:00:54 +0100 (CET) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on20606.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaf::606]) (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 D35DAF80166 for ; Thu, 23 Nov 2023 16:00:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D35DAF80166 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=EbR+E9AZ ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iS+B9jCqp0d+Lz1Gm8ZbW4aZU/qUGnZE7bgi30p/y59tA/8CPI0829Lq7hljyKnLqsE/BnFLCaecGtk5i96hzzgB3vliRcQKMAf18nyAmihQ5flNj1EL0uISrzDK1lzFHtnktJuPiylBsqqyvLSnnjRtmVNaE5CPG1QIJpvksdFs0Dsc0ckwvUKtUW/DAzNldTse2K5bnAL3y3/kkQB/CSvUdH4oQDvu7p2r9Zr5FlUt6p8LxZGk6jJ/aatnxDQAMihr1i2V/HMqZYh/Wxdf5pLtI9R+7rZ/DnGqs+qbK76qA36TorMmpO6kEdILkUI/5hGFxOw7mscSsXh7HTo1kw== 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=empYRnMbJvreOnSrmQknKcd8rvwklzlUIKeqT3Jv/rg=; b=Ts9fvcXhh/+6ucJTACIiC4coFn0PTRQKlHaAAfkgg5FG3kWRPrp8QRzx+aUqnBqWLJAdZg/JMT0aLu2ukBzEYhk0gEWQVmzB9LzDki/75z4bsVCeh1eK1QeXnuYm0ZMLrAIiUcdZuJY0hjWKs86UZGv1l6ScNJ17ie7Q2AfgPXPLPbfBfl2xF11TcOk5c4sPqX5lgIjY4TXG1CRATIg517FKXu1Jq5eaxdlh9n92d9EbiZdG4jgkt6CBqtgvV/j3FVfmtrxkdgDfoqIMRCJEFGut/oInJNCG/bIatpLOyB5Z8PUq9l7ZHYTRZsXrn+Njk36pP4rH6rx6r8ZJvQKbSg== 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=empYRnMbJvreOnSrmQknKcd8rvwklzlUIKeqT3Jv/rg=; b=EbR+E9AZBYfRpj/mUn0IoC7GBLR9UpTJKMjLtpQKSgVKyOKnMDNRjTJqED0uQJjPdOI01uphk5udHOL9YIVDe+QqkdSK6Rom/zVXRwxz4cFSosDW7b6tTDEfIIOh/jIkDA4/k3Xi1jmZqbAC6GXWtaHnAlAxS9pPMNiAvaGcZbk= 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 AS4PR04MB9435.eurprd04.prod.outlook.com (2603:10a6:20b:4eb::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.18; Thu, 23 Nov 2023 15:00:46 +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 15:00:46 +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 v2 1/2] ASoC: audio-graph-card2: Introduce playback-only/capture only DAI link flags Date: Thu, 23 Nov 2023 17:00:11 +0200 Message-Id: <20231123150012.154096-2-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231123150012.154096-1-daniel.baluta@oss.nxp.com> References: <20231123150012.154096-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: ZR0P278CA0135.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:40::14) 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_|AS4PR04MB9435:EE_ X-MS-Office365-Filtering-Correlation-Id: 39ce55fb-2fce-4038-513f-08dbec34f8bf 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: Q3CVaYL36QAqUHwYyLZg1pHih0kxoeW7vR5DGDphOxTDhft1v0lzeJ8NC/hby/M916I8XjUp8G0ES40743Iaq94xHDC5LEygJcj35WgecPgwsSDA7t4hV3w/n+mwGLzt1VnzByg4PQ4EsfiWeIX8vOuYD7ba9WZGHT5j7hJUAIP9ETNymaXojnTNZW3uh7/cJHRvR8izhDOHaNh2Lb7m+tDPKs5DLHLFOn5ZqeBTDcst01y8oOfF6dvkhPPF/D/XLuWebQnhexd7Ac2ePiAxFK61of+H8x0fst0QPGYC61NoOaiNhd7+met7II4VT8Wg90V1A3UZpN134Q7xulmSpByiw46GEuz6lTzjF0ip6eEMCdO8Jw+9keLtqeB7PxyLG/9Yw/id9hV25EfLsxK+fTc4DWBEQkb8KVd5wxdiQFy9J6eIbCRlgT+YEYvgciwajFPYH7Jie2H/CAcVKluC8kmNCHccRB7+AzQFg87T7IFgT44re5Y+VRllHugjVt/SUu/+8/UU+MwQvO517JuNvuSse2c9UKKRPzMUuPmQo5ymh/Spbwca4D/fzDhURtgjLioownbKmwczAH4diGsmF2RVJw/BinLkcmRpoFUyTKcFP/mImiWFa6BleD09Bpq4ibbLqUuTQjffDD1GSbiU2g== 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)(376002)(396003)(346002)(366004)(39860400002)(136003)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(38100700002)(38350700005)(2013699003)(2906002)(5660300002)(86362001)(83380400001)(2616005)(1076003)(26005)(66946007)(316002)(66556008)(66476007)(44832011)(478600001)(52116002)(6506007)(41300700001)(6666004)(4326008)(6512007)(8676002)(8936002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0kGi4xRb65qs09VK64GT8pKSuWm7KG438+LsNO7jD8Mgk59hXkuencyajGGRHiIZLKL/cI07R3QbFMXJtmVEXwT7vFds5sF+OsOQyF/azon1OfvetZNc/IsHj892d9izkJlqCk5tQkHK8hVy4v0pvPtg/Vjgi2AzupU3+ii3+6YuwGKxZd2zO7TE1h8Og9Uw2oMut4NqApYuaNR7RTGoQp7LtxiJm5zAyiONIgiNN35iUm3mcwNDtOXpvf9lewt8QxyL13nADu2che4xIf4yVfgqhx+oWXzqD7W0o/Z0639CVK7Vni9KWcIuT7BCS/NFh0JnJRt6HBPTEVJisxm1w359UVQlhKMQCXw8wngfXirhHGWj+xDCwMLWeiHU6eCrz/4XJtQxSXw61N945Stvi30wir40UXPwd4aous9Utto/eUmfENc7HzH2sGKh3aD10I2ADQ1lPB4emNZ74LhIwS6h/nBanGeSZSTvyMtgoLI9hS5Zl1qPeN8kGsGIPH2nWkurnPT/UqFFnPCZ3G7v9aTn/ubEx58Ji/bIFg3jt8SMkSy6EM2arWrucRtFEzB4KFYQlyDNg9nS7qAwYjA52TEnwF6AllcL9WBuxQNjn1EdrRbbQSVQHZ62PjKC5M/gTt6DnhQqweD78GK72rzyKsreZn9kTe7k/xbJ/SFC25mizdRljHSCG2637eP0/B4ZpbzUDm1HSzq7Ua48AOB5VfBVfZtLfnehCfaqoGVWw7WTWCgs5JAjT9eMlMRbbz3J0Uctd6TsI73KvuIL27RFS9Cd88Q5jmWnlgMEG3WQgiplcJoIWaUTWC7CAYDUvvfQphevYbu2jb/M2qnj/C0tyCVtRU0KhMv9CQL9Vd9oikPZ5IpIMh1T/aJPs9vu/FOzXHVSWI4ggE6enOTh6oS8698NsG5PiuKs6s+oato5aO2vKO613Ochqh9gS+vcK7eIS7cJb7jIPDqVCm7UKtZM8hORR/gMk+VdpsceooN1f2jAPwv/ntbpQzh0pfjNxdD5bTqzKkjrgOBlXtgFqiO6ZhMpxbD/n+KsWAfFZXel6rXTUsxJtILFZuITOB4bS4eBztsfRftO+XLrNblA3NlRvXG1zqQgQKhOeqXHiG4QV5eWl5TOnueJjNax19sRq/lsygq+eveQXyi+W6ovfHf+fvsPsDLAq33iIk0xB1hoaaeqxCKEU6tJ603SEskX9OaYa2IikwK1GWvvnzY49MYO95pbMZvRzZxmo8tmCcfWbO/e0imai76/4tTgBYatcwOFp2RaLjqpbGUxJppIIK4wFDIVuT72H8oV8290XUWKp4fPvv/Wohs9DOnvvLAmw09gFpY/6YL/Mp9txTHvoHDsoR9+Ct+c8lIZws/73Kgw9whrXp0eL4TB0ijYqIjl3sD6dqaI66QBNDr1j3gO4R39fm4eDXt700Dk0v71r8Qi+TcoB9EiZO5dBNx50JEYA01urN6kkTysVBQXYkk3L9T5y2PRy0tZFPz+/6UlEQOnoUZbA+8N/wq5aASkic6/242LSpkPUQoGkCK2WSjNu1aoNvKygD3dRvK/W8CZ9pdTLYlvrNOgCUg3a9hKHJjfXyxv X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39ce55fb-2fce-4038-513f-08dbec34f8bf X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2023 15:00:46.1377 (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: QKCrXIrQFrFzJsE4qVQnMviwmJkghEcXiKRcO6MEZoL2laLacnWKcuqZaEpWOXE3Z96pxpioXbIgPiCpylGTHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9435 Message-ID-Hash: 3Z2SNI6RAPLEPIJB2RXXYYT66KHUDMDZ X-Message-ID-Hash: 3Z2SNI6RAPLEPIJB2RXXYYT66KHUDMDZ 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. Signed-off-by: Daniel Baluta --- 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 15:00:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 746517 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 CED69C61DF7 for ; Thu, 23 Nov 2023 15:02:05 +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 1125BEBD; Thu, 23 Nov 2023 16:01:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1125BEBD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1700751724; bh=SbkmAQoRnL8s5yfsrMT4GKOVud2xU8bAOhmzk8/2luY=; 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=cEodQSzIkKjChLUA0wX4kGnNCl/fErf7QMu2zCyO7WpC7BcGyWked8px1JBEfBbGE RYDYsqG7LPQWaTQzvsmHKEYTGrihS7t99WtmWnffaCv4e9RJjVqMlSoUFT7o2Wcd/F UUAhhemxjEOqepJrEcOitVXaHbA7JHU1vFYVakp8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BDB27F805E7; Thu, 23 Nov 2023 16:01:03 +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 C0EEDF805F0; Thu, 23 Nov 2023 16:01:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A6B90F802E8; Thu, 23 Nov 2023 16:00:55 +0100 (CET) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on20606.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaf::606]) (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 2DFF9F80254 for ; Thu, 23 Nov 2023 16:00:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2DFF9F80254 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=ZeCD2b8x ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YlZxVaWZrhiKYk6zOr2HCTbjLG4wl4J+dxzrOFkI6DPn9BxGOyP17QjxeukF2OsHFMGtsqiYdSOHRWbvs5RvX0m14CD+yAseNPi9s80G8sdB1Qv6hQQGzwKbj/u09Dqr3+Yc63rPnWEyImHkaRIQrsarFAA9nB3cLkWxuk9tPb+CBp0MkK7cUtaWEnkHZ5CuDcSblXF9cSEgBFTIZxUPK7LwqWV7dFd2n41sVAqyakGw7OFkeo4g7Jm3oN5aw1GAg2/87Jc1vlhMsPVDOh+i6bznWkscHT2JZ33l4BW8RM8HauGQUYv/IFcLqZyMcY/unNdd74hKQCwiSj33qOjztA== 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=TCm3q2drwKhwlAFBL5YS4ZiycujkfAP2/lk4sC0Sq4A=; b=Llv+RVU2Hdq8cAIwKvrltG4MZ+RWC99Iq/UVeGYRKRJ0VzoThcjJbZSi8eCsEnBJVcnpT2e7yLfYbZ4zpvO0KjKqzlO1Tw48xWStZIuPzK5IwffRMoX+NDwDq8lseNf9beMt4M8pkKcrC5V8Z2owoKsowmjGQ3zx4TPNjmWUrlzZg8yqMwXR5uvBySD3Gl+M6FC35kmXThjpo0se35OdAj7UGp8p/ONyRhVJlyeRM87xF056xOkE5b9NdmqGyHakpuQ0LT9x4yIEtyqDA21wTAaNcD4cEZX4Nb1fue8E/5d0Wsm4icaUinWPoB5evl5atX/xJZRyKORAStIYk2Q+Tw== 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=TCm3q2drwKhwlAFBL5YS4ZiycujkfAP2/lk4sC0Sq4A=; b=ZeCD2b8xX0fauMvPi9O+0jpwpS1xGdITu4RnT8pkmpNH8DCJrGVkhxP1s+NiHlCA9JZ9UNSKZfbHBB/R39rDi4Snir/3DycZJIS3PKrv9dcq3EBRMUN8Z2MMknPM1GmIhzRb831BLGYDUxS2g7TKcEPQZnCU32XXhSQ4tJ+bH5M= 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 AS4PR04MB9435.eurprd04.prod.outlook.com (2603:10a6:20b:4eb::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.18; Thu, 23 Nov 2023 15:00:47 +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 15:00:47 +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 v2 2/2] ASoC: dt-bindings: audio-graph-port: Document new DAI link flags playback-only/capture-only Date: Thu, 23 Nov 2023 17:00:12 +0200 Message-Id: <20231123150012.154096-3-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231123150012.154096-1-daniel.baluta@oss.nxp.com> References: <20231123150012.154096-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: ZR0P278CA0135.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:40::14) 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_|AS4PR04MB9435:EE_ X-MS-Office365-Filtering-Correlation-Id: 7968fd9c-7869-4137-45b7-08dbec34f9b7 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: tmO90KCnK52pNy7ekDWX4WXsg2Fd+rKbTS+bGQ5W4Cgq4CzOUl1nenEyHECrojb+jIjtmhrxwKsU2h15I8cTkrQmauovNiICLOlIShgidq3x1Qskf7CiLA6X3ZsLhk/pJ98mDU5toFw+6Dz3Tp7iXyvXu+RFCh9dOMHCdHBKDTe9xHaXl70tPHp2jciiyZq+KLQOgC2005nGHukBgETqSQ8kCgWCFVwu9QE5Oeo+V7fBJFS9URA2n831yfr56bvvnx/VTwGr37Ebi71WEmjKo71Er0kKKDW7W3LFwiY6pCA7u+VHirCQinolYQgflG2GptckIfRKJEz83L+LIIGyfodhqEpj0tthPDMdG4asPxAj0OJIlSnwvPfX6AkBpyC96K51W8Qvhx/wuzAj8rJALaqiNGg71Oga+DUMA61uwsbM3iNfQ0mutf47iPNQRITO6Mq0IgA/Fhx2arlmp9P1Hum5rIpLbm5VkFCksxK3nqUykAGuVoMS9ipZTAbUJ2ahplmZMFAL7ttgWg5WQjrOGvHSuYcdxNR/wSDdVVazq2jGqYht6QDULwWk1+2J5ntiha0GG8hy5hfguPzt/Vy0gyPfogmUsozQhH2Ao0zgJtkNXseYEyaN2IT1WTVqFkYk3JhqJj+Xd3QTBSqebXJzQw== 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)(376002)(396003)(346002)(366004)(39860400002)(136003)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(38100700002)(38350700005)(2013699003)(2906002)(5660300002)(86362001)(2616005)(1076003)(26005)(66946007)(316002)(66556008)(66476007)(44832011)(478600001)(52116002)(6506007)(41300700001)(6666004)(4326008)(6512007)(8676002)(8936002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mW4EUh6PU4IDGW7obQVn8GE1l4EKq6j+vt5NZH6uRiGD6R81CWn4Uo94CUIDTfTfjZxelYM9I1HomKfzMHgUJ7d9ONqJoW4nB1LMRZ9anbwiImZgP63PpPg9hSURCXFx7i8LTcsQ6K1NXPb9OdvhGR3WjIkwo6BKT43UdC8/MBP1y3e5Vs2C1YkEeQORNix5yvrkxncSGT/FLqHX1Ju+ofYi5hMX3SIK+p8PjLxwBzFe3ppJDr3Vp3EtZ6C4aCrlZWLNm2ktO36OrSk2HqntdmHafqGp/gxLYFeRg+ymVmdzy0SHBifBWNjPAQ+EFVZMYeT/puksV1mNrS02cpiv0lJyxF9K4c+Wz2+glim/hBt2Ng2jbcMCvSNuApxKSoSYCg5FzCrsBvWyMxThlT4C7DtjVe065WMNhG5PzsMnxnvhi0BHd1UA2rdNg5e8hs7pYQNOYscWlfipNPWd51gbQN4Cb/GnRfrPfimlVmQHF0trDgHq3u9vszZolY5pfjKjBC0WR/SvFzYLa8pkxymBnJM9s8XwBVt0TWasgBh1/r5H9kW3hld+zQ6wJokjI4ylZJYufMVnsdzJpVNH4SH+A5SBeFCAbX4aZzwzmAJ7E4sFM4kW7DSdTAqx+z4rd2jVtJ/4IXADWMN1VzveP3A6be9GDyPHDeSuAQM6Qch3VXPjWUdc3UoTvsiIywkJchE/Ur4q2pLMpmPKJ48fM89542f7fAYvVucdUl2xOKWihdPKgLsShKI/NTCa3GbjipCMZQ62b0InfN104cW0Mx+9CuSODZ1C2Z5UGmRvlIVE2nroVRL1vGg+CCeGF7xWtCyOj/JNtcCFU5iuLSfsA4v0e5gqDg784o07BVFJunrUJxr7XjzG4GeQio1swEXa7EY071i/NbdwSHbF4iTLqQJrO/MkbRB1icD92PsOpKM/i5hAm8RlzFJjK06WccPdoaoBnweZtWOIM1LDumNyzWQFbQkioF1LG3jCol7nrtT9ysCL6sDzMVc0BNPHDSLjbwV3ZnA7qvqeA2vxeSh5djCfsp5ICxr+9m6Xnu5/ROOQf8bw1JuH9buExci38JJ4VxuzBzXPhVkeGnDI8PhBJ4yAHK8YzJQdmsQnHIyGy4+gdaIGbS8UrJujIKe1RNstzuPfqjwj5ceMvq4xULYguD7ef88HRy8U5Ykr+8QjozdS1+XuIeqfLbNARf8Azfi/00iaeA9nSrvrO/i9BvY5MwbrLfq4e9YWYhmRPAwPL6/dhVz653CHBY7N+mjqSm0/pzMTJChKbUALEEVQ4Sj1Zc/AEqexdNJUMl9DKskEKqbBMOI8Lfx5x433Gqp3luVAX79azeKum2cFhWCtAA7gZfP2nxjE6iq1LnkorGet2WAETqMJJ1InoP1BXvQ7zv8bK6+jmD5l208fMk/3TI3KDfuYOgFCf8LqYk1tqf79addKi5cXmiKme939LX5IpLMD1A2z0NhdBM4KBowlahcSGZSFXp8wLOT2bto00lx1icMRVjJUCK1s6kNjP6PVhK/ug6iEvoSZ48/hpSy7+EhLZ0eIEf0qn37+JWoYTj0izj5pUfiqfSiuce6ZdGI6h0mtOT17 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7968fd9c-7869-4137-45b7-08dbec34f9b7 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2023 15:00:47.7229 (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: +ntI2ajVCZwqI0jVU2X3cEjd3oFIEQOh+GOvN1kR47Jfu1v11YrzD/4pbfcqwuNzzN7+/Nk72F4IQeF1vzYZdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9435 Message-ID-Hash: 6MTMDJOLSHKFGY5CIYKAQAGNFBDT35XC X-Message-ID-Hash: 6MTMDJOLSHKFGY5CIYKAQAGNFBDT35XC 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..0aaa8a29fce2 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: