From patchwork Fri Jun 7 04:15:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 802354 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 27D64C27C65 for ; Fri, 7 Jun 2024 04:21:27 +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 629B984C; Fri, 7 Jun 2024 06:21:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 629B984C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1717734085; bh=YSnyAUqi2t0pfwL+afcX6h+1HLqd0jkyBNfQk/NhmdA=; h=To:Cc:In-Reply-To:References:From:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IKFGwELTVfqdFt+AJKOjaYsu3z1nyjYKyojH0NswNeSnv7zO1K2L7yvr1GbKJQv4x /1cKt8lGIe6i9BHnI++0hh7ie+sifiTxfa9scd5rSz1tpXHFUZ4KEdsgC9k3gV0X0r FEXbHytWqThRz0ir4gw6xvhNPZxgzXNvjpRvg5aI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 52EF9F805E2; Fri, 7 Jun 2024 06:20:36 +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 8033BF805E0; Fri, 7 Jun 2024 06:20:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 24D65F80518; Fri, 7 Jun 2024 06:16:27 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20619.outbound.protection.outlook.com [IPv6:2a01:111:f403:201a::619]) (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 5BCAFF80171 for ; Fri, 7 Jun 2024 06:15:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5BCAFF80171 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=m75BgPQc ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OzTyz8RpvA0KM7DFXwxlx3VM66jDKh2TH7f105oYrvozYRhr2aLGtOUfyRZERsGk9U++WmeICeb/j6dPiXt8VqJfn6nlfAkFkbZOms00P5nPcf5TTfyfBFjjEG3MSlpxCcJzEcjU56eTHr4HZOq3s46Tu86gl9o+dB9Jb5y+wYT/QppjWURfkOVJugcv3RBa6ZP4nNfHQs/ciCTjNuAt676n/TShTUe7svb1HDuThzBBlutQBz/GifZ7YWxj5+8ofxJlaLGuJXAVj+Rdk54oyKLOIB20ZQTdw69l1q38du44xJitMiDu6/moQYgtCl54x1DA3XpQcDpKYuW62+J0OQ== 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=/LZpH3ZwQGGr+kpFsgJk2r6RN4tHzbdtFMLtQoMpl9c=; b=kvBPCLf/q6IitGC7ytPeIg8e2Em3A/m8Mfij6pOP680/7p2om4wezwR4Ub3lU3R1ao5bxzy8tvIfgaiP5AP+SI9hTWlqC8QbRH3PWRBqV3WT88sb8ELzrjSu94rq6VUsDKCn5audfuZEuukfqzgGZf8ubti5FT5eHIWNrlHaofmClGQLCEz5jCkoDxqCjqDCiNZJB1s5OjEJ/cdsLuZymsyzhjzHzPrNwVlPg7FJpUBPKj65j34A2eZhXLJKH1qQGpQM45ifURCXMAHJUhGjLzhWUaxjpKHCsVQNBCjBdycJHFQGfh6xRAfB/9YugIbs/7X9FSpFSPSq2W8zSClQxQ== 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=/LZpH3ZwQGGr+kpFsgJk2r6RN4tHzbdtFMLtQoMpl9c=; b=m75BgPQc7nbc4ldsljUU4MzjHHjieLVgXHkprfGadCee8X/+0ozMfblbwqPZvpQrPxK07JN0+M/vOWLnQXiSWY+XveNSlgvoXONQudaZ6+BcZNvOists1LMKDWZDKyygGB6dNDm4e4GCR/c628DL9kme8jr8nYBgRcECx9uKfcg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8206.jpnprd01.prod.outlook.com (2603:1096:400:103::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.34; Fri, 7 Jun 2024 04:15:01 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.7633.033; Fri, 7 Jun 2024 04:15:01 +0000 Message-ID: <87tti5s81m.wl-kuninori.morimoto.gx@renesas.com> To: Mark Brown , Rob Herring , Krzysztof Kozlowski Cc: Linux-ALSA , devicetree@vger.kernel.org, Maxim Kochetkov In-Reply-To: <87v82ls82e.wl-kuninori.morimoto.gx@renesas.com> References: <87v82ls82e.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/5] ASoC: audio-graph-port: add link-trigger-order Date: Fri, 7 Jun 2024 04:15:01 +0000 X-ClientProxiedBy: TYAPR04CA0018.apcprd04.prod.outlook.com (2603:1096:404:15::30) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8206:EE_ X-MS-Office365-Filtering-Correlation-Id: 495e593b-28a5-4794-d353-08dc86a866c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|366007|52116005|1800799015|376005|38350700005; X-Microsoft-Antispam-Message-Info: 5OwKn3MFLDCSrCdcwNQwt9z9lr6uze08odxI7sAdTl79o05QoH/9Jwk52YCyP7U3DmpP4R8AsnFVyVhTTl5PUQ3l4cY1KGYWturPQuf97ZSOZOQ5rN7OHAOw2R6YmyrA6C2hl4qBgG5+GxnwhcBkKpmujZGYywsE3R/+9PRlwMmja9ZlPbITibSVpxwgCtp45YUljwl85+PTYHqjBlpzvtFfz5/9xUj5qdSFoVjua7zcDM6FC5u9tB/nEghfXWnh37l4UYp7CCGybVEXrSogHFnK8UVlEbjV7PNAkJz6KCgAfYJkf8imErtnBxAzbtk9QNLfZea1xKy08VE0kgemLOhrMajpemf8wXvk9ZloO41fOmzkNYJTKPznpo1+ZoeEcn89F/OteE6HA18iDj78Ywzfiyh0EdJEIon4BEuOxCbWsPYPm5EhYUvng65nxOMfY10MjefzkO1GBG09P4vdmy22jKesE4CSIsFBXAyEFKaWG08ZCn7/u+z2gN2Qd5R8svdsp+3RC31RuP1yp8Qh9Bbn2LSJlkWsPjqGxJQuo+vKLkWgF9veGIxbmd6x0/+hmIO4CzzWd/cACPOmlnf8IR4JPUGkR97WP2AMfJSLNF3mQH4IyhhB/weZuiVh4fJ/d3ZzWHAjVA9FG709YmWwy+cV2vR0Fg/Q5zlqkD4wmISf7UudZLosvdp+TL/0s9lACLyrB6RgTjx0qf+expT0M2cN9gAHOAMfpWRiNg5R+5X84pYeYil13CpukMXSRDAghKFaBUsJrjDeK78ET5GkomZsGCZoVzfIruVhmWSD2tReoutnJobxBRlYmrdSlSPsuofz0DzPEjXUryBuil9FnoWTmOR5gbJ4Qyo0DQppn3H4TixxkEoZ3DPEYH6TZ2MX95Nt64NAMsIz9wK10J331zLOnE9Osn2F2cpWcrAitdEQSs8udvx1cTJGnZsZM2LDBEaviikBOWlbMPutrtP6m9Q9N8WuUn+uous/RF9nGOdNpqm2HKSz0VRuoeQu9X8xjvF2r+EwBNhWGqio8aw7HfV+t8RaH4huT1fFf/77aw/4aFWZV2gmPIAiU8gEpVP5amkklPia1ocz2JRrWQoDpNVR54RrwiRI0o24RPNrNGpkhxhjVLwqC6J8WcNcE8BQT25XKNARvWgXexxPP3Uixaec84hNc5JAAGcamM7zqCVZWdMojP/3OqkGFDAsF/1DtL2OIcTE+wipPa/TPSYOYBJNcJmNqKecrPktTo2ehff7swYhBUtFFc/t/P5e/XqfIWiPCcpa4CTRfXO5SdhFD5FEkLv5nYJiE2AzCdow3kVsyn8+BN6ttsYFoyQ3K6Peu1bIiducBE9Jn7brsJN16YZ72fqj0cfFKwA6fkAnhs4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(52116005)(1800799015)(376005)(38350700005); DIR:OUT; SFP:1101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ODfIo4sQV+YKEqclx7T9m42wiRDLXrH8jtze+QxnO/NKCwjqn90Whm6oJgnduRdzW2qMhVKIYKYXZo0BeMLUcojMkHE4ShXhMVDQlUPaSMYCLTtasqZiq8DbEpkt0+4j6t7oNmQBKOAPWuyx+ZU7PvaTwQ8TwV9SttFVKlbTcwiHWd6Ry708f2VRbbBwhTj7PO5z3Y0GQrFu1HX4e5yT7VyqblTi7DNdJV6rVjNJ9rcWN8nygtJCVTURZ5HtYB1fBSnTXR1hFYfh0lDd6mW7U2W121VT1z705OSehNdqqkeSf9WszC/FBk7UuZ1vVjcAYMPAOkLwg7CLv9e4ft9iz+e4ACJ0qYJ/Vr4R0Nnu0CKhS1CL1RybvQ0iZm9fw+/nNfF6fqMCM1vakxMMeHdVcaX1szRcKwEDprRfJ3gkhpJu7kjqUKuLZtCyka/Ve4xBlI8DgqzruLg1pARH/T/RLQOKqgFUjDDc7ROTce3iBzULFP87B6Ax0Bg+NkV7kZF2CxPpes3wt2yg5SsQwEFyYIBU9Q+Bdy4jQCbIajgobC1iw6htBLEEKZvl+XwsujgklszMFUXP8zCKOT5GSt3CXk9ixiXoAGLSkiTK51IAgK3f4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 495e593b-28a5-4794-d353-08dc86a866c0 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2024 04:15:01.7058 (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: PZQIdatu3zq2ImY69ntGIlt9kD/s+zGZx9Hy9JhawLw7JPxZn1z6GofrL+mJAldUhxBcMxlFued5n7nbEgXNngcm5GVZq5bCPwkjT5W4RkcPXUbv9he2WYLam64lzCUh X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8206 Message-ID-Hash: DTSS5NBKHGOYVNMSS6BHZTBNFAEDRG73 X-Message-ID-Hash: DTSS5NBKHGOYVNMSS6BHZTBNFAEDRG73 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.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: Some Sound Card might need special trigger ordering which is based on CPU/Codec connection. It is already supported on ASoC, but Simple Audio Card / Audio Graph Card still not support it. Let's support it. Cc: Maxim Kochetkov Signed-off-by: Kuninori Morimoto --- .../devicetree/bindings/sound/audio-graph-port.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml index 28b27e7e45de6..d1cbfc5edd3ac 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml @@ -25,6 +25,15 @@ definitions: capture-only: description: port connection used only for capture $ref: /schemas/types.yaml#/definitions/flag + link-trigger-order: + description: trigger order for both start/stop + $ref: /schemas/types.yaml#/definitions/uint32-array + link-trigger-order-start: + description: trigger order for start + $ref: /schemas/types.yaml#/definitions/uint32-array + link-trigger-order-stop: + description: trigger order for stop + $ref: /schemas/types.yaml#/definitions/uint32-array endpoint-base: allOf: From patchwork Fri Jun 7 04:15:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 802639 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 6CC32C27C65 for ; Fri, 7 Jun 2024 04:19: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 4F29DE66; Fri, 7 Jun 2024 06:19:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4F29DE66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1717733985; bh=8zXrZ6GxG4HsQbYCy49mHfs5sS3ZuM479G7z+6IrDhs=; h=To:Cc:In-Reply-To:References:From:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=GcG/HtghutxW0avv7wHNizykFADUS7yWUTyOidJupYSkg1KjSS2O8xEcF8hHXrbAN DcBzM5SMK/sE81ivpo5GMbYbwE9hz8WTdp3F+V5IGxJuiJK/WqeXV+GB26Zsh7N155 JzE8V6LKys2efc1N4zDah8RjkW4tY171foO0uyXY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 79E28F805F9; Fri, 7 Jun 2024 06:18:54 +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 0DD48F805D9; Fri, 7 Jun 2024 06:18:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 95518F80528; Fri, 7 Jun 2024 06:16:25 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20607.outbound.protection.outlook.com [IPv6:2a01:111:f403:201a::607]) (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 C7815F800AC for ; Fri, 7 Jun 2024 06:15:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C7815F800AC 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=Qecald9b ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=afDPjUT9zTDlLKnQawwWUpjqXtd1INXNtsqG690Z/Er+3mMsMlmzoJfJCSnjkd8pluoCW4aIRhVYQ5B+5THOqCFk0XHJsKc8bPxhtXVleVvK9lgiz311kQcn1D4V2MB1WWZtwjG1JtIDWfQAI6Dc85lsgVrctUAe6wP1WyWbwyDdX1TMw8+5VL+8hT1ieTw+Q6DXArnFGxXCDmlWszuwe7O4dZ7G03jPf4ieq3HYhSRQj7zZd1ObLf33na/SYpPVI0R7C9HapdjSvDL4ydR+mhQh//9LNPLGJQTbAiCmS2303S5qjZgz/0148DXlT29AV+FwTm8UkuOa/s4PoPupYg== 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=4SorgzsWSLWUgB6uaQs1EsNFWIfGgccjWEBmrohiQKs=; b=AiDwDoTtBAhRjpFzZdFBxL0j/sNMVs8pnjjUoTZnPoTU7tXTA1FKSJUYBL7PVvgbgcNqawQN4O22uQzXiRvTNrIZ7/aWrMZ11LAvbSSZ6v8vGvSL2ki4TBikw5cOIj1Q2ptkIrBmXcHAt24JbdIj4gVWGA2R4PC7EqpbECZmoi131twbZiAuF/DfA82uO9Xa0aVE5zew+7VrIi+3Mqs+xYOLmUHYNNqKMGrgwGlWMlqTwdvtehsWJTkxK6TuHllpvIPHRrn0/yXGTt5d9MlgMGf8zBciTZjY1gmYxviXHrcvnwzfCVJABz7mYYRNecx7w4IEBTMkJv/vy4DJgtYVOg== 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=4SorgzsWSLWUgB6uaQs1EsNFWIfGgccjWEBmrohiQKs=; b=Qecald9buF2zY1uS8DhSIuskZASjbFlA9A0yhJksDWFih1NfYfuVT5llyYa3c/33BdLk8kT2SahHYY4cPMDrYwvNCoHwanx9/JXVsotSpm9ITP2cd5kZLc65uilscK4APhsGU5nBZxurSXNTp/MhfCFRHsTS4VQcIgrWyVOSou4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8206.jpnprd01.prod.outlook.com (2603:1096:400:103::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.34; Fri, 7 Jun 2024 04:15:11 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.7633.033; Fri, 7 Jun 2024 04:15:11 +0000 Message-ID: <87sexps81d.wl-kuninori.morimoto.gx@renesas.com> To: Mark Brown , Rob Herring , Krzysztof Kozlowski Cc: Linux-ALSA , devicetree@vger.kernel.org, Maxim Kochetkov In-Reply-To: <87v82ls82e.wl-kuninori.morimoto.gx@renesas.com> References: <87v82ls82e.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/5] ASoC: simple-card-utils: add link-trigger-order support Date: Fri, 7 Jun 2024 04:15:10 +0000 X-ClientProxiedBy: TYCP286CA0124.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b6::6) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8206:EE_ X-MS-Office365-Filtering-Correlation-Id: 997042c5-1080-4063-0614-08dc86a86c45 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|366007|52116005|1800799015|376005|38350700005; X-Microsoft-Antispam-Message-Info: BY/sDteSplUCwKvXDap8X22PKh51b/XOd0HGNd2O8alUdc3795U58/IX++qC+sCwlXfu7m1MJ58URhcaO4zBYEyUY51F2gmUOpN1XJDtEG7l5E1jI5zyzbFuQba3NSFu9PVTzZ2cCH+uHakoAVUdTZ2b7UaMWt/GBPZQ45bjIUgJ3JPgnzrqM0EMhw2Td7XCuyYzbx/ke3dgVNUOYq6dmnq1J/jj89YuNXY1yzOLYkhYl0UEJh/64+T48HNf9ILhaAG3IimAIfjOkdXnpkqJq4hziK499IenSUDSSBjQef5+VtBj1PgoVi0Gs7sHEV2GmQ+7erwx2/vtVOu13jGUrvZAMiWx+3PRqC3jVnKEOyJqOjJIfPQEjrV6jWpyNQu4j85tXIgi7e0I6whQLCDiKvcMLvegCbABkVQn0uzbEsnlQsCTg9J/A+n+QWEx3v6UoDlFWj65KR2/WhVfcS9FfPyAoPV0flJClC5XwDq2YYZK/Mmqmyd9GBe7cWDs6gvMVwwuMESUm1vA+O8gnNH6NqvmRSYWHtDZOZAIVYNskgqAGW4RQG9CLWKwuhTfnNx+CXInba03F+KkO9liVxV1t2sKf3ZecGR6pDcPsaGnQspmIlGqsU7TTjITAPGsnSEE7tP7BNhIGvH82+sraTflU4t5NNihN8i0nnClpJHr7VRgm01KcI0RDieYtpdFnDGNbXwwO+Z349S7ViDUyUKV2dIsPTqOjj1Shyxckj6lHb3bCTqUKR8DRga2+Foo2TNnIcsYMMoknvzM+xAl+x76WTdw/eRtqty44yxeJ1CfCj6mMKQ7Z1WfTTNhTModc0VJePRq0+iRM3OQg4YqGrVwRWBxD+KGjTpHXuIBAsOd7AdI155bP+J4FigtTgqX6lThYBuOpcV6Ol3RFeImhD+G0U5QwuQoMJu5GhNNB/e4+fxGxPA8o+T2nKTVR1WHgFAdJzsoJSNSYeCtM3SC3nLUISFHsKd0q+WeBlsrLkwRe/jnss/9IJRKyZ20pnKuE0f5KAgCCcXZWhOWB9zfnezYs+iMi1UV5wf0ODsKuRqO43xX2j8NZGF62KxwSm2xjAlGjTAvqJrZ8Y1MG3L7iXnwkByhGQ7sVL8kqau4piSgKCJ6TFZdlCHa9Jd99fyqgXBAWgXB7e74KR9LLZTy2fnd3xJZ2wuu+o58wONJXYgqu/il7pOnA8OZ5bDF49yyrnovCQjYrwuIj0ovIhMMDjAPQdCWZtQf4sCRVRxyNzaNq99vpbhuPLV7wywJ+jFTNNQdeWBnUeX8seiIssn0NDx6aBBFLSYNmLk0tjByIpO30jLgZHSAoTpaAz/QFn/B3fe5CqUdZPcUquGbkjfTlrQdWsVlfSLgJgNpyVkyBxPVY6o= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(52116005)(1800799015)(376005)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GUkG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dd1E8APXrJGsUq3By+DolaQJSLxd1u3q5MQll0wXc9dBGu+uIxyVFfAGPfqrU2wgFwlM5YvsvoMZjUftOCOhKOLUWz9wrnBxvTAJrFejRUNQiRw/LZUS8WX7YIUT85iGJFGbK0Ts53lwQd1pLRlR7eFWvQOW2f06vTAJxcBwYKcDBcn9IEchWQnIPnZrfFzRDl/q61m5koM/WhUuKIunz5B7n2v1q2PXrUtU2AksSRhiPG2MHeYTnk/YYmctqfPofGhq0NWUs4UFaLAADguMPKWGF2dBLc1kxU1NdC3HqYGfL/sjYnl9JAQdGD2ic/JCSXNRrLr2XFT4EmFwfwM1l7tSLSGmUepSlTZ+Ts+tkDIkEjzU01BlTpcZY2qVXWc2W1+xk9Vbt4szZcGRMRu7t6AfQz05q1IZTn5hYnQ8Aii894/5J9EJ1Al1tgsdlUTUslEgfxGUtJnutzKPx49ogN/fdSEjlUG8gSMZ7Xdio0q0n39N3Bgn1F5EOt9j/lRgueNHLN4YeFnFHGdfzdDmsp1+R+OzVuJt1MqPWOOr2HFf9g= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 997042c5-1080-4063-0614-08dc86a86c45 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2024 04:15:10.9478 (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: wxvjQW+uBlvC0N2R4j/TfMuxyxsTyoEZiKwjYLtN2tX96p6vcoVopaTAAz7it4ioF9JcnqEZtzr0iAQGr5swaXLtLNupCOxoJsyNe/ODvkMzy3tV6SC8uYkdQurhwe3/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8206 Message-ID-Hash: EXCRH23RPCZVMDMMXSA5RHZUSMBKUFA7 X-Message-ID-Hash: EXCRH23RPCZVMDMMXSA5RHZUSMBKUFA7 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.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: Some Sound Card might need special trigger ordering which is based on CPU/Codec connection. It is already supported on ASoC, but Simple Audio Card / Audio Graph Card still not support it. Let's support it. Cc: Maxim Kochetkov Signed-off-by: Kuninori Morimoto --- include/dt-bindings/sound/audio-graph.h | 21 ++++++++ include/sound/simple_card_utils.h | 4 ++ sound/soc/generic/simple-card-utils.c | 71 +++++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 include/dt-bindings/sound/audio-graph.h diff --git a/include/dt-bindings/sound/audio-graph.h b/include/dt-bindings/sound/audio-graph.h new file mode 100644 index 0000000000000..7679f1c1c12ae --- /dev/null +++ b/include/dt-bindings/sound/audio-graph.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 + * + * audio-graph.h + * + * Copyright (c) 2024 Kuninori Morimoto + */ +#ifndef __AUDIO_GRAPH_H +#define __AUDIO_GRAPH_H + +/* + * used in + * link-trigger-order + * link-trigger-order-start + * link-trigger-order-stop + */ +#define SND_SOC_TRIGGER_LINK 0 +#define SND_SOC_TRIGGER_COMPONENT 1 +#define SND_SOC_TRIGGER_DAI 2 +#define SND_SOC_TRIGGER_SIZE 3 /* shoud be last */ + +#endif /* __AUDIO_GRAPH_H */ diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 0a6435ac5c5fe..3360d9eab068d 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -199,6 +199,10 @@ int graph_util_parse_dai(struct device *dev, struct device_node *ep, void graph_util_parse_link_direction(struct device_node *np, bool *is_playback_only, bool *is_capture_only); +void graph_util_parse_trigger_order(struct simple_util_priv *priv, + struct device_node *np, + enum snd_soc_trigger_order *trigger_start, + enum snd_soc_trigger_order *trigger_stop); #ifdef DEBUG static inline void simple_util_debug_dai(struct simple_util_priv *priv, diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index dcd0569157cef..a18de86b3c882 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -4,6 +4,7 @@ // // Copyright (c) 2016 Kuninori Morimoto +#include #include #include #include @@ -1156,6 +1157,76 @@ void graph_util_parse_link_direction(struct device_node *np, } EXPORT_SYMBOL_GPL(graph_util_parse_link_direction); +static enum snd_soc_trigger_order +__graph_util_parse_trigger_order(struct simple_util_priv *priv, + struct device_node *np, + const char *prop) +{ + u32 val[SND_SOC_TRIGGER_SIZE]; + int ret; + + ret = of_property_read_u32_array(np, prop, val, SND_SOC_TRIGGER_SIZE); + if (ret == 0) { + struct device *dev = simple_priv_to_dev(priv); + u32 order = (val[0] << 8) + + (val[1] << 4) + + (val[2]); + + switch (order) { + case (SND_SOC_TRIGGER_LINK << 8) + + (SND_SOC_TRIGGER_COMPONENT << 4) + + (SND_SOC_TRIGGER_DAI): + return SND_SOC_TRIGGER_ORDER_DEFAULT; + + case (SND_SOC_TRIGGER_LINK << 8) + + (SND_SOC_TRIGGER_DAI << 4) + + (SND_SOC_TRIGGER_COMPONENT): + return SND_SOC_TRIGGER_ORDER_LDC; + + default: + dev_err(dev, "unsupported trigger order [0x%x]\n", order); + } + } + + /* SND_SOC_TRIGGER_ORDER_MAX means error */ + return SND_SOC_TRIGGER_ORDER_MAX; +} + +void graph_util_parse_trigger_order(struct simple_util_priv *priv, + struct device_node *np, + enum snd_soc_trigger_order *trigger_start, + enum snd_soc_trigger_order *trigger_stop) +{ + static enum snd_soc_trigger_order order; + + /* + * We can use it like below + * + * #include + * + * link-trigger-order = ; + */ + + order = __graph_util_parse_trigger_order(priv, np, "link-trigger-order"); + if (order < SND_SOC_TRIGGER_ORDER_MAX) { + *trigger_start = order; + *trigger_stop = order; + } + + order = __graph_util_parse_trigger_order(priv, np, "link-trigger-order-start"); + if (order < SND_SOC_TRIGGER_ORDER_MAX) + *trigger_start = order; + + order = __graph_util_parse_trigger_order(priv, np, "link-trigger-order-stop"); + if (order < SND_SOC_TRIGGER_ORDER_MAX) + *trigger_stop = order; + + return; +} +EXPORT_SYMBOL_GPL(graph_util_parse_trigger_order); + /* Module information */ MODULE_AUTHOR("Kuninori Morimoto "); MODULE_DESCRIPTION("ALSA SoC Simple Card Utils"); From patchwork Fri Jun 7 04:15:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 802355 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 8DD9DC27C65 for ; Fri, 7 Jun 2024 04:19:58 +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 DC446A4A; Fri, 7 Jun 2024 06:19:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DC446A4A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1717733996; bh=ci2e8BhC06wNWgK0fAI1KKHphl1PBB/WgtgVi6i4VGM=; h=To:Cc:In-Reply-To:References:From:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ihkhoSxGSkv0GhkBmtgn6vhMmJpnn6YFclmnC9xnusLMmApQIH1sUH35uHEmjurdB 49v87/er1rwqr8WGbM78LNkZ1mPu1ApqLib0tz2bF/MNsUS3NfCIvcoxJrrOoZLJrO Dw6fIE3JaQpXVlDAqXZ2uQ0lokLU1HtY8KmZfNJw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BAABFF805FF; Fri, 7 Jun 2024 06:18:55 +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 D42D9F805ED; Fri, 7 Jun 2024 06:18:54 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8EABCF804D6; Fri, 7 Jun 2024 06:16:29 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20607.outbound.protection.outlook.com [IPv6:2a01:111:f403:201a::607]) (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 3C5BBF804B2 for ; Fri, 7 Jun 2024 06:15:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3C5BBF804B2 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=dcwN/Uad ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oam8KS/M3s9dUurmkF60JYSTYDtMG2t/aj5Y/QFTwiD0/AyLGYpsJ5eApvdwNO61CgMnSZGgm3Vx8wHReV6Bgs3aY2mD1fZQ1gGolCAOBTW2uHaDpSKw6OH13TpGs2tgtN+ZElQYR7SmnkVoWSj1MhFLT48jWgmXUxFJ3VE4U6gfMqE8U+c6JX/iAhYrEuijkuSSd3vaBzLl8AjJB5mFeKIdbtH694tKX+gvJXLb26gZO45uDXILgGJ4p7ppbUpY4lRAD8lHqT5z8PK/P3+8nl/Wa9a1FMszDoD4CrygIJALmeMux1GvgDbkwaikVxJvz01HefRIjGdWstjp1ZWrWw== 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=6SR6qFu6vbCQG93VqEgo+PjdR3MVFfB3wgIXqBfrre4=; b=iiZvrZLcvwuFjpwqgfCjdIZSe7c3TPh6nraxakEwOwPI8G1sizg6+brbFmcO48QxkXDFWEa1KqY8+5Wdn1djTRGSfjHCnfx5sTY1MeuY5YsVSyixVhtySiEgNMhffmNECtFSVqtEr3UlxypDDd7mEXq+LmslypWVgVA+Liqbvqlc10YF86P1fWw/tPPElAd3YYpz8csLWdJEZm9mudwkleV/Dj3TvszwmLHWZ7I8X3LW3D2iD15LpuByA3LucTFbd6CY8awtl5JFrYEVEDkUKhOIELLtp01yW7FtbJuAPABORBuJNTN1EY0fsz22tW4XxY0hxF+MNBPBfYgj5rGyvg== 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=6SR6qFu6vbCQG93VqEgo+PjdR3MVFfB3wgIXqBfrre4=; b=dcwN/UadHfdyi4Tj5ir7sNHdGPRWhSySJeaWMObzz7VuPx5m88ktiOzgUwUy5qGGlhy55zPHci8aiOiFZi2rQZZnL9ITwe6M5zCvrMjPbN6OGHvs8/GyHygR3pUgF2935YMjAq06M9xCmFH/qsEuQr6a4cNwrsg5VgvyFPHgZ1A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8206.jpnprd01.prod.outlook.com (2603:1096:400:103::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.34; Fri, 7 Jun 2024 04:15:16 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.7633.033; Fri, 7 Jun 2024 04:15:16 +0000 Message-ID: <87r0d9s817.wl-kuninori.morimoto.gx@renesas.com> To: Mark Brown , Rob Herring , Krzysztof Kozlowski Cc: Linux-ALSA , devicetree@vger.kernel.org, Maxim Kochetkov In-Reply-To: <87v82ls82e.wl-kuninori.morimoto.gx@renesas.com> References: <87v82ls82e.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/5] ASoC: simple-audio-card: add link-trigger-order support Date: Fri, 7 Jun 2024 04:15:16 +0000 X-ClientProxiedBy: TY2PR06CA0044.apcprd06.prod.outlook.com (2603:1096:404:2e::32) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8206:EE_ X-MS-Office365-Filtering-Correlation-Id: c7b664ac-1b4c-4e87-da0c-08dc86a86f94 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|366007|52116005|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RletLZutc0Pj+poHg9kwEnwFUnMLnyuMyVOTLk/KiUJd9KJNX66od0PYnnBsudnhrZiaw+z57YIfK9cEtv24bqA8lZfkSxyrY1i7sQHpFBKiylt7AYDnfP+WRyeYNvjMDO6BcFJc31r94fCSAQ+uTcrX3Cl0XXIjqD6p0kIshfQVAp0lQZKUVdkQ2xEp0pWrbLJgEYNS+wCUsSGpVx6ar/OdEOae8ahlDJrLAKTy2ttjudglhS6WhwZ8o8LCP04q/BkCYlYJH5LPG4hfPOuuL2cTUxM08s2J/4DgmM74evXpjqNnXwXOtDAB9MipjRK2U0HgmnfXkT+HAotR9y+xlLKSDKIyQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(52116005)(1800799015)(376005)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: caNfsewQhTSfVAtPzVwM3sxkRO8Y7vUb9YmHxunrHQ/cicdtAVHDmPoft7GEOVH7FckdIVVw/ljU0d77emh/g7+YfVep56ACuKKCHhUt52eGLv1iYNJWc+iRgzDC5DyCy8l5lRoqRtusuuCLg6sH7lk7CRR3JF7RNZKjmlx/Q3mAO+qfEYA6uviPZJePYfhFtfE2GbYR/BVEwqcPsmBEB8MHe2t627UlB8l+aE/AcgOvQim/u54P1AfPEqyBIf8ClqiuRO9snhWkePykggDlvUinnW9O48EFwkpyDk2YGFF1l9O32r9BWIScfgX9LhKdHIW9uF1VLcwJnbEYecSlc2AREhKn/Znvrc5lU00PXGNT4iktpDWwydYCWEQajXGwBruhxJ/tAWHB8R+w4jdQ7E3RuEl6t+2FtOrSOiT0qo/DXWtgdGw99V5QGz2UBf8YwvXcmUA6bSGuej0h1xZ1Qo/mUU/WiXpuBKI5bU/UZ8IDeYezlHoiNrpX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/eqM9m8p8EromRTemIFDhGE8xn9UY4wF9GRuDSa3E5pEZ77GEclWBw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7b664ac-1b4c-4e87-da0c-08dc86a86f94 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2024 04:15:16.5123 (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: ywt5mGJyDP3vS9BGuW4+yH+TWUWsRpuxprabmRYcqS2a5yCwBA51cAQBgn8PqkefO70eQor/5UO7/p9DaBOvbDHtlKF+fnAusxHnwVAj7kWWaRVkR5DatQHpsnyeohd2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8206 Message-ID-Hash: 2Z4H4J4SE4DMJRNAJDJCY43SL34A4DBW X-Message-ID-Hash: 2Z4H4J4SE4DMJRNAJDJCY43SL34A4DBW 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.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: Some Sound Card might need special trigger ordering which is based on CPU/Codec connection. It is already supported on ASoC, but Simple Audio Card still not yet support it. Let's support it. Cc: Maxim Kochetkov Signed-off-by: Kuninori Morimoto --- sound/soc/generic/simple-card.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 2de5e6efe947f..edbb6322e9be2 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -176,6 +176,8 @@ static int simple_link_init(struct simple_util_priv *priv, struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link); struct device_node *node = of_get_parent(cpu); + enum snd_soc_trigger_order trigger_start = SND_SOC_TRIGGER_ORDER_DEFAULT; + enum snd_soc_trigger_order trigger_stop = SND_SOC_TRIGGER_ORDER_DEFAULT; bool playback_only = 0, capture_only = 0; int ret; @@ -198,9 +200,17 @@ static int simple_link_init(struct simple_util_priv *priv, of_property_read_u32(codec, "mclk-fs", &dai_props->mclk_fs); of_property_read_u32(codec, PREFIX "mclk-fs", &dai_props->mclk_fs); + graph_util_parse_trigger_order(priv, top, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, node, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, cpu, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, codec, &trigger_start, &trigger_stop); + dai_link->playback_only = playback_only; dai_link->capture_only = capture_only; + dai_link->trigger_start = trigger_start; + dai_link->trigger_stop = trigger_stop; + dai_link->init = simple_util_dai_init; dai_link->ops = &simple_ops; From patchwork Fri Jun 7 04:15:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 802638 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 563C5C27C53 for ; Fri, 7 Jun 2024 04:21:08 +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 4BD09844; Fri, 7 Jun 2024 06:20:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4BD09844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1717734066; bh=pK5e2honpodLkOcYZhrvlZ+Yw0jcYwuTA+gs285Vy64=; h=To:Cc:In-Reply-To:References:From:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ShJs+j0r5fK88UU+mmIfhaaEeP2Jrl658BlK9waQJO4JgsKQl/xVRN7Qqrrjtz4Lq Vy5iugN7/IV0hp3r+M5e0Og/Hdd7UuCSpZNLIiHdJne42OX2Fjw4DKZiWLy8d1muhP 3ciXxYTXo/KsXfskxcz8GpzejCgE59e0H/iW8Gc4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3A2AFF805AD; Fri, 7 Jun 2024 06:20:34 +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 4C734F8058C; Fri, 7 Jun 2024 06:20:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3E3D3F80171; Fri, 7 Jun 2024 06:16:28 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2060e.outbound.protection.outlook.com [IPv6:2a01:111:f403:201a::60e]) (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 A9E0CF804D6 for ; Fri, 7 Jun 2024 06:15:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A9E0CF804D6 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=Q25f5Jif ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZQ+WPlEiwWupbLycrkzAYXghdl9+dqPn0fiM3CIIAP0ytHdgkk9mtO4AQSR2O1blgP/c+EvybSt8tVUX3t5sNe/mt8SZXn7Oo5LQkUrqvFYX6cTipYxVQC9KMq69A+nIfwJLZnJxy2nCFDjeUyHmu+QgAsVffBGYTf26XflSjPlBL+X6Hg0j2rghWmNPk6W9G8bQVv6r87WAP2MGAFFEvBV4aFCAR+MFShuh6gF7al/zFoXe9czfro1KOm5VOgkxn+oONZE105KN2hbXVpZ8YuJ+/GxXy1eyRkZWzSC2tEgJULC0g7a1Q9r2Qfz48I2D/YhK/hmq52a+iujjzcyu/w== 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=3Ghxl4FQQlA0M7odY6cDxw9s0H2+Aloz5BBJ+3hM8bU=; b=l42YeaScvPc34ozUOpWQwwVbvnp7tSk8/Dl0zIYkaeZqYDN1C1yaECdS5AFjzGRjrcp/Frg2kI/IP47DK+8GXeZGiJW8eNHAinhsMq0vsskGlvJuGV3DggtblAayr0KXxG7CKWmcUizQ76MYV3KMqVoBsc1qlWm+P/XAUwiUxaUlQRVVuSN7BYp8uJJBycqmp5qvVFPhG3XTdS4/z/R43hibKYJypetxL4G+40INnY+Nd1BR7gpl3ob/tzzhdTpSpAtxLjZAl17hKnO0wZLVGE4zgyLSIiWYiXTZcDfvr+frAgryVoMSxtDyr16UKQPRoNw5C7jLEYju3YIXKrPFbw== 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=3Ghxl4FQQlA0M7odY6cDxw9s0H2+Aloz5BBJ+3hM8bU=; b=Q25f5Jifp1N2rIKl/OWZbzyAp4vPhjJkY83S9AD4uWDIOQ6ls+m0mhWEE8oC43GSsN5VlgMNeIdbTP6MPyTn8LQo+XmDGyRUWFNfPBTi384CZCeHb403ZvRuJvkW1/5gceKkDC7dj7Q08NYQxNTJAIZj6zuwt6gMT5Cvx4OZBh4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8206.jpnprd01.prod.outlook.com (2603:1096:400:103::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.34; Fri, 7 Jun 2024 04:15:21 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.7633.033; Fri, 7 Jun 2024 04:15:21 +0000 Message-ID: <87plsts813.wl-kuninori.morimoto.gx@renesas.com> To: Mark Brown , Rob Herring , Krzysztof Kozlowski Cc: Linux-ALSA , devicetree@vger.kernel.org, Maxim Kochetkov In-Reply-To: <87v82ls82e.wl-kuninori.morimoto.gx@renesas.com> References: <87v82ls82e.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 4/5] ASoC: audio-graph-card: add link-trigger-order support Date: Fri, 7 Jun 2024 04:15:20 +0000 X-ClientProxiedBy: TY2PR0101CA0038.apcprd01.prod.exchangelabs.com (2603:1096:404:8000::24) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8206:EE_ X-MS-Office365-Filtering-Correlation-Id: 25b1171a-4d43-4e5e-7c53-08dc86a87255 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|366007|52116005|1800799015|376005|38350700005; X-Microsoft-Antispam-Message-Info: EEos2EhYOpM8M+rc89lTLEDQNJGeOXurGyQf3fU6DtFKh67YvIUpzdxCTz5TMbUgNqmCMvWl28Z9sboLNZBzDACIXIeYr4IzUXSKw7xkDTb56757tWpSjXTVPr/0dR6K/8fsCpsGyPPdKW+y3Tl8yi/cLEWeNwXKLcOcO44ScnTrObAEhOX+OEiobnYgfiiDT45EqfpY3nFX/CoCom0MFXW6R3mP8H9txvVE3RvTghIPwPB57JAAwCfMNbtlppQMKpcqdzyu6EWsDPKt9vIxk7b+wFffma+R/Dprrepuc88kL8K7+bGdXh5TG7YWqzkNRbx+/aMQJ9HS5/gyG2tGs5MmUJ+3H4aQLtbBbwWxg3St1qwjKmVPLAd0wM9CsNF7KUGyl9gBwm7YSRcwDksd7433VUqq/MTfDQtUGdPiiBl5H8Prl3lZlcRZRRembGt1my1zDsALNIlUNoIKrhUB7r83DQyyml6Hx4Umsgy0u0ZyznTAUW8w0QvwMlw0P7kLb580kKrRtqpx8uRzZABQQzcvmgx3ZuqGtsv+jVfwBe8jmIc7cRevfGHtHEY9U2XXe5wLbqF/OUf0YcdynRAmlqD48BXe9xsTzW0/dWgWNMcmH+ftmpO91/J4HqEs1ZU7c5JXb2p3H9K1Tou+QoT7dYNiN+NRX8TdLw8LbIj2QgnDfK2z6IwQkxUL+7PQfrv3kwYoyHpLv1+y9MZAC7+q/EQ3sjXjbJBbK+7rVFMhto8eIUx+04wmukNDrF+22ymEdMolY2x8B5R2gIoHtMdWOJ5oTgc4x67I4ap12AJ2B0OfCzECwu+6QqJwt76yT2rQ+yC/OgprcwWyCOUODbBpYyoNX0u8iObF/IRvoe//8pHfsfxeteBFlT6kCl8NdaeBm9+fvKqsA2+Oyvo+u3C5MyRUX867AorQvd9Ygh8XpsA6Dthn/ucPXE8IQQOIqDdbXcpJh1gauDc8SzOVpILwqBZIJG2oH5PDtYbOcJxOGgSNovdfEVb5QH3eY/IOS6+zJzKqkC8F5Rjb66B5acPcbhgjNtxF3q9MRBu69ybWQpR+gNq0w5w7N7dB/KNZUA9hqxJfl9sT/myTk33C2fbwcpAqZv3aPu6liKa3sn0HxPfmHV4Tb0LBeeU/6GeSsVSXRkiCW4zMJvL+CZNQq7KbzXnzsaEXRc9QnAI6/4OCU2Jb7RoCaWGF6OPhwGC1SVgpeG2SQek4yNOeKc9Ahsqd7gPi4RTK1Biot7xZ2W2ljk58orj3pbRo8xSfLPYQ5t1YdR1sfvCf7DbVXXUbWvPm9cFN0ouSYjcqVeYJJyaNk+cPmohv4DoEbVap55Yr8HK9tgH86FZx6FafqbZSS9G/VNkurl86wjswRfOGzSOrbBo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(52116005)(1800799015)(376005)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wH3lyoJvwi/EQDjdVfzWdT1tm6pOu2Uo2i2Jp3zg6HdGlMdlu1pk9L15up6tS5fATBsDlhp+3s36YKpq+7/w8ZKDM26EsBUCkMkfTBSjGVGvifdUtHgL6WbaPfeb6ReVYG7QR34/gos/vnXPwfHpWrIjn/Bp4lb3o6CUbbjWOH9fhMxOnht/68UbsZi3Aht0IPP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I0wjrhxoxnq3jDozjmyMoDfCkBpbLw1BZq5No3TRKIj3g5Sv8jrt0T9LtInaoEMmsGKpEkLSr881+5Fwf7knMjRUAyEnDKgoCpoJ527h4t1UmXuMtyjA1LmeIfGq2hLBuAR8ZhPjgIEX0eKolHKR/SxfBfA2t40rXcS+LdrqsX84zqpsmb6inxnAKV84DcviGkqywXyrbuQ0uH+evM3tlTF1DNZfsg+LvLl34cFTb1T5mfF/2s693/UG7VkAt7SZkQPMALNZwdp4S1hD3NZXpicGETM61l5IE83Dh/KxFcBLwPstMYV6CCbbFn2JOsE/L53c3EFUG1Q/9WpwYzwXWGMJgNbKjC6FAGhI0MFHJvpTqJxbCg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25b1171a-4d43-4e5e-7c53-08dc86a87255 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2024 04:15:21.1191 (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: whLDE1hY6bvq3dv86JeN9aGPC5EroLM1PNQUz+KRtHSOcaZGhppdMk3FJ6+dzkAJhu3jo5kNa87vOouJTimhmWtLufZN0tdZ5ucSU3fEtIhmqLLDz6pQTJnxJUnb0Ngr X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8206 Message-ID-Hash: LVJPOJPT4CCXVFWP4D4QA3WDJATEAR25 X-Message-ID-Hash: LVJPOJPT4CCXVFWP4D4QA3WDJATEAR25 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.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: Some Sound Card might need special trigger ordering which is based on CPU/Codec connection. It is already supported on ASoC, but Audio Graph Card still not yet support it. Let's support it. Cc: Maxim Kochetkov Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 7b981aa8690ac..acf7d92d21e60 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -143,6 +143,8 @@ static int graph_link_init(struct simple_util_priv *priv, struct device_node *port_codec = ep_to_port(ep_codec); struct device_node *ports_cpu = port_to_ports(port_cpu); struct device_node *ports_codec = port_to_ports(port_codec); + enum snd_soc_trigger_order trigger_start = SND_SOC_TRIGGER_ORDER_DEFAULT; + enum snd_soc_trigger_order trigger_stop = SND_SOC_TRIGGER_ORDER_DEFAULT; bool playback_only = 0, capture_only = 0; int ret; @@ -165,9 +167,20 @@ static int graph_link_init(struct simple_util_priv *priv, of_property_read_u32(ep_cpu, "mclk-fs", &dai_props->mclk_fs); of_property_read_u32(ep_codec, "mclk-fs", &dai_props->mclk_fs); + graph_util_parse_trigger_order(priv, top, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, ports_cpu, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, ports_codec, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, port_cpu, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, port_cpu, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, ep_cpu, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, ep_codec, &trigger_start, &trigger_stop); + dai_link->playback_only = playback_only; dai_link->capture_only = capture_only; + dai_link->trigger_start = trigger_start; + dai_link->trigger_stop = trigger_stop; + dai_link->init = simple_util_dai_init; dai_link->ops = &graph_ops; if (priv->ops) From patchwork Fri Jun 7 04:15:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 802637 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 ECA15C27C65 for ; Fri, 7 Jun 2024 04:21: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 1740A845; Fri, 7 Jun 2024 06:21:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1740A845 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1717734096; bh=PYLjg4Rn9Bh7IeYqQUSM3JfEsrZr2AR86fI3O/cyWWI=; h=To:Cc:In-Reply-To:References:From:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Mai/Pk1hVdZKm+DMsyp1apjKtyjZwAcheqZJzwiRZRwWn2R6vPNj5EWEHafY8p2Yr EjcWxaZ8E78/WfMhpTRkccOT4gimmIptqgiURgljPlDMy5lE15bgbYFzojTIJoWRAm EuuoJOAS0Mrb9opLQ3kl4lWqzXwVe+pA3epXm7HY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6221BF805ED; Fri, 7 Jun 2024 06:20: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 A9F4EF80600; Fri, 7 Jun 2024 06:20:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 449C0F804B2; Fri, 7 Jun 2024 06:16:31 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2060e.outbound.protection.outlook.com [IPv6:2a01:111:f403:201a::60e]) (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 CB25AF80517 for ; Fri, 7 Jun 2024 06:15:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CB25AF80517 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=WwTCjxFk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CkYrNbxiYOPJ9t5bhXfmiRk2NI1tzjRS+vJ+f5qi/BYouJ6TmaLBXmUlkppB788wDIXF67lsRwvopczM5XQ5kamHLk9zU6eSptpV12ZYvjCyIwvJwGRSZlXiknKDRJAdKe8AloLHxD/aM4Hl5P+x5Tu57Rj2fD5iSAln3NNrhBMdg9WEAamY9AWq/ku1p9sbowTnkhBy1a/lKCG6gbvRPt75QoEvUklAaqHFtkBBJ3voabIEof9ZFl7WAwV1as9ORhbNdYRrnfOm0Ef1ivgUbVvfXBd3APRWxuePZvb35r3eixHnth/VGbYMJozigrNEIbedYIDfVwBU7angpaz/QQ== 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=YO4A8lsP7ma7Kmz5TkZdLhQzYk8gkkJJXXTmWh7m9sU=; b=EnG7LwGPSrpr5yQCRzVKfGTGEFyALk3gpvCljN2TKyDLbXpt0a4uhoksu4+dqjhfsoAV53cJzJnbtCePNWAiP71KE9g6m0DhbT6Q5x+JmLfEECI38sffFHF9rhmX5DqY1kd7nkkKoCX/jA4wfuq0AF7JavB4dJPoe0Jd2/Z4cI7OOUOqJEw4Bnbzfco05NfYrPvWuIj15wzrc0NFsXVuLgI20iI23Zv7mgcL0WGyu4S6cDQVuZzY2jd20DPwTQlqzIYQEUfPHSAlIxcpYjS2H0AoULFhuKcJZ0yhFJuPvdZbsJI49aP40s9azGZNj41QdU0sZ+zpGHfw/rgBeTlTIw== 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=YO4A8lsP7ma7Kmz5TkZdLhQzYk8gkkJJXXTmWh7m9sU=; b=WwTCjxFk9YvG093aVc1Y4gadHlgOSAxvRM3oEcjdoptGAdaxP+Wg4VtLWoCGw9ScauyaV7w/AIu14RWFStHeBybdbiuU5nt25PgZozrzY6eRApmKISlg87fXS7SLSWAdZTNXCH8fbyO1JGIos5Iow9p99ySyjKgB0Vq2hqYhots= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8206.jpnprd01.prod.outlook.com (2603:1096:400:103::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.34; Fri, 7 Jun 2024 04:15:25 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.7633.033; Fri, 7 Jun 2024 04:15:25 +0000 Message-ID: <87o78ds80y.wl-kuninori.morimoto.gx@renesas.com> To: Mark Brown , Rob Herring , Krzysztof Kozlowski Cc: Linux-ALSA , devicetree@vger.kernel.org, Maxim Kochetkov In-Reply-To: <87v82ls82e.wl-kuninori.morimoto.gx@renesas.com> References: <87v82ls82e.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 5/5] ASoC: audio-graph-card2: add link-trigger-order support Date: Fri, 7 Jun 2024 04:15:25 +0000 X-ClientProxiedBy: TY2PR04CA0007.apcprd04.prod.outlook.com (2603:1096:404:f6::19) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8206:EE_ X-MS-Office365-Filtering-Correlation-Id: 0cea75a3-f906-4003-6167-08dc86a87509 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|366007|52116005|1800799015|376005|38350700005; X-Microsoft-Antispam-Message-Info: d4i3YJRZJOJXzm8P00Y+wuYTEvnjPLBzG+AxsI0o127cfEslgtmIUNP8rk6frgeSglSE2BNOz5qw2bR6KwvdmKp3QHh5HQHm+9IzRsH+4mPNj73TOI1tKlstsUbiX/Ith8855JFwED3hDo3vssigP1ScqQF+ANQ2R6dBQyP456q9PPBlT0scD/wHgwWhe6uO6iRY/hSWogOTjiu5Ww/VuH8KRHf2MDnfqhHLZNilg3Z+TGQoxX6rHbtfCff8VIASFuxN2QNmPEjqs4LboFpwoZbHTHF7dKv/hBnLjLjj9+o9YTf3b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xTgH9rtqSoyQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(52116005)(1800799015)(376005)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: stx+57zNWKs6eVSc9Q5qkRCOfoLV4i/8tsRDJCHRSO6BUig2M2ba4i4Pse1b98frIQ7ZZu6eqlzYW9wGmGjSnIKOk8X7d9k1/OKhc9xYHxcqw5OfC+YLE+D1UDFrMvWKfCgZbht5RmIbTCJop4D9R5tzePyLeHVbpy3rXEZEIFcVNl4c6QPYTgYAVP0X7Tsy9JRORnHbEMjIm/lYM5v2gHFj6Cv39PCuDn5yZvvm5wUaU4B7VPjyFdBTjHAX+ZQVeuIOc9W78fqi7GYBc2BqgLYmy2mZy7J4t+F98ZPuJyyLjAHe1g1TVxIK596PSwNGNleEQv3ZZIbbHcVWAuo3wXnTF4z2nCZ3N4onxcYW7uXAY7lswxtwkjKakA8j6SOwdMUCkAXoMi9uu58wwNVKEfZz/eGxOedoajJQ1QZ8049B6xsgKm0CdmyFpgTzuQTDZE3GYVpqF+WYalLeNIiTb3lo1XxGXG4GDDEuKbv1Xg3K4MVMF3gUO9TBk8W4zzFEyJeZuKJavi8EY2VPGiXK+VjdejFtiYZWdOlrv8DVU5l5Hlkit2dWVtKMvLnJZ5hCHc2P9JuKc7112eGwS95Qb6ZBHqjwQtcpSluOZwDIsXowY0dtFwoOhWklIOgNqiOaIzB0W/95KzDO62et6IK+onk+EKwxv3KVvrYhLTR45XW+gZtITa74gWWZIgmUOwf2qgVwgC8Fq0gFoQCsYZA85FhpVWq6QhyAXZ1lxY32QczAQuO+QFKa5C7fPjrvyZRx5/aaEzGxkOAlDe3vdC9wDEPknGivsuJRL1wiks6Uk2F+2aL1hTN2mhPqEL+nxsJ/sVPiwfWdJe0EbcvlZbC4I3YJu+RFMBYSxr0l2oTmoic5T1wspzFALj9uZoTfY6JVCsJExF3zFC4NJqclfCEvPvlQRYe7A9UTFY9/9rYDka/zAoZHnGvSi9QpLubyr/esGy0W5yQCFZn78y7ag7a5CgEjAJUbVi0u/rr6ztyQG1MzXrqKcGCbHBkT9SQ3gTUvu4IHxZ/lx2jWK7BD2MD/6c5hI7JIU+UnSTs813B08mLXzd1y+qnyxSuurkPKVBq1WHJgfi4TZiQ9MmwfegLiD3JPPEscX+KTLtu3e6NlRn0IoT7XTAjNTIct5koSTK30wbxF3HkASPAjJ+USb5q5wMt++OPjCd6mkam48BTsCnhLqBEm6DobWMbdhwekJ1/9Lsgt2YpPNVP+LUaLtaGFqjGc1ag5WA09s/DoIsgs3cf864OmTKz2sD07Qi3YD/BjIN9yS6BwlJyILsfTTRzlKCQjgZqm7pNyhkcUID3iRe5u4qC47v38P3SrtFTmwzaZD2nG2J4Uf1xsF8BPU1Fhgr9+oamFdZ0Eloh9268tYq8TwaOk5qEOQJ8pj5qvvXf5KxCr2aL/UmStB49iO+yOu4JXj1Y5D9i2OAE7/zam8yMW7OvK8MgXLBxQ1JDqK94WF/IhDCgm0Ex4KB0bsa6OpXSoHpVKGCrft3j/w+PL+vDwSH4L1OHhCFBrN6pfoQfN2fQBHsLii/gBX8pND0yY5uHe9ZC9f9FtlUzY8b5KRIl6yU6nICVVJlJquJLdyOWEXlQk0PYH3sIfUTTrweqeaM0ef4yDaPetHicMapXfVpE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0cea75a3-f906-4003-6167-08dc86a87509 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2024 04:15:25.6621 (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: WvFq0mWoqLE3Pnm0E1SyT+Av9ztKVgp4I5QNm9RjJqrIbY+QuzatvVu+hQm6663CifpIL7ivwolRIvpDCOmRy8w3MDvBCWdHeueUWlSe5N3zoyu23N/jq/2k1VxY+pIG X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8206 Message-ID-Hash: SOIRK4Y6SHUCQ6RCEAJXIXMYU5P2IDCQ X-Message-ID-Hash: SOIRK4Y6SHUCQ6RCEAJXIXMYU5P2IDCQ 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.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: Some Sound Card might need special trigger ordering which is based on CPU/Codec connection. It is already supported on ASoC, but Audio Graph Card2 still not yet support it. Let's support it. Cc: Maxim Kochetkov Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card2.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 8eea818887580..abaf3c1719f31 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -759,6 +759,8 @@ static void graph_link_init(struct simple_util_priv *priv, struct device_node *ports_cpu, *ports_codec; unsigned int daifmt = 0, daiclk = 0; bool playback_only = 0, capture_only = 0; + enum snd_soc_trigger_order trigger_start = SND_SOC_TRIGGER_ORDER_DEFAULT; + enum snd_soc_trigger_order trigger_stop = SND_SOC_TRIGGER_ORDER_DEFAULT; unsigned int bit_frame = 0; of_node_get(port_cpu); @@ -806,6 +808,14 @@ static void graph_link_init(struct simple_util_priv *priv, of_property_read_u32(ep_cpu, "mclk-fs", &dai_props->mclk_fs); of_property_read_u32(ep_codec, "mclk-fs", &dai_props->mclk_fs); + graph_util_parse_trigger_order(priv, lnk, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, ports_cpu, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, ports_codec, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, port_cpu, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, port_cpu, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, ep_cpu, &trigger_start, &trigger_stop); + graph_util_parse_trigger_order(priv, ep_codec, &trigger_start, &trigger_stop); + /* * convert bit_frame * We need to flip clock_provider if it was CPU node, @@ -818,6 +828,9 @@ static void graph_link_init(struct simple_util_priv *priv, dai_link->playback_only = playback_only; dai_link->capture_only = capture_only; + dai_link->trigger_start = trigger_start; + dai_link->trigger_stop = trigger_stop; + dai_link->dai_fmt = daifmt | daiclk; dai_link->init = simple_util_dai_init; dai_link->ops = &graph_ops;