Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1973858imu; Wed, 12 Dec 2018 07:28:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/XrsjHGnfD69+bITpRNWdb0lML8odsBkC2l9LxLLwg7n++iha+1zzCWeBUmkgciBRR2/wrj X-Received: by 2002:a63:5518:: with SMTP id j24mr18329255pgb.208.1544628526062; Wed, 12 Dec 2018 07:28:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544628526; cv=none; d=google.com; s=arc-20160816; b=sFe1828FZ5jKLUk3ikopf5c+tF8fpVqAEd83nL0OIMPfgCDH422oh6JFvAjnC6H7YO mpMaknTYFCGhAJt0QpbX+R39ni/zXayPBpHoGCUkokJ4tjzVDTKl4UV8wihqJgBSEWJk kc5wZDeyRJWe5fc2DW1RqAq17/m8WLZ49JFD4OdocC5V3QGvPcz9Q+5BLzGy1Us0EQhq atH6FfH6NcYuoveyEVsNEiDTkujxwEKxunPCeADoq9EpyKAIuTkbsvzq8B6f4NpP+Ed6 GyJ1FYJFNeFAwYU1VLi157hTkO9zTJm39VRrKJhoLtn66Vf/Pl1KKALDj7/j5BicdMl1 B7gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cdXSRuHw/sW9Bp8pECv0r5AmvvuyLZuXtfuAKpQTzYc=; b=Uin3nFX8kqDmY1nN5bLfMAoP+a4Ns/gdRG2+ms2AchNtrP48xRHQmDiT8C8kLbwg7m Y4qVGiibD87xNlr86WTsjxqA7N1rCt52+MuXymdIl0xDQmTvBbOvmRFKfcGblj302PVx a79BiIZ/RcuW+AoMdkKd5PfAVyaYcjlI/ptpricVrB4b8n0y+rGu86IgS/JfcrJUP9tH MHhLbm+yV6p1yMLNoJGZQMlWAaFReqcaJ+f53LqVzY29zjliy9o9Lj+85tSMviZACIvB pw4nkJwj46diAr99CwyeNjATnpU2NeKB0kBugpoNKX+1jU4BBws4QJUKXLeG6DlA9cnA bzaQ== 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 t20si14634760pgl.211.2018.12.12.07.28.29; Wed, 12 Dec 2018 07:28:46 -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 S1727747AbeLLP1a (ORCPT + 99 others); Wed, 12 Dec 2018 10:27:30 -0500 Received: from muru.com ([72.249.23.125]:57734 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726246AbeLLP13 (ORCPT ); Wed, 12 Dec 2018 10:27:29 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id A9649809F; Wed, 12 Dec 2018 15:27:31 +0000 (UTC) Date: Wed, 12 Dec 2018 07:27:25 -0800 From: Tony Lindgren To: Kuninori Morimoto 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 Message-ID: <20181212152725.GE6707@atomide.com> References: <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> <87k1kfs0u5.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k1kfs0u5.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Kuninori Morimoto [181212 06:52]: > > 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". OK good to hear :) > 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. Oh so the other way around compared to my use case. Hmm. > 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 = ; > }; > } Hmm I too need to add secondary DAIs for McBSP in addition to the primary DAI controlling the McBSP hardware resources. > To solve this issue, we need to use "reg" for it. > Then, we can get correct DAI ID. Hmm yeah maybe. Just to think of other options, maybe also the #size-cells could be used? As the binding allows adding #address-cells and #size-cells to the port node.. Usually if you refer a subnode of a device you just use #address=cells = <2> where the second field would be for the offset. So maybe this could be used for 1 DAI this way: /* Codec has 1 DAI */ Codec { port { #address-cells = <2>; #size-cells = <1>; ep: endpoint { remote-endpoint = ; }; }; } Where this codec would then need to be referenced with just an additional instance number: foo = <&ep 0>; bar = <&ep 1>; ... And then for a codec with 2 DAIs the usual #size-cells = <1> would be used with numbered endpoints for each DAI the way you already described: port { ep0: endpint@0 { remote-endpoint = ; }; ep1: endpint@1 { remote-endpoint = ; }; } Do you think that would work? > Can you agree this ? we need extra patch, > but it can solve your / my problem. Yes it's starting to make sense :) > 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. Sure, maybe please first check if the #size-cells = <2> option would work though? > 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. Yeah I agree, just still wondering what might be the best way to represent 1 DAI vs 2 DAIs. Regards, Tony