From patchwork Tue Jun 22 01:15:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 465199 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 E6988C4743C for ; Tue, 22 Jun 2021 01:20:52 +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 64930601FC for ; Tue, 22 Jun 2021 01:20:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64930601FC 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 0299B16CA; Tue, 22 Jun 2021 03:20:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0299B16CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1624324851; bh=/zLaHncKpjo++ifBUc+VHyu/73Xm+PlVQjV5J3j1Pj4=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jI9iLiu31JGjpo6uHwsE9nYdcNlbHt3OOtaGFjFRknuF1AnhBWtshVKsegi1rNlES GYkElD/04Fur2wfSpv6cQAnMI/8d4rAMaGBUvwb/C5xTZZNbprFELVJ1nudyif0U5v K1CR+td7iok2/c8RJvNwNk2Rgh3R/lHzea2ndhWA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5D98AF8053A; Tue, 22 Jun 2021 03:15:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6586AF804E5; Tue, 22 Jun 2021 03:15:49 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id A32DDF8053A for ; Tue, 22 Jun 2021 03:15:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A32DDF8053A Date: 22 Jun 2021 10:15:42 +0900 X-IronPort-AV: E=Sophos;i="5.83,290,1616425200"; d="scan'208";a="85109369" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 Jun 2021 10:15:42 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 3F869400D0C5; Tue, 22 Jun 2021 10:15:42 +0900 (JST) Message-ID: <87fsxa3dj5.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH RFC 15/15] ASoC: audio-graph-card2-sample.dtsi: add Codec2Codec 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 Codec2Codec sample to audio-graph-card2-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 +--+ | | <-- Codec5 | | --> Codec6 +--+ (*) "IN" -> "DAI5 Capture" -> "DAI6 Playback" -> "OUT" (*) routing is using "TC" prefix on this sample. 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. Signed-off-by: Kuninori Morimoto --- .../soc/generic/audio-graph-card2-sample.dtsi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sound/soc/generic/audio-graph-card2-sample.dtsi b/sound/soc/generic/audio-graph-card2-sample.dtsi index 1d18aba22011..f7cae9c480be 100644 --- a/sound/soc/generic/audio-graph-card2-sample.dtsi +++ b/sound/soc/generic/audio-graph-card2-sample.dtsi @@ -24,6 +24,8 @@ / { * cpu3 <-/ // DPCM * cpu4 <==> codec3 // Multi (*1) * cpu5 <==> codec4 // Multi (*1) + * /=> codec5 // Codec2Codec + * \=> codec6 // Codec2Codec */ card2 { /* @@ -37,11 +39,14 @@ card2 { routing = "TC DAI2 Playback", "DAI2 Playback", "TC DAI2 Playback", "DAI3 Playback", "DAI2 Capture", "TC DAI2 Capture", - "DAI3 Capture", "TC DAI2 Capture"; + "DAI3 Capture", "TC DAI2 Capture", + "TC OUT" ,"TC DAI6 Playback", + "TC DAI5 Capture", "TC IN"; links = <&cpu0 &cpu1 /* normal: cpu side only */ &mix_fe0 &mix_fe1 &mix_be0 /* dsp : both fe/be */ &multi_cpu /* multi : cpu side only */ + &c2c /* c2c : first one only */ >; }; @@ -76,6 +81,16 @@ multi_codec: ports@1 { }; }; + codec2codec { + compatible = "audio-graph-card2-codec2codec"; + + rate = <48000>; + ports@1 { + c2c: port@0 { c2c_0_ep: endpoint { remote-endpoint = <&codec5_ep>; }; }; + port@1 { c2c_1_ep: endpoint { remote-endpoint = <&codec6_ep>; }; }; + }; + }; + test_cpu { /* * update compatible to indicate more detail behaviour @@ -118,6 +133,8 @@ ports { 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>; }; }; + port@5 { codec5_ep: endpoint { remote-endpoint = <&c2c_0_ep>; }; }; + port@6 { codec6_ep: endpoint { remote-endpoint = <&c2c_1_ep>; }; }; }; }; };