mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jean-Francois Moine <moinejf@free.fr>
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: Wed, 1 Jan 2014 12:59:47 +0000	[thread overview]
Message-ID: <20140101125947.GO31886@sirena.org.uk> (raw)
In-Reply-To: <20131231184430.3a4c9414@armhf>

[-- Attachment #1: Type: text/plain, Size: 1793 bytes --]

On Tue, Dec 31, 2013 at 06:44:30PM +0100, Jean-Francois Moine wrote:
> Mark Brown <broonie@kernel.org> wrote:

> > 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.

That's a sign that you're putting Linux implementation details into your
DT - remember, DT is supposed to be implementation neutral.

> 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

They should be able to use a default there; I'd expect that just to be
making the IDs the same as the index into the array or the ID field.

> 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

Then as soon as anything else starts using the same name for some reason
the binding stops being useful.

> than a DAI index and that it is less subject to internal changes of the
> CODEC driver.

Obviously the numbers that get assigned become a part of the ABI and
can't be changed.  Now that we have preprocessor support for DT the
plain text can be done with that, though for a lot of devices that won't
be needed as the devices are just numbered anyway.

> 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.

This doesn't mean it's a good idea to do it - as you will remember I
said I expected things to want to go more towards using phandle plus ID 
for everything.  

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2014-01-01 13:00 UTC|newest]

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

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=20140101125947.GO31886@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moinejf@free.fr \
    --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

all inboxes | Powered by JetHome®