Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp726377ybv; Thu, 20 Feb 2020 06:18:23 -0800 (PST) X-Google-Smtp-Source: APXvYqwRgkEWscZNh0FFf3NBXc6nLc9AtZ9HYfhQ+Llj9X5sEPOhR5PnYu0x7nW4FDuz3iOAYuS4 X-Received: by 2002:aca:ab52:: with SMTP id u79mr2034061oie.145.1582208303202; Thu, 20 Feb 2020 06:18:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582208303; cv=none; d=google.com; s=arc-20160816; b=r/n/v41eGZbScATotzU2dqdUt1xIqWJdBmy9iesxipYmFSpn/2g/qIRS+SPUbU2yex 5ZSV6pz1DPHXcrL3oSOdDcL4xQaBlbCreeOz7DFjAuWH6PL62kWNKT6iIpPgtMx5mLhF Y46HZ+75yyuW00Z95Xk/GcxsPdEnK8kBVzZmr+lg7iolDIjAb2sNZkhtCCoP8UvlamVC LqwLda4LIXb3IHUB4r1wla2Lmcy+irUBqT31WUN6W6owraWIaYvg3GWGVAm+0vTkLl5X pGH+ttp9IxmTGP35KCkAymBdtz+KpkDXZi6I0hMrMCKiA3wUEr02fDBOW62V2IeOyS+C zUVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Axzg4rCh+ok1KaDsGcP9AyakqPBpC/mwibitdg3IGVw=; b=fY5Am7/tj/7S0kTW3kzqmESzTzkNsESlOFyGwBZc1V+l5p199na75FpkRTeM7ZQhh3 cbZRWbgdATGE1UlZ+53Ph/M18U9sQiJchcHU1r4Lo/AcYBSA+XCIruwizZLcyUZkQKqH gQMcazD/hLcYNZwGPtYAUTPrpkyfZng/lEGLybNi6ApGX98lDSJ2szJPBav21l3zsewT tsxniIT5RuwOFAmqmmewrEGogSV5O+dhSxk6K3RaZ8C7BQeIs/a1g0V6CsqVplYHToYa AIvlMU4IWL6zAdpyEYmiOQWXuTHZ7dzBSbM3wEHTciNU7KUlCIIAXZD2lRaK4o2FyD1x 2HRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=pCKRt1az; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si11306411oic.225.2020.02.20.06.18.05; Thu, 20 Feb 2020 06:18:23 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=pCKRt1az; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728318AbgBTOQZ (ORCPT + 99 others); Thu, 20 Feb 2020 09:16:25 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:45454 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727088AbgBTOQZ (ORCPT ); Thu, 20 Feb 2020 09:16:25 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 01KEFGMm051288; Thu, 20 Feb 2020 08:15:16 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1582208116; bh=Axzg4rCh+ok1KaDsGcP9AyakqPBpC/mwibitdg3IGVw=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=pCKRt1az0CeDDzXENnEc0MpcujZQB0YGekohRP4P5jXgjcreBXflff1LrL4Ub1TZL DxnB5RImn2+G2ZNRAVYSsuCfZIUK4AoioyfGKQNj8G3Qufr3OerZ/OA32JqhUfiHat rpVl02uBPoe3igOGt4IAxogn0D0GewhssAGRTp5A= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 01KEFGMQ012068 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 20 Feb 2020 08:15:16 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 20 Feb 2020 08:15:16 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 20 Feb 2020 08:15:16 -0600 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 01KEFCgO095562; Thu, 20 Feb 2020 08:15:12 -0600 Subject: Re: [PATCH] ASoC: ti: Allocate dais dynamically for TDM and audio graph card To: Sebastian Reichel CC: Tony Lindgren , Kuninori Morimoto , Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , , , , Aaro Koskinen , "Arthur D ." , Jarkko Nikula , Merlijn Wajer , Pavel Machek References: <20200211171645.41990-1-tony@atomide.com> <20200212143543.GI64767@atomide.com> <346dfd2b-23f8-87e0-6f45-27a5099b1066@ti.com> <20200214170322.GZ64767@atomide.com> <20200217231001.GC35972@atomide.com> <5402eba8-4f84-0973-e11b-6ab2667ada85@ti.com> <20200218211631.fxojsxzvttoidfed@earth.universe> From: Peter Ujfalusi Message-ID: Date: Thu, 20 Feb 2020 16:15:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200218211631.fxojsxzvttoidfed@earth.universe> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, On 18/02/2020 23.16, Sebastian Reichel wrote: >> The simplest use cases you want to support: >> A. McBSP3 <-> CPCAP_voice (playback/capture) >> B. MDM6600 <-> CPCAP_voice (handset mic/speaker voice call) >> C. MDM6600 <-> WL1285 (BT voice call) >> D. McBSP3 <-> BT (VoIP?) > > Your description matches my understanding of the hardware setup. > >> I would not bother with recording the call as you would need tom >> reconfigure the McBSP playback pin (is it even possible) as input to >> OMAP4, I think.. >> >> B/C is codec2codec, McBSP3 is not involved at all. >> A/D is when McBSP3 is used only. >> >> Imho this can be represented as >> McBSP2: 1 port >> 1.1: to CPCAP_hifi >> >> McBSP3: 1 port, 2 endpoint >> 2.1: to CPCAP_voice >> 2.2: to WL1285 >> CPCAP: 2 ports >> hifi: 3.1: to McBSP2 >> voice: 4.1: to McBSP3 >> 4.2: to MDM6600 >> MDM6600: 2 ports > > I suppose you mean 1 port, 2 endpoints? Oh yes. Numbers.... > >> 5.1: to CPAC_voice >> 5.2: to WL1285 >> WL1285: 2 ports > > and here too? here too ;) > >> 6.1: to McBSP3 >> 6.2: to MDM6600 >> >> The machine driver should switch between the graph links based on the >> use case for the interconnected devices: >> A: 2.2 <-> 4.1 >> B: 4.2 <-> 5.1 >> C: 6.2 <-> 5.1 >> D: 2.2 <-> 6.1 >> >> Can a generic card provide such a functionality? > > I suppose in the end its a question if generic card can provide TDM > support. Sure it can, but can it handle the switching between the paths based on use cases? There should be machine level DAPM widgets to kick codec2codec (MDM6600 - CPAC_voice for example) and also to make sure that when you switch between them the system is not going to get misconfigured. Switching between CPAC and BT route during call? Not allowing VoIP while on call, etc. >> In case of B/C you should not have a running stream imho. > > I would expect, that MDM6600 codec marks itself as running/stopped > based on call state. That should enable DAPM widgets automatically > when CPCAP_voice is routed to MDM6600? > >> In all cases CPCAP_voice should be able to run the clocks on i2s, >> even if it is not used by the audio setup. >> Not sure if you can just turn Wl1285 as master, but it is possible >> that it is master, but silent when it is not used? > > I provided CPCAP registers for BT call, which should be enough to > figure this out (I did not yet analyze the results myself). I got the datasheet from NXP (thanks for the pointer!), I try to look at it in a coming days. >> I'm not sure if we should span out dummy dais for endpoints within a >> port. Imho the port _is_ the dai. Different endpoints might use >> different TDM slots on the port (or the same slot, which makes them >> exclusive). > > Makes sense to me. > > -- Sebastian - P?ter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki