alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: make snd_soc_dai_link more symmetrical
Date: Tue, 31 Dec 2013 18:44:30 +0100	[thread overview]
Message-ID: <20131231184430.3a4c9414@armhf> (raw)
In-Reply-To: <20131231165533.GK31886@sirena.org.uk>

On Tue, 31 Dec 2013 16:55:33 +0000
Mark Brown <broonie@kernel.org> wrote:

> On Thu, Dec 12, 2013 at 06:59:17PM +0100, Jean-Francois Moine wrote:
> 
> > This patch renders optional the CODEC name / OF node on sound card register,
> > as it is done for the CPU side, in the case the CODEC DAI name is unique.
> 
> > This simplifies the definition of CODECs with multiple DAIs, especially
> > in DTs, while keeping compatibility.
> 
> So, this is similar to one of the comments I made on the DT patch you
> sent today: you're saying that this makes things better but you're not
> saying why it makes things better.  I've been sitting on this partly
> because I've been wanting to sit down and try to work out what the
> benefit is.  This information should be readily avaiable and omiting it
> seems like it will make things more fragile.
> 
> If anything I'd expect DT to want to move towards specifying things by
> CODEC plus optional DAI index rather than anything else, that's the more
> common pattern for DT based things (really phandle plus index) and it's
> what the current generic card is doing.
> 
> It's possible there is a benefit I'm just not seeing but you'll need to
> tell me.

The first benefit I got was in the front-end definition: the codec side
is the dummy codec, and this one has no phandle.

Then, finding the CODEC DAI from phandle asks for more code
(of_xlate_dai_name in the CODEC drivers) and finding it from the CODEC
name asks for a double loop in soc_bind_dai_link. On the other way, a
simple loop without any more change may be used when the DAI is simply
specified by its name. I would say that the DAI name is more meaningful
than a DAI index and that it is less subject to internal changes of the
CODEC driver.

Eventually, I don't think that, using only the name of the CODEC side
DAI to identify it, is not more fragile than identifying the CPU side
of the DAI link by its name.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

  reply	other threads:[~2013-12-31 17:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 17:59 [PATCH] ASoC: make snd_soc_dai_link more symmetrical Jean-Francois Moine
2013-12-31 16:55 ` Mark Brown
2013-12-31 17:44   ` Jean-Francois Moine [this message]
2014-01-01 12:59     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131231184430.3a4c9414@armhf \
    --to=moinejf@free.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).