From patchwork Tue Aug 1 08:24:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Daniel Baluta (OSS)" X-Patchwork-Id: 13335900 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 C0A67C001E0 for ; Tue, 1 Aug 2023 08:27:03 +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 64D9F844; Tue, 1 Aug 2023 10:26:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 64D9F844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1690878421; bh=xsMt3Okstr5kyVHZlCwGkvehrU5gF2X5XuranWwU0d0=; 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=TnLQD6k4+4ddtb72ACc+/dMVQxEKrMgHCGliDjJkRS7Nzd51GMqgt/KGJstZi7bks 9BtWPWYI5Q8jx/J1T+hXkY3/XSiwEIrKJpgzFsh6IobFMkZe0DA1u0+2H95CdrW1CI sVgVtSQQayHPI98UmeKqpJsTtxXNq6tNXu35OQ18= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6E2F4F8055B; Tue, 1 Aug 2023 10:25:10 +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 EF604F8055C; Tue, 1 Aug 2023 10:25:09 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A90BCF801D5; Tue, 1 Aug 2023 10:25:04 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on062f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1e::62f]) (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 4C960F8015B for ; Tue, 1 Aug 2023 10:24:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4C960F8015B 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=SjrqChg1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AbyxoOEeGEK3z0sllu3AXiOcL3iNNqGJt8zVhAsRLMrLNvfm8rD+59FUq2CrXiHcmwGAlF9oT8tkDqOfdZRbkB/FkkljQa6itgJIhSxz/Fcq/kf4EN5YR4EYzWZn4KU+GMbRkUL7BMVORLN89ega3CWsRRoJLi7N81mfutBEVvE7ww05hFl3Lx7qemyM9oFrNKeSZ0cUG7egDW4C64ssCQ6osnzFbUC0L0To0aNjcBuOiu7vPT8WkRO1jfFWWtyngtxfFL1xo2PLJPYFs7UMeAS1FbkMNReag3oLgWcbdPEpTmbbSev9aZGWhiMkVgfwEzf/ZhqyT3BIDKqUsrP5Ew== 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=RzdrC/N/XUfpTl+MgYHVXrTh7R+x9io3qAlXC9s1b9A=; b=Yra3Uf86HFT0eGFYQF6SmfESR9L+zI5GvwOWEv1TpA6/9v29Z4VQV8tC6lRnHknJDKpoFLvC7lnyqDaUAJ4nMWg/+jT2yLZ1Bilui2MoRqqEVtlVOjKzFV7Nd2O4jMq6dMO5uKuyhkNYiQxC8cdI0MpN4hlObnToif3hR/bc2mX7sB2R25ZC9ZL31/6lWGz474rHaLUfEsSYkO7cgzoO/FtUqlhTpxQSHwJr9SGb+a1Stc5FPKDF4w92TpjJUN8fzeRUSeVq1lvXbtbTqS0z/S3c7WEOj+DThvOXwekaCLAZ2hqiRE7rsPGk+Mw1odmbjyWyxNj/RY+eDfwLkcsEKQ== 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=RzdrC/N/XUfpTl+MgYHVXrTh7R+x9io3qAlXC9s1b9A=; b=SjrqChg1iDuhQ2TK6H6Qe+nF8rhIylieIhOIpo2pEkn45pSyxheJv1IlHxIwajdLoTV3QToXp+qp2ZgWYbq+bgSu5co23T26OaNhTn4scf7rj4+KR61DXMKoqzyoTAJdsBxSdBruohYG+4gjd3+4Ow01nkpknfYUVngl1mUTPN4= 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 PA4PR04MB7917.eurprd04.prod.outlook.com (2603:10a6:102:cd::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Tue, 1 Aug 2023 08:24:51 +0000 Received: from VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::d4e4:973a:b085:de93]) by VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::d4e4:973a:b085:de93%7]) with mapi id 15.20.6631.043; Tue, 1 Aug 2023 08:24:50 +0000 From: Daniel Baluta To: broonie@kernel.org, alsa-devel@alsa-project.org, robh+dt@kernel.org Cc: kuninori.morimoto.gx@renesas.com, spujar@nvidia.com, tiwai@suse.com, perex@perex.cz, linux-kernel@vger.kernel.org, linux-imx@nxp.com, devicetree@vger.kernel.org, daniel.baluta@gmail.com Subject: [PATCH 1/2] ASoC: simple-card: Introduce playback-only/capture only DAI link flags Date: Tue, 1 Aug 2023 11:24:32 +0300 Message-Id: <20230801082433.548206-2-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230801082433.548206-1-daniel.baluta@oss.nxp.com> References: <20230801082433.548206-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: MR2P264CA0057.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:31::21) 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_|PA4PR04MB7917:EE_ X-MS-Office365-Filtering-Correlation-Id: ad1f5e8b-66ab-4479-c01c-08db9268c666 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: KXu15soKIga136cHmoKy6voMNXMkAsdPpP1c28U2nxChBJ8q7F3qoxaLls8tTkMN0WWKtgDxj2AM0UHfzxNClQm4ekAXQtUqTDPls5usVFdZqVUWEm3DXge721bCGKTLm3rKPjwxlW1GG6o5EjE0itktRTJGYbV5nGrO7pJ7OWgTiUPd3LsQO1jkeWuwtTAliExs/Eh33Vl7pz4LDLBKnSt2p1t8cNGHKrOL1g/lA+KkZWtZ1B2iDHe8XPYxWY+zAE/5dxz+mNQ63y50iQun1kSniiZo95foQjOnBE5KEJfuZOf5P8gC3nrQI+JAsDYdespOO5D2aVSw6ckKKB+DZI76+TZhEFqrf0yKaXt9Kvi7Mo35EJg6tpF/L0VI8vPAB7/lF63+LSRNLsY0ck6WdkPiaw+GbLQbY0xtACPHJhCRhi5slH5IRVkfwRmmX0fNCknEn6jchZwOGVKmMN/b1Xv1jwu0AQ3bPpT/QdZw8BMxWdHmwro6HCQYUGlZQpBWpxMXbuYjrDjTXvdb+rQ1UE6Pqdjy1Tq3sx3yxbkwY4CfDNgAXUo8AAqE/6Zn8uRaTBrJSp4OdUQU01lFFaV18vlZ/uimoJblP+tf9SWSqE8RwznRpHO33cmvaMrQ7+5B 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:(13230028)(4636009)(376002)(366004)(346002)(39860400002)(396003)(136003)(451199021)(66556008)(66476007)(66946007)(52116002)(2616005)(6512007)(6486002)(86362001)(38350700002)(38100700002)(26005)(478600001)(1076003)(186003)(6666004)(6506007)(316002)(41300700001)(2906002)(8936002)(5660300002)(7416002)(4326008)(44832011)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: efaMxjDBs6xh0s96MRHLSjy01kGo2WtqEVJ+MwCKfkHUZ6QmvTUKaD1b1ZNIWv4IhotEu59Xon23r1yh+9A9Xa2jIzVL/gsa5sSMJ/IU9TDzReZ1mRR/dI1uY0FSBaPvK9tOZImpQjLulPWOf4WISdwzDqYTWtzbFHYf5O+HRKkarC3LPfPzmbfaMHgqKjBY8JVKuPn+KIGBWoOU8E/jsaA/r9KFhnJeSukXsOQsqlX4xeunE6Vd4y8MF1SGO1YCClkW86GbarCRK5xRgpPbasFn0rNoAIQjQMJvK0MaM1pXQfRTYIZLeFkMPPylKfS7JeOGMh1KfBi29AdzS8luBJvuBkxuPsyGr/QhkUqqUUS3ufIvZk+De22xR05DonWgIaxDP0/8sXBoy4U7Z7hZZ/wj8CQFJeeEGGTlLDK0IT3jEKYqe4D24yQAbWvzBjkw82G2aSma7X/LVh4DXBzs1TA5zBq7QJXxiGc9f/DruoLVwUAalKGYu1TJFxHxAB7hyiKh2qNc29OK+cdgMCgyZDb+VQ+ZRlsFJhNwM2bUSHF9G76rjzdGB/GrdbucNCUP+7IvYbaujGZ3kENPdLREhHalGeUOHTug9TwtBWjFmUZ5u6WmddOL+LqH1KzQrn1cx1709392qa5eok+vhPsirCet91M7C+5HjbMbpPWEgmy+pze84E1H8D+IYijTKI/l/o2zzhBvlptMoQ/LzCbYXg+MxYz7iXRdXEpShvvqgdqmXFDnjyEnBs7RaJpJD2An5HSanxImBYtCpz2vLx/oFMBOGj1mOAFHSSXKzrX7Uy+dDCyU8/TLZBXkEjr2spubu4dJ6oZrEYme6dToJ6b4WwWd53YdIUJ0s4urVZypBIUyV8PXMLRyjAbjFV9heOHdndUvbvYmEk3Rjr4zCI+vvCtWRcd/RrUb74XKIizUJZ31joTEObl783yklQ0Exnqs+oI2tK9gUyX4j/SZADS/efsNwcxBriHUl305JVp8vHioMWo69ds9oxlcAZZO0guJV6cybWwYMgyTZ5UffG7//9Bij1f5+sXrARWZ0xTeP8/GHWN9nbefPPxkQULWDmU+PdqV23SxnK/ZUi16DG+4gThOG4XGGpgKANgCprkEp6fQqnIHM5PEHe42IAkOtdNFflGz/6jvh3qt8Jvgu/NovP2oJzNba2H9AU4+HgJKjks/+3kq17CG3/ybFjEy7/ds0X9Q8oUpNU01/KFyg4r/KCn8jatweetLVIJ17rv4NQRSwQ6mk5gxov4NcdqhyQfocycjtYa6hScHWPO7HEDHp3Ang3e6DLONXkIfMFnJTuGjA3+Sz7Q65SKWhi5uZ4v45Ai9RK1po8FYk/WbU7v6gUFUtq5vAn5lGZlE6f3H89Lv9It8rA4DSSANJXlQE7HEJa4Wbzzso8gAvL5yQtlZ90Q7d2Ptx7ZvEkFdmVljPZMWVeW8TNVqkVQURKqoDpcczSFGHS84m73zr/HEmx3ARR7ggJiwsEsyF0aFGpt/ej8dQMOok6eS63F6lscs9Q0n2SZzFhlbaFmOth+Z7AKYMmnss5Gd5Ax+hUPAp2WGEbO2DpP1KuzIFvRCz74RJt5U X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad1f5e8b-66ab-4479-c01c-08db9268c666 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2023 08:24:50.8742 (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: YFeXTCMmah/9ZFyapxJzfnaAG87OEjKG+lRMQjhQC99dYIl0u6PfeE4xgBkL7RMVbRrLU/MXyWPDx/zmbU2dLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7917 Message-ID-Hash: QJJVV3OIEFNCR3ZYMREZE6BTWCFMDLBV X-Message-ID-Hash: QJJVV3OIEFNCR3ZYMREZE6BTWCFMDLBV 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 need this to signal that DAI link supports only 1 direction that can only be either playback or capture. Signed-off-by: Daniel Baluta --- include/sound/simple_card_utils.h | 5 +++++ sound/soc/generic/simple-card-utils.c | 27 +++++++++++++++++++++++++++ sound/soc/generic/simple-card.c | 10 ++++++++++ 3 files changed, 42 insertions(+) diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index d1a95bc33c56..47d90edaf6fe 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -135,6 +135,11 @@ int asoc_simple_parse_daifmt(struct device *dev, struct device_node *codec, char *prefix, unsigned int *retfmt); +int asoc_simple_parse_link_direction(struct device *dev, + struct device_node *node, + char *prefix, + bool *is_playback_only, + bool *is_capture_only); int asoc_simple_parse_tdm_width_map(struct device *dev, struct device_node *np, struct asoc_simple_dai *dai); diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 5b18a4af022f..e04d2995cf0b 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -115,6 +115,33 @@ int asoc_simple_parse_daifmt(struct device *dev, } EXPORT_SYMBOL_GPL(asoc_simple_parse_daifmt); +int asoc_simple_parse_link_direction(struct device *dev, struct device_node *node, char *prefix, + bool *playback_only, bool *capture_only) +{ + bool is_playback_only = false; + bool is_capture_only = false; + + if (!prefix) + prefix = ""; + + if (of_property_read_bool(node, "playback-only")) + is_playback_only = true; + + if (of_property_read_bool(node, "capture-only")) + is_capture_only = true; + + if (is_playback_only && is_capture_only) { + dev_err(dev, "Invalid configuration, both playback-only / capture-only are set\n"); + return -EINVAL; + } + + *playback_only = is_playback_only; + *capture_only = is_capture_only; + + return 0; +} +EXPORT_SYMBOL_GPL(asoc_simple_parse_link_direction); + int asoc_simple_parse_tdm_width_map(struct device *dev, struct device_node *np, struct asoc_simple_dai *dai) { diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 190f11366e84..1fb34a51636d 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -195,6 +195,7 @@ static int simple_link_init(struct asoc_simple_priv *priv, { struct device *dev = simple_priv_to_dev(priv); struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); + bool is_playback_only, is_capture_only; int ret; ret = asoc_simple_parse_daifmt(dev, node, codec, @@ -202,6 +203,15 @@ static int simple_link_init(struct asoc_simple_priv *priv, if (ret < 0) return 0; + ret = asoc_simple_parse_link_direction(dev, node, prefix, + &is_playback_only, + &is_capture_only); + if (ret < 0) + return 0; + + dai_link->playback_only = is_playback_only; + dai_link->capture_only = is_capture_only; + dai_link->init = asoc_simple_dai_init; dai_link->ops = &simple_ops; From patchwork Tue Aug 1 08:24:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Daniel Baluta (OSS)" X-Patchwork-Id: 13335899 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 1666AC0015E for ; Tue, 1 Aug 2023 08:26: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 469DC7F4; Tue, 1 Aug 2023 10:26:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 469DC7F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1690878410; bh=ENPQ4mS3V77bxcj3DunRE4xUBl23EEkdk40dpDGvSkE=; 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=Y8f/ddLldBXOXkvtKakgjopxK+hzI03Qy/PyZjGaqC0oiSoHvza891wT8SCdBsONp +G66XFBkPsKIl14aWtc8CpaodIFBld8MRm1bOY0RCtK1SRs7UVYAA22yorc1KUgvA1 KZcpmjGjIuKA76JMTremqenHD697cWWMg7J5qQ7Q= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 711F1F8025A; Tue, 1 Aug 2023 10:25:09 +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 BA2E4F80551; Tue, 1 Aug 2023 10:25:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 66C54F8025A; Tue, 1 Aug 2023 10:25:01 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on062f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1e::62f]) (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 AC0A5F8016D for ; Tue, 1 Aug 2023 10:24:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AC0A5F8016D 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=K9D5smqA ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LeE/xvSyCY+ww1rAFiZvcs4pqwP7vbBDYFlW7ulVNRwV3i/zbyk8nxLiCk5sImPgSmTcTfekCZ1wZcC8hr3x2aGKMDFtbCrZZQH4xAqY4vGknsC6g5YaxGm0o4g27T8KaFtmmjx1bUqqMoQ7i+P/mGrMs1WAqvySsqNNpFKPeD4QaI2kTvkT+hYn1qGMvroJnQkIj5vi+uc9/xY+xH90waNH5dPF1b4qmC4wAKya12arwdX5x4Ep2VIEC7wCl2/05PVNEqfZ7KvbnkT5iEKHg8lMUNPC6w/UW1mC24pvpvGPPck14isCtE6EEP8s3/q7lbkTU0G+YsxtcFwYiryotw== 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=ZfY6M3KKq4bJe1fFhlM30Nswp5pBszMPEpheMHnePAg=; b=CP95zGjrezCw+w/V4lCRmhupNdx6n+rWde7fVcsGs4HbATfxjFgGdNpeLx+gNy4KlXAnlfJ+gHqXGhBNOLfZebq93rOrtg5xSKbMuujJmhViaOHmDSCxyZ7Fs7M5yTm00l8UJubZydwT8YMU1EGpmeGFFBrPqqmZvzLT+8nfRL2AVNV8D09h9jVmHivH3yODhJnIuKF7ZARIhu3yuAxQTOVFj2kq2sdMB9jXk9n1GGaNO/Mz8OVyrKGvmjIjF7AkGmq3zHil8ViMbPgw9I782W7F6RSBJmO+K6PsLnbLhrES8KFQae3LXJUb/JJqTZg27EdvW+fIeMjON9PAiYrQtw== 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=ZfY6M3KKq4bJe1fFhlM30Nswp5pBszMPEpheMHnePAg=; b=K9D5smqAqiOqO6gaX3DISllbKtG/Qh68xIauDKcdN5CE4kKpY6I+YNKxD+E1WTixcbi0RlxXj0oWyYrn+eQ0Pz+69POvRZMaicSzL1xiSdJuge8Yfs5SApJG4RldSfBQHGgJ6qKsHflfieCLwD8vwAKn2xh0qDx1TMWDBQ3e0mI= 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 PA4PR04MB7917.eurprd04.prod.outlook.com (2603:10a6:102:cd::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Tue, 1 Aug 2023 08:24:52 +0000 Received: from VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::d4e4:973a:b085:de93]) by VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::d4e4:973a:b085:de93%7]) with mapi id 15.20.6631.043; Tue, 1 Aug 2023 08:24:52 +0000 From: Daniel Baluta To: broonie@kernel.org, alsa-devel@alsa-project.org, robh+dt@kernel.org Cc: kuninori.morimoto.gx@renesas.com, spujar@nvidia.com, tiwai@suse.com, perex@perex.cz, linux-kernel@vger.kernel.org, linux-imx@nxp.com, devicetree@vger.kernel.org, daniel.baluta@gmail.com Subject: [PATCH 2/2] ASoC: dt-bindings: simple-card: Document new DAI flags playback-only/capture-only Date: Tue, 1 Aug 2023 11:24:33 +0300 Message-Id: <20230801082433.548206-3-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230801082433.548206-1-daniel.baluta@oss.nxp.com> References: <20230801082433.548206-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: MR2P264CA0057.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:31::21) 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_|PA4PR04MB7917:EE_ X-MS-Office365-Filtering-Correlation-Id: 004b4a81-49db-43f7-d94b-08db9268c746 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: +vVSL0HagpcgIPV4cdNBKpXQFeQBmshDiQiuheMsWelG8JB5Zd1EKiYLbhJCYKCODUSNCuQWMqmjEvZ/tYgdN5nDK4LuquCWrss0x9tJLlpbDQbm7r2aqmzb3hWr7dAkJ7pa/yg8TxDenp+XHz7glK2p7jkBBy9tpTT1Ul2zdhCo9iXxEg1tx4CTVPhS/cHMH8pfDPjaeY3QDvIeW+Ntmjk8MDxoO6RCVWWo9G5G9dYXKVIUPZuLgCeA0AioXNPvw/BkIegPSVOghijKxPqqRnkre8MTuRo95jZtO/wLMuQQcfi0g4tzkTUQ8jlTujq79pKHcfyBxflaqPdzyRvGZp97gY/gykGUt0nw8/EU0IfxPqoF9lQZ6PFFe0wh+HUltLA5oVEu3TyGrcUdy8w5+eMCJvr2k49QM7OtluJi8PImD/TZHm+GIPgiHp+GaaEnkl2PeaiXsyG+9898+SJ/H6hD0aXT0fCDNPJzkU5hd0WimGYzsZFW1j2fqHCy9/8+IHilY/85GLQ+M6CULNJ85VZ90Li3X1aYId/WNlTBwmFDfhO9E2BzALVSBSCEy+vpEB63xuhV/z1QVXP4naH/ydDLU/9Byb0X42fRYoc65FZwX/RTYI+h3qaEsZ5evHHu 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:(13230028)(4636009)(376002)(366004)(346002)(39860400002)(396003)(136003)(451199021)(66556008)(66476007)(66946007)(52116002)(2616005)(83380400001)(6512007)(6486002)(86362001)(38350700002)(38100700002)(26005)(478600001)(1076003)(186003)(6666004)(6506007)(316002)(41300700001)(2906002)(8936002)(5660300002)(7416002)(4326008)(44832011)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Q+BnAXaQD4a1OUvx4MswgNJ9hHwAEmOv+lVKkeORBqmEbqGb1VH3c+U/nTEw/idjRBDVP15J+uCWIrMcU49PrhZClsk54am7244Th3MPnwnq82oTy+u6muNbEZOP7iH7g7pcVTmuWYPiY15Qh7HMvvxJC+0seVT8zyOIx3pAXlNV8CqDMA+zKg750nYyapk6e6HZfp6cjCaW4I2FCkUorzxZXTKLR1TYdc4lPGWCb91DdA2ty8f1qwGqQUti8oDv87wzuXYGFaAh74WilpgzS7KviWDfYBCLExnlgz1Ux5zr5Qhqdm6LVV5ybJ/hjt3OEi3VBlcnmNZfyzqDYvRh447MZWLCjK/DnTrAGNY4E0xkUPX6s9MRmI8C/SDgjPw6GFrR46+abg5FtzztXNSbLBytQ9J2OL3lRedzabqOLwrQKUZL1qQFX2hvPM+XXEj1pMIRjR7CCuSyPfXml892PfzU5qz94MslJzgb9uJftSFwMuTXSZKo8MTnH6CyeJ/ec0N2vcaZA1vE099qCaZibrW05km16/yb4FL00LLSR7trHfZ01fz+/M+KC+PO8l7mLOOXi166vzKx7TNk/KW5oJ/75rYFI2mEv5ZpGW4i3FIQsW25jAj2bRR9rhS2IxfRSVb3BJvLsiW1ogm7fPQCXnU1EIeU1XDQaqTvvYHnmYSJsdSr/MzRsbkj2DV0sNg+ZVP0OD0wpK6pvQ1UCR5Ebe9rlW1A+ZynTZJbrUkYCYfw5By3iQ2CeyfbtWeHqfG1hkmVdDSDUBQj+IP011r9gjQFmqAQN2O19KHtuGlomyT46HvfD1n0j7st6UiH5VtsMrpt/Lqq7l6oYm7cKxwReA1vkGVrIf1zyit3DwXGE2uR7sKn5jjkwWMEEqjSi4M4kKM74Rv3QoJISEyni0xjUyRItyDmsTYnTBqMoK34chfpjcdsBU9N1+UqbEnmaL0ky8zzVNfuIykbWzlSUNXB/7JkWLZPXBLQpd1ita6m1822MWEAUo+1EmhrVRz9sLbUPSejWNR9ql6au6NdXBFtFwLQOEmxDdI5n0QLAeb5VSa33TgrEx30am5g8ezJOzk7XzQwEYqZEptFjA6B9F7/KOxjGqdFMySpxPI0A/mFbgn1c6j7EpxbytNxsDK0tGRyTobnCwfKtJNM8wCwgJBWuJYP1BfDwmZcaLViIj0Q+om5AbpQTr61+/cbEsSe40oCjl3/wYmgS5y4q6IKuQljhHF88bKWKxLP2wYAE59UCZsuIeUzZqohofPUIgH0t/hWLeeYHWb2tzd43PvBJEKaJjXtn4VuNTvDTNrKauc4PLkRhBg+w8AbeMpzxPnCDM8E8IYl4pJrfQ6joMy280VbgD9zvQEJqpq0sIIp2MWtYWKsExb9RAeD7cN/9IOaHd0DD/Xn3aAz4xrr7GgnkEl7TQc0LE+B1V/meA1suSTfIFsNm4zb8mHjTiQ9aRuFRhS+54FtUWs3UeDzzFjjpPl3xRFdnGPJcIGiCnlCRR3+jIHmq1Z4xt8t50dYAq/atGx5pui5dWnSTurkNfKmQuCYX6Ad1+Z2NSENB9JNUfcl8s0tHgLMOauaW99qQHH7Oaer X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 004b4a81-49db-43f7-d94b-08db9268c746 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2023 08:24:52.2891 (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: JheMEgFZtDCPry+MsKZMQuaoaaZOoGTQG3i/EQHaiU4PlBNk8Mg/ioTXTjb+Ek28c48MLme/Cix8qFd9PXSkpw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7917 Message-ID-Hash: CWXVIXU3X3VK5WKZNPNLJX7SOOFT3V23 X-Message-ID-Hash: CWXVIXU3X3VK5WKZNPNLJX7SOOFT3V23 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 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 --- Documentation/devicetree/bindings/sound/simple-card.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml index 59ac2d1d1ccf..1bf331f095a4 100644 --- a/Documentation/devicetree/bindings/sound/simple-card.yaml +++ b/Documentation/devicetree/bindings/sound/simple-card.yaml @@ -27,6 +27,14 @@ definitions: description: dai-link uses bit clock inversion $ref: /schemas/types.yaml#/definitions/flag + playback-only: + description: dai-link is used only for playback + $ref: /schemas/types.yaml#/definitions/flag + + capture-only: + description: dai-link is used only for capture + $ref: /schemas/types.yaml#/definitions/flag + dai-tdm-slot-num: description: see tdm-slot.txt. $ref: /schemas/types.yaml#/definitions/uint32