Message ID | 871sxwwcas.wl%kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Nov 28, 2016 at 02:48:37AM +0000, Kuninori Morimoto wrote: > > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > --- > .../bindings/sound/simple-graph-scu-card.txt | 69 ++++++++++++++++++++++ > 1 file changed, 69 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/simple-graph-scu-card.txt > > diff --git a/Documentation/devicetree/bindings/sound/simple-graph-scu-card.txt b/Documentation/devicetree/bindings/sound/simple-graph-scu-card.txt > new file mode 100644 > index 0000000..b0e46ba > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/simple-graph-scu-card.txt > @@ -0,0 +1,69 @@ > +Simple-Graph-SCU-Card: > + > +Simple-Graph-SCU-Card specifies audio DAI connections of SoC <-> codec. > +It is based on common bindings for device graphs. > +see ${LINUX}/Documentation/devicetree/bindings/graph.txt > + > +Basically, Simple-Graph-SCU-Card property is same as Simple-Card / Simple-Graph-Card. > +see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt > + ${LINUX}/Documentation/devicetree/bindings/sound/simple-graph-card.txt > + > +Main difference between Simple-Graph-Card and Simple-Graph-SCU-Card is that > +Simple-Graph-SCU-Card can use multi CPU. So it can have more that 1 port? At least for the bindings, I think you should combine these 2 bindings. Whether the driver should be combined is separate question. I imagine you have 2 compatible strings because you have 2 drivers, but that isn't really a reason to have 2. I still have no idea what SCU is. Rob
Hi Rob > > +Simple-Graph-SCU-Card: > > + > > +Simple-Graph-SCU-Card specifies audio DAI connections of SoC <-> codec. > > +It is based on common bindings for device graphs. > > +see ${LINUX}/Documentation/devicetree/bindings/graph.txt > > + > > +Basically, Simple-Graph-SCU-Card property is same as Simple-Card / Simple-Graph-Card. > > +see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt > > + ${LINUX}/Documentation/devicetree/bindings/sound/simple-graph-card.txt > > + > > +Main difference between Simple-Graph-Card and Simple-Graph-SCU-Card is that > > +Simple-Graph-SCU-Card can use multi CPU. > > So it can have more that 1 port? At least for the bindings, I think you > should combine these 2 bindings. Whether the driver should be combined > is separate question. I imagine you have 2 compatible strings because > you have 2 drivers, but that isn't really a reason to have 2. The difference these 2 are, 1) compatible name 2) single port / multi port. From ALSA SoC point of view, they are using different feature, but from DT point of view, they are almost same. Combine these are OK, but my question is can we use different "compatible" ? Or same "compatible" but switch single/multi somehow ? Best regards --- Kuninori Morimoto
diff --git a/Documentation/devicetree/bindings/sound/simple-graph-scu-card.txt b/Documentation/devicetree/bindings/sound/simple-graph-scu-card.txt new file mode 100644 index 0000000..b0e46ba --- /dev/null +++ b/Documentation/devicetree/bindings/sound/simple-graph-scu-card.txt @@ -0,0 +1,69 @@ +Simple-Graph-SCU-Card: + +Simple-Graph-SCU-Card specifies audio DAI connections of SoC <-> codec. +It is based on common bindings for device graphs. +see ${LINUX}/Documentation/devicetree/bindings/graph.txt + +Basically, Simple-Graph-SCU-Card property is same as Simple-Card / Simple-Graph-Card. +see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt + ${LINUX}/Documentation/devicetree/bindings/sound/simple-graph-card.txt + +Main difference between Simple-Graph-Card and Simple-Graph-SCU-Card is that +Simple-Graph-SCU-Card can use multi CPU. + +Required properties: + +- compatible : "asoc-simple-graph-scu-card"; +- type : "sound"; +- simple-audio-card,routing : see simple-card.txt + +Example + +ak4643: codec@12 { + compatible = "asahi-kasei,ak4643"; + ... + port { + type = "sound"; + ak4643_fe: endpoint@0 { + remote-endpoint = <&rsnd_fe>; + ... + }; + ak4643_be: endpoint@1 { + remote-endpoint = <&rsnd_be>; + ... + }; + }; +}; + +rcar_sound { + ... + ports { + compatible = "asoc-simple-graph-scu-card"; + + simple-audio-card,name = "graph-sound"; + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&rsnd_fe>; + simple-audio-card,frame-master = <&rsnd_fe>; + simple-audio-card,convert-rate = <48000>; + simple-audio-card,convert-channels = <2>; + simple-audio-card,prefix = "ak4642"; + simple-audio-card,routing = + "ak4642 Playback", "DAI0 Playback", + "ak4642 Playback", "DAI1 Playback"; + + port@0 { + type = "sound"; + rsnd_fe: endpoint@0 { + remote-endpoint = <&ak4643_fe>; + ... + }; + }; + port@1 { + type = "sound"; + rsnd_be: endpoint@1 { + remote-endpoint = <&ak4643_be>; + ... + }; + }; + }; +};