From: Sylwester Nawrocki <s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Kuninori Morimoto
<kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Linux-DT <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux-ALSA <alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org>
Subject: Re: [alsa-devel] [RFC][PATCH] ASoC: add simple-graph-card document
Date: Mon, 23 Jan 2017 19:14:46 +0100 [thread overview]
Message-ID: <6e3976e8-d26c-e39e-e886-4ab00ce79d01@samsung.com> (raw)
In-Reply-To: <87tw8q1bct.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
Hi Morimoto-san,
On 01/23/2017 08:33 AM, Kuninori Morimoto wrote:
> Hi Rob, Mark
>
> I created OF-graph base simple sound card.
> I want to post this patch-set, but it depends many things.
> Thus, before posting patch-set, I would like to know
> OF-graph sound DT binding was OK or not.
> Can you give me comments ?
>
> ---
> .../bindings/sound/simple-graph-card.txt | 140 +++++++++++++++++++++
> 1 file changed, 140 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/simple-graph-card.txt
>
> diff --git a/Documentation/devicetree/bindings/sound/simple-graph-card.txt
> b/Documentation/devicetree/bindings/sound/simple-graph-card.txt
> new file mode 100644
> index 0000000..4b29284
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/simple-graph-card.txt
> @@ -0,0 +1,140 @@
> +Simple-Graph-Card:
This binding is likely going to cover most of existing sound system
configuration, at least it looks as it has a potential to be scalable
enough. So perhaps we could treat is as a more generic binding and
could drop the "Simple" word now? I'm not 100% sure it's a good idea,
but maybe we could make it "Generic Sound Card DT Binding"?
> +Simple-Graph-Card specifies audio DAI connections of SoC <-> codec.
> +It is based on common bindings for device graphs.
> +see ${LINUX}/Documentation/devicetree/bindings/graph.txt
The DT bindings should be OS agnostic, I think we should drop the
"${LINUX}/" part here and elsewhere in this documentation.
> +Basically, Simple-Graph-Card property is same as Simple-Card.
> +see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt
> +
> +Below are same as Simple-Card.
> +
> +- simple-audio-card,name
> +- simple-audio-card,format
> +- simple-audio-card,frame-master
> +- simple-audio-card,bitclock-master
> +- simple-audio-card,bitclock-inversion
> +- simple-audio-card,frame-inversion
> +- simple-audio-card,dai-tdm-slot-num
> +- simple-audio-card,dai-tdm-slot-width
> +- clocks / system-clock-frequency
> +
> +These should be implemented
> +- simple-audio-card,widgets
> +- simple-audio-card,routing
> +- simple-audio-card,mclk-fs
> +- simple-audio-card,hp-det-gpio
> +- simple-audio-card,mic-det-gpio
> +
> +Required properties:
> +
> +- compatible : "asoc-simple-graph-card";
"asoc" is Linux related, we shouldn't be putting this in the compatible string.
Perhaps "generic-sound-card" ? Again, I'm sure if it is expected to have such
a generic kind of DT binding.
> +Optional properties:
> +
> +- dais : Sound DAI phandle list if Card has
> + multi DAI. see Example
> +
> +Each ports
> +
> +- port@0 : CPU setting
> +- port@1 : Codec setting
> +
> +Example: Single DAI case
> +
> + sound_card: sound {
> + compatible = "asoc-simple-graph-card";
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + port@0 {
> + sound0_in: endpoint {
> + remote-endpoint = <&rsnd_port0>;
> +
> + simple-audio-card,format = "left_j";
> + simple-audio-card,bitclock-master = <&rsnd_port0>;
> + simple-audio-card,frame-master = <&rsnd_port0>;
> + };
> + };
> + port@1 {
> + sound0_out: endpoint {
> + remote-endpoint = <&ak4613_port>;
> + };
> + };
> + };
> + };
I wouldn't be making a separate case for single DAI. The 'ports' node can
be omitted, port@0, port@1 nodes could be put under respective device nodes
and in the 'sound' node we would have 'dais' property pointing to the CPU
DAI port, not the endpoint. The endpoint is supposed to describe one of
possible configurations of the port. I think we want phandles to the 'port'
nodes, not phandles to the 'endpoint' nodes in the 'sound' node.
> +Example: Multi DAI case
> +
> + sound_dai0: sound_dai@0 {
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + port@0 {
> + sound0_in: endpoint {
> + remote-endpoint = <&rsnd_port0>;
> +
> + simple-audio-card,format = "left_j";
> + simple-audio-card,bitclock-master = <&rsnd_port0>;
> + simple-audio-card,frame-master = <&rsnd_port0>;
> + };
> + };
> + port@1 {
> + sound0_out: endpoint {
> + remote-endpoint = <&ak4613_port>;
> + };
> + };
> + };
> + };
> +
> + sound_dai1: sound_dai@1 {
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + port@0 {
> + sound1_in: endpoint {
> + remote-endpoint = <&rsnd_port1>;
> +
> + simple-audio-card,format = "i2s";
> + simple-audio-card,bitclock-master = <&rsnd_port1>;
> + simple-audio-card,frame-master = <&rsnd_port1>;
> + };
> + };
> + port@1 {
> + sound1_out: endpoint {
> + remote-endpoint = <&rcar_dw_hdmi0_snd_in>;
> + };
> + };
> + };
> + };
> +
> + rsnd_ak4613: sound {
> + compatible = "asoc-simple-graph-card";
> +
> + dais = <&sound_dai0
> + &sound_dai1
> + &sound_dai2>;
> + };
--
Regards,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-01-23 18:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 6:07 Question about OF-graph ports Kuninori Morimoto
[not found] ` <87r33z4maj.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2017-01-19 11:12 ` Mark Brown
2017-01-19 14:58 ` Rob Herring
[not found] ` <CAL_Jsq+pDkfijyKV0ALzZUrH-NVzmLaNj6ivAEFO98NUOXGojw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-20 1:46 ` Kuninori Morimoto
[not found] ` <871svymrnt.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2017-01-20 14:22 ` Rob Herring
[not found] ` <CAL_JsqLOwQn_hz3B5gFL-zr-Pm_8PX+b-sAQhLwkioD7E-ODAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-23 6:58 ` Kuninori Morimoto
[not found] ` <87wpdm1cyq.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2017-01-23 7:33 ` [RFC][PATCH] ASoC: add simple-graph-card document Kuninori Morimoto
[not found] ` <87tw8q1bct.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2017-01-23 18:14 ` Sylwester Nawrocki [this message]
[not found] ` <6e3976e8-d26c-e39e-e886-4ab00ce79d01-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-01-24 0:30 ` [alsa-devel] " Kuninori Morimoto
[not found] ` <87sho9fgju.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2017-01-24 14:10 ` Sylwester Nawrocki
[not found] ` <c4541388-904f-9886-7e8a-a609ed9feaa7-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-01-24 16:41 ` Mark Brown
[not found] ` <20170124164126.jquggggl7ct5znuc-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2017-01-24 23:55 ` Kuninori Morimoto
2017-01-24 23:55 ` Kuninori Morimoto
2017-01-25 0:00 ` Kuninori Morimoto
2017-01-25 0:09 ` Kuninori Morimoto
[not found] ` <87mveg9f4x.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2017-01-25 10:27 ` Sylwester Nawrocki
[not found] ` <b1626b5a-31f0-5d82-1c73-633ca85996d0-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-01-25 23:59 ` Kuninori Morimoto
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=6e3976e8-d26c-e39e-e886-4ab00ce79d01@samsung.com \
--to=s.nawrocki-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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