From: Kuninori Morimoto Subject: Re: simle-card DT style for DPCM Date: Mon, 01 Sep 2014 18:28:04 -0700 (PDT) Message-ID: <87mwaikdzx.wl%kuninori.morimoto.gx@gmail.com> References: <877g1o18ka.wl%kuninori.morimoto.gx@gmail.com> <20140901143047.GX29327@sirena.org.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by alsa0.perex.cz (Postfix) with ESMTP id 0AD932651C8 for ; Tue, 2 Sep 2014 03:28:06 +0200 (CEST) Received: by mail-pd0-f174.google.com with SMTP id ft15so7272102pdb.33 for ; Mon, 01 Sep 2014 18:28:05 -0700 (PDT) In-Reply-To: <20140901143047.GX29327@sirena.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: Linux-ALSA , Lars-Peter Clausen , Kuninori Morimoto List-Id: alsa-devel@alsa-project.org Hi Mark > I think here what I'd expect to see is only one CPU DAI specified for > the back end link in the CPU that is actually linked to the CODEC and > the front ends being worked out by the drivers, unless there are systems > where the set of front ends can be configured at system build time (as > opposed to from software at runtime) somehow. This means BE don't know who is FE. The implementation can be more easy if it has connect-to / connect-from property (I'm not sure this is good naming...) So, how about this ? In pattern 3 case, it can be FE/BE if connect-to / connect-from was added, otherwise, it will be normal DAI link. connect-to / connect-from can be used if FE/BE were implemented in different driver (pattern 3 indicates simle-card is BE) We use pattern2 if FE/BE was not separated. --------------------------------------- pattern 1: use DPCM in simple-card --------------------------------------- It is supported, but it should use pattern 2 case. This is sample of connect-to / connect-from. see pattern 3 sound { compatible = "simple-audio-card"; ... /* Front End */ dai_link0: simple-audio-card,dai-link@0 { ... connect-to = <&dai-link1>; cpu { ... }; codec { ... }; } /* Back End */ dai_link1: simple-audio-card,dai-link@1 { ... connect-from = <&dai-link0>; cpu { ... }; codec { ... }; } } --------------------------------------- pattern 2: use DPCM in 1 simple-card --------------------------------------- sound { compatible = "simple-audio-card"; ... simple-audio-card,dai-link { ... cpu@0 { ... }; /* FE-cpu *//* FE-codec is dummy */ cpu@1 { ... }; /* BE-cpu */ codec@1 { ... }; /* BE-codec */ } } --------------------------------------- pattern 3: use DPCM in simple-card and other driver --------------------------------------- sound { compatible = "simple-audio-card"; ... dai_link: simple-audio-card,dai-link { ... cpu { ... }; codec { ... }; } } -- foo-bar-link: foo-bar-sound { compatible = "foo-bar-sound"; ... remote = <&dai-link>; /* foo-bar style FE * same as "connect-to" in simple-card */ }; &dai_link { /* Back End */ connect-from = <&foo-bar-link>; }; Best regards --- Kuninori Morimoto