[RFC][PATCH 2/2 v3] ASoC: simple-card: add Device Tree support

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Jan 31 11:49:27 EST 2013


Hi Stephen

Thank you for checking patch

> > +Required properties:
> > +
> > +- compatible			: "simple-audio"
> > +- simple-audio,card-name	: simple-audio card name
> > +- simple-audio,format		: see below
> > +
> > +Optional properties:
> > +
> > +- simple-audio,bitclock-inversion
> > +- simple-audio,frame-inversion
> > +
> > +CPU / CODEC DAI is represented as a sub-node.
> > +Then, sub-node name should be "simple-audio,cpu" or "simple-audio,codec".
> 
> Why require sub-nodes? it seem over-complex.

It was Mark's idea.


>> +- simple-audio,system-clock-frequency	: system clock rate
>> +- simple-audio,frame-master
>> +- simple-audio,bitclock-master
>
> Aren't those a property of the CPU<->CODEC link, hence the clock
> frequency is identical,

This clock connection/frequency depends on SoC/board.
There is a case where system clock is not connected to both cpu/codec.

system clock    bit/frame
--------[codec]---------> [cpu]

> and the two "master" properties are the inverse
> of each-other in between CPU and CODEC. Specifying these right in the
> top-level node seems simpler.

If I put these in top-level node, it needs

  simple-audio,xxx,frame-master;
  simple-audio,xxx,bitclock-master;     xxx = cpu / codec

This is same things ?

Of course I can do like

  simple-audio,frame-master = "cpu";
  simple-audio,bitclock-master = "cpu";

But, this style can't use snd_soc_of_parse_daifmt()


> > +Required subnode properties:
> > +- simple-audio,dev		: phandle for CPU/CODEC
> > +
> > +Optional subnode properties:
> > +
> > +- simple-audio,dai-name			: simple-audio CPU/CODEC DAI name
> 
> OK, I see those two are CPU-/CODEC-specific. However, you could easily
> just have different property names for the two.
> 
> I assume you didn't like my idea of not putting the DAI names into the
> DT, but using extra arguments after the phandles instead? Doing so would
> be more alike most existing DT bindings.

I'm confusing about this.
What does this "different property name" mean ?

If you agree with "sub-node", then I can use below style.
it can remove "dai-name" ?

  ak4642-hifi {
       simple-audio,type = "codec";
       simple-audio,dev = <&xxx>;
       ...
  }

  fsia-dai {
       simple-audio,type = "cpu";
       simple-audio,dev = <&xxx>;
       ...
  }

Best regards
---
Kuninori Morimoto


More information about the devicetree-discuss mailing list