From patchwork Mon Nov 13 01:27:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13453452 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 10653C4332F for ; Mon, 13 Nov 2023 01:36: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 81C5F209; Mon, 13 Nov 2023 02:36:00 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 81C5F209 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1699839410; bh=dawlgpAZH/cfv2pTBTXWamsDoEbTVug8/jCKU+mHo+Y=; h=From:Subject:To:Cc:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=UNbU70jOaleaWl3mRgie9Ft9ekU0igApPZ+pqii1FqOz+xQGDQaOK4abF0U511wNL qi8GUWqgIZLrSw382LHTIsWTHHGO4LQMEnTQP53OBCJxrrkphNMDxx5RruUCrWIopf QCMP7l1qteOd6dvOyi0KIXQqlOPf2bjgRMgDcfWw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5143CF80558; Mon, 13 Nov 2023 02:35:39 +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 25AC4F80093; Mon, 13 Nov 2023 02:35:37 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E9B32F801D5; Mon, 13 Nov 2023 02:28:22 +0100 (CET) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20701.outbound.protection.outlook.com [IPv6:2a01:111:f403:2019::701]) (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 E1228F800ED for ; Mon, 13 Nov 2023 02:27:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E1228F800ED 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=GjqGEmHT ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QWnnP7kEgQfJ8kY+6lTOmQ69yQA5IzGUnMlO6zWbDwpXJWhyIJnYdy0WHEhe3+FOk/x8qopyVXojaTQ2Cr+KFamab/nhf0cNl0zpwREqitBXW0NOmYTyci7gbl4QYgemv6AVyKtf5NCnBBhfYyrQix5/2uYoaRpIjjXBLRpByb2B8nxMdV+3BS5WdzSgj3L/EGOwHe8gZAlTkA4F2MFsOpngtMWfllj6tb/uOU5cK4u8RZPyEFCdHy120dO7s/U/Q6hj+KfxaQSHpW5ThIHoV+adoFbBHX+W+r8US9thdgtRr81mVUpW+KunTLOKhuaqWy0lNsm09w1im1NJZgViAQ== 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=l8kT2dUstHslSwymI1/keZdNcjUkIOgD2vRNNwG8ZZw=; b=RF1zpspwW7xyq6lESGf4k7Dp1kiNrcL6BO126OinSESQNBM044M2mbHLyG90rBLlgZHF3qjVaYCw+zyApaK/KISsAddutVhNY9iT9YsSB1jVOUVUZJJwBtS/RBVzbZt3sn8bFZGPBfo7YAU72PbCcsiY1EbAPMWfa7qs/kh2DJpkJJJFFzQr4ki2DXOkT8kp/6GVSru+cfUl0/qiG3FVIO2htE1XxZxULWis1Xd5aRwyXcmQMnPkxqpJyICDjUJtDtUFWJQUQaU4HGkzo9TMQLZy+TdKl7qFJSwXfjS5XWiTiU/aOBXdiKpEnfxoRMODIOxNCcRDWDzz8WnG8npqCA== 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=l8kT2dUstHslSwymI1/keZdNcjUkIOgD2vRNNwG8ZZw=; b=GjqGEmHTTxgDRbpURxYGnVmzP4+JOFXGmyJswdzOFiXCZm7DqQzY5sYMG2Sa1yOTAdFHFuMV9rh01tcM4keXn5iFsA9oRVtZ4IQgyNmxaODmR09RAkRNtIZK+LPIBuII0TXlE39NiocA3mN/HoDxjm0vGuINF+1y5OTdJ8jywWk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OSAPR01MB2178.jpnprd01.prod.outlook.com (2603:1096:603:1a::14) by TYCPR01MB10494.jpnprd01.prod.outlook.com (2603:1096:400:306::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.29; Mon, 13 Nov 2023 01:27:51 +0000 Received: from OSAPR01MB2178.jpnprd01.prod.outlook.com ([fe80::173f:d892:3d66:397d]) by OSAPR01MB2178.jpnprd01.prod.outlook.com ([fe80::173f:d892:3d66:397d%4]) with mapi id 15.20.6977.029; Mon, 13 Nov 2023 01:27:51 +0000 Message-ID: <87v8a64f3d.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v7 0/5] ASoC: makes CPU/Codec channel connection map more generic User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: Pierre-Louis Bossart , Mark Brown , Bard Liao , bard.liao@intel.com, Conor Dooley , Krzysztof Kozlowski , Rob Herring , Jerome Brunet Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org Date: Mon, 13 Nov 2023 01:27:50 +0000 X-ClientProxiedBy: TYCPR01CA0194.jpnprd01.prod.outlook.com (2603:1096:400:2b0::18) To OSAPR01MB2178.jpnprd01.prod.outlook.com (2603:1096:603:1a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OSAPR01MB2178:EE_|TYCPR01MB10494:EE_ X-MS-Office365-Filtering-Correlation-Id: 89df833a-e2f3-48a5-c1cd-08dbe3e7c093 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Rwk67zBscCZkLaJxawjtXSfsAb0xNhmRrTt6cHBlslruZgphQsSNuKPZ0ZByCxWf/Q4Rv/AdpkKEAkEJkm+XyYWZUdGlQyGSHQ8MorxWQWdOSCNDpE4axouMSQPn7I7DKErjHIe5cfqZmh4Yo1WHks4+vc0YSh8ie7LyLFYwFkn4Ra793hMa3e3o6qoxRJxp8FmpGMRU33BS+9vGCl/d97bRpoyRJDe/sngHIG1wokmkjfAaSGvLjRA06omE2ap+IR3Nrbh2m3Lu+lSFF2Y/XdBH/+XDz5VyUSof1e8ye428tT0R+O0TSGOIrAiDWWaBrvEvRvU+a1pxAl50ri2I9N48F6nbqpuKyVBW2rseN+ayxsmga0TNM+CJ7dvDU7iNgsvAiB8a5JrOG0SxiTEXHDA5Q6P8KmDderSCx9hrFa4GVgpAbXOSfeHoaLW6JVVfQ/cTInzsFSwuMy8N7qYXF5rioHAK3fEKQt+YYIFdtWRVIt3aqxr6mvAnYgbnMSbV6QenZXRYVg06+yDiiwmkIlv09ycWlx4okvSEFAK1wyASgPIkuMO19rE87P0tcSkVujzEXpg62OtQrMeK3G2fdVSyhr0kk69YBo5Q5kymDbNht6P9K1+2xt0a0sftk590ly49Uy9UtSHi4z3jSKT4b2I9evHMijtFDaCRw1slPheQ3Wm/O4k138mJB5TEjwFBHJ0Dazp5Ie0TeIN5bciTKA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OSAPR01MB2178.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(136003)(346002)(39860400002)(376002)(366004)(230173577357003)(230273577357003)(230922051799003)(64100799003)(1800799009)(186009)(451199024)(2906002)(6506007)(52116002)(478600001)(86362001)(26005)(2616005)(6512007)(316002)(66556008)(66476007)(66946007)(6486002)(966005)(19627235002)(38100700002)(83380400001)(5660300002)(7416002)(38350700005)(8936002)(36756003)(8676002)(4326008)(110136005)(41300700001)(41533002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mOgEphy9GZTY1JBVsgxTIjnQ2FI1wpUOKZ0GSHR+IXRSrlQS4lzXKeW/JXVCPlogWBi4oTPv5CQvcfeBkc3QDEB5JDwH2OavgciiA6FGy1c3vkVII6f4LgHgt+QT+zshDPQK9uPcS7kDp0zmnK61mWpwurN0COwjhb1GyTsCq9+MFa9ITy1qP5sHt16/F1bmxZc4MnDtZHjAlilFtd8eL5wn7Wit2U14LiLX53YqhRF2Rt+mjq4CRyRovcqAZazLbcs4xwlfQXDE+wyTnMthkWpmW2OwT3a36JS1l7KrivBjl82ef7hnjbM7aMgDdLS8QfdVyq6sQahIFJDX2e5Xo9NHg1wBEnF96JBgL4UwlTZVlv56U/SuNU4xxnMK9gR8HInCj/TtJjo/NwYUsz4Z6fkhXM8KU5ZpMw/j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tjU4+KZR61BtQQHGpBYxAZjQe3/jVFpa3OEMGqoA3zxoQSZHhj1ERlkS7Hmcjo4Diyy7uUr61vTlZBsf0pCM0nR0rk//I3Kfk8GKWyaGuzShIUXYymt8WGZpvuQRBBDlU7/QvEo/M= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89df833a-e2f3-48a5-c1cd-08dbe3e7c093 X-MS-Exchange-CrossTenant-AuthSource: OSAPR01MB2178.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2023 01:27:51.2042 (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: CSXHhCoAB2Ls5WkXJ4Y2uK+6lMfYl9PB46Hvr+wgj7NvSlaWWQzobZnHrmHMr7JHM6qLtzBnXGKx8QVceHOCP9xttsqGbZYVb8jOlSNgEVKGGMewTcXstXgEXmVbWe1P X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB10494 Message-ID-Hash: 2MFPXAFNDEIZQ6PYVTE7LB5LRJEBFSWD X-Message-ID-Hash: 2MFPXAFNDEIZQ6PYVTE7LB5LRJEBFSWD 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.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: Hi Mark Cc Bard, Pierre-Louis, Jerome, DT-ML This is v7 patch-set. Current ASoC is supporting CPU/Codec = N:M (N < M) connection by using ch_map idea. This patch-set expands it that all connection uses this idea, and no longer N < M limit [1][2]. Link: https://lore.kernel.org/r/87fs6wuszr.wl-kuninori.morimoto.gx@renesas.com [1] Link: https://lore.kernel.org/r/878r7yqeo4.wl-kuninori.morimoto.gx@renesas.com [2] ASoC core code ([PATCH 1/5]) is same as v6 and it was tested by Pierre-Louis, and Jerome. Big change on v7 is basically for Audio-Graph-Card2. v6 -> v7 - use "endpoint" for N:M connection instead of ch-map-idx on Audio-Graph-Card2 v5 -> v6 - tidyup some warnings - rename "ch-map-idx" -> "channel-map-index" - Update "channel-map-index" description - add Tested-by from Pierre-Louis / Jerome v4 -> v5 - use cpu/codec index on ch_maps - separate card2 sample DT patch into prepare and new feature - ch-maps -> ch-map-idx on DT v3 -> v4 - add Jerome on To - add "description" on "ch-maps" v2 -> v3 - tidyup comment - use more clear connection image on DT - "ch_maps" -> "ch-maps" on DT - Add DT maintainer on "To:" for all patches v1 -> v2 - makes CPU/Codec connection relation clear on comment/sample - fixup type "connction" -> "connection" - makes error message clear Kuninori Morimoto (5): ASoC: makes CPU/Codec channel connection map more generic ASoC: audio-graph-card2: use better image for Multi connection ASoC: audio-graph-card2: add CPU:Codec = N:M support ASoC: audio-graph-card2-custom-sample: Add connection image ASoC: audio-graph-card2-custom-sample: add CPU/Codec = N:M sample include/sound/soc.h | 56 ++- .../audio-graph-card2-custom-sample.dtsi | 380 ++++++++++++++++-- sound/soc/generic/audio-graph-card2.c | 277 ++++++++++--- sound/soc/intel/boards/sof_sdw.c | 28 +- sound/soc/soc-core.c | 95 ++++- sound/soc/soc-dapm.c | 45 +-- sound/soc/soc-pcm.c | 44 +- 7 files changed, 754 insertions(+), 171 deletions(-)