From: Grant Likely <grant.likely@secretlab.ca>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
kumar.gala@freescale.com, linuxppc-dev@ozlabs.org,
Timur Tabi <timur@freescale.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 1/2] powerpc: add platform registration for ALSA SoC drivers
Date: Tue, 27 Apr 2010 20:31:18 -0600 [thread overview]
Message-ID: <i2vfa686aa41004271931wc04b9c11l5f3ebda0acb14b9@mail.gmail.com> (raw)
In-Reply-To: <20100427222913.GE15083@opensource.wolfsonmicro.com>
On Tue, Apr 27, 2010 at 4:29 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Tue, Apr 27, 2010 at 02:24:34PM -0600, Grant Likely wrote:
>
>> However, as you and Mark rightly point out, it completely fails to
>> represent complex sound devices with weird clocking and strange
>> routes. Something like this is probably more appropriate:
>
>>
>> [...]
>> codec1 :codec@4f {
>> compatible = "cirrus,cs4270";
>> reg = <0x4f>;
>> /* MCLK source is a stand-alone oscillator */
>> clock-frequency = <12288000>;
>> };
>
> You also want to be representing unused pins here.
>
>> [...]
>> ssi1: ssi@16000 {
>> compatible = "fsl,mpc8610-ssi";
>> [...]
>> fsl,mode = "i2s-slave";
>
> I'd not include the master/slave decision; it's either implied by the
> fact that the CODEC has a standalone clock, a property of the link/card,
> or a policy decision that the running software can change on a whim.
>
>> sound {
>> compatible = "fsl,mpc8610-hpcd-sound";
>> /* maybe something like (totally off the top of my head) */
>> dai-links = <&ssi1 0 &codec 0
>> &ssi1 1 &codec 1>;
>
> I'm having a hard time loving this. I'd be looking for a lot more
> semantics on the links (things like information about separate clocks
> for the two directions, for example) which makes me think that that
> simple list format is far too simple and you want a list of more complex
> objects.
Oh, absolutely. This example is no where near complete. Mostly I
just wanted to give a concrete example of a 'virtual' device like Ben
was talking about. I'm not going to even attempt to draft a complete
binding until I've got time to properly go over the issues involved
and discuss them with you and Liam.
> There's also analogue interconnects to deal with, and jacks (including
> detection and accessories). Jacks can be particularly entertaining
> here.
>
>> Or, in other words, the device tree should *not* be used to describe
>> every possible detail and permutation. It is best used to describe
>> the permutations that are common so that they don't need to be hard
>> coded for each and every board.
>
> I think the ideal is something that's purely descriptive of the hardware
> and doesn't include any policy decisions. Policy decisions covers an
> awful lot of the interesting issues, though - but they're the sort of
> things that can easily be changed with a new software load and therefore
> don't belong in the device tree.
Agreed.
> On the other hand from a pragmatic point of view it's just much less
> hassle to just only provide the mechanism for instantiating a machine
> with custom code and use that for everything.
Also true, but this approach carries with it an incremental cost that
distributions feel the pain of. Ultimately I think we'll find a sweet
spot somewhere in between.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2010-04-28 2:31 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 20:49 [PATCH 1/2] powerpc: add platform registration for ALSA SoC drivers Timur Tabi
2010-04-27 6:36 ` Benjamin Herrenschmidt
2010-04-27 8:07 ` Liam Girdwood
2010-04-27 14:52 ` Timur Tabi
2010-04-27 15:20 ` Liam Girdwood
2010-04-27 15:28 ` Timur Tabi
2010-04-27 15:56 ` Timur Tabi
2010-04-27 16:41 ` Liam Girdwood
2010-04-27 18:32 ` Timur Tabi
2010-04-27 19:15 ` Grant Likely
2010-04-27 20:04 ` Timur Tabi
2010-04-27 20:38 ` Mark Brown
2010-04-28 4:19 ` Benjamin Herrenschmidt
2010-04-28 4:18 ` Benjamin Herrenschmidt
2010-04-30 21:46 ` Timur Tabi
2010-04-30 22:04 ` Timur Tabi
2010-04-27 20:24 ` Grant Likely
2010-04-27 20:46 ` Timur Tabi
2010-04-27 20:59 ` Mark Brown
2010-04-27 21:03 ` Timur Tabi
2010-04-27 21:11 ` Mark Brown
2010-04-28 4:25 ` Benjamin Herrenschmidt
2010-04-28 13:00 ` Mark Brown
2010-04-29 0:42 ` Benjamin Herrenschmidt
2010-04-28 5:37 ` Grant Likely
2010-04-28 13:35 ` Timur Tabi
2010-04-28 13:57 ` Grant Likely
2010-04-28 16:20 ` Timur Tabi
2010-04-28 16:47 ` Grant Likely
2010-04-28 17:27 ` Timur Tabi
2010-04-27 22:29 ` Mark Brown
2010-04-28 2:31 ` Grant Likely [this message]
2010-04-28 9:16 ` Mark Brown
2010-04-28 4:10 ` Benjamin Herrenschmidt
2010-04-28 12:07 ` Mark Brown
2010-04-29 0:36 ` Benjamin Herrenschmidt
2010-04-29 3:43 ` Grant Likely
2010-04-28 13:19 ` Timur Tabi
2010-04-28 13:39 ` Mark Brown
2010-04-27 9:54 ` Mark Brown
2010-04-27 10:09 ` Benjamin Herrenschmidt
2010-04-27 10:41 ` Mark Brown
2010-04-27 20:27 ` Grant Likely
2010-04-27 20:50 ` Mark Brown
2010-04-27 20:53 ` Timur Tabi
2010-04-28 12:49 ` Liam Girdwood
2010-04-28 20:35 ` Timur Tabi
2010-04-28 21:58 ` Grant Likely
2010-04-28 22:13 ` Timur Tabi
[not found] ` <r2oed82fe3e1004281513k23b54b56v7904a4a34750c90b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-28 22:23 ` [alsa-devel] " Grant Likely
2010-04-29 0:52 ` Benjamin Herrenschmidt
2010-04-29 3:44 ` Grant Likely
2010-04-29 0:50 ` Benjamin Herrenschmidt
2010-04-27 19:21 ` Grant Likely
2010-04-27 20:05 ` Timur Tabi
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=i2vfa686aa41004271931wc04b9c11l5f3ebda0acb14b9@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=alsa-devel@alsa-project.org \
--cc=benh@kernel.crashing.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=kumar.gala@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=lrg@slimlogic.co.uk \
--cc=timur@freescale.com \
/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).