From patchwork Tue Oct 12 04:56:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 12551507 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 84DDBC433F5 for ; Tue, 12 Oct 2021 05:00:09 +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 A98AB60D42 for ; Tue, 12 Oct 2021 05:00:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A98AB60D42 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 118431693; Tue, 12 Oct 2021 06:59:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 118431693 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1634014807; bh=zigMbgsQeHffByqYyZ7L9360xtsnjlyeoWrpD1RH8Zk=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aEMk0I0You2iDXVc8IJqR5YIkuVTSVCtZA6XLCwI374dVLQwA/MqsebmEny3h+tCX R2xLooOK4Lx61hyqKftnhMCfAKudPcF8QX8+zhhB4vrGlk3DYaiMA3keYKxBi3oTWB 4RKzm2DRmj2tgpWDZmugxilbTNdE5+/ZjJvzsQjw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C110AF80518; Tue, 12 Oct 2021 06:56:47 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E606EF8052D; Tue, 12 Oct 2021 06:56:45 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 95C31F80518 for ; Tue, 12 Oct 2021 06:56:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 95C31F80518 Date: 12 Oct 2021 13:56:31 +0900 X-IronPort-AV: E=Sophos;i="5.85,366,1624287600"; d="scan'208";a="96710800" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 12 Oct 2021 13:56:31 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 797704007F58; Tue, 12 Oct 2021 13:56:31 +0900 (JST) Message-ID: <87o87ulu2o.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 15/16] ASoC: audio-graph-card2-custom-sample.dtsi: add Codec2Codec sample (Single) User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown In-Reply-To: <87a6jen8su.wl-kuninori.morimoto.gx@renesas.com> References: <87a6jen8su.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-Single 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 +--+ | | <-- Codec6 <-- IN | | --> Codec7 --> 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: test_codec.7 <-> test_codec.6 mapping ok test-component test_codec: test_dai_startup() : test_codec.6 test-component test_codec: test_dai_startup() : test_codec.7 ... Signed-off-by: Kuninori Morimoto --- .../audio-graph-card2-custom-sample.dtsi | 23 ++++++++++++++++++- 1 file changed, 22 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 4bc96e0aa447..f416dead9522 100644 --- a/sound/soc/generic/audio-graph-card2-custom-sample.dtsi +++ b/sound/soc/generic/audio-graph-card2-custom-sample.dtsi @@ -48,6 +48,11 @@ / { * cpu5 <-@--* *--@-> | | -> codec4 * cpu6 <-@--* * | | -> codec5 * **** +-+ + * + * [Codec2Codec] + * +-@-> codec6 + * | + * +---> codec7 */ audio-graph-card2-custom-sample { /* @@ -72,12 +77,16 @@ audio-graph-card2-custom-sample { "DAI5 Capture", "TC DAI4 Capture", "DAI5 Capture", "TC DAI5 Capture", "DAI6 Capture", "TC DAI4 Capture", - "DAI6 Capture", "TC DAI5 Capture"; + "DAI6 Capture", "TC DAI5 Capture", + /* for [Codec2Codec] */ + "TC OUT", "TC DAI7 Playback", + "TC DAI6 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 */ >; multi { @@ -112,6 +121,14 @@ ports@1 { be1: port@1 { be10_ep: endpoint { remote-endpoint = <&mbe_ep>; }; }; }; }; + + codec2codec { + ports@0 { + rate = <48000>; + c2c: port@0 { c2cf_ep: endpoint { remote-endpoint = <&codec6_ep>; }; }; + port@1 { c2cb_ep: endpoint { remote-endpoint = <&codec7_ep>; }; }; + }; + }; }; test_cpu { @@ -160,6 +177,10 @@ ports { port@3 { codec3_ep: endpoint { remote-endpoint = <&be00_ep>; }; }; port@4 { codec4_ep: endpoint { remote-endpoint = <&mbe1_ep>; }; }; port@5 { codec5_ep: endpoint { remote-endpoint = <&mbe2_ep>; }; }; + port@6 { bitclock-master; + frame-master; + codec6_ep: endpoint { remote-endpoint = <&c2cf_ep>; }; }; + port@7 { codec7_ep: endpoint { remote-endpoint = <&c2cb_ep>; }; }; }; }; };