From patchwork Wed Oct 6 00:36:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 12538307 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA5C1C433F5 for ; Wed, 6 Oct 2021 00:40:29 +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 4CCF46120C for ; Wed, 6 Oct 2021 00:40:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4CCF46120C 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-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 E486B169C; Wed, 6 Oct 2021 02:39:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E486B169C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1633480828; bh=8KmqMK6FtQJcBf01F1vVHubpzcCgJBQa4AR9x8LkYl4=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aS83QDPS6Bmk1ji2ftfW9+HjRbzGIbX90M641Zanp7vqTo126Pv6h15aZHwCX6iyQ uAQUrf5hZyu5JZH8lnwU+dTz61na4y955d3OoQ7rng7W1zphC5kp4Eu0T2OUf1Ilnl O7NahTSCPWpxrlehr87WKGmhITrpowTl4a06nkuw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3D52AF804BD; Wed, 6 Oct 2021 02:36:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2048BF8052D; Wed, 6 Oct 2021 02:36:13 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 12C93F8020D for ; Wed, 6 Oct 2021 02:36:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 12C93F8020D Date: 06 Oct 2021 09:36:01 +0900 X-IronPort-AV: E=Sophos;i="5.85,350,1624287600"; d="scan'208";a="96235444" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 06 Oct 2021 09:36:01 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 9920640041BA; Wed, 6 Oct 2021 09:36:01 +0900 (JST) Message-ID: <87mtnn3s7i.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v4 16/16] ASoC: audio-graph-card2-custom-sample.dtsi: add Codec2Codec sample (Multi) User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown In-Reply-To: <87a6jn56x0.wl-kuninori.morimoto.gx@renesas.com> References: <87a6jn56x0.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 Codec2Codec-Multi sample to audio-graph-card2-custom-sample.dtsi. Because it can use very basic connection only for now, it can use only - 2channels - S32_LE format Test-Component driver has "IN" and "OUT" widget. Thus the route is +--+ +-+ | | | |- Codec8 <- IN | | <- | |- Codec9 <- IN | | +-+ | | | | +-+ | | -> | |- Codec10 -> OUT | | | |- Codec11 -> OUT +--+ +-+ One note here is that it will start works when it boot. In other words we can't stop it so far. We need to update driver for it in the future. ... asoc-audio-graph-card2-custom-sample: multicodec <-> multicpu mapping ok test-component test_codec: test_dai_startup() : test_codec.9 test-component test_codec: test_dai_startup() : test_codec.8 test-component test_codec: test_dai_startup() : test_codec.11 test-component test_codec: test_dai_startup() : test_codec.10 ... Signed-off-by: Kuninori Morimoto --- .../audio-graph-card2-custom-sample.dtsi | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/sound/soc/generic/audio-graph-card2-custom-sample.dtsi b/sound/soc/generic/audio-graph-card2-custom-sample.dtsi index f416dead9522..8eee7b821ff7 100644 --- a/sound/soc/generic/audio-graph-card2-custom-sample.dtsi +++ b/sound/soc/generic/audio-graph-card2-custom-sample.dtsi @@ -53,6 +53,20 @@ / { * +-@-> codec6 * | * +---> codec7 + * + * [Codec2Codec-Multi] + * + * --NOTE-- + * Multi connect N:M is not supported by ASoC. + * + * +-+ + * +-@->| |-> codec8 + * | | |-> codec9 + * | +-+ + * | +-+ + * +--->| |-> codec10 + * | |-> codec11 + * +-+ */ audio-graph-card2-custom-sample { /* @@ -80,13 +94,19 @@ audio-graph-card2-custom-sample { "DAI6 Capture", "TC DAI5 Capture", /* for [Codec2Codec] */ "TC OUT", "TC DAI7 Playback", - "TC DAI6 Capture", "TC IN"; + "TC DAI6 Capture", "TC IN", + /* for [Codec2Codec-Multi] */ + "TC OUT", "TC DAI10 Playback", + "TC DAI8 Capture", "TC IN", + "TC OUT", "TC DAI11 Playback", + "TC DAI9 Capture", "TC IN"; links = <&cpu0 /* normal: cpu side only */ &mcpu0 /* multi: cpu side only */ &fe00 &fe01 &be0 /* dpcm: both FE / BE */ &fe10 &fe11 &be1 /* dpcm-m: both FE / BE */ &c2c /* c2c: cpu side only */ + &c2c_m /* c2c: cpu side only */ >; multi { @@ -105,6 +125,16 @@ ports@2 { port@1 { mbe1_ep: endpoint { remote-endpoint = <&codec4_ep>; }; }; port@2 { mbe2_ep: endpoint { remote-endpoint = <&codec5_ep>; }; }; }; + ports@3 { + port@0 { mc2c0_ep: endpoint { remote-endpoint = <&c2cmf_ep>; }; }; + port@1 { mc2c00_ep: endpoint { remote-endpoint = <&codec8_ep>; }; }; + port@2 { mc2c01_ep: endpoint { remote-endpoint = <&codec9_ep>; }; }; + }; + ports@4 { + port@0 { mc2c1_ep: endpoint { remote-endpoint = <&c2cmb_ep>; }; }; + port@1 { mc2c10_ep: endpoint { remote-endpoint = <&codec10_ep>; }; }; + port@2 { mc2c11_ep: endpoint { remote-endpoint = <&codec11_ep>; }; }; + }; }; dpcm { @@ -128,6 +158,11 @@ ports@0 { c2c: port@0 { c2cf_ep: endpoint { remote-endpoint = <&codec6_ep>; }; }; port@1 { c2cb_ep: endpoint { remote-endpoint = <&codec7_ep>; }; }; }; + ports@1 { + rate = <48000>; + c2c_m: port@0 { c2cmf_ep: endpoint { remote-endpoint = <&mc2c0_ep>; }; }; + port@1 { c2cmb_ep: endpoint { remote-endpoint = <&mc2c1_ep>; }; }; + }; }; }; @@ -181,6 +216,12 @@ ports { frame-master; codec6_ep: endpoint { remote-endpoint = <&c2cf_ep>; }; }; port@7 { codec7_ep: endpoint { remote-endpoint = <&c2cb_ep>; }; }; + port@8 { bitclock-master; + frame-master; + codec8_ep: endpoint { remote-endpoint = <&mc2c00_ep>; }; }; + port@9 { codec9_ep: endpoint { remote-endpoint = <&mc2c01_ep>; }; }; + port@10 { codec10_ep: endpoint { remote-endpoint = <&mc2c10_ep>; }; }; + port@11 { codec11_ep: endpoint { remote-endpoint = <&mc2c11_ep>; }; }; }; }; };