diff mbox

[14/19] ARM: omap4-panda-common.dtsi: Add HDMI audio nodes

Message ID fdeddff24bc38efb7a155b2569a5f2056278cb9d.1399884780.git.jsarha@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jyri Sarha May 12, 2014, 9:12 a.m. UTC
Adds a simple-card sound node for HDMI audio, the associated
hdmi-codec node, and sound-dai-cells propeties to the DAI nodes.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 arch/arm/boot/dts/omap4-panda-common.dtsi |   21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

Comments

Tomi Valkeinen May 16, 2014, 11:04 a.m. UTC | #1
On 12/05/14 12:12, Jyri Sarha wrote:
> Adds a simple-card sound node for HDMI audio, the associated
> hdmi-codec node, and sound-dai-cells propeties to the DAI nodes.
> 
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
>  arch/arm/boot/dts/omap4-panda-common.dtsi |   21 ++++++++++++++++++++-
>  1 file changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
> index d2c45bf..c04f453 100644
> --- a/arch/arm/boot/dts/omap4-panda-common.dtsi
> +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
> @@ -41,7 +41,7 @@
>  		};
>  	};
>  
> -	sound: sound {
> +	sound: sound@0 {
>  		compatible = "ti,abe-twl6040";
>  		ti,model = "PandaBoard";
>  
> @@ -65,6 +65,24 @@
>  			"AFMR", "Line In";
>  	};
>  
> +	sound@1 {
> +		compatible = "simple-audio-card";
> +
> +		simple-audio-card,cpu {
> +			sound-dai = <&hdmi>;
> +		};
> +
> +		simple-audio-card,codec {
> +			sound-dai = <&hdmi_audio>;
> +		};
> +	};
> +
> +	hdmi_audio: hdmi_audio@0 {
> +		#sound-dai-cells = <0>;
> +		compatible = "linux,hdmi-audio";
> +		status = "okay";
> +	};
> +
>  	/* HS USB Port 1 Power */
>  	hsusb1_power: hsusb1_power_reg {
>  		compatible = "regulator-fixed";
> @@ -512,6 +530,7 @@
>  };
>  
>  &hdmi {
> +	#sound-dai-cells = <0>;
>  	status = "ok";
>  	vdda-supply = <&vdac>;

Maybe this is how this has to be done, but I'll still ask:

Considering that the HDMI audio is basically inseparable part of the
OMAP HDMI video, and if a board has HDMI video connector connected to
the SoC's HDMI, then it has HDMI audio.

So all of the above .dts changes are already implied when we have HDMI
video on the board. Is there no way to prevent every board needing to
add those exact same nodes to get HDMI audio?

 Tomi
Mark Brown May 16, 2014, 11:08 a.m. UTC | #2
On Fri, May 16, 2014 at 02:04:44PM +0300, Tomi Valkeinen wrote:

> So all of the above .dts changes are already implied when we have HDMI
> video on the board. Is there no way to prevent every board needing to
> add those exact same nodes to get HDMI audio?

You can always instantiate devices directly from the HDMI controller
code, there's no need to put things in DT at all.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index d2c45bf..c04f453 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -41,7 +41,7 @@ 
 		};
 	};
 
-	sound: sound {
+	sound: sound@0 {
 		compatible = "ti,abe-twl6040";
 		ti,model = "PandaBoard";
 
@@ -65,6 +65,24 @@ 
 			"AFMR", "Line In";
 	};
 
+	sound@1 {
+		compatible = "simple-audio-card";
+
+		simple-audio-card,cpu {
+			sound-dai = <&hdmi>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&hdmi_audio>;
+		};
+	};
+
+	hdmi_audio: hdmi_audio@0 {
+		#sound-dai-cells = <0>;
+		compatible = "linux,hdmi-audio";
+		status = "okay";
+	};
+
 	/* HS USB Port 1 Power */
 	hsusb1_power: hsusb1_power_reg {
 		compatible = "regulator-fixed";
@@ -512,6 +530,7 @@ 
 };
 
 &hdmi {
+	#sound-dai-cells = <0>;
 	status = "ok";
 	vdda-supply = <&vdac>;