[RFC][PATCH] ASoC: add simple-graph-card document

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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:
+
+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
+
+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";
+
+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>;
+				};
+			};
+		};
+	};
+
+
+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>;
+				};
+			};
+		};
+	};
+
+	sound_dai2: sound_dai@2 {
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			port@0 {
+				sound2_in: endpoint {
+					remote-endpoint = <&rsnd_port2>;
+
+					simple-audio-card,format = "i2s";
+					simple-audio-card,bitclock-master = <&rsnd_port2>;
+					simple-audio-card,frame-master = <&rsnd_port2>;
+				};
+			};
+			port@1 {
+				sound2_out: endpoint {
+					remote-endpoint = <&rcar_dw_hdmi1_snd_in>;
+				};
+			};
+		};
+	};
+
+	rsnd_ak4613: sound {
+		compatible = "asoc-simple-graph-card";
+
+		dais = <&sound_dai0
+			&sound_dai1
+			&sound_dai2>;
+	};
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux