Hi Mark
Cc Laurent

This is graph base DT support with simple-card.
Because it is still [RFC], I don't post full-patch-set yet,
but now we can use simple-card with graph style :)
(If my previous simple-card cleanup patches are accepted :)

Because it is based on simple-card, simple-graph-card can use similar
feature. But unfortunately not full feature are tested well, because
I don't have some of them. Thesea are not well tested feature.
Maybe no big problem, but I don't know

        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
        simple-audio-card,dai-tdm-slot-num
        simple-audio-card,dai-tdm-slot-width

Big difference between simple-card <-> simple-graph-card is that
simple-graph-card doesn't support "platform" endpoint.
I don't know how to handle it under graph.

To support graph base DT, CPU/Codec driver might need to adjust.
And, as Jean-Francois mentioned before, CPU/Platform driver
need to register simple-graph-card card.

1 big concern is that it doesn't care about video port at this point.
So, if device has both video/sound ports, simple-graph-card
can't probe card correctly.
We need to have .type or similar property to know it was "video port"
or "sound port" ?
(ASoC need to know dai name, and it is based on total sound port number)

Below are simple-card <-> simple-graph-card DT style

=====================
 simple-card
=====================

sound_card {
        compatible = "simple-audio-card";

        simple-audio-card,format = "left_j";
        simple-audio-card,bitclock-master = <&sndcodec>;
        simple-audio-card,frame-master = <&sndcodec>;

        sndcpu: simple-audio-card,cpu {
                sound-dai = <&soc_port>;
        };

        sndcodec: simple-audio-card,codec {
                sound-dai = <&codec_port>;
                clocks = <&xxx>;
        };
};

codec_port: codec {
        #sound-dai-cells = <0>;
        ...
};

soc_port: SoC {
        #sound-dai-cells = <0>;
        ...
        soc-port-specific-property
};

=====================
 simple-graph-card
=====================
codec {
        ...
        port {
                codec_port: endpoint {
                        remote-endpoint = <&soc_port>;
                        clocks = <&xxx>;
                };
        };
};

SoC {
        ...
        port {
                simple-audio-card,format = "left_j";
                simple-audio-card,bitclock-master = <&codec_port>;
                simple-audio-card,frame-master = <&codec_port>;

                soc_port: endpoint {
                        remote-endpoint = <&codec_port>;
                        soc-port-specific-property
                };
        };
};



Best regards
---
Kuninori Morimoto

Reply via email to