From patchwork Tue Oct 10 01:21:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13414726 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 81812CD68E2 for ; Tue, 10 Oct 2023 01:23:06 +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 2D684FF3; Tue, 10 Oct 2023 03:22:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2D684FF3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696900984; bh=L5Jmjh9ai6L1JtXf0jW8HC+6Zrhjv1W3vIt4KhkgJqs=; 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=Cs7jraClwKHvxcWqIedDu8Cwajk8jbKb/bBi+ew8/YN1IVimVudyWRL2RXa/KOxk2 QPw7lVeGhuKkZW5gFttUPZsHuzEkgmlMIenBu0dPjg+wrILpK2hYP3IV/dxY5Mz+PV ewYQXqYwAHxIIMW83zfeKmsmpU/E6bkzbpy3RyME= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9C801F8057C; Tue, 10 Oct 2023 03:21: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 A627FF80570; Tue, 10 Oct 2023 03:21:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D84CEF80570; Tue, 10 Oct 2023 03:21:31 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20711.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::711]) (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 B6434F8055A for ; Tue, 10 Oct 2023 03:21:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B6434F8055A 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=f0fBBucj ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f5VSdQ6NYjd4rS4MccYYxTqYGrpnOqql+wBkPg6g8L+CSi0OzqtjfeaisVmBW9UeyyORUwsM4SGYLHAYqt0pYyrdV/rj3gJ62qMYgnJMdIWUp62UXre5DwvTukL92lfY9th3SD3TcWFhcR9VHKdmLm04fNwMtTYAekETW+cdhirmq+EGuIbB1wHLuvkybOalZhQi1V/EdqtfyOK08OKbPSVaLDRBmYTY/AVIGoR1GAzi4HaNxjepywYh4K9I6uQaQ+T5eU/FvfbHprujfLpZ1T7WaItQxLL7+QQpc4ZEQvxMIhkiWnpyQwRk12AV49DeS7yujpFEA5AyrHQRCbyWYQ== 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=mvi/Xqlub49eq/S1qDEly4Ntmkr5dYeWqCEMTmNYWXI=; b=COHZTbCTf8V5Kd3W+4xBi8GWbNNZmI2HpPLKemR7Pig2q56fbI8RRhbuSgTgp8W1hmNfXC1yECUMWFqIm4H+LSzy7nVSbJlvapq3lteVDA8GLm6Dlj7T1thQYI5UsEVnSnlyPWjhaiYqpfIl920WeAKW8cVGSeTGs9UMcfkMC7btH7QslcltPb3Z/zgO9c6youRSr/VJw8GsH1MpscyEUMCk9YCUCsnQL5a7tFl79N9eRCTniHTnHUexarr72MN41fMQbKcFtmbU3NjI0nt5IPE1uK7G2xs412A62JgtksmfZRr3Oa8P3yWW16HnIJfqh67dKPfAjWH6nbDN2gB3yA== 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=mvi/Xqlub49eq/S1qDEly4Ntmkr5dYeWqCEMTmNYWXI=; b=f0fBBucjaFQuqdkNi2puUH3bbLKLCozWUAUbtxSQpzF1G1psrF5XfQStFmlmaRGFT3BM6en+v9rsqpkGyKgNyEJ7SvFW1TJsxxFhHchk1E2xtrj3j9rTQhIEt96s1lO/9+AJdpS3pMFgQiVEdb2L+OS12fw8uLq3Jy9sYEKOm1A= 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 TYWPR01MB9647.jpnprd01.prod.outlook.com (2603:1096:400:1a2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Tue, 10 Oct 2023 01:21:17 +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.032; Tue, 10 Oct 2023 01:21:17 +0000 Message-ID: <87a5sr8e7n.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/4] ASoC: makes CPU/Codec channel connection map more generic User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: Mark Brown , Bard Liao , Pierre-Louis Bossart , bard.liao@intel.com Cc: Linux-ALSA In-Reply-To: <87bkd78e88.wl-kuninori.morimoto.gx@renesas.com> References: <87bkd78e88.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 10 Oct 2023 01:21:17 +0000 X-ClientProxiedBy: TYCP286CA0245.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:456::13) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB9647:EE_ X-MS-Office365-Filtering-Correlation-Id: 50e017db-c956-4015-486a-08dbc92f33dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DjqFoITDS4rW9Myn4EfBUw85tADTmQIDnDbOl/6kfvIe5u6kfRZMfDqCJURbOiK/WkeksfEovQ2HpsrLuliLn8gS5n8eQqSyGrXpaVAjs9R3tWkI1FDluY6bgtTbqEQsxbSHzBiTFMqrufz3nPbS57uzE8Ktdu1ifdMPBPY4fS/zPZddOyyiHHRfqWaTc31PLHq2Kj8nIaTHNUI4vHV6XN7nsM8MOnxIUsTcs3EmCzxFaNg2Wku2hiCk6fxurGMLxAjrUOxwaLjBej2OS2fXpkT4+SerUW6339rcWnhCQEYsv7pkp8wqS+wUnQgZAwky8RnIjZs2HAKfEQ2c8Bw79DHe4c7AdCfaS7vOTudY2/T7XscRQgUy8/hVJpKnTpPMYXjbQ2iTG6qYGwIX2g6fe+nDmy99NUafeH5n2qasvGJXJwf+p8VElxXTYH94qVMuOXdIWv5GLOa+7rELDpYNa4Kf2zqc8Ey9Y9sUWNFWfpYj2E7trwsFZVdPoyNC3jUWR8RyJrWZ5KPaoHkRS6YwVy+WPx00LEjy1a8L5XwTx01wLuJx3hegmk6Bx0Xtnlj6gnxEo9vYUofxNJkO0w3LniK5YO8a0T0eMhof2MhLqlnx3qSRkWnwBIPrHR27hvIB 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)(366004)(396003)(136003)(376002)(346002)(39860400002)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(38100700002)(38350700002)(36756003)(6512007)(26005)(2616005)(5660300002)(8936002)(8676002)(4326008)(41300700001)(316002)(110136005)(66946007)(66476007)(66556008)(6486002)(52116002)(6506007)(966005)(2906002)(478600001)(30864003)(86362001)(83380400001)(41533002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: u57ZDkevhKql1PocW/zvF5C9puXq+8yKMMMxV46K+h4k2dNNAQc3uS+yUUxixdal77621VBG2/kNpIRcMPPPCp+MAXj5b/zlU0IDQocLNqmyaWIKyNnj07wXZ8CQrhGvCTP3+PqYUhJbzDcf4sSFim5i2q1KJyCXPB0KfsyF/A8dOGl04ctqVady8iRE+7a6EeUDQyfTi8a27O6us3FTZtD5HXqiirPdaMVyebEF6uul4TrfnYlqSOGudAu5udpTepiF+PpXMrlBpneOruV3V4Sk5SDrER9LtiYAjFP4r8ynSCQX5XW7wFXjVjiK/Exk2rVa0NoCa0ShM5TXaAf4wboJjha7jgnWHHL00yAa2u0VGNSX2nGu7/3LbZlX3ZohJ/394ldo4pdEGHMRvQ5v7NhEAgtHVyIsnBAXhFgE8/fUMW39BCDDv2aXkU3AbPBNJ4WWVaZfg6/eIgoD3bxSoeVu3TZKskvgTxASAWO57qpIWAv3PCjxfbyXDNOv7Lq3TfGLzqgNZNSn42jsoQBXE8gaZcfAZFuT0Qi+F1GKOUUwf5z4WE0yTMcPmU9i7TFSg7DVLyfwxS0Amv0RYQF5bPHE4ahHglzP3z0wFYMdgW4yq/h1qhINOxZx6wsua4+gZAaf6Nduw87IQD44+IdU2DLUYfntBSyYODg4IbP1gJ1eU9+LWA9DFFWcG1/muYy5LW6Vq5d/gare2e/CrawJNiNcOGcBgIUfvQklRRgO6+pp8GR0Y7ZcUR8wJI+rRi6x/qSuq+D+zNMVtSdKxg1ULLdhGr93O76TMW95gnwvBG6DmuHjT93NqMYXsEuOc7sNm6lON9b+PQcizMb/RPnODAfgGnuKc9KnynEncxLB9PYZZWU5GV01LXht/ZpJz5Zv/UC7S33vAEjV7c+Yne7JSxfV4qN+Z/guB/sxQERJCOsjCNy9RjoEs0/9uWQYF5rIPbnesRbe/ggPgC1nMGvH6+U50/CxpQlkQP6khs08XVQnTu+MaNGgpzWgrqxfIcJcuZyrMVzeCH4ihQDRrRHnivEyPB6rIahS22mmmvFDAsYZp+QWHKsq12iNuLrxXBHRjXiwpmnuonhdhCJK0agBrvsWN2k8lhsBXRcCZpC6KbL23WMsizJxtaR4feRIkP0LAWpWPx14UulPtxb2dp2Otdhvb24uIMy7ECnY25Q6/HxxTLGjqr/omUlTB2GLB/JZvKcdlh7M+ezFYt5qVEgH55+B1YXFsy++oi6/7vwsZRoBiEF8knl7OqNy53dB13aAStAGwMNQd1ppVzGTsIXPxj8ktHJu19v4HRUmSns3UK+10RYH1jaQ3aOb/c6OejR4jJt5E6QZjZkam0t35E2cC7U7/LiRhDnzRsxMVDrzyzQ6vSlQORNbZn9ObyaDFNLOXWdswhmrY1ItYL0glvWd50QANEpN+awgYsFN3YjclgylziWtozYJqGf03mq9+3XECbIcxeSnVk7WgWABpDoBV3xY6iY+xLTzDwIR/xl9RSXTOhHjyOKNc6IDPUkWxz71fWgbsXWtmijl89OqvWXc+bNrNkkyL77iZSqBFS5XkVFa6UlD0hm4dwsFrjsfzO1GxvnjPXreNvre9URu/fMtZkDyWnqn37eYIzG6OcJIVWQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50e017db-c956-4015-486a-08dbc92f33dc X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 01:21:17.5966 (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: QCBc46Y0mn9vTz+8tl6U8x1YU0puCzaaKmMwarO1YTlUGQEJoAC5XRoq+Cn9VT+yGW3NIQa06xz1lBsfzl6rqxoPtgAKaDnpdrPPbXSMVHNsgfRHRug+CryItPjLEuNw X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB9647 Message-ID-Hash: 6J7VP7M373TPXNRSPBOUY36XZX3TLQPX X-Message-ID-Hash: 6J7VP7M373TPXNRSPBOUY36XZX3TLQPX 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 | 48 ++++++++++++++++-- sound/soc/intel/boards/sof_sdw.c | 14 +++--- sound/soc/soc-core.c | 83 ++++++++++++++++++++++++++++++++ sound/soc/soc-dapm.c | 47 +++++++----------- sound/soc/soc-pcm.c | 73 +++++++++++++++------------- 5 files changed, 191 insertions(+), 74 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 63b57f58cc569..13f1158df2b1e 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -655,8 +655,50 @@ 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] + * + * CPU0 <---> Codec0 + * + * .ch_maps is from CPU + * + * .num_cpus = 1; + * .num_codecs = 1; + * .connected_node = [0]; + * + * CPU0 <---> Codec_x + * CPU1 <---> Codec_y + * CPU2 <---> Codec_z + * + * .ch_maps is from CPU + * + * .num_cpus = 3; + * .num_codecs = 3; + * .connected_node = [x, y, z]; + * + * CPU0 <---> Codec_x + * CPU1 <-+-> Codec_y + * CPU2 <-/ + * + * .ch_maps is from CPU + * + * .num_cpus = 3; + * .num_codecs = 2; + * .connected_node = [x, y, y]; + * + * + * CPU_x <---> Codec0 + * CPU_y <-+-> Codec1 + * \-> Codec2 + * + * .ch_maps is from Codec + * + * .num_cpus = 2; + * .num_codecs = 3; + * .connected_node = [x, y, y]; + */ +struct snd_soc_dai_link_ch_map { + unsigned int connected_node; unsigned int ch_mask; }; @@ -688,7 +730,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 226a74a4c340f..7927b729866d9 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 c305e94762c39..a4bb4c29331cf 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1824,6 +1824,84 @@ 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_connction_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_connction_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_connction_maps"); + return -EINVAL; + } + + /* Compensate missing map for ... */ + if (dai_link->num_cpus == dai_link->num_codecs) + dai_link->ch_maps = default_connction_map1; /* for 1:1 or N:N */ + else + dai_link->ch_maps = default_connction_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, "strange connected_node (%d) was added to ch_maps", + dai_link->ch_maps[j].connected_node); + return -EINVAL; + } + } + + return 0; +} + static void soc_check_tplg_fes(struct snd_soc_card *card) { struct snd_soc_component *component; @@ -2030,6 +2108,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 2512aadf95f71..3c7c2b16bd64a 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 8c168dc553f65..0bfff2ea111d7 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 Tue Oct 10 01:21:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13414727 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 E1213CD68E2 for ; Tue, 10 Oct 2023 01:23:11 +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 42AA0F95; Tue, 10 Oct 2023 03:22:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 42AA0F95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696900990; bh=gB2sxht7GFiyArR+Haa+7ZtVwPWrgKvb185hxJsqEHM=; 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=CBeUYNLBRjx+zOeFyiDaDM1YBZ8SOA0tv3jicyNB/J0Kvvq56S4w2OqlO0tbFTf1M 1Rkde/et4YsLSTm2MFdOlfOYqGBukcZYqYT3anu/N80B3I6jF1RVO0CRqLR7iMYb9J UPcgGOvrMx2bhBIj0CH0UryGD/wSKqIhRxK74vWc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9D923F80587; Tue, 10 Oct 2023 03:21:38 +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 186E5F8057F; Tue, 10 Oct 2023 03:21:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EF0CCF80570; Tue, 10 Oct 2023 03:21:33 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20731.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::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 5168CF8055B for ; Tue, 10 Oct 2023 03:21:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5168CF8055B 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=TnJefnOD ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EWgju6DrWHGFEfIjdFkTKnVTPEecdgxNSX48EW+ioU70mXm5zun/7b46LDLMSme2hgOX4QYS35fPZJDZDxb70KXdGeok+lF5qcUHEXl408nkQUY2jNNg44s9zjh5xxVTlsUZZ4tETH9adreZ1cxdkPmvlKPvjnH8srBg5oGAwgmu08XEUuam6A7qAsflKOKscNUBJWWceXLXWOkMeOyT58CI6izQbSvzvS77jUtqe1yRfZRCgTU/xPCKC3HmGRZOmopWDVapu18KSk6cbwta+tYRIoSTSWawWVQK92CNot+9IyeQ3cSRN/OgXt9uIp3EV4+9CIXKKESduiJiNofPZA== 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=7mPuFQFWJPX8WqU/et0h2ns/g7L9Oc7DfhOqQWkZV68=; b=iA/vmlgn3hTLaVwzRdvqmph5T2tlb45kCPoRPsk913O2xOlXmAHXLTEgvRzO4lRkl8Hc8rQnuky8uuQwyiMYhFALNajiv0gUMHAHFJQswyX2jeg8KKPvqZIMNEXqdE5L3Qx2Z20tYgx1GPYWa44dLEkB0r19VVvV9pXCb7mn7XDufIHbSABM23V5ZMvYkF599m5ZTOGFoVzhzP9FkdlF6QK0dU8wsK32W1LE6LhlKwfKu8pK3IE0AXFrGy+jXA0MAHr4qFNhyBFoXfuVSBcataRa6Y8zT6tXIDkoo7QMJ3d6Xg2o9Zb1TeWxaundGx+J50zIaV+SVLFRr2m0cuuUlg== 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=7mPuFQFWJPX8WqU/et0h2ns/g7L9Oc7DfhOqQWkZV68=; b=TnJefnOD6b16zOJCO9LMwzCWpZCE2be+QZ4NAvTjbH9s/6OvmqEPnvXTfkzx4PXEmv59JMZey94EXaaugrstVcU+NriWkBgV0ZLppAHFyNIlFUPCr3T2UcKzYD7bRR+UhXVafUVrryy4i4CHhbHZJ9U7kBj4gQ8xWdXEtPclFjA= 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 TYWPR01MB9647.jpnprd01.prod.outlook.com (2603:1096:400:1a2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Tue, 10 Oct 2023 01:21:23 +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.032; Tue, 10 Oct 2023 01:21:23 +0000 Message-ID: <878r8b8e7h.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 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: Mark Brown , Bard Liao , Pierre-Louis Bossart , bard.liao@intel.com Cc: Linux-ALSA In-Reply-To: <87bkd78e88.wl-kuninori.morimoto.gx@renesas.com> References: <87bkd78e88.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 10 Oct 2023 01:21:23 +0000 X-ClientProxiedBy: TYBP286CA0019.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:ce::31) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB9647:EE_ X-MS-Office365-Filtering-Correlation-Id: c9fe9ae5-6cb4-4b87-7e44-08dbc92f3768 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5CVfmlBa0HXb5Q/p+Uo8Lby6SV+tVgc+sDqj0qKhR/V975UjTcrc0/izBYFgKr6tgFz2I1S67MtOJISHg7nVgC45dgM/ceMo0eCOOgKo/1JFcvWqNcS03c1h8WXB/C8yBTcksrQrbmlsFOX0x9hoxibmP5yoouhor05XwUvm8uA0XM9nWbxApsyRbAslrGj814MHjpd1biXCCJDwWHalfRiIS6niXU0OheOPeYTY1qy5ezcq+SZzior5BSIs8I9mehK5v4prBmx0MQGKG7vxbEXeL1jQvy8GUIckaAvI9rPQrkadHxJccvDYJXeXtLWAeWz1N4cAUYk3cu2L+ItYVEzIo7mh8BpSo3x4npmaKshRU+xFr13RblSCsI7qmVNR4JAqqm7bcpDgneDJZ/aW+TzjD8WYEUdYhMN9Gx5Qd4A4L1c3cvbUCou3L1zL5CevFTLZUQyDoTOZsl+EvRcTQ1G2j6ONy9KtuTy1JPIv6wOI8vXVJUpnrtz0Ss/0ascCXBI/PPgPlObLvphF9VCaXDiUHdHdByLZzb3Y6fuhB2jkysDzesj1rmJws25fZa7kCvPpKXR4CL0YpI4srF1NSTYQoWBh/UO8P9/Tzb3TQCGkc/+xrFcfIVDiaa3APsPRmoTpzLw/LvTKWx66tGgEQg== 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)(366004)(396003)(136003)(376002)(346002)(39860400002)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(38100700002)(38350700002)(36756003)(6512007)(26005)(2616005)(2013699003)(5660300002)(8936002)(8676002)(4326008)(41300700001)(316002)(110136005)(66946007)(66476007)(66556008)(6486002)(52116002)(6506007)(2906002)(478600001)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WUHDpJza5nHJjVWoBWzywGAPKlpYm509p+QjgvTVJlEijET2srX2xvO2ts9lUXn3b58A8T3i76wi+uD1gPNQL8buW5AzwFtB2OZSYvpfMdHh52XRm2DltlR6PUSizEZdFSytOqQPE6JYy7Hm8Zgtv4Cp7UOqj2rmzRTy2rSdX5kP48jO7EeY/CpSyZSqQA981r8IyIVEVObHp26YPAhzUIA/VIwRv0+5rjf1oNNACpJmoMw6VOeQ+DRa454blqHE414En/QtALkiD1AKFXuaPgkzRBTf5pOrvCMeTKIhfPBGtw8dZXnnaj6iM9wncz9KFxsmnUwJi69pJADZtAVVNRZnLRv9Kxu9SoerR1W3uSEbDVmgGZq/h77MCf1iFQAyLcZyTMQemz7bXu2HYrPjAAqviGhj6hqVfuCbYogHduBbpd2w9wP8eQxS+uIMpTcLsKJe2K+8LtLexNqriLF7uo/6y6CgRX9Eq1ispNNlg8IPZxPSkv12fkZ0nw599BciXzNMEBe5tPMOHv+gTMlgDR+a/fDyY37XR3MIYnEkTqqlOycSfrAvJ+eRNCLdmpRptb8Fawsy0E0ORZicbMOGIcN/LihHWpBLpIHbTCOt/eEXCAIjc19MBLLJjTiBE2rG0okt+Gits12x8fLgKe+ZHq540Vu/a2FCWqiIE6Q66JGmYy9B/7Pu2c0L70OeJsMF5ggrmuQo4eUGolA4K1BHmdmTPeEJWqmK2in1IiznrtF9EaKRoUpiutLaEfdDMM1CM7wTQB0eWqVG7VuutKrupYIYzkfNTIvjLHo0Dg7epflcgh+6Wh78fKYcxMl4g06W8S8JPbr2GGmkE6ajxD+Yo+vrBAti7J8WmyQAqNS6R569kQ0t57Nhwf72/QRY/Iu5btoUOSruBGPaqgZ6nNlhTLtFPyE/ERFo9lUx8v123vMF2IC0IDrxWlDqKmZyfQWTdL2BGjkWt99eE4Yy00Pa1hlY4Ou132w5SDYCGpW2+IxWAg/+T80qgCGZGLRy8DlwPQwsJ0sYNeRtcEKsRl+EzM7wO4LHH0EHbgPM+1oLflsKGH4DKQCZrAyFza7NR9koLRcvzdxBCSblMbC7L/jTHMI2YrDgD+wrHPJZnONySdNqLreNyLyf2g/y0IrTykP9y830xMr2wgWg7AP/9aNWeaDzBZRUqnJAfQihQXVf7PzOA4gGxW6ZqVerd0owXFosOuqeNb3zmfqiZu95IGG/bT8mSQ9Lj22CQ/C84B74k8YKigf3alfsm5euEweoqc0r8R/OiLyMYysCVTmwu8n6varRvL/heFpLVTm6rK1L6X/C+HB0+QpSyW3bWE5xh8GSK1SoWjxFfK3rVji2NoGvaDu4fCoAJ/BwuBFvb48a1wJGRq+BNcYlUB1ck+qLIKwg/Nxe/iYqYKZzspo+A6nWNx22OVbF+DAV9QwwFK5Q9KdSTvWlxPWqBDwJgH0t1x8Qmk8b8JmoI9QrGDGxFBh96SaNAoT4e61bBUUpEo1ZuH2I8Kgn8rnpJNwqrps52s6jLPpu/g5iyiQKEtrGjvx+B5/IJo7G2yLxSDRoeig+rKTZVcXznOU7Yg6GsxKhqcpRXtfnJ5GDZmvIIzutp0SJQzHUCKBZrMb3ZGMnBtrquKo= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9fe9ae5-6cb4-4b87-7e44-08dbc92f3768 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 01:21:23.5640 (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: R48VfDVMVRwDo30REK1bQnqJdk2DK4lJg804IgoG38hx0toOjv5yN/j8t2n3J1PBZWw/1YuGVmIRJY1Zak/0DoDMq2wROzy/+2sbgCAwyhmk/e+nt5+6cT7sFG2HMLEi X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB9647 Message-ID-Hash: P5LSGDBZVNEHQOM4NKEOYXUV7VIWFW33 X-Message-ID-Hash: P5LSGDBZVNEHQOM4NKEOYXUV7VIWFW33 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 5d856942bcaee..009fef88d443a 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 nm_ch_maps 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 Tue Oct 10 01:21:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13414728 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 22041CD68E2 for ; Tue, 10 Oct 2023 01:23:26 +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 38E22F0D; Tue, 10 Oct 2023 03:22:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 38E22F0D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696901005; bh=gv/ZkkxUQpVmHCKv2osK0oT17mWvRQQVi0vF7/ikPyQ=; 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=iiqqeZWdQOeBiBZtZ4Hiaj4FAvkaUF3KILZLYP/HuJVCLwHGwYbbjVJyEjFy3kpNe CW05YujfwA+4DCC23WgTBBPq2e/9A6a6sch7gR3NMUhfigA0i6/6BqpaER2pWU9sBy bvtc9Hn/w/1D6UQ8Zq5W4rYpe9OuPz3BFJcH0iBI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 088E1F805A1; Tue, 10 Oct 2023 03:21:45 +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 DEA68F805AB; Tue, 10 Oct 2023 03:21:44 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 98253F805AD; Tue, 10 Oct 2023 03:21:41 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2072c.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::72c]) (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 B2DE0F80567 for ; Tue, 10 Oct 2023 03:21:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B2DE0F80567 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=p+T21sRC ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YDtHMfKajhTn7A2OwiWwLq79eLteCKz01V05weF+IoFt7JeZG7Lq8aPa6jAIDEN3bTqfitYD0tYupvHgHY/OYVSQl9sJfKGEJUnVY+c02kmnMw9eFZU9EGpaGZSu9gHZ/pWNvIDa/EJ3NjXCW5XwEsyIK8ZQm81y0jLomSrp22V1+n1e/qEFH+WTq7yKDVc4SHqL6S8LcKCulotBHYc0afHOxtpL0mLY262e0oScLhF0d2C3nvfjvt8VODGLvZcHyX+yxdMdIt5+Ef+NWzM8qvGHT4xyqzM6xp0YprpzkaoPweCnz4BZAUDJcU9JdoDQCcLyk+ImtyA38BXSSR0lew== 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=GLE19BC2ivYYfKqdPF5ibDvTydaPn4w8bmdnri+9FsE=; b=Q/xiGWbMhHLjjFXbMwZ/YVQ0axeDZD3CvV7w7ktxMP7sUQWwUmRJjbX3PO4QICSKV4z/ZMa80sqbijHpM1BXO4Eh3ob4d+XEtUuoeh050DLWh49jDS2KWf71FRWWTRLrNbOtyqW4UStYoXHTzqi5tv1iI2GgP6k+VQbXiJ02oTUNXlLD+kxEgr98h6gH5xYllWuZBrvO/1txgZ+VxnK/0OMRJn/UonAXrnQvesjtqEuaVf1JKxhyMZLyi12TUBJkoHThyzwjhPEl2B+lY3cSY+Laz/kX+2PINBjJW99si+QBIQqwJgtlqM4eEOZ5EzEwOXRTNRwLJR1VOgNvZlJAPA== 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=GLE19BC2ivYYfKqdPF5ibDvTydaPn4w8bmdnri+9FsE=; b=p+T21sRCdlbAD5H3vfYxwldyRRABNNKxMPmW38cReUBaGmIqacnLRtTX+hc5lP/TEXyAWla8wLhK6psPH3/GCtpOGXVwtTMDz25JpCxzFDlAo2Ifm0l8VvzZ5N9oRdcG22ufKfkzYATGBQOVp/Zczg8WGzeZef1EtKz8/z6qDNw= 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 OS3PR01MB9930.jpnprd01.prod.outlook.com (2603:1096:604:1ee::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Tue, 10 Oct 2023 01:21:29 +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.032; Tue, 10 Oct 2023 01:21:29 +0000 Message-ID: <877cnv8e7b.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 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: Mark Brown , Bard Liao , Pierre-Louis Bossart , bard.liao@intel.com Cc: Linux-ALSA In-Reply-To: <87bkd78e88.wl-kuninori.morimoto.gx@renesas.com> References: <87bkd78e88.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 10 Oct 2023 01:21:28 +0000 X-ClientProxiedBy: TYCP286CA0168.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c6::18) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|OS3PR01MB9930:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a4af4bf-6067-4463-f552-08dbc92f3ab1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dqLqORIvJ6xoqSlX45f30bQ9yr5SOkiUedOp/cK6URlpgyesR9aozo1aGTXg8M8LukHbgY/xDeIgf/mP7T9guVIV7n/FyIg9p8nBiyDkht5OtaemvXuRfRl2i3amcwfu22gJX+JVxES4ycJu/Fv2BtPJ1rAS/+33gitxalKUQ7OqQP54D5r/GBH40HKlJQxR1lfDnXMAyEc5bqlabdIpfTqxdOWKqwdKoQwtl/hG6JxrjAKNxibMtJf6pPekvL7IUzjOi9onJd3hncfJODqoS9SIHUKf1p8o6BLH0pBjYlmajy8FvvhPtbDajhga2f1DWCXoLYMwvS686IY6w4MtsJw5F7cJbLJQM/oFxkdRAkShJNQJ6aoq/MVFG99kLJfnTjKBogGW7JCTKqWTH2rvvxYt1orIYpQPHE2RqVnmefV1vXgJiSsGOzOHBXjSPNowOGAMfjri8euH3NLJvlFe8Cy+FO2FgqIWgDRh7mfSAO9BinzC04YnBGpOR8C1s/1OUNLDmB0TYqnyI6EAdoNQucZMbFdOyhmve5Ck0ZaxokoFAczSrb1eUVET2qKJDLQUs02yklmAYCQxPTvKK2NO52Q72YGvTKavQXilg/rOeDgfgxIwB2lDYwJmgN1Lcfy9BMq0Jd+T9D/EeqG7OkLCmQ== 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)(136003)(366004)(376002)(346002)(39860400002)(230922051799003)(1800799009)(64100799003)(451199024)(186009)(83380400001)(8676002)(8936002)(4326008)(66556008)(66476007)(66946007)(41300700001)(316002)(52116002)(5660300002)(2013699003)(478600001)(2906002)(6486002)(110136005)(86362001)(6506007)(36756003)(2616005)(38100700002)(26005)(6512007)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OlONb1Xyye8U7ucPKZ56fKmpYQBxFHGBydwFHectlppLv8UO6wyNf59GNHNY3T/nDtWuCwlGwUM8nX4XZzDl8cscKMLyjx6dHlaGNJSS9ZyiBrjnz5Gbv9fCtPGyVn5xAbqERSCU3k8pME6F+VwnyZ7vSj6kME/aRNiuaS1tGP90Lgx06IgInd5ge5Lx5ilxiH1FCV6t38dOuWu91stToaVMah7szoul6ZQjYmYQK+0tZa6pLEb0pj3qkt6bhaIAt86BbBIauUwjjvhOJqEtXgoOmMfvWWruxe8o0ST09Mrs83iHg/0y7QL83B3v1D6AKy311QwlRWjYhG+2//Si/0JKa9HSMIssBJDf18wDPlTKWsU0NaXj2TXH6IWsBSKOxwkIyzdWac3Bjm3b7N5scnZ9RWWhE+QSNF+fpOJHhiJf8uyNjR5GBvxcvbqdkFtV6JVW6au6O/rOKedwuoMiQtTKA+YWnB/zZ9+mLnKCzeBTWOlde/8T5o8nasdnYkdMuEf2HeXOB3RazKVN6rUxSGHEOk5B+Y5BXk3aVymoNDtEbXkFlf9OWOmi9zswRu6ntOhk3ChDT9n3J2XBz8JI+aetFE99Ma+dEmthiClaOWGbO4KIUPvD8lvht3nxmplipiXoJo6nefBaAy5TqJDT0KUDc4Hg2u66EFXTsDwTd5PBzBJsxJh806rAUFioI2AzBlJTP8h2RzqMFAH2Vyl8NajBgKnw2pbPuVoVtPt6HHcKwRSh51ncq7e+frTLpedNNHOLL6gi2EI6nDca7gsDew9uTMSnVCVnm4I4rgj1RN6Vi9k/KCJToZWVWAm/e1npubGL9lAlHFEI62vwXhUiTSZtHEufozxyi/IvH+C6SV5XDEgcdTdk7ZVZcsAM54EPHA0gw5uKMVsA3vB2KgtKU1Vq0hq8OSVZz+itnLSCObmfFU4nq8cUeA3NaX7ntT1VuiT4DsjKiTxAHdY8au6CRgIxEiID/S1HNzbaw3F1YTGTexZDS8L7YSkCL0ERRCLvYfvTrGn51R8ACTVGL3thWoBq2vrMuKY+NGk6BfJ9YWLKuUaS1nVo0Nfwju0W5phSuEN5yw5KvenY0KKCxxYoBrlY4oKAVDi+QYiyMAbIei1m24hpWexVxi1ybUO5oZLpU770+IS/M8NwR5orT/3RONq1UmSrWE16kOaJKvaFgTm2/1q8/8w0y2+eO4ZIEF4BIvYJVLoxmOMEbS/KhdYmB5hiU+DwAEYC2nE/LMOZvyr42bY8mmDojQj3APFqAm7HrOk4bfOa+uT1iRYEvdctmkizJlUEc9cDW+HTvR7LjXPNJF01vdU5fmLTv4hnbcpESnem8FQmXR70ejuaQet+2ovZL0rvXT188OZbSqLMly8q/45kl57Q41UddxsBqg1sXDVlaLm/2Wrfb7minTsDvhr7tEgVHUTN/yBDqHph7Xh6y/vsAAAExlXVhs/0KRsSYqcSDLXfz3wz5dO+hLxWfdZO5y6KPkiqeUIvidQbcQIyGoHXJ+ZJFuTfxd9gdaNsdj7VrFdh4mARP68oPrxLUcmf/sIMCL612gvH+lfNWA9Qq5EWYogkyZPtaFfxdxTGilX4fY3XYqkMhZCk9SonMPvMJFC0RZqO3TpR3guqalc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a4af4bf-6067-4463-f552-08dbc92f3ab1 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 01:21:28.9620 (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: mtFwEcyleAooInU2zaRT5EvkpurqDZl38VQ/ONbmklBHLU/hXBrQjjaQXD3JtVadGU0VN0/ZeJ/G47tBMHC0TpjvblLNEQVukyL4pgLe87tHMq4VAuRuOfM/ANOY2aEf X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB9930 Message-ID-Hash: PGFADTE7W26T3QIYVNR33ZBFOQR2BWJR X-Message-ID-Hash: PGFADTE7W26T3QIYVNR33ZBFOQR2BWJR 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 8acaa2ddb335f..d43a4d2cdaa5f 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] + * for ch_map (*), see + * soc-core.c :: [dai_link->ch_maps Image sample] + * + * +-+ +-+ + * cpu8 <--| |<-@--------->| |-> codec14 cpu8 <---> codec14 + * cpu9 <--| | | |-> codec15 cpu9 <-+-> codec15 + * +-+ | |-> codec16 \-> codec16 + * +-+ (*) ch_map = [0, 1, 1] + * + * [Multi-CPU/Codec-2] + * for ch_map (*), see + * soc-core.c :: [dai_link->ch_maps Image sample] + * + * +-+ +-+ + * cpu10 <-| |<-@--------->| |-> codec17 cpu11 <---> codec17 + * cpu11 <-| | | |-> codec18 cpu10 <-+-> codec18 + * cpu12 <-| | +-+ 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 Tue Oct 10 01:21:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13414729 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 872DECD68E2 for ; Tue, 10 Oct 2023 01:23:56 +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 BBF8F1284; Tue, 10 Oct 2023 03:23:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BBF8F1284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696901034; bh=04nvzkETKtRG76FNsxedKkTwcZuf6RoImNpzxpPQI3g=; 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=g4dCEEUdQUgJ14BBITohc4xI0A1uQQPAS8JWXZZFGNowx62/vClahmRlSgZPkHG7j 7kHm/wprnKI+Hfu0CZ0o5QlLohYfeknYjgsflHlDHdSkOWYL69IaIsts14XPvUr2V2 zeYNjtPoDQcjCdUkemf7hPxpXLBloCXyRzkkfeqM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7BA5DF805BE; Tue, 10 Oct 2023 03:21:47 +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 4280DF805BB; Tue, 10 Oct 2023 03:21:47 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B8858F805AB; Tue, 10 Oct 2023 03:21:43 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20730.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::730]) (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 F2B68F805A1 for ; Tue, 10 Oct 2023 03:21:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F2B68F805A1 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=B8UV6qS8 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oaxXamW0suX3OMasA35MmQok5abdCRLqTgXEqjsH5TF6vtPm6PI5UDlV6wGQGsbLzo3qrqIrJWWqbyIJUQKVtxAi5g2WDeb89LJh8WToIFWJdhE+TumVo4BSpnP3AhozyvvLbO2WWZCeDNOcs+RsKKv5HLz5jwKswQJA2gv1U3LkErFSAEb7LkK6lI2c4sUPppyKSUJrw6qgxhYVKHBRdaJeX1LH2CPJGxnaDgzaX+tsc8ptt95V1LuWf5qsqdO95xpWRtJg07zjL1uHJVpD7GJwuNy9P40kq7vOteRpvRQmVu04RCxWrpjrXEtD8UTgvjlM56zyP/0KR6s8vv9W2Q== 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=xlMnq4AzdZ9m6Mu/4ZKap2h8Ja1M2JvvKUIxJeEwCIU=; b=izLfWl85fWyKV/8FDrYUrLx1DYzbmFoiagJo8qtbEPCuQ2Iq49rNfR3a0+T9tbvukYmQsKGIlJWwtrYtdAINhP7a7hEC4Nt8hilppWvXa1yEm9NTq6ikL3L27iJlLByPwT5EbTGwhe/n4PSiCgYtMOYID31EuG1MMPUuXnNwLPy0FKY+nCTa9+cXqKH/tEMqCnCj1jPk6qUsGSRN5ZGzOBDh9ikMssArClRnMnlEnhx7jfy3sn4rGWAChWeqIMN4b82wKroVx/WqWUS9Fap1lGo/lDyK3YLdq7GOrvOccgnYTHd8osjgtV8JVUB/rNaENL7SuiiVWnK4cr9MgVuwxg== 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=xlMnq4AzdZ9m6Mu/4ZKap2h8Ja1M2JvvKUIxJeEwCIU=; b=B8UV6qS8VU0U8bxdj4O7QGS/0ZxG190Hm6iWuV/6cwIpP84EomxrsQge6dCJepcASKHwRDB0PHCQJYXwRpSzRkOG+S/S+81VMXaZR2Z0ZUXiNtfI1Bob/b6S6L2HeZuowbdcBD02ceMjgBprzpvQoWE3SbWkdqfKm3yH9+Llun0= 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 OS3PR01MB9930.jpnprd01.prod.outlook.com (2603:1096:604:1ee::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Tue, 10 Oct 2023 01:21:34 +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.032; Tue, 10 Oct 2023 01:21:34 +0000 Message-ID: <875y3f8e76.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 4/4] dt-bindings: audio-graph-port: ch_maps property User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 To: Mark Brown , Bard Liao , Pierre-Louis Bossart , bard.liao@intel.com Cc: Linux-ALSA In-Reply-To: <87bkd78e88.wl-kuninori.morimoto.gx@renesas.com> References: <87bkd78e88.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 10 Oct 2023 01:21:33 +0000 X-ClientProxiedBy: TYCP286CA0052.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b5::13) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|OS3PR01MB9930:EE_ X-MS-Office365-Filtering-Correlation-Id: 130bc8f2-4690-4260-21d4-08dbc92f3dce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1mNRriBTB4vHhox0AylBgaQxlXb1O6IcliSm+3ZDtCKMjOrcZGS+hEdmsKuYxvzJ+YRRKo8WePs6Tnxny8NpDwSa5mXybSnLscalKTP4rIW55vtIUE1DuGu23BiyzbBk8SCJfuqL2vSUbJAawEWdgIwIc+U4R9gaaEp6yPqWDmaV0f9NV2Q7Og3Z/so1q0ZAXn1moz1HZ6PgamuGT0BKyuR1hFcZxpDAza8/5N/V8oQfuuU/QE3v7GoF7CYtvm49gK202RYutQLomk7c9BL6O6zKtW93jFizr0/RwZKY/+aI8TARjTFxocgEPp6Jl/2Nc1hGH2xwiIWZ7O+98Jf+kkABrFzZdqioH4tEz9Vt/YVpieOzb0adHgpUZHZ6vRiN2H1VwnyL88wmC4hpu3/EgPBlcEhzLkL9ZBsgUOK+G+CPhzsrP5IveFemFI5RAlW/0xBdoS63+Visyoj1NMZML/u09jTazdgQandgNZtxbtprG9hSTkLiF3rg+NcNPrNZuFbimdezvIXz/Bh1Ia/XuX9vnmlguYy8fIMy6ep3g5RYv9aTc2RF7zlFwBPsovTDXyhJsAiV/gThPj25kagbl42SR6tz3wMtaJJuIDx3z0anDKj0SpRvIFHFr3/ulB8PmEJK2fV+VBRvh0JahPqjMQ== 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)(136003)(366004)(376002)(346002)(39860400002)(230922051799003)(1800799009)(64100799003)(451199024)(186009)(8676002)(8936002)(4326008)(66556008)(66476007)(66946007)(41300700001)(316002)(52116002)(5660300002)(2013699003)(478600001)(4744005)(2906002)(6486002)(110136005)(86362001)(6506007)(36756003)(2616005)(38100700002)(26005)(6512007)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: A3skH40e8pwNs7rXdM3AtHP95Fr8325MTAfGxnupLDUiRQp+RFLtyI5UiHHLBVqDvfznuEE3Ay6hq46PI+wuf6J1QIvziaP+h0yT6aes0WNhlWw7PjgaMRDb7ztnsUcrsYZUANF+Rk2GVsoeyCXLbbIkkfUkZo3VpdCBo8HE/LEEIeTbDdvM4ZF895UM1sd0Vo+vXa6GQREsvkTuCTXluZBHS+MR1JvSStI0nPjReCS239az0L7XyOhzxURY0OpLQTXOELLIgC8+ROEIlcTEVcuJGmH6ayhbSSsMHFet07XGQUo4s3tTZ+JJy5w95IUN7zB8hT/k7rZ/Nk0kUPAcccVDpNMhllM4hoiyLedYhiPBci3gua05GpGw9ccrZsSQPUeO9AfVRABSLKoX5/z9IxgSuLLdSX0hmgC20bdprVA5c3W3AyiQXzCFhAhDkF3rurpEjoXSrmGDEvpqlJxVbk6whMsxlfpx+UH50W1jtgakxCO/b0hjQ/C/xcbT1Ar2zc4L0HCeUDpPRgHoBIK+NNfVYtB+Kdbj05K6xDC1AGbfKRa4QmBsprPWscfXYgFWxkG8sV8hxuDSYZsginrzK6AWIIANGSOaQDBrVS7N6P7vV6tjxtPDv+IdG7p6C/7KH5YnlaEwJ2+5B4EzvDC9CUFWFvzmkvCfNSDseXmf9SImcv3r/+BLs+a7Z3pBVvcIfqa4U3Zgif85oROisx35kU+67TvUeuN4CUUgOL6Ggoc6eArLB/AEagYiDUWSQdWeAHbSj/84IBeJKcWfLTRMWMY14dJaRd7TjO65S7pnskYjviomoUawNlFmzhFGqshoUrGt7Zvl70zle2W3jKw/nTgk2BMLQxxK7ixjK+U3ro3lHshMPPNde3NPWmPkoPoqGMvqVi1GclPpuIPJeSzE6lmXxiXFbrAzXeeZxtE/l2a+EBFyI/pyWYRDUXeXFOThEl+yuNE2XoWesxYVIaUHawCsqQpn5+U3dVDUH7OvFelgETkNTga9oUpxeLkSh2HVFKvmed9AE6PsPyV6RLSBrx0IXTrtPOTo5pvPmZM0yZP4i2qvUV9CYJpsjOuh78OWUMdmG+/a3mjPXSbf+aBwk1ATqIIYh4/Cqj1IYqCJ4kukPghJvLUH5C52UzVDV34sMpI80qH446+QAU77CoQkVOFKCHsnTAel//yVefdgZO5NQOp0vmo3SBuqcgMtQwBht5YJOCvNN+W7k7ZeBVD6lQyWxgQuagJEZ3u49r/9V1XY1YOyB8lpO2y+QGe1Ux48ZX8v31PVZVFrNVcxD7EZ56yvQDLFG6cTXB67BLY6ZeN7WWZZWLNv2jn/KRXH+Y4LXEI92oEzxttGU5vx7Us2iYV5Clf30g63zMXeUhtqDLGcsupPIkxy7QddW8fxc7cUMqkkLNcQORSjhwp9oWuk7IcfL10/WlmStTBKaIFWQazLm2e3B6tUeoPbYdmPekggfQADBjbT0R380L2Pb8hu7uB5yNhzro9m4K9NoqLtF47p8TPDl5EMPxFdWU8SVgaoWcoXcLU0s45wT79Ux2ZKLWlzpF9aalcspLe/kO5ftDCKZe/nHHKT793od04Ist2lvBlno1h9PID0ex2eNsvfjqa4OyuEvEUlIH2wFHHKxrA= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 130bc8f2-4690-4260-21d4-08dbc92f3dce X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 01:21:34.1350 (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: 7WxhWNF2nAaxfJfZd4BCSboQgZ8dbzwzFfCgm4SHZUSM61/YNA5pRccXOlK4lTjOFStqf7bKR3vDCgixoc2e7IK8C3YvSO2uNjo3FbKRX8YG2qRzyUIXaL2EXp6MBuVP X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB9930 Message-ID-Hash: 5I7LGTFWVCH4RNNTIF355SJ262Z2JQYR X-Message-ID-Hash: 5I7LGTFWVCH4RNNTIF355SJ262Z2JQYR 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 60b5e3fd1115f..dc663af784fd1 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: