From patchwork Thu Oct 12 01:31:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13418123 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 CCD88CDB465 for ; Thu, 12 Oct 2023 01:33:49 +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 76CF1E86; Thu, 12 Oct 2023 03:32:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 76CF1E86 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697074427; bh=ifNCtF3ql/QikeiDvr91Flp2w6TiNIsMJd3bcafZFSE=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=sYfFKpWlIREFV/nVIYQY+BsaY8E1vL1D4GHwAIJ5yGJYn386R6+z7/7bLIDNknMw6 fxKaSk0udjSnuudEGl58fHcn7ulAyDfSKeS2nmrGHQc/7j+pgDz3nJr4qkPjspc7Uw Dp09GSz/dhTOtkqH+otvdgj8QSSfTvZFdU2FdHjk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 877A9F80570; Thu, 12 Oct 2023 03:32:21 +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 04752F8056F; Thu, 12 Oct 2023 03:32:21 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BD8AEF80563; Thu, 12 Oct 2023 03:32:16 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20700.outbound.protection.outlook.com [IPv6:2a01:111:f403:2019::700]) (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 BB2F5F802BE for ; Thu, 12 Oct 2023 03:32:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BB2F5F802BE 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=MuwJSaii ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T7YRrYY/tHHm1Eh62KXxzvjTLR+Pp7MEwii1kLoiRJo3oVgHYROnDtcQa6IdT9Jd5BW7uDNndE3LoFpvGkbMv3u9Y+NhegsS6Z5zMzAtvUbVra0gZA5Idzn6e+v30rIs3Xzli5EMvlb+aF60NC2I9cYihBy4UzfRy0czaoBhgZMJLWFCn1poswr27AUqGwVxRB/8U63n0zJ41C1AKh4U7XKfAlmu3FtDV5piKY1bFuGVpDdD52irm/dPCaOfoMV2+A4M6HZWT9s+YJhpUy1AYistnkZYMGzPz1uJ0fnpSnxA2L0MeJGajTreDrU0XfbuCs6EnJuw7gbNfxvelJWqsg== 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=W4AYtG+keeIPKxYqNKHZTQiSO/VnWhfY9wa6gnssUMs=; b=CT1sCtSIaTukpyOpxWK2tzpwL9yiO9x1lQzp5ZngW5tQUPNeYmY/88lNWBUQdNIXrnar6BEztacy/Kc0CNFZKXtHlgBjyNv1nmIl+kNHLuUq07N14ATa3gAzaQ7ONd8Tu7U9D/j++zuS7reSumrTXMuCrA2mrjspmyomV7zrNyd9zHKVJsClsPtTtujFyWyzUaWd2vtyR4q9z6GkFjHvene3rtSdwdGfQykQpHSJng/YXyetpj1OY5/0nehKqzHkl2uYgFwl/sOipDafCvdi6tcecoSzUyaxwRAWVRgBxpFHpAVQnrpGxCCWrda+KbcEKssV2IuCZDBsAkuQjczkfg== 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=W4AYtG+keeIPKxYqNKHZTQiSO/VnWhfY9wa6gnssUMs=; b=MuwJSaiiLTKGFAxOVVpEgxmcn2brI5z7XsozdDomnsBhZV5y4HTV5KHiVcb8TaKsCTP+WXX8Ud/JEGaBjySWbTA/pSVKIBDCoA761FVJKwDP6D5C5LBuAri94zNaXCjF3ZPPsacp7vKZ4SV8xry7ZxIYa6J0Qt4UCmhmLCy0KXo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYWPR01MB8411.jpnprd01.prod.outlook.com (2603:1096:400:176::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Thu, 12 Oct 2023 01:31:58 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::d2a3:45df:a180:595c]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::d2a3:45df:a180:595c%6]) with mapi id 15.20.6863.043; Thu, 12 Oct 2023 01:31:58 +0000 Message-ID: <875y3cy6b6.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 1/4] 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org In-Reply-To: <877cnsy6bl.wl-kuninori.morimoto.gx@renesas.com> References: <877cnsy6bl.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 12 Oct 2023 01:31:58 +0000 X-ClientProxiedBy: TYCPR01CA0149.jpnprd01.prod.outlook.com (2603:1096:400:2b7::9) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB8411:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e2896e9-3f36-4362-8ac4-08dbcac306bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ukfljAno+u8F1d4nY1gBudPliy2Nfnts8sGrUNr9w21u5WmGrSdt+sfJVGh6OvXJm9njRAPQZlI0qp63Kpw4wQkqghiLsu/nDiTQKqEKaKaB3lzxe1MqswlVO3avMy0rtzOfidyBpbeJalUEYpAiNOiEizGwqxBN9tAmR8OpJib7ddVB9R/AoH06do8N+j6ggj35IgMeBBizJYhsK0PMQR7H/8hTizZv/wpbSrjfB/+jZ3X11AXPsMYTn/9zkzztD2Pqj6XmVDxK63aKjLTA1pIauZ9PLG9XazKT7GkabeltL5CLepmjWtN4kVYGc2tRhf+e+7r7dlyaDibAy80+PDyBOByt7UW6JNRkj1MWDlWHmRLUT6EBRCLoLAfguJpC4sHabvTE39JBp5EwYE7PL0hlOkyxDYFC+myK/5lZYqJwrplLjb5rcbwlYRbRNRk/azoM7jKnm1gfQtuyNnLcnlPL+dpaUqDfm1kIUGoU4teMidcyhGthP1ZmzQraevjZckbRs1oX2QHdxSMVsqg18vv3bb8ZmNEZq9/b2/2Uor7FDA/Q2Yrv5yBhRCMJun6KVvS4+i0Z4v8L9BZGpTFSHREAKIsLYpw/RXUdUatvWQlia0u3l8B7aCVH6aJRrKel X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8426.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39860400002)(136003)(366004)(376002)(346002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(52116002)(966005)(8676002)(4326008)(6486002)(6506007)(6512007)(38100700002)(26005)(8936002)(110136005)(478600001)(66476007)(66946007)(66556008)(316002)(41300700001)(2616005)(83380400001)(5660300002)(2906002)(38350700002)(30864003)(86362001)(36756003)(41533002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AgOHPCpE+J4+Qp5CQMFj6jXkiDsmiQwy7ZeIdgkD6WjLJeH4pGjITQv/WvYjC+c5goFnn1pPP3OcDnGD4E1+AHUxAhvXscaQij4E8u10t71GzEMoSESkQ2Rf/OCGs0UZe+hWcrQZNMs0i3FO5yo8K4OU724iV5zd+/ieI9kSh+OjKD0Vvkf2BTUQdJWScn5Cm1wJXlBRRIclD7OV0kuDYLOeiFL7+j93uxoYijmAj5jbDZrN1I64ORLnYA3W+Xneol/qSiyGXs//dAdhPbtdgU5WcWJgvA89lO+gErd6IQP/17zPXyH8jUhOFtl4eA2QL0BWah52bX25fSoQ5/ZqPlvT/irNDyPOuLJ2WsG17tVK/cGt4JCqReMZZjKlal1Qr5VOP2ExRRtQNhGSMRx29OSxNLP/kbAAifwMarM2Co6DHxx7WkjsQXd0oudn9JXP9lINmHhjTYIf0A1xd/mCQMd9+CtXDAP+ABdJjtNt5hQ+dzuPTgM1TTtW3V62YPmNTS7GLaOkrNNd0Lwbv+vSKF1iHcYDgTXJlxLSPzp0mbm5QjBkyaWKb9GuXIoitwvfSC9rAXetlOUdef3NsVye0FBBu2gEhik7AQjjXBPS6wdRWrR1Kb4UdTDE++ExyivLI3/8wR0elB9lbeDY5nPS1liqp/wIBcf+FBtfbAvvpT8wdH8AWyH1J/GOmd10uQIKtnBCnIw7sl+gFdjO53xK8gGNtzqGwfTjffj7tVN5kLUS9jHYXl8CADZJQNMWe/MtQxKsZcbJuV0kLqlq/Jm5VT3XTMPS8mIsmX8FcIAdejNMfR3Se3gvNFbFz04gzFDUnCSZOL6BGbhsz1pkMNxKXiGZWcb0TZylHKL8O07KkVLq2N9zUkaqGx2F3Vqk1rSuG0ZVS9rrq8kVcR5LzQeEalpERoC6uJUZgedJYJt7Vd5q1LAh79k4/L8FAFkkdV48SiEvkOz+uKL7oNRn/QOdOkXfGQCFw2BjKNLXRK53mUFz2fn8gKK4qyQKrasUwm58PtMg86BZeqQB0FGseAc5RmDTw9M7Asra4728B9vvxDH0tVNAEPY5qsCy5JmJ4qS2S0AwMKbjId2zbXTztiEfzd8RXSrOeb0u0DjMDoDFuoQjM8aqEz2+mT0TwT+aB9dSLWnfL69+pcn/Td4muX5Z8zgHGayzyWQUKE1mp8REaYDbYyT7IMQ3K/fqjXr8ouqYO5BfPhqAtzizgI9oUTX3wNCkwCniTFhSyHaPSAajWUIoO/MoCZ2J/n58igPMOF5WGERce+jy+VWg2FRjeF/6WXtREFy25GDarfHXsYASiycnozKnNG1GqqFVOBOXZFqH7oujNlywbw/W2rrEI2CRoA5mq4OHCLMLcHKL7mM+Hp5jdeAq6asB0+Os+lo3l3Q9syz7oN3HW+wJm8Qe+Sjyh/5dszwJuwAro3EvtXAUHdR8nuZQJbgEVNbWspdpHp2uzcYn8eEd2NrtnGhzxFOEAxJHVznu4JU/4jDKroU0eugpW7QaWrbfjvyVUcooogoW81amiyAZax+0zDMIU2pRETbXXUVYMMCzwxpr817wK/vZqRVUa5syyqiaKs8XAPbdEn+dfX/W5DSsFKEUiBsBURfCXcQ7g0kRaYJAFIIRpWQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e2896e9-3f36-4362-8ac4-08dbcac306bb X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2023 01:31:58.6001 (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: WTszidPiuWKN8oIvNJRMZrlFhqCIDMcRhMsUb6JHtcHNE0zo3ALNaJtLpPuKoyI7er2wHf0Yg7K50nRu9AUZ3SZkeJ3xRGOKTmZtCB4jgZIW/lR1DrdOM2cANaRJ5QAR X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB8411 Message-ID-Hash: GEXPLZE5MW3SKMSBPMBGHIAZWTR6B7NZ X-Message-ID-Hash: GEXPLZE5MW3SKMSBPMBGHIAZWTR6B7NZ 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: Current ASoC CPU:Codec = N:M connection is using connection mapping idea, but it is used for CPU < Codec case only. We want to use it for any case. By this patch, not only N:M connection, but all existing connection (1:1, 1:N, N:N) will use same connection mapping. Because it will use default mapping, no conversion patch is needed to exising CPU/Codec drivers. More over, CPU:Codec = M:N (M > N) also supported in the same time. Link: https://lore.kernel.org/r/87fs6wuszr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto --- include/sound/soc.h | 66 +++++++++++++++++++++++-- sound/soc/intel/boards/sof_sdw.c | 14 +++--- sound/soc/soc-core.c | 85 ++++++++++++++++++++++++++++++++ sound/soc/soc-dapm.c | 47 +++++++----------- sound/soc/soc-pcm.c | 73 ++++++++++++++------------- 5 files changed, 211 insertions(+), 74 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 63b57f58cc56..ff04ed312009 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -655,8 +655,68 @@ struct snd_soc_dai_link_component { struct of_phandle_args *dai_args; }; -struct snd_soc_dai_link_codec_ch_map { - unsigned int connected_cpu_id; +/* + * [dai_link->ch_maps Image sample] + * + * if (num_cpus >= num_codecs) + * .ch_maps is [CPU] base + * else + * .ch_maps is [Codec] base + * + *------------------------- + * CPU0 <---> CodecX + * + * Because [num_cpus >= num_codecs] + * .ch_maps is [CPU] base + * + * .num_cpus = 1; + * .num_codecs = 1; + * .ch_maps[] = {{.connected_node = X; }}; CPU0 <-> CodecX + * + *------------------------- + * CPU0 <---> CodecX + * CPU1 <---> CodecY + * CPU2 <---> CodecZ + * + * Because [num_cpus >= num_codecs] + * .ch_maps is [CPU] base + * + * .num_cpus = 3; + * .num_codecs = 3; + * .ch_maps[] = {{.connected_node = X; }, CPU0 <-> CodecX + * {.connected_node = Y; }, CPU1 <-> CodecY + * {.connected_node = Z; }}; CPU2 <-> CodecZ + * + *------------------------- + * CPU0 <---> CodecX + * CPU1 <-+-> CodecY + * CPU2 <-/ + * + * Because [num_cpus >= num_codecs] + * .ch_maps is [CPU] base + * + * .num_cpus = 3; + * .num_codecs = 2; + * .ch_maps[] = {{.connected_node = X; }, CPU0 <-> CodecX + * {.connected_node = Y; }, CPU1 <-> CodecY + * {.connected_node = Y; }}; CPU2 <-> CodecY + * + *------------------------- + * CPU_X <---> Codec0 + * CPU_Y <-+-> Codec1 + * \-> Codec2 + * + * Because [num_cpus < num_codecs] + * .ch_maps is [Codec] base + * + * .num_cpus = 2; + * .num_codecs = 3; + * .ch_maps[] = {{.connected_node = X; }, Codec0 <-> CPU_X + * {.connected_node = Y; }, Codec1 <-> CPU_Y + * {.connected_node = Y; }}; Codec2 <-> CPU_Y + */ +struct snd_soc_dai_link_ch_map { + unsigned int connected_node; unsigned int ch_mask; }; @@ -688,7 +748,7 @@ struct snd_soc_dai_link { struct snd_soc_dai_link_component *codecs; unsigned int num_codecs; - struct snd_soc_dai_link_codec_ch_map *codec_ch_maps; + struct snd_soc_dai_link_ch_map *ch_maps; /* * You MAY specify the link's platform/PCM/DMA driver, either by * device name, or by DT/OF node, but not both. Some forms of link diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 226a74a4c340..7927b729866d 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -579,7 +579,7 @@ int sdw_hw_params(struct snd_pcm_substream *substream, int i; int j; - if (!rtd->dai_link->codec_ch_maps) + if (!rtd->dai_link->ch_maps) return 0; /* Identical data will be sent to all codecs in playback */ @@ -607,9 +607,9 @@ int sdw_hw_params(struct snd_pcm_substream *substream, */ for_each_rtd_cpu_dais(rtd, i, cpu_dai) { for_each_rtd_codec_dais(rtd, j, codec_dai) { - if (rtd->dai_link->codec_ch_maps[j].connected_cpu_id != i) + if (rtd->dai_link->ch_maps[j].connected_node != i) continue; - rtd->dai_link->codec_ch_maps[j].ch_mask = ch_mask << (j * step); + rtd->dai_link->ch_maps[j].ch_mask = ch_mask << (j * step); } } return 0; @@ -1350,7 +1350,7 @@ static int get_slave_info(const struct snd_soc_acpi_link_adr *adr_link, return 0; } -static void set_dailink_map(struct snd_soc_dai_link_codec_ch_map *sdw_codec_ch_maps, +static void set_dailink_map(struct snd_soc_dai_link_ch_map *sdw_codec_ch_maps, int codec_num, int cpu_num) { int step; @@ -1358,7 +1358,7 @@ static void set_dailink_map(struct snd_soc_dai_link_codec_ch_map *sdw_codec_ch_m step = codec_num / cpu_num; for (i = 0; i < codec_num; i++) - sdw_codec_ch_maps[i].connected_cpu_id = i / step; + sdw_codec_ch_maps[i].connected_node = i / step; } static const char * const type_strings[] = {"SimpleJack", "SmartAmp", "SmartMic"}; @@ -1453,7 +1453,7 @@ static int create_sdw_dailink(struct snd_soc_card *card, int *link_index, *ignore_pch_dmic = true; for_each_pcm_streams(stream) { - struct snd_soc_dai_link_codec_ch_map *sdw_codec_ch_maps; + struct snd_soc_dai_link_ch_map *sdw_codec_ch_maps; char *name, *cpu_name; int playback, capture; static const char * const sdw_stream_name[] = { @@ -1530,7 +1530,7 @@ static int create_sdw_dailink(struct snd_soc_card *card, int *link_index, dai_links[*link_index].nonatomic = true; set_dailink_map(sdw_codec_ch_maps, codec_num, cpu_dai_num); - dai_links[*link_index].codec_ch_maps = sdw_codec_ch_maps; + dai_links[*link_index].ch_maps = sdw_codec_ch_maps; ret = set_codec_init_func(card, adr_link, dai_links + (*link_index)++, playback, group_id, adr_index, dai_index); if (ret < 0) { diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index c305e94762c3..07fdcb997ab4 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1824,6 +1824,86 @@ int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour) EXPORT_SYMBOL_GPL(snd_soc_set_dmi_name); #endif /* CONFIG_DMI */ +#define MAX_DEFAULT_CONNECTION_MAP_SIZE 7 +static struct snd_soc_dai_link_ch_map default_connection_map1[MAX_DEFAULT_CONNECTION_MAP_SIZE] = { + { .connected_node = 0 }, + { .connected_node = 1 }, + { .connected_node = 2 }, + { .connected_node = 3 }, + { .connected_node = 4 }, + { .connected_node = 5 }, + { .connected_node = 6 }, +}; +static struct snd_soc_dai_link_ch_map default_connection_map2[MAX_DEFAULT_CONNECTION_MAP_SIZE] = { + { .connected_node = 0 }, + { .connected_node = 0 }, + { .connected_node = 0 }, + { .connected_node = 0 }, + { .connected_node = 0 }, + { .connected_node = 0 }, + { .connected_node = 0 }, +}; + +static int snd_soc_compensate_connection_map(struct snd_soc_card *card) +{ + struct snd_soc_dai_link *dai_link; + int i, j, n, max; + + /* + * dai_link->ch_maps indicates how CPU/Codec are connected. + * It will be a map seen from a larger number of DAI. + * see + * soc.h :: [dai_link->ch_maps Image sample] + */ + for_each_card_prelinks(card, i, dai_link) { + + /* it should have ch_maps if connection was N:M */ + if (dai_link->num_cpus > 1 && dai_link->num_codecs > 1 && + dai_link->num_cpus != dai_link->num_codecs && !dai_link->ch_maps) { + dev_err(card->dev, "need to have ch_maps when N:M connction (%s)", + dai_link->name); + return -EINVAL; + } + + /* do nothing if it has own maps */ + if (dai_link->ch_maps) + goto sanity_check; + + /* check default map size */ + if (dai_link->num_cpus > MAX_DEFAULT_CONNECTION_MAP_SIZE || + dai_link->num_codecs > MAX_DEFAULT_CONNECTION_MAP_SIZE) { + dev_err(card->dev, "soc-core.c needs update default_connection_maps"); + return -EINVAL; + } + + /* Compensate missing map for ... */ + if (dai_link->num_cpus == dai_link->num_codecs) + dai_link->ch_maps = default_connection_map1; /* for 1:1 or N:N */ + else + dai_link->ch_maps = default_connection_map2; /* for 1:N or N:1 */ + +sanity_check: + if (dai_link->num_cpus >= dai_link->num_codecs) { + n = dai_link->num_cpus; + max = dai_link->num_codecs; + } else { + n = dai_link->num_codecs; + max = dai_link->num_cpus; + } + + for (j = 0; j < n; j++) + if (dai_link->ch_maps[j].connected_node >= max) { + dev_err(card->dev, + "dai_link->ch_maps[%d].connected_node (= %d) is " + "larger than max (= %d)", + j, dai_link->ch_maps[j].connected_node, max); + return -EINVAL; + } + } + + return 0; +} + static void soc_check_tplg_fes(struct snd_soc_card *card) { struct snd_soc_component *component; @@ -2030,6 +2110,11 @@ static int snd_soc_bind_card(struct snd_soc_card *card) snd_soc_dapm_init(&card->dapm, card, NULL); + /* for keeping compatibility */ + ret = snd_soc_compensate_connection_map(card); + if (ret < 0) + goto probe_end; + /* check whether any platform is ignore machine FE and using topology */ soc_check_tplg_fes(card); diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 2512aadf95f7..3c7c2b16bd64 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -4426,6 +4426,7 @@ static void soc_dapm_dai_stream_event(struct snd_soc_dai *dai, int stream, void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card) { struct snd_soc_pcm_runtime *rtd; + struct snd_soc_dai *cpu_dai; struct snd_soc_dai *codec_dai; int i; @@ -4438,39 +4439,25 @@ void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card) if (rtd->dai_link->dynamic) continue; - if (rtd->dai_link->num_cpus == 1) { - for_each_rtd_codec_dais(rtd, i, codec_dai) - dapm_connect_dai_pair(card, rtd, codec_dai, - snd_soc_rtd_to_cpu(rtd, 0)); - } else if (rtd->dai_link->num_codecs == rtd->dai_link->num_cpus) { - for_each_rtd_codec_dais(rtd, i, codec_dai) - dapm_connect_dai_pair(card, rtd, codec_dai, - snd_soc_rtd_to_cpu(rtd, i)); - } else if (rtd->dai_link->num_codecs > rtd->dai_link->num_cpus) { - int cpu_id; - - if (!rtd->dai_link->codec_ch_maps) { - dev_err(card->dev, "%s: no codec channel mapping table provided\n", - __func__); - continue; - } + /* + * see + * soc.h :: [dai_link->ch_maps Image sample] + */ + /* .ch_map is from CPU */ + if (rtd->dai_link->num_cpus >= rtd->dai_link->num_codecs) { + for_each_rtd_cpu_dais(rtd, i, cpu_dai) { + codec_dai = snd_soc_rtd_to_codec(rtd, rtd->dai_link->ch_maps[i].connected_node); + dapm_connect_dai_pair(card, rtd, codec_dai, cpu_dai); + } + } + /* .ch_map is from Codec */ + else { for_each_rtd_codec_dais(rtd, i, codec_dai) { - cpu_id = rtd->dai_link->codec_ch_maps[i].connected_cpu_id; - if (cpu_id >= rtd->dai_link->num_cpus) { - dev_err(card->dev, - "%s: dai_link %s cpu_id %d too large, num_cpus is %d\n", - __func__, rtd->dai_link->name, cpu_id, - rtd->dai_link->num_cpus); - continue; - } - dapm_connect_dai_pair(card, rtd, codec_dai, - snd_soc_rtd_to_cpu(rtd, cpu_id)); + cpu_dai = snd_soc_rtd_to_cpu(rtd, rtd->dai_link->ch_maps[i].connected_node); + + dapm_connect_dai_pair(card, rtd, codec_dai, cpu_dai); } - } else { - dev_err(card->dev, - "%s: codec number %d < cpu number %d is not supported\n", - __func__, rtd->dai_link->num_codecs, rtd->dai_link->num_cpus); } } } diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 8c168dc553f6..0bfff2ea111d 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1043,7 +1043,6 @@ static int __soc_pcm_hw_params(struct snd_soc_pcm_runtime *rtd, for_each_rtd_cpu_dais(rtd, i, cpu_dai) { unsigned int ch_mask = 0; - int j; /* * Skip CPUs which don't support the current stream @@ -1055,22 +1054,28 @@ static int __soc_pcm_hw_params(struct snd_soc_pcm_runtime *rtd, /* copy params for each cpu */ tmp_params = *params; - if (!rtd->dai_link->codec_ch_maps) - goto hw_params; /* * construct cpu channel mask by combining ch_mask of each * codec which maps to the cpu. + * see + * soc.h :: [dai_link->ch_maps Image sample] */ - for_each_rtd_codec_dais(rtd, j, codec_dai) { - if (rtd->dai_link->codec_ch_maps[j].connected_cpu_id == i) - ch_mask |= rtd->dai_link->codec_ch_maps[j].ch_mask; + if (rtd->dai_link->num_cpus >= rtd->dai_link->num_codecs) { + /* .ch_map is from CPU */ + ch_mask = rtd->dai_link->ch_maps[i].ch_mask; + } else { + int j; + + /* .ch_map is from Codec */ + for_each_rtd_codec_dais(rtd, j, codec_dai) + if (rtd->dai_link->ch_maps[j].connected_node == i) + ch_mask |= rtd->dai_link->ch_maps[j].ch_mask; } /* fixup cpu channel number */ if (ch_mask) soc_pcm_codec_params_fixup(&tmp_params, ch_mask); -hw_params: ret = snd_soc_dai_hw_params(cpu_dai, substream, &tmp_params); if (ret < 0) goto out; @@ -2824,36 +2829,36 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, int cpu_capture = snd_soc_get_stream_cpu(dai_link, SNDRV_PCM_STREAM_CAPTURE); int cpu_playback = snd_soc_get_stream_cpu(dai_link, SNDRV_PCM_STREAM_PLAYBACK); - for_each_rtd_codec_dais(rtd, i, codec_dai) { - if (dai_link->num_cpus == 1) { - cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); - } else if (dai_link->num_cpus == dai_link->num_codecs) { - cpu_dai = snd_soc_rtd_to_cpu(rtd, i); - } else if (rtd->dai_link->num_codecs > rtd->dai_link->num_cpus) { - int cpu_id; - - if (!rtd->dai_link->codec_ch_maps) { - dev_err(rtd->card->dev, "%s: no codec channel mapping table provided\n", - __func__); - return -EINVAL; - } + /* + * see + * soc.h :: [dai_link->ch_maps Image sample] + */ + /* .ch_map is from CPU */ + if (dai_link->num_cpus >= dai_link->num_codecs) { + for_each_rtd_cpu_dais(rtd, i, cpu_dai) { + codec_dai = snd_soc_rtd_to_codec(rtd, dai_link->ch_maps[i].connected_node); - cpu_id = rtd->dai_link->codec_ch_maps[i].connected_cpu_id; - cpu_dai = snd_soc_rtd_to_cpu(rtd, cpu_id); - } else { - dev_err(rtd->card->dev, - "%s codec number %d < cpu number %d is not supported\n", - __func__, rtd->dai_link->num_codecs, - rtd->dai_link->num_cpus); - return -EINVAL; + if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) && + snd_soc_dai_stream_valid(cpu_dai, cpu_playback)) + has_playback = 1; + if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) && + snd_soc_dai_stream_valid(cpu_dai, cpu_capture)) + has_capture = 1; } + } + /* .ch_map is from Codec */ + else { + for_each_rtd_codec_dais(rtd, i, codec_dai) { + cpu_dai = snd_soc_rtd_to_cpu(rtd, dai_link->ch_maps[i].connected_node); + + if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) && + snd_soc_dai_stream_valid(cpu_dai, cpu_playback)) + has_playback = 1; + if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) && + snd_soc_dai_stream_valid(cpu_dai, cpu_capture)) + has_capture = 1; - if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) && - snd_soc_dai_stream_valid(cpu_dai, cpu_playback)) - has_playback = 1; - if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) && - snd_soc_dai_stream_valid(cpu_dai, cpu_capture)) - has_capture = 1; + } } } From patchwork Thu Oct 12 01:32:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13418124 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 7F433CDB465 for ; Thu, 12 Oct 2023 01:34:07 +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 3E589E93; Thu, 12 Oct 2023 03:33:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3E589E93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697074445; bh=3JEF2BQlIHYf6495H6nkM/THEIDLwX1T5p0ClWa49u8=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=m6V0wpiHPg9ewAezB1vY3xkgLf/vlnw/6dpfeJEuk4RswZOwoVJ13pSMCjf6Q7Kpp S5cgxf4CI27MbYawEeuPX9CK3rP6iUNvey25sIBce3C9ia9l13xayYlkR0GXDFHp5S 3aKY0seWqpAaAG1JPAjT/fmKFQKHMGTigXZzWrqw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 41B71F80587; Thu, 12 Oct 2023 03:32:22 +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 98E9BF8057A; Thu, 12 Oct 2023 03:32:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A768BF8055C; Thu, 12 Oct 2023 03:32:18 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20700.outbound.protection.outlook.com [IPv6:2a01:111:f403:2019::700]) (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 CAF05F8055A for ; Thu, 12 Oct 2023 03:32:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CAF05F8055A 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=ad0Klc4g ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GaNZtl3avBOaXOaE7dSBG+7Y8LgW0oJpqP4VGWhT0VlRCp0D9Ms7GQVYliLIG8qSl/K+YbI+puRwpKVPvo7N9aPAwfcb3Fckxtix72oeoFMygVUxNqiN8emMet0ZQIr4YQpUFnEuR9dtbpaGeRwAL3CgtrFs8QNtncJAnKy6WAWueXFzIsLtBYpirUUyNzU07CVqbGEcHt8LdiWNpvkFOksbk6GQZj5GRAD7PIoESepljss8YdW4SrU+Yd/UD3iK+BBdvw7Cl6eBvDmJOwsvepZUr/y2MiiKkM479aH0Lf+Tx5WUeoxMh6vFJTCTsC1azb7FqwtveyqvAPclWg/CIw== 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=SV40rYPgD+X79RHIP1LMFV+4ANzbM28sKQBKFTpL4f8=; b=dLNCbgyHAlRjiFML0/0enW/DqK1WPHMlDGitVgkFeVeLAuCcrsw/WRm/cJuQZGXL52e3qZc2F0kQhe2snrZTiMLG4fiJf6CN/ASiIQKezy9gduS/iC162UhkCdZ8rSRz+0LEpWpLYTIX70qsJSmcbOf2llebYAKLbeZjcRmLflC4EPytGxLxbPX89ejobh3m23jzZR06dyU9JbLdnX3bjI3dQsSltapR8phYgZ/+vMHLT9q1LE/KSO729FxAflMAF7BCFs33KANupUfDpkbscKXF/avCSiX09i688e0C8bjFj7mHHkXAFam2g53CR2wJyk/LA9CeJJLUxkwMraXISA== 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=SV40rYPgD+X79RHIP1LMFV+4ANzbM28sKQBKFTpL4f8=; b=ad0Klc4gss2/36mm66ZCHVtvjWxVpr1yPiqD3bNY1oBeORi9e4Hj0QG5zemSdyvp2rl50ItQcmsYpBvMTA1f5VPI0r8LnGWEGiz3y9GulEqh8IRUC8nSe4prUU3IzlIjUd0+fa36yz36AcKhDO622A+BDUogf34EsbcRENwFWus= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYWPR01MB8411.jpnprd01.prod.outlook.com (2603:1096:400:176::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Thu, 12 Oct 2023 01:32:04 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::d2a3:45df:a180:595c]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::d2a3:45df:a180:595c%6]) with mapi id 15.20.6863.043; Thu, 12 Oct 2023 01:32:04 +0000 Message-ID: <874jiwy6b1.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 2/4] ASoC: audio-graph-card2: add CPU:Codec = N:M support 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org In-Reply-To: <877cnsy6bl.wl-kuninori.morimoto.gx@renesas.com> References: <877cnsy6bl.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 12 Oct 2023 01:32:03 +0000 X-ClientProxiedBy: TYCPR01CA0140.jpnprd01.prod.outlook.com (2603:1096:400:2b7::10) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB8411:EE_ X-MS-Office365-Filtering-Correlation-Id: 62ae42c4-fa05-4828-a87b-08dbcac309a5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zzCamAOmjlNkN2KMJshINMuAm0Am3hq+tqpFevYghtoM5duv6N+kZ3U4A9Ygmrt///++drMxlyaPQArWbBB1G1gc9VSIai+QGzjBf/WkwPhTE4vtiqZQLjqsgRcA72yth5HsT82YSvriIpWKpHvimNA1a//My80x+y9XFP5qpom7PcUJoRgRlHWUjjeSzYcp1+u1TpOM9fv3YohnEP+Z/k5RT34EvcYQiOB0wTajIE5ifeUiVa/ff/07AUcacrtFWxsPwZu58J8uzQSET64LCIYkzKTLeaSfsDVIvL5bchBR9d7Xh5trLDC/WFW5GhaLAsBEfdvQRenvLj/WU0UGXJaA/pWrOvUvLS4x4IOlBfUHFwL/b1xSjzwO715vCcbkk2YBcs0jrTDWV5c9od5YDvLEY0mqftCfvvk41FoBjJyVYo1AmkEAB1eJLDOAlnyifvgXBWmrRkOT/Hh101m1kJC/UIciW2lQAV/g05qDLitsKZSpufNP0Db3SkTkfxKswHlprD09QwkJJ2l/eAuTzBDkY3RlaGAa4wdeWExFX46Xx2xwYwC3dQal/GneXc34yXFERLfQbzOAWsDD98aXz72E4CtP80l+42MppVorB+o2PjeozuPf2l0/imGZ+hLiIIanr2mpFobzfNHy3vDPTA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8426.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39860400002)(136003)(366004)(376002)(346002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(52116002)(8676002)(4326008)(6486002)(6506007)(6512007)(38100700002)(26005)(8936002)(110136005)(478600001)(66476007)(66946007)(66556008)(316002)(41300700001)(2616005)(5660300002)(2906002)(38350700002)(2013699003)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: i0+Uf3QvZqwSTuxmZ4DmCppdcR1hC7vbsgxML6Uy0vLS1VDU/c1usFkJ3J6Wjoo5xovhdQED+1HZ3mjvqmBQeHQLg2tLcPkPk3BR9orzuWy3K4OFhoh6gPZAgCo/IBST7GNkgGCW7145JX2fV//GMtLbAQFUV8qBg5BRCjLPiIofwKyqcsvz9hQPsLbBYtO4csGzYNOXdMFtcnhdg1majiN6uW439tMIyXi38VRzTHzSL/IpHg+ylWHCrel2z1oM7rdgpoyFRKQNxBHrcFd9ICW0g6409ewxcrm4/EBAX3EajBbE/7VSZNH+sRCBUAwNYnEwXE52ktxmcx+T2XsO9zxgGb93z2XJI1o7L2aFRHVkFk86dPlK9tyMAt9X8dIRrFDayG34rXaWfcDvYvr0whHvQb9GpEY4mBoY7+YnLkkULrlVxrdWCwss0QmG1+/Yh3HVOGWBQGKS5seiig0P/l3N9poAJEw+OqhfH04i1h2UGgLXLAJ6Ud6fkQYSCk6arPahMGXEWDmHK1L6pBQ2grNJqSNBmtjfhONJlGE+SUwPxzfq+NkBwKXVIzMS7ziXTuzp6flFOjShVdQPuc4clVjWzA+/h3lWOiyiZU99I0l5T/dOFj3PAHbfpS0d35fO60FIXytIo67rI+fIR+xRbNPnX98C949pVM7E6nuQ5MKgd51rHreW9C8KutD+cpB5uXXeIdEOl+/4otwU/Fto0NDDpPWJ6h/hwSqD8WfJifrUtvr2C/WH1H6UYQVNsjF89gPwRcPib/QD5TES4SDRxeBLcFtBCIzQkEEKYgsMLCYgcjwQmRMRTb6hxPR2NXN0Ov96TE3acC87mEte47+muvQ5ovjZBaSXYKepCy2FXp8g3puPLmtX3RsNH/Lz41yqb343MP6sdmiGs4jWmnS8dFc8JCQ6jzbRXYsgHbI+CHj+hDY3G6smtk+nP/96JEDXm3x77z83NS5PvJcPZ6r3gWMfZ967vDi+nw7hHixioJP0ZDa5GtDlLa2/GRFocRJzjlD0pAOpOZQ+U4M84a86Njzn1NPWEElfBTU4rwTze7sny/RovsB1CUA1m0UY/xjxf1GgxZs2F4wq2QTSiH+sqb0oQM9N1y1tvGPVAcGYrBL4u9j2h6OnrJvrArmuS/rcKjM5O6IMukOlt6xwMvyx5GDNr+hHpSiOH/oga7WRmX3dNcPRR4P9OV22i155tQ0n/9ZFFrII+ZkYax0FJgSEJQnRTcJNK8RVEqqpNd53Kp2ELLdxDBdX94g1OZq6QSkHSJq5twhzQdWkpzAebh/hXYZPK8IHW2wFrcT1hzvkRztX/nWFk4vhbfoY9kJr3bJy3J6QHEvBckNkiKIjf8EFKgsz05+2l+FaMZIVD/kLZkYPcstPytfeadIqet/3njRO9TJVcyzDmJiFkkIZzPXhdzBbIpuZ0lOkkeLI/9z+XV1BajWLoKD2nsGYrr4BBwRJBF3EWpV875WG4ZIigPTbqHUetTbyzkz7iUsAEj+9u4eY1tlRREsa/GWOQ0RQTQveRUI/1rOnq2fyKfhsyM8vn7b5FTCk9VUynlVFJQMKQJNKnYTtl812/ue0AclTFmVTH7P1KT6une/6cieJZwfNfh7QVSOnfNPFKoIZZMojbXE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62ae42c4-fa05-4828-a87b-08dbcac309a5 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2023 01:32:04.0386 (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: B67h5SBsPGGNnTstVrCW0egX92+3S0pBsdsFglmCJjfuGIIrviuo6HtWAOW97dtKghVw8Vqk2zWwkifOg/RNjtN+YuvvkorFV3eIccB7OXDdBghIwJQgCKAuNhvGvfAl X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB8411 Message-ID-Hash: CDTN63QCUHLN7NMTEDNBESHQFL67TXAL X-Message-ID-Hash: CDTN63QCUHLN7NMTEDNBESHQFL67TXAL 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: Now ASoC is supporting CPU:Codec = N:M support. This patch enables it on Audio Graph Card2. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card2.c | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 5d856942bcae..bd65e7a19350 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -515,7 +515,10 @@ static int graph_parse_node(struct simple_util_priv *priv, int ret = 0; if (graph_lnk_is_multi(port)) { + struct device_node *ports = of_get_parent(port); int idx; + int num; + char *props = "ch-maps"; of_node_get(port); @@ -530,6 +533,32 @@ static int graph_parse_node(struct simple_util_priv *priv, if (ret < 0) break; } + + /* read "ch-maps" property if exist */ + num = of_property_count_elems_of_size(ports, props, sizeof(u32)); + if (num > 0) { + struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); + struct device *dev = simple_priv_to_dev(priv); + struct snd_soc_dai_link_ch_map *ch_maps = devm_kcalloc(dev, num, sizeof(*ch_maps), GFP_KERNEL); + int *temp = devm_kcalloc(dev, num, sizeof(int), GFP_KERNEL); + int i; + + if (!ch_maps || !temp) { + ret = -ENOMEM; + goto multi_end; + } + + ret = of_property_read_u32_array(ports, props, temp, num); + if (ret < 0) + goto multi_end; + + dai_link->ch_maps = ch_maps; + for (i = 0; i < num; i++) + dai_link->ch_maps[i].connected_node = temp[i]; +multi_end: + devm_kfree(dev, temp); + } + of_node_put(ports); } else { /* Single CPU / Codec */ ep = port_to_endpoint(port); From patchwork Thu Oct 12 01:32:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13418125 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 7EA20CDB46E for ; Thu, 12 Oct 2023 01:34:15 +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 90F89E94; Thu, 12 Oct 2023 03:33:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 90F89E94 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697074453; bh=Wx4jcGMtPMzzFRvK9ibgwQXr3O3yEnRG1ZtKxyYVDKA=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dGdvrWvK8p95uFFHKtmn1xPjblS6xnUrAg1njFOGPA7ZytMpY5MUgXD/sNMbQ6dFF XA10SNcbE/e14pwJKYI0PQm5Tep84Yqcsdt3HrIlVm8skR/Y0Vv5PF9vQOXFDu7Isq ogKD88Wt+8aznOzfYZ8npipcj7PduwogF5J4Z+Pk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 64282F8057E; Thu, 12 Oct 2023 03:32:28 +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 19004F8057E; Thu, 12 Oct 2023 03:32:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8CFE7F80588; Thu, 12 Oct 2023 03:32:24 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20700.outbound.protection.outlook.com [IPv6:2a01:111:f403:2019::700]) (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 92316F80557 for ; Thu, 12 Oct 2023 03:32:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 92316F80557 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=KhYfXX+9 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FnIlrwU0soSyKQ1Pvswz3g1cfpvVjhuvJbQZSKzyxGyBVAtZNNswAuZ+FXJxKSSEQCPMEOOQ83cwrlA1J6nK2c2KJiRgVWNM51OT1zaRmNIACxEj3F+4hkFYlZtEhQD0QsdwbwoX1g1zxXp63rESuafzQIBEseK+F6M3itjGeZoQb+wMsSgj2amcjV/tCEn009hN+NFht/aiAjjKVzc+gGawBmXazcYJ2FbLRLLvOBkCN0sT4P7nkfrZ/M4eE+PuU3A+TKEjBAFJjKdNBm8h2I4T3XleCZm6dYb/4KhoJA8np+cKpiU2fxwOFKgJCimwO4NJ6JAuBBMdLMTPZ+2cLQ== 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=tT512XT52jyir/q0l5HhNTVHyna6Pz+ZH9H/R2a2fIw=; b=Cmi7u+asgOLui/QSVYivMRUfUlN6IPYNzqE/NMVkdIipz4KzPzMXfrN3BMXZQeUBnYxUPE6ZgS7h1Qi4byJJYUIfBTK8iMqQze3ht995P4qrpwlendGj2tuzlMb5UYqvcS3Hzb0Rb0t6WW2jJl7HdiSVm8kKRoIwRoLEWtKkIQRSf8RgWJEOq4DuN3uXbQUBhTYuyjz00znx5sXSzhfKqM/FgqoXJowQLm9bNEVB6BWw9ctkV1I4a/Wxq2MK+f0J11LaKQi4QrUMqFqU8GQGmtFC6bFvee2RmzSzVeAiK9FpmGO2tyg9gOOglLFTfKvFjYnVmGKzeiwIj+rHrfoBVA== 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=tT512XT52jyir/q0l5HhNTVHyna6Pz+ZH9H/R2a2fIw=; b=KhYfXX+9Pc1/FS/c/gJBun8JyN7DeHtH3ffJd6ZSLuKMgsOAtfVhUPYRCs5ZejsMABvcdGFZXrkIH4FaaElEzZ0m+p+NOy02tggo1j9xf47r0nrscqxINiL7wi78LQ662Yg6LLb/PMwNNnpnnqhdOA3zXUb7vDZ/LXn94QBS/3U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYWPR01MB8411.jpnprd01.prod.outlook.com (2603:1096:400:176::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Thu, 12 Oct 2023 01:32:09 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::d2a3:45df:a180:595c]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::d2a3:45df:a180:595c%6]) with mapi id 15.20.6863.043; Thu, 12 Oct 2023 01:32:09 +0000 Message-ID: <8734ygy6av.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 3/4] ASoC: audio-graph-card2-custom-sample: add CPU/Codec = N:M sample 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org In-Reply-To: <877cnsy6bl.wl-kuninori.morimoto.gx@renesas.com> References: <877cnsy6bl.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 12 Oct 2023 01:32:08 +0000 X-ClientProxiedBy: TYCPR01CA0141.jpnprd01.prod.outlook.com (2603:1096:400:2b7::8) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB8411:EE_ X-MS-Office365-Filtering-Correlation-Id: 19cd0510-51f2-45f0-90fd-08dbcac30d23 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cdqlP3t9bslMB5q07z5pndSn/v3FVlxpdK3b7GZ6k63yJ0FjqK5LEk7RrXrnO5wsx1DyZYFy//3/g3QXBygmTtXs/hUeWjW6V/+FQi5kurA3WE1P/lkppSpzovCLAODBVWeM/VljsNSz8tMj9fJFXs0xBJyfpLm/0V/yySOWee6misgLpts1h0OdMSODx0pBbrTqG9rtwK/4u/9CyB8rRZtmO2+93wcVay6qPyW2icAdlZ+NnFxgIQ7X5m+lvRdd/P6SAH2o7WA6tNDbfVrFAOrLYBZjDeYHeQNiki8lf22rm+sGwmE0I2GPAdm1sh6sBVN+80sRlM7SKeGpLO0RkPBP0KYXU5heBqkhrdE3OzohXMvw4iIvZxggSeYJ9bkPDUpBAmxcNWUjanzurA4Ig0N91adN1d040FFc8F4ZntsrQL5VtF+4HUaLzVcd2LfG2NkqqyZSGGNjIK5LN+mL+dvzcvZtRJir7mNvOLCB5noRenVMq3yDUBHXahYKQx5v/Sqe4E0ubTV8EpL1vMEoz1fdKjSqNzNimVdh7gXWzeCpkqksqB9CPeaoN54x215QoN9cL0vpYPjO5OzGZEYMiK6qVeYTm05SN1xtFKwxG/QHoKen40RT8CEV9l01FBh4bu+n2Xe8EwYKNAYnbfIbSQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8426.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39860400002)(136003)(366004)(376002)(346002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(52116002)(8676002)(4326008)(6486002)(6506007)(6512007)(38100700002)(26005)(8936002)(110136005)(478600001)(66476007)(66946007)(66556008)(316002)(41300700001)(2616005)(83380400001)(5660300002)(2906002)(38350700002)(2013699003)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /wYOlVwi7p3C897EHPkKojUz1ilxEuMIAOLK/94CAZNkGE/t2McRCUQPNeePzioL6gV5zTzKiAjNykp/i66OIHzBgPby5y3CNfB7Sn8whsc4/UmhS33W2WG10PSHi3aaAcusMa5nBYcxnI5NRd9lzqfDzTsKFj9rd2C17bUmiLJ6D8d+9Btv4d0tHZWCpbr6tGsPVGZ4IgGI8N4PDFM7701KwKZBptdQjEYXmMGbtqSxpaSHbpOv6o6J9FWTxACluxmB2mdz5t/ayrUob7gdFAMbAeyG6KvT23Ow4jjxL1PW8J7bAam5D3W3GHIqllRxFbsvoTKmXnIRP+pRTdxJtis3WYr/xm8t44PzzSeHMKJQus0skEAr0efvQJ0R85eUO3Egoq/U27s9QpgHMh+NNcrrbfhedCptmYRkGAYCzfA3xzKs6NuhqCTRQAgqWX0VEJh04gLObVEOYZiAS/W74p/ytrBa2kz/UedxRimx1j6QkZqzfxCSSFClIWDpw9kcAiCqiRYjFl0WEu9JhbKffhWtltkfzx8nVge3/6XkHfe/zlGtSrwYRS66a1WzZszffmRMxWInDkz9y12lmIVJ7jsM9DX0IMYZVhS5a6+JaV8f7eImOHg87S/2lNzu8OgYmfOGDomgSdy6AFAC9gOcfqVtrrsv6xXeHGxQec9++2ap6Te2bpQjwBpc8Y/iJBnxCklZQ7inyv0iY3DiP7CV3dpZkuEag5Xhsq18Duats36kSV/rLSWKmlZahAnMdkkE7PC+dM7G5oq5Dyw1iXaRnSdosWLCCHJ9nk1XtSemZLV9lX/vrkfs1HO5MNqMMw4q578VaX/L/KhHhW42zbfOFWd4dNHoCd5OGDNHmn25nLrqTrbU2FHLfKIF880ox3DaK7n751169/eYeHsK/PDiVesBNVVlEG3iE9P10DSphxBrvUDM6H1dnGLLWAJCNMzBKGYA6DLj62XR9TMGoMsknSRMa94ZVxwTVTGymGfbr5n+mFWpeGPYoscoQwe51HEcMn2MU/tT3CFzx2cQQnVc+TJy976Ac9py1gV4M3e7zLYhxZYb/kxUfF6DKg9d8ai0LJV6vjGeKlHYZSvMhYba7RKgaCJqd1bD791hpZjlljBAiUJVvk6QGOA6NHXCIz7jKvq2Mxo3Zd6tsid4HZQMTF4qez4UF22Z6QAK081Low/fnOBC0hJs/EcPbM0S/TJShcaVryRAPd/DktUW1e7EngRzJ/V3fDYWMuuL55h3o55xExUMJnBJ2x5sXzpF2JoC5bw4sqIHeoGrm+XQo+rZf8y+kFFm8DexSTtqYX7nJpKZRKu/OQy73dQ73LGq5gx6wTIMCS5ztNveTpi/d7lQW7hxg540Kl+9H5k9VkDxjWN4vfaebFOaP8h4KQZOscSNy5fG6JMXRMY8HU5NQssnbu5KcemmQGlnTI92zuxI7gorBMv0XzK7z5L3C8gFmBfeoa9qDL68z800YGAhDAa48iLvFHIWLAXlXCjIlSF/55F0SH2J+mfizf2vo/hsTrghLbtez7dJTEaaTmdXYiZ1ZPCUnXeM26jYwUSL8bOY6vHYxiRiCkfXuYR4/tQa9d5Fcex0CcGyXaCWRVHh49rGOvrBcY8aM+HvqNRQPJf0i08= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19cd0510-51f2-45f0-90fd-08dbcac30d23 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2023 01:32:09.2053 (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: gOPLH31j9I1qULkVr9l5YKYFnWLHxRSbuUpw81u1NANFiOS9H/ucudc48KbUVbdKWMADXGXCwmU+kFD2mH+Q0QgPrk6ZeypVOLwhVjsWwLTANvtTwKZa+cQiNaAweIo/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB8411 Message-ID-Hash: NIOXUYJAQVMLNG5AG5PRGPGN3GYFIP3L X-Message-ID-Hash: NIOXUYJAQVMLNG5AG5PRGPGN3GYFIP3L 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: Now ASoC is supporting CPU/Codec = N:M connection. This patch adds its sample settings. But One note here is that it has many type of samples, it reached to maximum of sound minor number. Therefore, new sample is disabled so far. If you want to try it, you need to disable some other one instead. Signed-off-by: Kuninori Morimoto --- .../audio-graph-card2-custom-sample.dtsi | 138 +++++++++++++++--- 1 file changed, 121 insertions(+), 17 deletions(-) diff --git a/sound/soc/generic/audio-graph-card2-custom-sample.dtsi b/sound/soc/generic/audio-graph-card2-custom-sample.dtsi index 8acaa2ddb335..14d638de120a 100644 --- a/sound/soc/generic/audio-graph-card2-custom-sample.dtsi +++ b/sound/soc/generic/audio-graph-card2-custom-sample.dtsi @@ -58,12 +58,32 @@ / { * | |-> codec13 * +-+ * - * [Multi-CPU/Codec] + * [Multi-CPU/Codec-0] * +-+ +-+ * cpu1 <--| |<-@--------->| |-> codec1 * cpu2 <--| | | |-> codec2 * +-+ +-+ * + * [Multi-CPU/Codec-1] + * About ch-map (*), see + * soc-core.c :: [dai_link->ch_maps Image sample] + * + * +-+ +-+ + * cpu8 <--| |<-@--------->| |-> codec14 [0]codec14 <---> [0]cpu8 + * cpu9 <--| | | |-> codec15 [1]codec15 <-+-> [1]cpu9 + * +-+ | |-> codec16 [2]codec16 <-/ + * +-+ (*) ch-map = [0, 1, 1] + * + * [Multi-CPU/Codec-2] + * About ch-map (*), see + * soc-core.c :: [dai_link->ch_maps Image sample] + * + * +-+ +-+ + * cpu10 <-| |<-@--------->| |-> codec17 [1]cpu11 <---> [0]codec17 + * cpu11 <-| | | |-> codec18 [0]cpu10 <-+-> [1]codec18 + * cpu12 <-| | +-+ [2]cpu12 <-/ + * +-+ (*) ch-map = [1, 0, 1] + * * [DPCM] * * CPU3/CPU4 are converting rate to 44100 @@ -144,15 +164,38 @@ audio-graph-card2-custom-sample { */ &cpu0 - /* [Semi-Multi] */ + /* + * [Semi-Multi] + * cpu7/codec12/codec13 + */ &sm0 /* - * [Multi-CPU/Codec]: cpu side only + * [Multi-CPU/Codec-0]: cpu side only * cpu1/cpu2/codec1/codec2 */ &mcpu0 + /* + * [Multi-CPU/Codec-1]: cpu side only + * cpu8/cpu9/codec14/codec15/codec16 + * + * Because it will reach to the maximum of sound minor number, + * disable it so far. + * If you want to try it, please disable some other one instead. + */ + //&mcpu1 + + /* + * [Multi-CPU/Codec-2]: cpu side only + * cpu10/cpu11/cpu12/codec17/codec18 + * + * Because it will reach to the maximum of sound minor number, + * disable it so far. + * If you want to try it, please disable some other one instead. + */ + //&mcpu2 + /* * [DPCM]: both FE / BE * cpu3/cpu4/codec3 @@ -182,24 +225,24 @@ multi { #address-cells = <1>; #size-cells = <0>; + /* [Multi-CPU-0] */ ports@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; - /* [Multi-CPU] */ - mcpu0: port@0 { reg = <0>; mcpu0_ep: endpoint { remote-endpoint = <&mcodec0_ep>; }; }; - port@1 { reg = <1>; mcpu1_ep: endpoint { remote-endpoint = <&cpu1_ep>; }; }; - port@2 { reg = <2>; mcpu2_ep: endpoint { remote-endpoint = <&cpu2_ep>; }; }; + mcpu0: port@0 { reg = <0>; mcpu00_ep: endpoint { remote-endpoint = <&mcodec00_ep>; }; }; + port@1 { reg = <1>; mcpu01_ep: endpoint { remote-endpoint = <&cpu1_ep>; }; }; + port@2 { reg = <2>; mcpu02_ep: endpoint { remote-endpoint = <&cpu2_ep>; }; }; }; - /* [Multi-Codec] */ + /* [Multi-Codec-0] */ ports@1 { reg = <1>; #address-cells = <1>; #size-cells = <0>; - port@0 { reg = <0>; mcodec0_ep: endpoint { remote-endpoint = <&mcpu0_ep>; }; }; - port@1 { reg = <1>; mcodec1_ep: endpoint { remote-endpoint = <&codec1_ep>; }; }; - port@2 { reg = <2>; mcodec2_ep: endpoint { remote-endpoint = <&codec2_ep>; }; }; + port@0 { reg = <0>; mcodec00_ep: endpoint { remote-endpoint = <&mcpu00_ep>; }; }; + port@1 { reg = <1>; mcodec01_ep: endpoint { remote-endpoint = <&codec1_ep>; }; }; + port@2 { reg = <2>; mcodec02_ep: endpoint { remote-endpoint = <&codec2_ep>; }; }; }; /* [DPCM-Multi]::BE */ @@ -241,6 +284,50 @@ ports@5 { port@1 { reg = <1>; smcodec1_ep: endpoint { remote-endpoint = <&codec12_ep>; }; }; port@2 { reg = <2>; smcodec2_ep: endpoint { remote-endpoint = <&codec13_ep>; }; }; }; + + /* [Multi-CPU-1] */ + ports@6 { + reg = <6>; + #address-cells = <1>; + #size-cells = <0>; + mcpu1: port@0 { reg = <0>; mcpu10_ep: endpoint { remote-endpoint = <&mcodec10_ep>; }; }; + port@1 { reg = <1>; mcpu11_ep: endpoint { remote-endpoint = <&cpu8_ep>; }; }; + port@2 { reg = <2>; mcpu12_ep: endpoint { remote-endpoint = <&cpu9_ep>; }; }; + }; + + /* [Multi-Codec-1] */ + ports@7 { + reg = <7>; + ch-maps = <0 1 1>; /* see [Multi-CPU/Codec-1] */ + #address-cells = <1>; + #size-cells = <0>; + port@0 { reg = <0>; mcodec10_ep: endpoint { remote-endpoint = <&mcpu10_ep>; }; }; + port@1 { reg = <1>; mcodec11_ep: endpoint { remote-endpoint = <&codec14_ep>; }; }; + port@2 { reg = <2>; mcodec12_ep: endpoint { remote-endpoint = <&codec15_ep>; }; }; + port@3 { reg = <3>; mcodec13_ep: endpoint { remote-endpoint = <&codec16_ep>; }; }; + }; + + /* [Multi-CPU-2] */ + ports@8 { + reg = <8>; + ch-maps = <1 0 1>; /* see [Multi-CPU/Codec-2] */ + #address-cells = <1>; + #size-cells = <0>; + mcpu2: port@0 { reg = <0>; mcpu20_ep: endpoint { remote-endpoint = <&mcodec20_ep>; }; }; + port@1 { reg = <1>; mcpu21_ep: endpoint { remote-endpoint = <&cpu10_ep>; }; }; + port@2 { reg = <2>; mcpu22_ep: endpoint { remote-endpoint = <&cpu11_ep>; }; }; + port@3 { reg = <3>; mcpu23_ep: endpoint { remote-endpoint = <&cpu12_ep>; }; }; + }; + + /* [Multi-Codec-2] */ + ports@9 { + reg = <9>; + #address-cells = <1>; + #size-cells = <0>; + port@0 { reg = <0>; mcodec20_ep: endpoint { remote-endpoint = <&mcpu20_ep>; }; }; + port@1 { reg = <1>; mcodec21_ep: endpoint { remote-endpoint = <&codec17_ep>; }; }; + port@2 { reg = <2>; mcodec22_ep: endpoint { remote-endpoint = <&codec18_ep>; }; }; + }; }; dpcm { @@ -323,9 +410,9 @@ ports { /* [Normal] */ cpu0: port@0 { reg = <0>; cpu0_ep: endpoint { remote-endpoint = <&codec0_ep>; }; }; - /* [Multi-CPU] */ - port@1 { reg = <1>; cpu1_ep: endpoint { remote-endpoint = <&mcpu1_ep>; }; }; - port@2 { reg = <2>; cpu2_ep: endpoint { remote-endpoint = <&mcpu2_ep>; }; }; + /* [Multi-CPU-0] */ + port@1 { reg = <1>; cpu1_ep: endpoint { remote-endpoint = <&mcpu01_ep>; }; }; + port@2 { reg = <2>; cpu2_ep: endpoint { remote-endpoint = <&mcpu02_ep>; }; }; /* [DPCM]::FE */ port@3 { reg = <3>; cpu3_ep: endpoint { remote-endpoint = <&fe00_ep>; }; }; @@ -337,6 +424,15 @@ ports { /* [Semi-Multi] */ sm0: port@7 { reg = <7>; cpu7_ep: endpoint { remote-endpoint = <&smcodec0_ep>; }; }; + + /* [Multi-CPU-1] */ + port@8 { reg = <8>; cpu8_ep: endpoint { remote-endpoint = <&mcpu11_ep>; }; }; + port@9 { reg = <9>; cpu9_ep: endpoint { remote-endpoint = <&mcpu12_ep>; }; }; + + /* [Multi-CPU-2] */ + port@a { reg = <10>; cpu10_ep: endpoint { remote-endpoint = <&mcpu21_ep>; }; }; + port@b { reg = <11>; cpu11_ep: endpoint { remote-endpoint = <&mcpu22_ep>; }; }; + port@c { reg = <12>; cpu12_ep: endpoint { remote-endpoint = <&mcpu23_ep>; }; }; }; }; @@ -363,9 +459,9 @@ ports { /* [Normal] */ port@0 { reg = <0>; codec0_ep: endpoint { remote-endpoint = <&cpu0_ep>; }; }; - /* [Multi-Codec] */ - port@1 { reg = <1>; codec1_ep: endpoint { remote-endpoint = <&mcodec1_ep>; }; }; - port@2 { reg = <2>; codec2_ep: endpoint { remote-endpoint = <&mcodec2_ep>; }; }; + /* [Multi-Codec-0] */ + port@1 { reg = <1>; codec1_ep: endpoint { remote-endpoint = <&mcodec01_ep>; }; }; + port@2 { reg = <2>; codec2_ep: endpoint { remote-endpoint = <&mcodec02_ep>; }; }; /* [DPCM]::BE */ port@3 { @@ -395,6 +491,14 @@ port@3 { port@c { reg = <12>; codec12_ep: endpoint { remote-endpoint = <&smcodec1_ep>; }; }; port@d { reg = <13>; codec13_ep: endpoint { remote-endpoint = <&smcodec2_ep>; }; }; + /* [Multi-Codec-1] */ + port@e { reg = <14>; codec14_ep: endpoint { remote-endpoint = <&mcodec11_ep>; }; }; + port@f { reg = <15>; codec15_ep: endpoint { remote-endpoint = <&mcodec12_ep>; }; }; + port@10 { reg = <16>; codec16_ep: endpoint { remote-endpoint = <&mcodec13_ep>; }; }; + + /* [Multi-Codec-2] */ + port@11 { reg = <17>; codec17_ep: endpoint { remote-endpoint = <&mcodec21_ep>; }; }; + port@12 { reg = <18>; codec18_ep: endpoint { remote-endpoint = <&mcodec22_ep>; }; }; }; }; }; From patchwork Thu Oct 12 01:32:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13418126 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 EE08CCDB465 for ; Thu, 12 Oct 2023 01:34:44 +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 21E28E76; Thu, 12 Oct 2023 03:33:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 21E28E76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697074483; bh=+VkIsrzfIKv8RAI6Nberv5A/3rCQp/FtnZok0AtJJ1I=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=AbIPU6BqlCuXRBzS0eZRzhwmvWG7uev2dMoB2MzGXJjeBsggGcUt17hNXGis7w2ZD c2bckDGAhmO2/EaQhwJLLLQs8tXnXM4/pH5Xwaq2rI1mASjiKi0qbcV6ujDykQvC6b bAk1kPNm61mdmXwhdSYSFED+Hmjkp89GjG/HcvOA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8C322F805B0; Thu, 12 Oct 2023 03:32:30 +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 C4EAEF805AE; Thu, 12 Oct 2023 03:32:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6EE3FF8057E; Thu, 12 Oct 2023 03:32:25 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20731.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::731]) (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 6ACBCF80578 for ; Thu, 12 Oct 2023 03:32:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6ACBCF80578 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=ljczvZTj ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MUZfHMvxLlAOSCVXRorgYoGrUdsvXaNDxb6eSdw0qzhGCTXOXh1ci+37K+4LJ66WtoFBx8B6SHBjIWfdyrGTUReBHmbHUbR8cBId2ueHtK0H7O/kOf9nCtVhUzxdQ+NkiFKVCpbEwTmaYeTbtD4/m6gwood9xOqHu4/DVJLcbtPPZXytzv+igG4KVhvEoVvJgn/fONjDRP8ekOnb/0qkWEkK7Wn2v1ppJRa4svWXFfg6SIpJMstcln9mlQyWKTEu+yRsjbjcfduilSjFOWXAYkS3Q/MroIqWiV8rTO64CrnuGkCMQHAbErORY1kGw19jqPNhrKQItqo1ghVJL3+D2w== 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=csMaeuoFo+kq5LvrmzUAkOD0gnIOsr+PViKXv3V9bgw=; b=BWG2UMBP7nZ49joOiEGfVLfiHOu019bpdlsWd8GbNP52QdtSG1UwbQUV3Kp/7rDyN1Scmm/Wa7id1slMa7logt96LHIMOGzOwDg5zwuvwocO47mj2qi1FnKLsk//Jp6VshEsFe6unBgI28VV7o1Ii682xG3WSTYABBAj8Hzypou83Nau0L1+iWOZ3UYaD3qiafwmOFFIHj06aNy5mCLR0piKWsGR52kCe1kPS1ZGs24QV6nP4umhMBpCtRFIliHoXFj76diyzRBeOD7AdPIZf9sP5zvcuEtL3qvXmUoo4Gkw4xgdIs6XbJzgDTxQd45Pf3cVJEvOGAFkGweRNIGg9Q== 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=csMaeuoFo+kq5LvrmzUAkOD0gnIOsr+PViKXv3V9bgw=; b=ljczvZTjEyskrvmFyB0dCpNmSVGTqHdr2Ozx9csGIaC7DmF5Ygr4hvhVA0KwV72qGsizzCRWXNh7gYv8XZ/6fpgYPMJ3Hxyl+8as9R63KbG/g59YVBZdlFRxtMbLRYyaLYN5jJPcn8x1GiSCwGc3/NH20jWoUHbdS9FEc5T+WWo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by TYWPR01MB8411.jpnprd01.prod.outlook.com (2603:1096:400:176::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Thu, 12 Oct 2023 01:32:14 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::d2a3:45df:a180:595c]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::d2a3:45df:a180:595c%6]) with mapi id 15.20.6863.043; Thu, 12 Oct 2023 01:32:14 +0000 Message-ID: <871qe0y6aq.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 4/4] dt-bindings: audio-graph-port: add ch-maps property 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 Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org In-Reply-To: <877cnsy6bl.wl-kuninori.morimoto.gx@renesas.com> References: <877cnsy6bl.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 12 Oct 2023 01:32:13 +0000 X-ClientProxiedBy: TYCP286CA0135.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b6::19) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB8411:EE_ X-MS-Office365-Filtering-Correlation-Id: 743f41ad-7c50-491c-25a1-08dbcac31004 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U5d6tM6sCFYCS7NQZBVmN3g5oP21vN8HqMRgmjyNWM49bxH7hz2H0AMlcvuIhk2UO0WVZQtnj61Nj17eiDIqfLtsGHkzoqtQzK17eCW/rhA6VHkMs+ybbyi+/giQ2QxAH1BPaHEpAWcBUQ1SLOZ0ipVfyD0NzQerGRykSYaTtr1jGZd/F0e+K/fEHDndto59+eREbr70C1Ffnaz9J1/h2i4ZWqKHHVDX80qPgs3p3Tb1CJd31FAb5MVkzWxQg1tNOkWlO1lfbAGO0kJHcitiyGTPtgFQUuGRMsHvCVB8lySGbEHXUG807OMQQbPJKce7mWJHhuIOnFUYlHpTcUKrtFtsuW5vsgQEkprH6lE+MqUFnJtn4W9iziWcLiv0pC+aECP1Wsq34wDqRU6Bc2iKTecUzyUkfQ3kvHVGJ7YMDl7NL1eY0ikZy4n7iAtWfpQ5q0zywym85NxeBSN7IN0KNoOPScHNQoLBUnkFk+M3fYmvZVZlYn78cLdnVkWeYHfjReHQjXDyOQfcXkwutrUcGuZZkCSAu9rW5jEtD4Ucd3pJ91YcrvbycVssKF8FxOwxfT6Pigw+HGrVH3x2EGKw+axOU3YCifhtyjjTGhgCiAdwvUyuQN7wepwqYGFTQisV5e1ToTYbiDW91xOQmzZn8w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8426.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39860400002)(136003)(366004)(376002)(346002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(52116002)(8676002)(4326008)(6486002)(6506007)(6512007)(38100700002)(26005)(8936002)(110136005)(478600001)(66476007)(66946007)(66556008)(316002)(41300700001)(2616005)(5660300002)(2906002)(38350700002)(2013699003)(4744005)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: X79mJk+lnE/NqnRB5x78abIZqHmXZgPjdOrjFh61wZWb/ErdOMoiaw9oBvTEv/KyYSV3uBz1sSOxHqs7mhUIUFswZssUMbH+lKCd8e0Iau5Q2TOjmPiUyOuP8qM91sYjDL5p79RlvV4gyO19MKeDDpSgKQVFUEwddMC5hRotOdSjO15JpqvBtNlYHp9p35UK9/ljUf7fY+Ze4ezaScp3fRJVAfTenuV44DZJVDdvyoB4ezorzs7XR2x4DFTdkDbZrQWPLbQO/5TFNMt6pQciO2CMt+kOvjEIxwbBRslFf0094H9CCdrf7j7RC9G0gFNzJEhifO5jTSkdDNM1z+LD5hs6MDZbNab041ypmH4YX3z6mlo2S9BRquKrvJFA6l6pGs2dwfdQModvtAwf0wdjVB06hXW4PQ5N1YSyNaBcLm+3iR5fF2XnZn9VxoNbRuOk57DtlEzX3lSPZzwMy07VZw8l+ISPKEq+EYPNViW0fMrKcJjDQlHSnWcqw4bDRVkJSTDtOQRw7BE10X6h1XGFu5oibQOC2VqFodRqajtuDnf/3RFQsQeRhWnC7Wey2msLRQ9HSmoTOPu4pfHRwtobs97smZ60qfjXEPJHwog/anASX91Re0J00VmOKcMOanWecyXvqObhINL/D/VquuyJaOH1x6Xc+4pGS8qiXPBzOZjhb8T/ta9FbP0hUDX9Upmmo8cOUTrWMu1F5LWAYYDigS+pGNjiRU5Ty21uqDOiQ53eqXvkJ03uBfOmpBYAiAC4jIQJUNdZL9zYfhAHg3o5tNgTPuNXmhQWnAchWlkKssLUDSbBtn+k5CDdTp0Kukajczx8nxV7r7QT2i09vJfXX7IG4OmxrGBUftJf0Zq6r6lqaGJJ7qVRDKKj6bxPAQwZdk4zBSpWBX5k9PkAleasb9HPeL93h8cQukc9aJ1K1lbOyEVbNyVgJQfqJGFZF4TpmFHnUYmTb1eBXJocMk/HoaztN80fOd4V/Xgo90aEiQG316QdLDGRisTMU8RIzUT+jK7DZ+M1W5Z4/EYKXfEQoCgqos74dZxPnBSZec5p2LHVACg4QLXBEq1lrXg0ji1HflBnhxD9A2oIqupIg3ohxAbf1H+s8zfH/0XkzeRNz7j8fyTUbRCVHbTqGnvT88Lo7ecqacoyvqTVaPhqd+0DMw+6NuQedoLrGCCCxldjqLP1P+xz73SOLSvTRV7tu1tPQ+b2YG6XcFYixzRJVUIFP1nPJc8Fa+D8FqDftA2BD7cPypcUiLEM5yIkq90OU0QIaXSLrlRVlyxUHYsoFKm3gQdo0dh6237mXy19MiulXwtf7/DDJOY0di5l1ISAKDZY+yik4WgMNnuJx9+Zy9yLUEAsadbf8sbqGNPPbHU2IsC8S7KW2P/7b7/v9tEzjZ64AZHCSnWwE8mpBbqAgRGGzvCcprlyTEueNQ3/cEIE4V02kZDj/xB8Mp6bLXZSIUhN/KXCLX1Fwc1+jQ/cLA3ahMpFoGcrZfFwFw2jdEFCho6+GYEibKce3rpwWDKXDyYvCTTL07EfWxDkIRsyvIFLxig47YVBMGHRkzDA7KF1L0dier4vI8BPXTw7W+1xjG4Ki+9Fzpev6LEmegMQVE85Xiej05qeSDjKob0Ra0/qfik= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 743f41ad-7c50-491c-25a1-08dbcac31004 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2023 01:32:14.5064 (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: VtrKp4r5yuDfcgTbQsUKm3EFO8AVeUd7YfVwryuFLjzxpil0+8JZhMfIecs/v4s8z19hY9I50WSca8VufsfMsLPpdu/b3f2MUyhDxyBz+HB2X194tczTA+J0WYovmSb3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB8411 Message-ID-Hash: MAW6J23FNH6UBTB6UZBUDUT7G3YG7UOJ X-Message-ID-Hash: MAW6J23FNH6UBTB6UZBUDUT7G3YG7UOJ 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: This patch adds ch-maps property to enable handling CPU:Codec = N:M connection. Signed-off-by: Kuninori Morimoto --- Documentation/devicetree/bindings/sound/audio-graph-port.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml index 60b5e3fd1115..3c4b331e8498 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml @@ -19,6 +19,8 @@ definitions: properties: mclk-fs: $ref: simple-card.yaml#/definitions/mclk-fs + ch-maps: + $ref: /schemas/types.yaml#/definitions/uint32-array endpoint-base: allOf: