From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 EDE74C7619B for ; Mon, 17 Feb 2020 05:26:30 +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 74D9C2064C for ; Mon, 17 Feb 2020 05:26:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="X7NecdeB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74D9C2064C 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 C0ED0846; Mon, 17 Feb 2020 06:25:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C0ED0846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1581917188; bh=2tlP1z+71zIeMEASYDFfe1t22oi+oNe5EpGdvruyHx4=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=X7NecdeBzbI95E5fZV05cRUvbSgUihUFjKR0sVnSiSM2T3LEwGQcLq8dl8DzNow94 zn5NbFOlynxP55Wzew1ffxtRIR7NWlLpu+UlksxPgVgBx9LZ3ijrR2BOG1U2wfKa8K K8NIX5jRaP1tmbs9FKuDE/b9MOu9DZE+axEzeyY8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 245C3F8015E; Mon, 17 Feb 2020 06:25:38 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 72BABF80172; Mon, 17 Feb 2020 06:25:35 +0100 (CET) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 8A92EF800B6 for ; Mon, 17 Feb 2020 06:25:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8A92EF800B6 Date: 17 Feb 2020 14:25:22 +0900 X-IronPort-AV: E=Sophos;i="5.70,451,1574089200"; d="scan'208";a="39471410" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 17 Feb 2020 14:25:22 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 7A35F400754F; Mon, 17 Feb 2020 14:25:22 +0900 (JST) Message-ID: <87h7zpaiq7.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Kuninori Morimoto In-Reply-To: <87eeuuat85.wl-kuninori.morimoto.gx@renesas.com> References: <20200211171645.41990-1-tony@atomide.com> <20200212143543.GI64767@atomide.com> <346dfd2b-23f8-87e0-6f45-27a5099b1066@ti.com> <20200214170322.GZ64767@atomide.com> <87eeuuat85.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Wanderlust/2.15.9 Emacs/25.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, Aaro Koskinen , Tony Lindgren , linux-kernel@vger.kernel.org, Merlijn Wajer , Takashi Iwai , Liam Girdwood , Peter Ujfalusi , Mark Brown , Pavel Machek , Sebastian Reichel , "Arthur D ." , Jarkko Nikula Subject: Re: [alsa-devel] [PATCH] ASoC: ti: Allocate dais dynamically for TDM and audio graph card 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Hi > I confirmed attached patch on my local platform (= Renesas ULCB + KF board), > and it works well for me on at least v5.5 kernel. Maybe my DT patch was not good for port vs endpoint. I attached new one. -------------------------- >From a222375f826f650d1181646cc79b8b89b364da2a Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Fri, 14 Dec 2018 09:47:47 +0900 Subject: [PATCH 1/2] Local v5.4: ulcb-kf: add TDM Split support CPU0 ------ ak4613 CPU1 ------ PCM3168A-p /* 1ch/2ch */ CPU2 --/ /* 3ch/4ch */ CPU3 --/ /* 5ch/6ch */ CPU4 --/ /* 7ch/8ch */ CPU5 ------ PCM3168A-c /* 1ch/2ch */ CPU6 --/ /* 3ch/4ch */ CPU7 --/ /* 5ch/6ch */ aplay -D plughw:0,0 xxx.wav // ak4613 aplay -D plughw:0,1 xxx.wav // PCM3168A playback 1ch/2ch aplay -D plughw:0,2 xxx.wav // PCM3168A playback 3ch/4ch aplay -D plughw:0,3 xxx.wav // PCM3168A playback 5ch/6ch aplay -D plughw:0,4 xxx.wav // PCM3168A playback 7ch/8ch arecord -D plughw:0,5 xxx // PCM8168A capture 1ch/2ch arecord -D plughw:0,6 xxx // PCM8168A capture 3ch/4ch arecord -D plughw:0,7 xxx // PCM8168A capture 5ch/6ch It seems 1 sound card DAI number is limited by SNDRV_MINOR(). Because of this size limit, total 8 DAI seems maximam. So, this patch removes HDMI so far. Signed-off-by: Kuninori Morimoto --- arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 116 ++++++++++++++++++++--- 1 file changed, 105 insertions(+), 11 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi index 202177706cde..2c3bd62d13ff 100644 --- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi @@ -115,18 +115,39 @@ #size-cells = <0>; mclk-fs = <512>; port@0 { + prefix = "pcm3168a"; + convert-channels = <8>; /* TDM Split */ reg = <0>; - pcm3168a_endpoint_p: endpoint { + pcm3168a_endpoint_p: endpoint@0 { remote-endpoint = <&rsnd_for_pcm3168a_play>; clocks = <&clksndsel>; }; + pcm3168a_endpoint_p2: endpoint@1 { + remote-endpoint = <&rsnd_for_pcm3168a_play2>; + }; + pcm3168a_endpoint_p3: endpoint@2 { + remote-endpoint = <&rsnd_for_pcm3168a_play3>; + }; + pcm3168a_endpoint_p4: endpoint@3 { + remote-endpoint = <&rsnd_for_pcm3168a_play4>; + }; }; port@1 { + prefix = "pcm3168a"; + convert-channels = <6>; /* TDM Split */ reg = <1>; - pcm3168a_endpoint_c: endpoint { + pcm3168a_endpoint_c: endpoint@0 { remote-endpoint = <&rsnd_for_pcm3168a_capture>; clocks = <&clksndsel>; }; + pcm3168a_endpoint_c2: endpoint@1 { + remote-endpoint = <&rsnd_for_pcm3168a_capture2>; + clocks = <&clksndsel>; + }; + pcm3168a_endpoint_c3: endpoint@2 { + remote-endpoint = <&rsnd_for_pcm3168a_capture3>; + clocks = <&clksndsel>; + }; }; }; }; @@ -299,28 +320,86 @@ /* rsnd_port0/1 are on salvator-common */ rsnd_port2: port@2 { reg = <2>; - rsnd_for_pcm3168a_play: endpoint { + rsnd_for_pcm3168a_play: endpoint@2 { remote-endpoint = <&pcm3168a_endpoint_p>; dai-format = "i2s"; bitclock-master = <&rsnd_for_pcm3168a_play>; frame-master = <&rsnd_for_pcm3168a_play>; - dai-tdm-slot-num = <8>; - playback = <&ssi3>; + playback = <&ssiu30 &ssi3>; }; }; rsnd_port3: port@3 { reg = <3>; - rsnd_for_pcm3168a_capture: endpoint { + rsnd_for_pcm3168a_play2: endpoint@3 { + remote-endpoint = <&pcm3168a_endpoint_p2>; + + dai-format = "i2s"; + bitclock-master = <&rsnd_for_pcm3168a_play2>; + frame-master = <&rsnd_for_pcm3168a_play2>; + + playback = <&ssiu31 &ssi3>; + }; + }; + rsnd_port4: port@4 { + reg = <4>; + rsnd_for_pcm3168a_play3: endpoint@4 { + remote-endpoint = <&pcm3168a_endpoint_p3>; + + dai-format = "i2s"; + bitclock-master = <&rsnd_for_pcm3168a_play3>; + frame-master = <&rsnd_for_pcm3168a_play3>; + + playback = <&ssiu32 &ssi3>; + }; + }; + rsnd_port5: port@5 { + reg = <5>; + rsnd_for_pcm3168a_play4: endpoint@5 { + remote-endpoint = <&pcm3168a_endpoint_p4>; + + dai-format = "i2s"; + bitclock-master = <&rsnd_for_pcm3168a_play4>; + frame-master = <&rsnd_for_pcm3168a_play4>; + + playback = <&ssiu33 &ssi3>; + }; + }; + rsnd_port6: port@6 { + reg = <6>; + rsnd_for_pcm3168a_capture: endpoint@6 { remote-endpoint = <&pcm3168a_endpoint_c>; dai-format = "i2s"; bitclock-master = <&rsnd_for_pcm3168a_capture>; frame-master = <&rsnd_for_pcm3168a_capture>; - dai-tdm-slot-num = <6>; - capture = <&ssi4>; + capture = <&ssiu40 &ssi4>; + }; + }; + rsnd_port7: port@7 { + reg = <7>; + rsnd_for_pcm3168a_capture2: endpoint@7 { + remote-endpoint = <&pcm3168a_endpoint_c2>; + + dai-format = "i2s"; + bitclock-master = <&rsnd_for_pcm3168a_capture2>; + frame-master = <&rsnd_for_pcm3168a_capture2>; + + capture = <&ssiu41 &ssi4>; + }; + }; + rsnd_port8: port@8 { + reg = <8>; + rsnd_for_pcm3168a_capture3: endpoint@8 { + remote-endpoint = <&pcm3168a_endpoint_c3>; + + dai-format = "i2s"; + bitclock-master = <&rsnd_for_pcm3168a_capture3>; + frame-master = <&rsnd_for_pcm3168a_capture3>; + + capture = <&ssiu42 &ssi4>; }; }; }; @@ -359,10 +438,25 @@ }; &sound_card { + compatible = "audio-graph-scu-card"; + + routing = "pcm3168a Playback", "DAI2 Playback", + "pcm3168a Playback", "DAI3 Playback", + "pcm3168a Playback", "DAI4 Playback", + "pcm3168a Playback", "DAI5 Playback", + "DAI6 Capture", "pcm3168a Capture", + "DAI7 Capture", "pcm3168a Capture", + "DAI8 Capture", "pcm3168a Capture"; + dais = <&rsnd_port0 /* ak4613 */ - &rsnd_port1 /* HDMI0 */ - &rsnd_port2 /* pcm3168a playback */ - &rsnd_port3 /* pcm3168a capture */ +// &rsnd_port1 /* HDMI0 */ + &rsnd_port2 /* pcm3168a playback 1ch/2ch */ + &rsnd_port3 /* 3ch/4ch */ + &rsnd_port4 /* 5ch/6ch */ + &rsnd_port5 /* 7ch/8ch */ + &rsnd_port6 /* pcm3168a capture 1ch/2ch */ + &rsnd_port7 /* 3ch/4ch */ + &rsnd_port8 /* 5ch/6ch */ >; }; -- 2.17.1 Thank you for your help !! Best regards --- Kuninori Morimoto _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel