devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	linux-kernel@vger.kernel.org, Xiubo Li <Li.Xiubo@freescale.com>
Subject: Re: [PATCH v3 4/4] ASoC: simple-card: Add DT documentation for multi-DAI links
Date: Tue, 18 Mar 2014 09:17:28 +0100	[thread overview]
Message-ID: <20140318091728.1d2240ca@armhf> (raw)
In-Reply-To: <20140317164339.GR11706@sirena.org.uk>

On Mon, 17 Mar 2014 16:43:39 +0000
Mark Brown <broonie@kernel.org> wrote:

> On Sat, Mar 15, 2014 at 12:30:05PM +0100, Jean-Francois Moine wrote:
	[snip]
> > +sound {
> > +	compatible = "simple-audio-card";
> > +	simple-audio-card,name = "Cubox Audio";
> > +
> > +	simple-audio-card,cpu@0 {		/* I2S - HDMI */
> > +		sound-dai = <&audio1 0>;
> > +		format = "i2s";
> > +	};
> > +	simple-audio-card,codec@0 {
> > +		sound-dai = <&tda998x 0>;
> > +	};
> > +
> > +	simple-audio-card,cpu@1 {		/* S/PDIF - HDMI */
> > +		sound-dai = <&audio1 1>;
> > +	};
> > +	simple-audio-card,codec@1 {
> > +		sound-dai = <&tda998x 1>;
> > +	};
> 
> So, this is not exactly pretty as a binding.  I would expect to see the
> links explicitly represented in the DT so you see the two DAIs in each
> link grouped into a container, the above isn't very easy to read and as
> Jyri says this lack of clarity also causes practical problems in that
> there's nowhere to place link specific parameters.
> 
> I think what I'd expect to see here is that the simple card can either
> be a container with a link in it directly or a container of links.

I agree. I see two possible syntaxes:

1) keep the same definitions in the containers:

sound {
	compatible = "simple-audio-card";
	simple-audio-card,name = "Cubox Audio";

	simple-audio-card,dai-link@0 {		/* I2S - HDMI */
		simple-audio-card,cpu {
			sound-dai = <&audio1 0>;
			format = "i2s";
		};
		simple-audio-card,codec {
			sound-dai = <&tda998x 0>;
		};
	};

	simple-audio-card,dai-link@1 {		/* S/PDIF - HDMI */
		simple-audio-card,cpu {
			sound-dai = <&audio1 1>;
		};
		simple-audio-card,codec {
			sound-dai = <&tda998x 1>;
		}
	};
	...

2) new definitions in the container

sound {
	compatible = "simple-audio-card";
	simple-audio-card,name = "Cubox Audio";

	simple-audio-card,dai-link@0 {		/* I2S - HDMI */
		format = "i2s";
		cpu-dai  = <&audio1 0>;
		codec-dai = <&tda998x 0>;
	};

	simple-audio-card,dai-link@1 {		/* S/PDIF - HDMI */
		cpu-dai = <&audio1 1>;
		codec-dai = <&tda998x 1>;
	};
	...

The 2nd syntax is simpler and clearer, but the properties of the CPU
DAI and of the CODEC DAI are the same in the container (format, clock
and PCM slots). Is this a problem?

BTW, there is a 'dai_fmt' in the DAI link, but this format is not used
in the simple-card. Why?

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

  reply	other threads:[~2014-03-18  8:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1394883134.git.moinejf@free.fr>
2014-03-15 11:30 ` [PATCH v3 4/4] ASoC: simple-card: Add DT documentation for multi-DAI links Jean-Francois Moine
     [not found]   ` <d054780a0edf4b2338a52e48bff9144e19aa614f.1394883134.git.moinejf-GANU6spQydw@public.gmane.org>
2014-03-17 10:19     ` [alsa-devel] " Jyri Sarha
2014-03-17 16:43     ` Mark Brown
2014-03-18  8:17       ` Jean-Francois Moine [this message]
2014-03-18 10:41         ` Mark Brown
2014-03-19 10:08         ` Jyri Sarha
     [not found]           ` <53296CB7.1000909-l0cyMroinI0@public.gmane.org>
2014-03-19 13:46             ` Mark Brown
2014-03-19 18:32               ` Jyri Sarha
2014-03-19 19:14                 ` Mark Brown
2014-03-19 16:07             ` Jean-Francois Moine
2014-03-19 18:51             ` [alsa-devel] " Lars-Peter Clausen
2014-03-19 19:15               ` Jyri Sarha
     [not found]                 ` <5329ECC2.7040803-l0cyMroinI0@public.gmane.org>
2014-03-19 19:21                   ` Mark Brown
     [not found]                     ` <20140319192157.GW11706-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-03-19 19:31                       ` Lars-Peter Clausen
     [not found]                         ` <5329F0A1.8020801-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2014-03-20 11:24                           ` Jyri Sarha

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=20140318091728.1d2240ca@armhf \
    --to=moinejf@free.fr \
    --cc=Li.Xiubo@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    /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).