From patchwork Wed Oct 11 06:02:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13416605 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 E7E60CD98C7 for ; Wed, 11 Oct 2023 06:11:46 +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 398E7ECF; Wed, 11 Oct 2023 08:10:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 398E7ECF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697004705; 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=mPgIKQQ/Zs/SfILTxmEt1Igh9Uy472gZxmIjOs4FMkdBxeLR6LQ2YfBTvJUR7ovGU OS/AIKfXrx1CrrfIRtgrct+Zhz7OmkCaWM5D+EzoUF+Lx2/PaVPNlEjpGTIFgPYSbX IFTFsTNGW7LtObxC+Q7O7VXZ5TiLTgFI89ekMgbM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C62BF80580; Wed, 11 Oct 2023 08:09:59 +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 EAB0DF80579; Wed, 11 Oct 2023 08:09:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 782D2F802E8; Wed, 11 Oct 2023 08:07:10 +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 0E24CF8027B for ; Wed, 11 Oct 2023 08:02:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0E24CF8027B 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=FmJbLRrF ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PBoCcKWEzwzF4lO2ALmcwDyMpEPa4Lj5gbSwbKeSHOEetVoEkERDd7Yibpy5ZgkbQRDVENx5cJR7+F3ibgVuND5Ds6EOxXF9FBd7cldUVdzASY7UwIKj/bmwy63vTlVP4UyHBOJEDxnIEFwAbAHMajQAr/M/3GrVkFPZezBZIxOakMh1qF+VKRY2ilrRkGGkEsKsciLOfX/IIwMmQUbtuaOMqIK40pgTCz+H62vkEzHfYPPklv81dpLOn+5ufo6VMJe/n1mAPJv/YN5lcpy0AnFFGcR/8pmwwhn5joMP0Ky1yzIbflU7zqHJoKNGj2UpVdfC4r8YhO857WWt2iIgdQ== 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=R3+qWDhYjRk8CYfvKpP9FZIj2tnhWMZqBL+CqVemS+LE1d2qwk9yE2OKG4JnS3O8U8ZQpzkiDSEVU52hl1afSE6tCF9NRShKqfqKLZ8ToE/oMd/L7FhoGGSOzedmwuiQOcdwS52zToIL9AtjRnGpcGiD7n8vI/l9fsndm/RMnIhyWX53BkCPFjKH+5kmx4eK4ppH2YJWyiaVI7F/Ora5vRPA8u9+DcQ0jdG2+FcoFMedvpgBVas8YsQZnKbKsZCGf4Mxj5levAe7IBvXufX0ikKnRIiVC6yAZCqNJLmLiilcVXVldzdLvw51yWQvWhIet33Td/DLShuSgvDz2xpqig== 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=FmJbLRrF5pZUiUiUTAGhEehqcg2gsQZAsQJWvZ2U1H14GUqf6j35YY5yAYWpD/gKsEKwiLnoaYpyWecdvOmZBJf8Hbr/CVM6jUoJPhxA/+jr9EKINgqdNoZRTeEPmUagWH3YXxwAvQUpSg/X3X7bgd/8tBKqY/ZJQ1lSIAkKbWg= 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 TY3PR01MB11514.jpnprd01.prod.outlook.com (2603:1096:400:377::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.40; Wed, 11 Oct 2023 06:02:43 +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.040; Wed, 11 Oct 2023 06:02:43 +0000 Message-ID: <87lec91yt9.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 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 Cc: Linux-ALSA In-Reply-To: <87mswp1ytu.wl-kuninori.morimoto.gx@renesas.com> References: <87mswp1ytu.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 11 Oct 2023 06:02:43 +0000 X-ClientProxiedBy: TYCPR01CA0017.jpnprd01.prod.outlook.com (2603:1096:405::29) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TY3PR01MB11514:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ac88bf5-5da6-456f-ac69-08dbca1faf12 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b4Ghemm1H7yWQwLAVql8BgkAX6+fkK1ZLXCX99Cszb0xkQu/H6HN0J60hYEJChOGA0c/XH/d8UHGoMWA0jqcE/u2BpzM+kPWccPS7frXwEz7V8cCrilQ1W8qnmnKLzFDmCxtE8s1qpYd0XdcDRhnwBYNWWSdU1HrvnMCTY55fBQnuj0+JHfwr232yy17QjIvYVVM3HNBOGM3GF4PVaUGgMdd34e3EzbvTulANOShUUyTM2dbuj+Mfdr0aGI7txuZ8oNqktn4ikNyEdee1lq1rmSz81EUVjgvQZ4Du1zC74s+4Tmh9vbifu2zrn4Dd30HzcP/IfEKJBP8qwqgUCCH5DbSDqLLDVG6Y3EkUWOfYK/Nv7vpTdgnZ/J5QA0zWXDS9Em7bseFMOGTbTCHQejNG4DAipXnjJMHzRIxMAGgwNqvXR2LXRb4f9gbOqW5KH2nT9xxTQgiZlbWzZd3gk4E2trRvLMNBU7lg46ViEJP9NwnH5iU6YNtq09TS1Jrh32uAppiriRrhUJpu0JqIrU3mu6rP6zNPaFhKaRPrTcJb8f/OclBTtHwnSoMUcZSBkmFuo3a0d4f6ndHUAnJvVs2cwOnKsDGMkAA/JpLCsx0HZoc+MmdwLbMKeJUsukmk7An 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)(346002)(366004)(376002)(136003)(396003)(39860400002)(230922051799003)(1800799009)(451199024)(64100799003)(186009)(52116002)(6512007)(478600001)(86362001)(38350700002)(36756003)(38100700002)(2616005)(2906002)(30864003)(83380400001)(966005)(6506007)(26005)(6486002)(8676002)(4326008)(8936002)(316002)(41300700001)(66476007)(66946007)(110136005)(66556008)(5660300002)(41533002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2Vlc2yOkTrGI86vagqSmIyqzwe10FKFXiB4m/zCAJ5XQf0qlBJGvqDzFa1naZfxiLDdbWDclpgd6PAxZ/1jAgmOFV9t4Nsu7tJSnW2yI+PbMzKHKJ3+hn+eBm2q8u2XShANZVPWUE1BbNZPGvqgIvZ93B98h64b6c6pAMITm7zBsONKfnPz7BygKVbXbByoZeTzIjBFaUcI79de8DNt/D542NcLRPB+VOAv13a6a0hB2JO5FBoAWZK9tTtpllWs/uS4m0yaAAmAqjQfaHXTZYFj1bHdEK3+Y4RX2ZmxRZGaFJLuEKJ+uQW2SyRcPrWFgfwD/Pb++dJjfcBjft85wvGw6MeHI8QbJqhwVChS9d48pyhB1q2Co+fQnvA25En8t/F/EHIoe2yJafBEC+joEtS6rPUMukucyIyfWOHSmFIP0/eCGxQgKamSvOGWBbed4IsGbXz8chDS88Zw4pgMYWOwvJ8RzhoOgp5bGMzO7/y4yCjqrY4fs9fOZ9Lx4N1+oYoyd1tsXGMQUKP/6T72b0S9FuBFSCTk7rrAIld9jhy+Xd7QoYnRae7s5UrWqT0Yd/TymGePslqLbGaEs5LlVB0PwGQqz1/XB9BpOYCKnKw3ZpGQPxV1wnZnbDHuqI30qCmdIlVOyM7yHS+N2iWDoYFA0mz1kqKE5lobHZWEJi/pXKVuHonytoBBU0Tp0WwCjc7syYi9pJv9KDJ6E3t80siambi/Yl6hSmVzLkKlwDQ9E70LXSzyKjmoMNINjGDkQuSfuvr2MXhHJrrdECJcJad1/B5PnTAvUOL5JMQKwUt42IEbXcQ1InhnBlveGT9dEJLYir34Qsj+E1WjidJzJue4q9qbzXq//R4+cZ+dodX6xwMQaSMLC9L1wFFx8Fhetd+LPIl+YYcjK5xQlY+OF6zMgbkF7FKTeHPsDbMi+LMut0GnV7dcSArHMDPCfYaF4TTFCUHP7JiDceVmaCLpPUzeyz25Tc2TvY3s0jWsTdRB5GxQXxIdQisP4o1NrujOBO2L7tGWjhAvc3Mff//uFOsfqpmw0xeG3jb2ewKKHl3ZwbXc3Cn3QyMcf6I3hUjbqmzxcnySggWVzLGfdCvO8NfOajCxek7NzgvTxGYCA+t8p+13LPy4CTh3pw+84C4UmMzLj1Oy+AVUOl6vzEqRT8Fyqlh6Vom6YD2UugTupnYP6fwHr4JB0y9vzMI7a8SiaJCZ9H+UDWLZeBdvNINt7sEDXf5XZV8WaDzpJvCwpTurYVOqpr8Gds4yoSmrUdNUBYniCK2BATf//p82TNSToJYm6z+YcrCPUL4/ODtHlKgUDJV05bGOYN+z9Ro3WdyitBn4qPp3//wbp8SLgf0jFrmcyZuZ5n8uILMBFf4RWeDrzDFrssUUqdYqd8AzPttovoJzzK+/mbh34wvlzndp0K8y3o7BiB7+uzypFlAjbRgghbn4avAxvzZAfk4UhKyXdlwnBwAcfQaa1ulxfVntlnLp3IXd2D9WnuDJq7MJpqxxHxhkkQfmbLSDSIBT7NB06D+Yx0+CBh5eUtOmva2Xf75gD/uyk4FA8OV/aItrJT3rRG59PQ7yXU6+/5pfa64vHXXonJZw4XB63p0oLuNLkuQ8HSLIB4fMpzrV+hS9V9a8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ac88bf5-5da6-456f-ac69-08dbca1faf12 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 06:02:43.4575 (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: 0xO05LGtw6cF78djyARo+QM+nxesAEnzdPfW045qSdZvk3CGgEZOTnhsoEHKWqKBQnQPWFQQWaUQEMWUhcxH4SzSvCK/s8/H+ClyIQLDR9mQu5HJ3LcoTWP2fSutZXgQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB11514 Message-ID-Hash: OZVQZFPBOR3CUZJDFDRVLRWHBWZ4LMP4 X-Message-ID-Hash: OZVQZFPBOR3CUZJDFDRVLRWHBWZ4LMP4 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 Wed Oct 11 06:02:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13416603 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 B638ACD98C7 for ; Wed, 11 Oct 2023 06:10: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 3E073EBB; Wed, 11 Oct 2023 08:10:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3E073EBB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697004654; bh=2n+2a4zkJQdWPSHVloKnRNIMDu1ywgdxHuNiEX5QAjA=; 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=p0+qVd2TatweMO7gWktPpcKt1kFnxm3p3OqsGNJK31rKl+ONNOK9rCUW33SliDBBb QV/15aOo5jlW68Z948oKcXUPrWfXqQC47sCbhE/h9Zwre9dvR7yE358oQvzS5PZRW6 yxdaT8TReePTP1HM6/gws287Ia85vgelsBL3JP7Q= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1E457F80310; Wed, 11 Oct 2023 08:09:55 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A42A7F8015B; Wed, 11 Oct 2023 08:09:54 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B4CC4F80310; Wed, 11 Oct 2023 08:03:36 +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 10D09F802BE for ; Wed, 11 Oct 2023 08:02:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 10D09F802BE 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=BwR8HwPJ ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ASS8spJBzuuc2h4vwBWwUMavZmRxHpuKlkZ2cIyP1m4hrHlCdXcx8SVGn5cwGMRU+1IM1RWK8T4hJJSxWSRlSMLwyG9h8uGQ1cPkIeCBaDip/rhLHuN3vnbiS2VcghX8OGsDaXdq9mPjntMjPnHe5Rimr+/3aWseqYqYtRCN0jopR4n7Jini6zUW8LG9kUll0X6wU9S26NYneLmkIuMn33fRp0DPJeUx5nH69HQ+Nbuha+7ZwydgrnEBGeta3Vc4l2ckekfLdIOjiZbkLqjn10cYorR1W06BaRsGlDuFtO8XJTmcbQiayj1uW8INuF1tjcdyiEbHGZjuEMYnzrM97g== 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=VGJwPdePh9FJsBzfLV9i5VeRs4aObFkEsVIaOs5TnyQ=; b=nIo9Nbs9V4HV+NXQg8OJlIEMx9+ms48RGl+TDWOUX6uV66hhq2MXzmsz8UMJDhfAMdpwUmqUaK3FFYmXISzKLZPpKQwGyBKI4avOFX7siAsxfGLSKCz99XrBfKzw13gW9foz4H5nTjq/xvaYX7tA2hcrni4gRrLFzLbet8bu/T2AvzM68akrskaICvk391cRNWr2+eK+twOoVg56HXWam8W3dNyEGiAaxHOhNiLQkFndxwz+/P74urcxfBV4q8X2utHhDHAZJY1JGGNzMO64Cih/G37O0Xc68JZIO3KEyBTX+zOiCTyHoITm41hPHwxKBKeHUvE6uEBdWKVxLbccYw== 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=VGJwPdePh9FJsBzfLV9i5VeRs4aObFkEsVIaOs5TnyQ=; b=BwR8HwPJExOTJ+Q10bZokvpZQpwkZEft3gNrc3ApeNunnkOidlcQxfi2OXHp5Ek2bQc1DOF30IPV/rt4qEZwgBHjQKS9Ph0ddyR4gHhlYrqeDvTeYdSjqMlclh8waxpBEWy+aQIFmQobVHX8BTn/+v/PpHPMKUUIK3/8j3tgFWs= 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 TY3PR01MB11514.jpnprd01.prod.outlook.com (2603:1096:400:377::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.40; Wed, 11 Oct 2023 06:02:49 +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.040; Wed, 11 Oct 2023 06:02:49 +0000 Message-ID: <87jzrt1yt4.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 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 Cc: Linux-ALSA In-Reply-To: <87mswp1ytu.wl-kuninori.morimoto.gx@renesas.com> References: <87mswp1ytu.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 11 Oct 2023 06:02:48 +0000 X-ClientProxiedBy: TYAPR01CA0187.jpnprd01.prod.outlook.com (2603:1096:404:ba::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_|TY3PR01MB11514:EE_ X-MS-Office365-Filtering-Correlation-Id: e00fc271-0e04-4b82-d64c-08dbca1fb24d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MG1Fh84r7BM1EcO61ra8PXS5rtv+2GNTflY9rENr+H+CqcRb2q5ZoDVoYiUqBpz85qIOTNEV1h8ENvkN/qGh1sKrC5YV8IlVfBZ1SWrRfkBep1RSz6EGHVwdbaBNRZlYgSVm3XYsKjWUrPAHicBDK7W1MI+MYvfR8djdOuj3ErgSggQSrtKsoaHqW4RHHD+i2EMtFb5S0FFuAQrAW5w4sB/QvCdlPqbnjWkJWXqVLCnvOIdWXdqbsn+4KldRaXjBlQg5PszYzJBPxiqoPjW+Dke/yDyW3JQuBlIW1CC4P8eN5SZ3ZG6xHXNop0LARrxQUNjEAsLFDGVE706+wTB3rDpGqbmx194N0zDoc8aCd7uzRptFBiXYkCH0sabh10K+HifcKBfJFS4lcD78Tv9VpjO8ylSiMY6MLnWcljivrbBIRxpK2N/ADyEk1k8ZJZu3V5NiovwtUHuJ6OATqYAseFRcJ0Qrl8MTt61Ageal1vve8AJAKZarbH7XhdCRz/BEDU3kU6fV0J/xQi21ji8vfSBDKaQskoS4CmS5RbKbp1+Fe7/KmpPvAc/+HgY8DYOFx1g1iSSwgiGiGdRCBNzAW1A7r5iI7b23RnbK/47XopWA87NC5W1umKSYcDoNd3Q/QjLeUXldHvfmIQNcMAG2fw== 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)(346002)(366004)(376002)(136003)(396003)(39860400002)(230922051799003)(1800799009)(451199024)(64100799003)(186009)(52116002)(6512007)(478600001)(2013699003)(86362001)(38350700002)(36756003)(38100700002)(2616005)(2906002)(6506007)(26005)(6486002)(8676002)(4326008)(8936002)(316002)(41300700001)(66476007)(66946007)(110136005)(66556008)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +7F8NgbVhqgPmAZoe4FjHfimrwc/0HAvD/W8QBSHUbFhx4F3+szUrtzUjOPZuQ/TjbYlKEOMu5wnpSye3hAOh+D39SXQh9ZfmmNuudDKRfCKCUJhwOMJBeO/p5Gr6ZY6onN/cUx/+davV8/gaV8YpXGHNhe+TOI3XkIIDwfBAeKOHjHZACZtrbwgKHaysisk5qq1Ua15bzxHe6XJr4f+1Ui+28ihICxvpHJ7HtgI3ENnGw9Ifs4Pi2VoAgRhdZFPVgYwV2/efKxWfg7B8gW4Dut03Mj3soruDlwmQ0LKElaYbgw0J+HToR6mG7DFdTBueFk7ow8GPpWWm7xDhhZm13Qxq8eht4uTV75VOfh+5Ts5exewD+4AlWDOFOVEDHsE0hMzGSZCeAgCFVIxovmyqTpyrjJs/XWHeiaiHAGVo4bJ2l7zVHk5LljD2EoQYyFuU+MwFwhD8MSL90wPuuf753FPSfstCPXXk8+HSdDFN0499HNEb5IobYZ/NlSAOgMvdBBelcXzfpadzsG9gN+Yvfrl1xyvMtNxLsUKGu39RTkhm8EqeP84/ocrS1+o0mRAsorbFuUYfPoD9gcw8H3QXLXo/ZM0YzeyNiX5VYYHAUMT0eR0/utsOntf36JCqW8GGtjvLFHXLg0LOF5ZnCUj+hkj9GJK2ZNCsPETbczjlYhVf1i/gWclC0JC7hHmcn7chgqdJyeOKwXDrLTHiPqzMkBlQsgKhbWTv1fncd/I53MV3vIPHopc0zNNVmYtWjna5cvd2jdxp6jfln0LTawDoL/uX+V1oRQMwtH8P3ZIa7nkKSiyIvxecCDdTmPm71OWAc9PSYYFX3j8fW7tltiXgzkyC5d1X/DtJI6kCIcCZTQzOv6/XeNMpmhzDqhlx/d0VvH2cH02cE94CJz0aU2q9hCJb5CZrPSRQwkxAECdRyYOxWrWdLQqesG9z8XXt7X6yVVE7pcVyjja0AE+fYTxeNC5A0kzCxIR1yrf3XqTMRUFeCykt9i9LUuLdYcs/tMUHSahQ8ms8vUs+sbb1mUZoRIEc7+1i3FtffDwxm7Kcc1YFnhX3h0HYlLUV1XGVv/TBcye81KfOEo1OGCX14VybCkBAuxoewgXAHEv7Ta4SxOKGbklibL9bH47TUseRxSZ43km0eL8bziHBadQlv+x5KbSxVFYNqeYWj5Ibo+ZfCKBEGGDPKxK0W8f36PC5GZ1T2Kvh1qD5xBU6r9h4UhGgCOA7g7tyPmZbfDb5YLfzvSsQN7KMu38h6LXOyHiH9EOJuat9Xj/zoOpwgukZXxT3Grr2qZVmVCVKqRP4tGRAlpZUIcqzJMTRjcVSy2dX8gQFLQniVpx/TyKnV73XgPsZJbuEnZMLFnS+CBDI2dCQt2VetyzE+1Oy8oKumDuZCfV6d/HK45RJjJNzglVycZwDm3BagrjtnpYEVl9SgvQebVR2NWv75HFa0UYYN19F7GVl6KdqJqaIUp8AWk292c90YVQONNFGtjw8Q1qVep4vqeFZ/se6oEQ/4dM5jSC5/Go1yxb+racRRZW/4PaLpikYHwHEjqbWHsBjn1R80/CE+DN+BwaskBRsPxiYHGwCh9xR4RYC8gWQfvE3NNhDtczQ3ooemlxHPU1mwmTqdYrzN0= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e00fc271-0e04-4b82-d64c-08dbca1fb24d X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 06:02:49.0535 (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: Zqx1DRoQfFvo1GPtvUUhvU9WfZ44l6x80M2JwzxvNC3QGNWzghsbTSzBhrqOS8ELKvpxKhOeH1c0JtKTOl8Ms3Z7T36DQX5UH5F6SVR1gARwgFRhJ5F6H/rkURNcfAvl X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB11514 Message-ID-Hash: 7WAD6HOE3ID257WNZNIMJBSNTNJBPYKS X-Message-ID-Hash: 7WAD6HOE3ID257WNZNIMJBSNTNJBPYKS 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..009fef88d443 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 Wed Oct 11 06:02:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13416604 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 557E3CD98F3 for ; Wed, 11 Oct 2023 06:11:38 +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 4DF01EC5; Wed, 11 Oct 2023 08:10:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4DF01EC5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697004696; bh=N4XpC+Quh4UGbwECP0k3oKRvQZ2JcuqQv88iNoxDLr4=; 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=roZGaAGe73MMHe209Y+vAYZrronr5VDxZds5O1rv0XPRFEhTDhp+zx1gI0Rw+HiW4 GqbRqlodhNYGmPe8IDhY8oKWShWIXBQRB+jx+6phZIw+7UNOyYQPH7rulyt6A4pHlC Q2jYKb7iHErw1ZBXcqo/1wA4Cu13P5VwL8RKJM/o= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A082AF80571; Wed, 11 Oct 2023 08:09:57 +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 4DA91F80567; Wed, 11 Oct 2023 08:09:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 97C85F80552; Wed, 11 Oct 2023 08:04:00 +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 B6212F80130 for ; Wed, 11 Oct 2023 08:02:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B6212F80130 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=OqGsJKrU ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h7V7rOksIVGVSu+PBX0a2J4RK/dAPRPma2vGeuL171Va8qGGIBbS28zktqQPrMcg/NsVwFX8Yhc9x4uRTBKRA7oQowjJU7r41d2WthpdeXMMjV0RWZWN5INPAsWwQK0v4IovFvkDCg64dNl5JyuG31qpoPfXQONiyJNFaQmwsoWHVnj2dmzelr+PTYWEiDHrtWRkapbzWy6JFXuvqltRqJsXAXxUk7BZvIoWQxK2U4Dp1l9vy0Fc4Yb4mLBmkjJuwK+Y7DlwZlLdFdWxpLjy/mzIXvLYaiEcYd2XaW13AFyCIhi1JQAuMi3uS5piJG451hyW6O2zrMcToKpvMH5Wcg== 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=oAuKBwG+PQ9xeS1F64MxL9urfcS0AEoF8rRul4XzurY=; b=j+RJOdayb9gIgHpsqF3wSXgygp3Gl6j6aj/QTU4i1BCaRy7QXbIHswurGgn1DQNi9ExipNs3tqel2T04icClt8EHtSSYQnann3IdD30/ZWCS6YBF3F4po292Wq6U2AjHSFd4KN6hLCeG9XaY+6DddAW9ID8A8LhfYpvwf+SrQp+7JdnsMhl9mohyR3HLNh4ekgOvWbCPGHKhguXAsEVsPsrg6iGL4scU4WOGsHtA9w0Na9unfhMJ4fAgfYi9cEN1x5EkWfTloK483Uo/MtkYJdbYiKm05fG5j5j2xhaxNWHq7fu5ewFy2PhNQUYEs6motEOn0TWVNq1+UU9eIV5d0Q== 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=oAuKBwG+PQ9xeS1F64MxL9urfcS0AEoF8rRul4XzurY=; b=OqGsJKrUQDZWPMYCaj/qnKTd/LAeXk7lUDu4HCF72ZwycNzLYaf/wSek7HGG/yBrdXdSSQrUR6XZp2wOJ6tK+jgPv9WRgkdYuz3WXJAaLrjqof0iJhQOOmZFKz2cd3vOGghUcAAAo5Z/SfT7vuK0F7TaBVf6OTlF1MxmRXuA6ws= 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 TY3PR01MB11514.jpnprd01.prod.outlook.com (2603:1096:400:377::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.40; Wed, 11 Oct 2023 06:02:54 +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.040; Wed, 11 Oct 2023 06:02:54 +0000 Message-ID: <87il7d1ysx.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 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 Cc: Linux-ALSA In-Reply-To: <87mswp1ytu.wl-kuninori.morimoto.gx@renesas.com> References: <87mswp1ytu.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 11 Oct 2023 06:02:54 +0000 X-ClientProxiedBy: TYWPR01CA0001.jpnprd01.prod.outlook.com (2603:1096:400:a9::6) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TY3PR01MB11514:EE_ X-MS-Office365-Filtering-Correlation-Id: 46f6c2a6-8f15-4378-954c-08dbca1fb5e3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x1EnK7tr+ZzjZQnFWwFAwsYeQiutT4n5BH20jaWegIfeUyU40cgTGAectOTHDxwU1+h2gybYyqwMsB2vY0ldIGoyxu100Pw0CyrQ73yn37vyRGqwBFY24XjuGLbvSdigeezyK+ttvJ3snTinzjhdhgkNypBMd3mncD4Yranfv+7DY3QR/SjsOyLMJIWe9aZl+dis7glzhm4O6C1pstR4nt+8PPYdiOUdOIejxKo6IHis4Sdjfiqyz6syERIH1rthpu4fE1G3BH34EBL341lIDgo4Cvkge9tTcRveL7bw3axXgJ6OREtg197pyLJ/kD5noloO/y2laPELzBhKF1KJAdOlxEhHoWNbWonk5eAKSOFziPJcttsma6lHu94SLyLqWeHIWqWcM6t9NHbm6QPX9C8Sw4TFbi6DuNXJUFsDJDByHjdc49lDIWAiJbmtKofhCgY/SgDrYKCHqG27SEiNPA2+RYFHEeDoXS1nmC2lhQZA0EJ0tNv6Mv0bR1huxCJ68t7fOiIOMciuaa9zoW29z8Ftk4A2YU1G/HhIUkvLbbKDLWO5iwD1WD+RsPM0TryHxHnLIsMkmGyT4zHJrn3Uf8YOCECKbpRZ4SNorbd1Gq1ZBtX720cnXs7xPfJoUvLOJyUa5DrH0XFJya7rFnb4AA== 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)(346002)(366004)(376002)(136003)(396003)(39860400002)(230922051799003)(1800799009)(451199024)(64100799003)(186009)(52116002)(6512007)(478600001)(2013699003)(86362001)(38350700002)(36756003)(38100700002)(2616005)(2906002)(83380400001)(6506007)(26005)(6486002)(8676002)(4326008)(8936002)(316002)(41300700001)(66476007)(66946007)(110136005)(66556008)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Rff2mIORRf2r790cT0Ki/K2JTYoBT3fd0cGWNsQNLK44Gds6JxEpRJfKaD81sbyVPE3JCp+Cy5L0OGnqs0CXJM0qGj1ywJoPrPu/iSztVYJEyphWZ+NTcgVRnz6gjHBlweofcsC48sWnCZxL++UNHQx65BArX3d0gPlumhhgubLRQJDePN0uMJSyoZz0fjrum3nGbKjTPPfyfj7f907ppTug2Mlm7EyO8Yn0B0myJgp3VjTYjFGeWDbIZzimqJrAYOIKfIVS22257pSG7SCkzfvXH28UZlF1GfQqv+H+pShZQZzemcY9sZWW3kKQeWghEU2U8CUzWW0rp20jYlOLHS96axiAYFSOZZni3O0YMb3c2whNksSv3txiisi83fu1+h7M5QpzcrJQZ6CHDrUYeBcrfWR/XLeRoek9ZHvRdj5ibxlkxQS/smCexnVJtiMCutwFZrjIJWPJKw29i5EwQFRQQvQ0YRlbnJoj8aGic+SyAfYYJvA8DMk8tRLewDLQ7/ZMV57Isus92DDa/NNg7IHVNvWclpVfU43rDLzZ2WEDvFfIqISXuMIjKm4z6PrjLrEqBgQk2zvOGmu1qFn9eFiYTDO7oQuLOXDCM3AY9NTYc2I5PDjzLM9xs4tLJh62RHmUBClfGZpIjaAvHRq3DU7qpkGg1tgofOadEMqUD8VRpr4TjKkJxdayhvMMWMEhzSXr/MDQ4NqNmSKcBLMADvOBqTTW2ZsJRsjRIDUhwDHp8rPY5Bu1Pe4R9e4f+pR03GoW0UTBuIHVpY6zALZlNxlO6Ia27ntCX7f7Ufi7Slw9bXkrlRoS7NVo9gMPfXZABrW639Q1TYEvIvP6degI3K/tz8g0y3IbosMhTw73d8VE4KAUL8I1160fgaNfU7i89y+0bL5DUE8PlEaEnLw+ww5erNDbFfoC1qIBWoQBjaRPIOCqssiz6h5d+RNCWelIP2HDhs30DoM+FpTtvu4nO5ybAfJbnXPKxFZDzEmGNpMT+Ofyub+0+SZZOAtYXIOb2LhIT6HnYJhSfevWHM1tepsaWerpBHz2ppXDjF1eHNDYEtyITRMsc2Y2ppw+2e0+MPq39bLEc7BAnQF77r3w6AbHJfE6lmjAer/eWViO212exRJAILkabpmyvEqjXHt17vvTfBSHEAhkln6t7MkWRcbL4GD4LYdC8ilLZyTslua3SxuMw2SqiplbcNFl0JbcmoJYXlAGZ8EtUqb7VUjD240HnWq08HNwB9LQt/SBNQFNMO72+MeuF3WDQCNHcDgkdN/wHvK0/P1VWm6ejvnsWksHlLd7/FlDILnXtI+HSfmu/TEe0n5fOlyDL4j8xesnGQ9oJZ3TzKsWdS8eR8ym1o7/hwwPfi/MNMCRqhy2hOaI0fxRsMmyr/FKwAyHtDAPJF8HsGoxTtCkw6mrredDX2lcxX7W/Z0NTh7VLVhSP7MwSFZ2HEzc16g5mQQOqE3Tq5MrJrJjiVA8flvmpFIB4x/3H1wBsQaM6Pyme3iENLyruSKWPYUUETi/3sPRYBAMhKxJU0V26QU5okbsWbPXSOypQ/48H2iyGUPsaeLW1ljNWO+C2EwJGcGTzr1yApz7q1tcKrD054BrgqESqDGQ3Z/e7XGB7TfIKPFdvuYHQ4U= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46f6c2a6-8f15-4378-954c-08dbca1fb5e3 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 06:02:54.8286 (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: a1fNO0JAznWLUhgSiea2yPWDoNdWbe/8jX3FRWiN/v8qj2UESE3tMs3S7XuhKRnu+W32RBqGR3/2HTPFcqX8KRG7wC0pny4uK6/TfhnNaq+PSp0e4hA2tbknU8z8kwZg X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB11514 Message-ID-Hash: 5T76AYRQH44JJJYYGKSD3U7UMXZ26XOX X-Message-ID-Hash: 5T76AYRQH44JJJYYGKSD3U7UMXZ26XOX 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..d43a4d2cdaa5 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 Wed Oct 11 06:03:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13416606 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 95470CD98C7 for ; Wed, 11 Oct 2023 06:11:57 +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 F36DCEDC; Wed, 11 Oct 2023 08:11:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F36DCEDC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697004716; bh=BOLdIJ/Fip/PEJJJvOlFNNyBsje+s9TibGBPzOy42hk=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=lHSGk5wk8lKE6I6tawNfitUlarB33kQq/Qh6L/37oqyx4vyec9F02QsWppJHhDQC0 o/Z/mMYIs80703kENBn4uwZ84GnY4EA3OWaSUHwPNqqOQPhoa7OxNlvEIyidKcIV6/ UtZab/ePRcxhFIRCOrza14Rnf9XUrmlrqsf+cGSY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BBB5CF805A1; Wed, 11 Oct 2023 08:10:00 +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 6525EF80588; Wed, 11 Oct 2023 08:10:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E8B10F8027B; Wed, 11 Oct 2023 08:08:06 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2071c.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::71c]) (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 7A5E7F802BE for ; Wed, 11 Oct 2023 08:03:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7A5E7F802BE 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=b3FYrrdF ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BFsfdb0W2Y8es2WkevtlzfKZTbDrGAfobEeLazwjjAPK0W9tR2DjG6k+o0nOPcvUnG8wRu/NOCv+v5ESjdI3P2evL6/VE09NY0LIZ3lgV/FcWAQGZSUdTVCWIJEgclPHrmnzH6L/HW0iNr/hsYvPycGhH59KW01zGDHhIGtkJ1oJ6FM+KjhYsSRa6oXWea+cVTPDGG3uROm+I5SHb9JA2IncR7+RBIOJD1Do45J/Bj4POF0O6yNlRM/fBlk0nQ3szggL820ElLQfTshDCSdl3atXlm9l0N+WJOMcGBGocturV9S4+q6PCI55rosC8W3Dko9MxXAVt/5qD1mnrlUYjg== 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=16eRbcEEF4Pv62QIAJanjPk/HuWs6btyR8KiEUjXu+0=; b=VV4TMC1FtCbHs0Job/e1R59hPkLJqM+bBr/KRUcIwahKJyIxqs4QPn6tFmlBdV6nDubRRy0Dz6vjVtkcpchfvBnvfOrSea+luWrEdpeETCJ8ZWP8/3ZCboFkHS1HvPLjWusCMy8qt4KQ0nCWA3Fx8927SsNp3VMB/rjA1q0O7MtEhAOgV3xDyM2V//U+WFTX81uCX4uSAT/SaAMqK43LEsl7mYhS81IHIb4zKQDQR8vbKEGODTNKuyIBRM73CAkVZPy53M83LE/LEV5Ov7KrCjP2+TAt4T2JXW5QFeMlP/QBrAK/JGXvz2gzFU0SD96y8t+z1M/lt/25B8MAqCoNLg== 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=16eRbcEEF4Pv62QIAJanjPk/HuWs6btyR8KiEUjXu+0=; b=b3FYrrdFsf72y6gQh2QmMDpl5msKJAjBsxhK356bI+a3GSyCFnLwcpRN8ZrFrgC1RfG+J4O9wpRjPx4qwmzHKiQqhTnt4MIolAUnb4p4OL69MbdjXEVUAFZbRTVz2UXgmyJ7H9tr/hPUWzTrKYYfEK9TagU7IaPhUzHm3ikW0FU= 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 TY3PR01MB11514.jpnprd01.prod.outlook.com (2603:1096:400:377::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.40; Wed, 11 Oct 2023 06:03:39 +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.040; Wed, 11 Oct 2023 06:03:39 +0000 Message-ID: <87h6mx1yrp.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto 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: <87mswp1ytu.wl-kuninori.morimoto.gx@renesas.com> References: <87mswp1ytu.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v2 4/4] dt-bindings: audio-graph-port: ch_maps property User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Wed, 11 Oct 2023 06:03:38 +0000 X-ClientProxiedBy: TYCP286CA0211.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c5::14) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TY3PR01MB11514:EE_ X-MS-Office365-Filtering-Correlation-Id: fe62a808-55af-42e7-1186-08dbca1fd053 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wdtQ3py4BEx7KlXaj3wzcqbDzdOEfxvVIWpEIhtMYsLOiLP7wpEHnXGHbDdU2hYVTbuEj/bB9mbxStK0V66gN0+zKP6q5chkN9RwxM8a58h0p17yWHJT5TASd59x7lso9T6NfLsDp+OkavgX9kdUaHqBURC1AToFbt8h5bjOaYdSgKOpcWFQt05lYcIG84XJHbqGAcKIMV1UByqbtPT+1ffJOKD6ZQiHC1WCYxTi50/7U8FRBpjp3FdNw9OwTPt7Eo00/I0yhoU1i9GgVE7IhhZvi+Sh9gt6JV8d3WTJwLQ5azQxbTIVTLHOtkqL7RpZOpQMQM63usCjn6FqyL59ULsWtW7hwNzWeDc4DDVa4GijY5Qt3scChsaXkhRTvkN6C3g4CkMEOv1KkMYVBa7qT+ZNUuzzlGm05R6tayYNmNlGiVFVbrpPotX7PCp5BR1V945GAq/6CNTX3zz+mbXom4mpXo3Kmz/z8M6dgweB/zrK2ARK1diw9ZTRISN95MW/NRP4mFz63bwJBTfUHOLMauHQ8u0QvzQOPzaY1MaQK8vbajX2npbNIk6IvFoU9JT+7jrWR2wr0x9Kwo2VQudOm6w+b5190XTspI/x8c6f0jAPPeIzdErUnib5ffL4F0nMyzkQxJDxm4+QREPA3rOp1Q== 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)(346002)(366004)(376002)(136003)(396003)(39860400002)(230922051799003)(1800799009)(451199024)(64100799003)(186009)(52116002)(6512007)(478600001)(2013699003)(86362001)(38350700002)(36756003)(38100700002)(2616005)(4744005)(2906002)(6506007)(26005)(6486002)(8676002)(4326008)(8936002)(316002)(41300700001)(66476007)(66946007)(110136005)(66556008)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: K4nQBwcIYkobZr+SNTK5sxGOlESUtgS36OCE+chS8ZXwFVjf66t7xK5JD/iMGndl6OxaoePNMgGyXIXIjTrrnaoPsqiBsMdgXtOq4GIWTQNLbIOWJihrVTJeIEJlj4bjYckVjc3moa5Tn1IvND8zTu4hF1CN09MzzKu/YZQeZpVgSh3AZEjGrGLo4IVeqtRGQbbJLGQA/m3gJpjZZbLnbcbEvlOKwmukHTMVRYZCJbGnLDdRgvjT/nfveFY7l6cJ0dE0+8Jr4ZE4aQ2SaRiKO65Yk2fhDYvZ/21vQCu0SBvSziXQOv8kV2YY7nbZoPRw/mSN5tUXaTt2n3rfBfqzWBZoGeHx9/+OPIywKdlcZv8ZDPdfehROlsgCRhpLxDDlf6UrwyWMOUV8FF0N5B9ovQN7+gQQEC/YTK/c2iF0fWN9unjWkZv4TsX2EcHrBaV2zgnXhAWQ723XBRWN0U2niXLS6ntrFel2X7Y9Z+uSUnHVhPMDcxuaiZNbfZZBxknbBXvgrIs5IHNlKN9CRp9Jg9epRPrvZoCb3zRCMj9DHCYOBY9XjzvzUl1/6YCXO/1exrz/iMKP/uiFFRM+Qk+ABbEwY0nmaKjWUtiILyLOrE3HB10/58QrisCCt30bJGxE4CHK9qWyYtq8nmRSITPQijeA4JgcaboueoyFjG2K46oj2blEm5P4xB8a55Kz16fwkvqxQevtET00WilZOFyYeTIzYBvtQ9/cykF6hH1Nrge/rttesqt3OY2m6YorTm4EDcjK3V/9CMmXB0Llfr3hJr+0EwA4u27nLp39DftaLVdlcFu/8J3P20fcoqerEiioVfgzFcWjDgOdt0XUY3Hh5SZD+gn/oSfqlurcXozBirloOM3nBmZ33/XNHEfTb1r/kINjaNRSCBHZV/i3hJLnt8V99KoJiWuHdAUYteTWZ+4U9uDjHQwXHK6u+QeXCYQIL64kyimKoWSfrO7yz3IY4TwEIQ0wE9wixl61LCQRgZMs27FyvBTUC8Bo7pgDJ5jL8gpSFCGS1EjFj3Y2EIOizNLiNe64rUyUgcKUXCjn0DUnNZHYtCBAzHB7Dv7DXHCCoo5bLf1+SAoz/A5Ra8rNaBI/axmVw2PkkiOLlphEc/JA0l2GIoQaNzFuJ0DIyppNrNfRrPaCPx+emmIlkgN1R6UBUXxhTvngx80cke79VP67Ky4An99f23D9UCJHOvKyPJWUCdwCVUAk+c/2P+l8yyOSYbMXzkF+s4VLk1SRWJYstvy+vkZAsQoDlSZpe80i5P5I1UhRkyJeDdEDx/Ax52LR4RaAZYnrXqcZVV1mvVb9gRqSRdAAl+7ismUeuIiD8URcrt2rnjdFPu/c6P9/SxNcEvzFzmJ7OlPuk5Sbc0F28rN13IAJSqGsEnUQc2z9sygELPMxNrvmPxHFhPA/89Kyck9W3L+am3Zs22YDnW0KffsSRYUJAorwCRQhS7mApeYCcBL7qeOMWLCVu5juIhmYpSCxxNoP+9nygX9YXGkbbSqNppi1xm7fXsoMlLuxnrJiQKscnmKQX8CBxPLC+TSw4Eg0QGr9AgQ5R31XzEaz4BDP3+3L1cuI5OoF93lfSijuFtftJ19j/EYxeTTWhLOmwod0YyUVAueiGwNNVHE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe62a808-55af-42e7-1186-08dbca1fd053 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 06:03:39.1963 (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: GO6rK6tNCGbhfYHj55SecNb3Gh1/80A6xsJYlMvoakPYeD6f0HZYWB+sSqBO3vd/cv/LBMuvT4uJT+03giJdYbFzuR/D8t6I61pbQVLSC2VdvX6Mn21t7TAMViCbtSfr X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB11514 Message-ID-Hash: NUV2PBXQX2T3PDI3R27UTJVFQOO6LREZ X-Message-ID-Hash: NUV2PBXQX2T3PDI3R27UTJVFQOO6LREZ 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..dc663af784fd 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: