@@ -70,6 +70,7 @@ properties should also be placed in the codec node if needed.
Required CPU/CODEC subnodes properties:
- sound-dai : phandle and port of CPU/CODEC
+- remote-endpoint : graph endpoint of CPU/CODEC
Optional CPU/CODEC subnodes properties:
@@ -162,3 +163,21 @@ sound {
};
};
};
+
+Example 3 - sound-dai and remote-endpoint
+
+rsnd_ak4613: sound {
+ compatible = "simple-audio-card";
+
+ simple-audio-card,name = "R-Sound";
+ simple-audio-card,format = "left_j";
+ simple-audio-card,bitclock-master = <&sndcpu>;
+ simple-audio-card,frame-master = <&sndcpu>;
+
+ sndcpu: simple-audio-card,cpu {
+ sound-dai = <&rcar_sound 1>;
+ };
+ sndcodec: simple-audio-card,codec {
+ remote-endpoint = <&du_out_hdmi0>;
+ };
+};
@@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
+#include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <linux/string.h>
#include <sound/jack.h>
@@ -224,11 +225,13 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
int ret;
/*
- * Get node via "sound-dai = <&phandle port>"
+ * Get node via
+ * sound-dai = <&phandle port>
+ * or
+ * remote-endpoint = <&phandle>
* it will be used as xxx_of_node on soc_bind_dai_link()
*/
- ret = of_parse_phandle_with_args(np, "sound-dai",
- "#sound-dai-cells", 0, &args);
+ ret = of_parse_snd_soc_connection_with_args(np, &args);
if (ret)
return ret;