From patchwork Tue Jun 22 01:15:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 465933 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96EB5C4743C for ; Tue, 22 Jun 2021 01:20:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 12869610C7 for ; Tue, 22 Jun 2021 01:20:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12869610C7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 988D116AB; Tue, 22 Jun 2021 03:19:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 988D116AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1624324833; bh=do6zhIu3+EdeRRvf6bEwWoYdsNMQrhvB7YDK7iJjABc=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=GCaT9F7L8iS0n229bHid4zL6QrqPTZ1C59PFFXYX6bjZeOvd+TzofgV+Sqru0r6pm SZQjyFHz8CVoX9cVQTkgJrdHxVt2zf+7u5If3AlYFXy2WBhybGA7RF8Sy0jJmQrvux gG0C8NoDhGZdZISg9t9AbBmZcMDOkee/1cT3CGyo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 075E5F80539; Tue, 22 Jun 2021 03:15:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 394F8F80539; Tue, 22 Jun 2021 03:15:41 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 819DEF80536 for ; Tue, 22 Jun 2021 03:15:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 819DEF80536 Date: 22 Jun 2021 10:15:38 +0900 X-IronPort-AV: E=Sophos;i="5.83,290,1616425200"; d="scan'208";a="85109360" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 Jun 2021 10:15:38 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 215E64149817; Tue, 22 Jun 2021 10:15:38 +0900 (JST) Message-ID: <87h7hq3dj9.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH RFC 14/15] ASoC: audio-graph-card2-sample.dtsi: add Multi CPU/Codec sample User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown , Rob Herring In-Reply-To: <871r8u4s6q.wl-kuninori.morimoto.gx@renesas.com> References: <871r8u4s6q.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kuninori Morimoto This patch adds Multi CPU/Codec sample to audio-graph-card2-sample.dtsi. Because ASoC doesn't support "N CPUs to M Codecs", this sample uses "2 CPUs to 2 Codecs". +---+ CPU4 --| |-- Codec3 CPU5 --| |-- Codec4 +---+ Signed-off-by: Kuninori Morimoto --- .../soc/generic/audio-graph-card2-sample.dtsi | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/sound/soc/generic/audio-graph-card2-sample.dtsi b/sound/soc/generic/audio-graph-card2-sample.dtsi index 9aab6be176e5..1d18aba22011 100644 --- a/sound/soc/generic/audio-graph-card2-sample.dtsi +++ b/sound/soc/generic/audio-graph-card2-sample.dtsi @@ -22,6 +22,8 @@ / { * cpu1 <--> codec1 // Normal * cpu2 <--> codec2 // DPCM * cpu3 <-/ // DPCM + * cpu4 <==> codec3 // Multi (*1) + * cpu5 <==> codec4 // Multi (*1) */ card2 { /* @@ -39,6 +41,7 @@ card2 { links = <&cpu0 &cpu1 /* normal: cpu side only */ &mix_fe0 &mix_fe1 &mix_be0 /* dsp : both fe/be */ + &multi_cpu /* multi : cpu side only */ >; }; @@ -53,6 +56,26 @@ DSP_BE: ports@1 { }; }; + multi { + compatible = "audio-graph-card2-multi"; + + /* + * (*1) + * + * This uses 2 CPUs x 2 Codecs as Multi connection, + * Because ASoC doesn't support N cpus to M codecs + */ + + multi_cpu: ports@0 { + port@0 { multi_00_ep: endpoint { remote-endpoint = <&cpu4_ep>; }; }; + port@1 { multi_01_ep: endpoint { remote-endpoint = <&cpu5_ep>; }; }; + }; + multi_codec: ports@1 { + port@0 { multi_10_ep: endpoint { remote-endpoint = <&codec3_ep>; }; }; + port@1 { multi_11_ep: endpoint { remote-endpoint = <&codec4_ep>; }; }; + }; + }; + test_cpu { /* * update compatible to indicate more detail behaviour @@ -69,6 +92,8 @@ ports { cpu1: port@1 { cpu1_ep: endpoint { remote-endpoint = <&codec1_ep>; }; }; port@2 { cpu2_ep: endpoint { remote-endpoint = <&mix_fe0_ep>; }; }; port@3 { cpu3_ep: endpoint { remote-endpoint = <&mix_fe1_ep>; }; }; + port@4 { cpu4_ep: endpoint { remote-endpoint = <&multi_00_ep>; }; }; + port@5 { cpu5_ep: endpoint { remote-endpoint = <&multi_01_ep>; }; }; }; }; @@ -91,6 +116,8 @@ ports { port@0 { codec0_ep: endpoint { remote-endpoint = <&cpu0_ep>; }; }; port@1 { codec1_ep: endpoint { remote-endpoint = <&cpu1_ep>; }; }; port@2 { codec2_ep: endpoint { remote-endpoint = <&mix_be0_ep>; }; }; + port@3 { codec3_ep: endpoint { remote-endpoint = <&multi_10_ep>; }; }; + port@4 { codec4_ep: endpoint { remote-endpoint = <&multi_11_ep>; }; }; }; }; };