Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1529661imu; Tue, 11 Dec 2018 22:58:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/WEfWah1DhBTEFD2jXs+Cq/Kbr/GxQ9xPwhN4ekM7ufQPP780VJyp9ERxgQVorCoQvzBwFq X-Received: by 2002:a63:5d14:: with SMTP id r20mr17381509pgb.329.1544597898794; Tue, 11 Dec 2018 22:58:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544597898; cv=none; d=google.com; s=arc-20160816; b=KHHJE1bRx2bBSxVm8HzgF9jimh66QuqnZq/iAQ1bDqsh6oBWwJfGczxy5JpXFtVgJR ewkApsn2ICwGWuslWKK+n4aoWZ/wdohWEO+UumMJiIcZOIYrYCZ/gPCLO4HktszzUV7l +CgcaVN5YyA+6ko7hFYNQ7nyfZwCX2Ys/LkZze2zY/LcJ/ctp5iEJ77xj5AwiqTbpwYO hP+N5n18PhvqNa9CwoqSV+0D3szCZJFB2VQex7jj3MS+HKT5BNVMQMQnRY8zAP+IL7Bt o0XSvOFT+kI4REzTB2nMArZ8J6XFaYKFhESX5QUwXW8aU7ah03XGqy9JrXcQz6ynA4ww hHIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date; bh=0y97g2DIhTgGQnpICU7lfJItsCbRVEr86uR0ugkG7j8=; b=L4c4jWcRQ+krf7xzqmkvhmUpluRis6ZlcmvgJSFOfyFcPHycxDfB4yc3oFeOoLQTav HshSetlg/1zkDghytrff9cNM2cdUNoUaepo9xGKuVJLbB57Cup3GX8dHzKMGIGCGMaTD u4JBsFF+35+cWUFWlASrpUYoE4mDEJw2Oo+Cgbv6Ze6DqwkhUwkeaoC9HDfD4i15rZTe 8wJLeCzX951IjSS70JXSZMdfI+wYc/EC9MkeTwb+u32r3wtMLgPCDe/zuWIOAjvbGIcd IziMKFe0DgzcAW3EMK2d5a6Jt5Ox18l72YMqvCvsV9lGGsVRLpjtEIegeTO2gisZusiK 6ywg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m38si13930706pgl.125.2018.12.11.22.58.04; Tue, 11 Dec 2018 22:58:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726611AbeLLG5C (ORCPT + 99 others); Wed, 12 Dec 2018 01:57:02 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:62788 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726253AbeLLG5C (ORCPT ); Wed, 12 Dec 2018 01:57:02 -0500 X-Greylist: delayed 302 seconds by postgrey-1.27 at vger.kernel.org; Wed, 12 Dec 2018 01:57:00 EST Date: 12 Dec 2018 15:51:56 +0900 X-IronPort-AV: E=Sophos;i="5.56,343,1539615600"; d="scan'208";a="2394937" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 12 Dec 2018 15:51:56 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 979CF4039BFC; Wed, 12 Dec 2018 15:51:56 +0900 (JST) Message-ID: <87k1kfs0u5.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Tony Lindgren Cc: "alsa-devel@alsa-project.org" , "linux-omap@vger.kernel.org" , Liam Girdwood , "linux-kernel@vger.kernel.org" , Takashi Iwai , Peter Ujfalusi , Mark Brown , Sebastian Reichel , Jarkko Nikula Subject: Re: [alsa-devel] [PATCH 0/2] Graph fixes for using multiple endpoints per port In-Reply-To: <877egf33m9.wl-kuninori.morimoto.gx@renesas.com> References: <20181211020557.61783-1-tony@atomide.com> <8736r4bvf3.wl-kuninori.morimoto.gx@renesas.com> <20181211045220.GI6707@atomide.com> <871s6obqkb.wl-kuninori.morimoto.gx@renesas.com> <20181211053536.GJ6707@atomide.com> <87wooga9an.wl-kuninori.morimoto.gx@renesas.com> <20181211141649.GL6707@atomide.com> <87ftv33bpg.wl-kuninori.morimoto.gx@renesas.com> <20181212001950.GX6707@atomide.com> <877egf33m9.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Wanderlust/2.15.9 Emacs/24.5 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tony, again > > > https://patchwork.kernel.org/patch/10712877/ > > > > Hmm, so do you have multiple separate ports at the "&sound" node > > hardware? If so then yeah multiple ports make sense. > > > > But if you only a single physical (I2S?) port at the > > "&sound" node hardware, then IMO you should only have one > > port and multiple endpoints there according to the graph.txt > > binding doc. > > > > In my McBSP case there is only a single physical I2S port > > that can be TDM split into timeslots. > > Mine has 4 DAIs. Each DAI can output 2ch. > These will be merged and wil be 8ch TDM and goes to Codec. > But hmm.. it is 4 DAIs, but 1 "physical" interface... > > So, your patch seems correct, but will breaks DPCM... > I will confirm it. I thought "port" = "DAI", but yeah, "port" = "physical interface". Then, my issue is that we can't judge DAI size from DT. For example, MIXer case, 2 CPU DAIs are connected to 1 Codec. DAI0 --- CPU --- Codec DAI1 / In this case, CPU side needs 2 DAIs, Codec side needs 1 DAI only. For both CPU/Codec case, OF graph will be like below, and we can't judge DAIs size from this. port { ep0: endpint@0 { remote-endpoint = ; }; ep1: endpint@1 { remote-endpoint = ; }; } To solve this issue, we need to use "reg" for it. Then, we can get correct DAI ID. /* CPU has 2 DAIs */ CPU { port { ep0: endpint@0 { reg = <0>; remote-endpoint = ; }; ep1: endpint@1 { reg = <1>; remote-endpoint = ; }; }; } /* Codec has 1 DAI */ Codec { port { reg = <0>; ep0: endpint@0 { remote-endpoint = ; }; ep1: endpint@1 { remote-endpoint = ; }; }; } Can you agree this ? we need extra patch, but it can solve your / my problem. Now I'm posting patches to merging "audio-graph-card" and "DPCM ver audio-graph-card". If you are OK, I will include above solution patch to this patch-set. Current audio-graph doesn't expect your use-case, and I want to avoid conflict. So, "merged" audio-graph should solve your use-case. If you can agree about this, I will post patch-set. Best regards --- Kuninori Morimoto