devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM/dts: hdmi-codec: panda/es dt entries
@ 2014-02-18  9:43 Paolo Pisati
  2014-02-19  8:15 ` Peter Ujfalusi
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Pisati @ 2014-02-18  9:43 UTC (permalink / raw)
  To: peter.ujfalusi, bcousson, tony; +Cc: devicetree, linux-omap

HDMI codec dummy entries for Panda/ES.

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
Depends on "0f7f3d1 ASoC: hdmi-codec: Add devicetree binding with documentation", eligible for a 3.14-rcX fix.

 arch/arm/boot/dts/omap4-panda-common.dtsi |    9 ++++++++-
 arch/arm/boot/dts/omap4-panda-es.dts      |    3 ++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 88c6a05..f4aeaa1 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -36,9 +36,15 @@
 		};
 	};
 
+	hdmi_audio: hdmi_audio@0 {
+		compatible = "linux,hdmi-audio";
+		status = "okay";
+	};
+
 	sound: sound {
 		compatible = "ti,abe-twl6040";
 		ti,model = "PandaBoard";
+		ti,audio-codec = <&hdmi_audio>;
 
 		ti,mclk-freq = <38400000>;
 
@@ -57,7 +63,8 @@
 			"HSMIC", "Headset Mic",
 			"Headset Mic", "Headset Mic Bias",
 			"AFML", "Line In",
-			"AFMR", "Line In";
+			"AFMR", "Line In",
+			"HDMI Out", "TX";
 	};
 
 	/* HS USB Port 1 Power */
diff --git a/arch/arm/boot/dts/omap4-panda-es.dts b/arch/arm/boot/dts/omap4-panda-es.dts
index 816d1c9..70152d6 100644
--- a/arch/arm/boot/dts/omap4-panda-es.dts
+++ b/arch/arm/boot/dts/omap4-panda-es.dts
@@ -23,7 +23,8 @@
 		"Line Out", "AUXL",
 		"Line Out", "AUXR",
 		"AFML", "Line In",
-		"AFMR", "Line In";
+		"AFMR", "Line In",
+		"HDMI Out", "TX";
 };
 
 /* PandaboardES has external pullups on SCL & SDA */
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ARM/dts: hdmi-codec: panda/es dt entries
  2014-02-18  9:43 [PATCH v2] ARM/dts: hdmi-codec: panda/es dt entries Paolo Pisati
@ 2014-02-19  8:15 ` Peter Ujfalusi
  2014-02-19 10:54   ` Paolo Pisati
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Ujfalusi @ 2014-02-19  8:15 UTC (permalink / raw)
  To: Paolo Pisati, bcousson, tony; +Cc: devicetree, linux-omap

Hi,

On 02/18/2014 11:43 AM, Paolo Pisati wrote:
> HDMI codec dummy entries for Panda/ES.
> 
> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
> ---
> Depends on "0f7f3d1 ASoC: hdmi-codec: Add devicetree binding with documentation", eligible for a 3.14-rcX fix.
> 
>  arch/arm/boot/dts/omap4-panda-common.dtsi |    9 ++++++++-
>  arch/arm/boot/dts/omap4-panda-es.dts      |    3 ++-
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
> index 88c6a05..f4aeaa1 100644
> --- a/arch/arm/boot/dts/omap4-panda-common.dtsi
> +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
> @@ -36,9 +36,15 @@
>  		};
>  	};
>  
> +	hdmi_audio: hdmi_audio@0 {
> +		compatible = "linux,hdmi-audio";
> +		status = "okay";
> +	};
> +
>  	sound: sound {
>  		compatible = "ti,abe-twl6040";
>  		ti,model = "PandaBoard";
> +		ti,audio-codec = <&hdmi_audio>;

I don't think this is going to work. The omap-abe-twl6040 machine driver only
handles mcpdm and dmic right know.
'ti,audio-codec' is not even supported and it is kind of misleading naming in
this context since twl6040 is also a codec, so why only the dummy-hdmi codec
deserves to be called as codec.
Furthermore: we have the omap-hdmi-card machine driver to handle the HDMI
audio. It lacks DT support AFAIK but should not be a big deal to add the bindings.
To get the hdmi audio working you also need to have phandle for the omap-hdmi
DAI, the codec alone is not enough.

Is this patch actually works at all?

>  
>  		ti,mclk-freq = <38400000>;
>  
> @@ -57,7 +63,8 @@
>  			"HSMIC", "Headset Mic",
>  			"Headset Mic", "Headset Mic Bias",
>  			"AFML", "Line In",
> -			"AFMR", "Line In";
> +			"AFMR", "Line In",
> +			"HDMI Out", "TX";
>  	};
>  
>  	/* HS USB Port 1 Power */
> diff --git a/arch/arm/boot/dts/omap4-panda-es.dts b/arch/arm/boot/dts/omap4-panda-es.dts
> index 816d1c9..70152d6 100644
> --- a/arch/arm/boot/dts/omap4-panda-es.dts
> +++ b/arch/arm/boot/dts/omap4-panda-es.dts
> @@ -23,7 +23,8 @@
>  		"Line Out", "AUXL",
>  		"Line Out", "AUXR",
>  		"AFML", "Line In",
> -		"AFMR", "Line In";
> +		"AFMR", "Line In",
> +		"HDMI Out", "TX";
>  };
>  
>  /* PandaboardES has external pullups on SCL & SDA */
> 


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ARM/dts: hdmi-codec: panda/es dt entries
  2014-02-19  8:15 ` Peter Ujfalusi
@ 2014-02-19 10:54   ` Paolo Pisati
  2014-02-19 12:13     ` Peter Ujfalusi
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Pisati @ 2014-02-19 10:54 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: Paolo Pisati, bcousson, tony, devicetree, linux-omap

On Wed, Feb 19, 2014 at 10:15:24AM +0200, Peter Ujfalusi wrote:
> > diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
> > index 88c6a05..f4aeaa1 100644
> > --- a/arch/arm/boot/dts/omap4-panda-common.dtsi
> > +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
> > @@ -36,9 +36,15 @@
> >  		};
> >  	};
> >  
> > +	hdmi_audio: hdmi_audio@0 {
> > +		compatible = "linux,hdmi-audio";
> > +		status = "okay";
> > +	};
> > +
> >  	sound: sound {
> >  		compatible = "ti,abe-twl6040";
> >  		ti,model = "PandaBoard";
> > +		ti,audio-codec = <&hdmi_audio>;
> 
> I don't think this is going to work. The omap-abe-twl6040 machine driver only
> handles mcpdm and dmic right know.
> 'ti,audio-codec' is not even supported and it is kind of misleading naming in
> this context since twl6040 is also a codec, so why only the dummy-hdmi codec
> deserves to be called as codec.

i see what you mean: i thought that hdmi_audio to actually work had to be
referenced inside the sound node (hence my inclusion there) but i was wrong and
it had nothing to do with twl6040,
would this one be ok for you?

diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 88c6a05..b6dd458 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -36,6 +36,11 @@
                };
        };
 
+       hdmi_audio: hdmi_audio@0 {
+               compatible = "linux,hdmi-audio";
+               status = "okay";
+       };
+
        sound: sound {
                compatible = "ti,abe-twl6040";
                ti,model = "PandaBoard";


> Furthermore: we have the omap-hdmi-card machine driver to handle the HDMI
> audio. It lacks DT support AFAIK but should not be a big deal to add the bindings.
> To get the hdmi audio working you also need to have phandle for the omap-hdmi
> DAI, the codec alone is not enough.
>
 
you mean sound/soc/omap/omap-hdmi-card.c? that's exactly what i'm trying to fix.

With the above patch, plus:

-CONFIG_DISPLAY_CONNECTOR_HDMI=m
+CONFIG_DISPLAY_CONNECTOR_HDMI=y
 CONFIG_DISPLAY_ENCODER_TFP410=m
-CONFIG_DISPLAY_ENCODER_TPD12S015=m
+CONFIG_DISPLAY_ENCODER_TPD12S015=y

to make the omap-hdmi-audio-dai attach (sound/soc/omap/omap-hdmi.c)
and something like this (that is not upstreamable as i understand
but is an unfortunate fallout from the board removal[*]):

--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -335,6 +335,11 @@ static struct platform_device omap_hdmi_audio = {
        .id     = -1,
 };
 
+static struct platform_device hdmi_audio_codec = {
+       .name   = "hdmi-audio-codec",
+       .id     = -1,
+};
+
 static void __init omap_init_hdmi_audio(void)
 {
        struct omap_hwmod *oh;
@@ -349,6 +354,7 @@ static void __init omap_init_hdmi_audio(void)
             "Can't build omap_device for omap-hdmi-audio-dai.\n");
 
        platform_device_register(&omap_hdmi_audio);
+       platform_device_register(&hdmi_audio_codec);
 }
 #else
 static inline void omap_init_hdmi_audio(void) {}

i finally get my OMAPHDMI device back:

flag@panda:~$ cat /proc/asound/cards 
 0 [OMAPHDMI       ]: OMAPHDMI - OMAPHDMI
                      OMAPHDMI
 1 [PandaBoardES   ]: PandaBoardES - PandaBoardES
                      PandaBoardES

[*]: in arch/arm/mach-omap2/board-omap4panda.c we had:

-static struct platform_device panda_hdmi_audio_codec = {
-       .name   = "hdmi-audio-codec",
-       .id     = -1,
-};

-static struct platform_device *panda_devices[] __initdata = {
...
-       &panda_hdmi_audio_codec,
...
-};

that was registered as part of omap4_panda_init():

-       platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));

-- 
bye,
p.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ARM/dts: hdmi-codec: panda/es dt entries
  2014-02-19 10:54   ` Paolo Pisati
@ 2014-02-19 12:13     ` Peter Ujfalusi
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2014-02-19 12:13 UTC (permalink / raw)
  To: Paolo Pisati
  Cc: Paolo Pisati, bcousson, tony, devicetree, linux-omap,
	Valkeinen, Tomi, Sarha, Jyri

On 02/19/2014 12:54 PM, Paolo Pisati wrote:
> On Wed, Feb 19, 2014 at 10:15:24AM +0200, Peter Ujfalusi wrote:
>>> diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
>>> index 88c6a05..f4aeaa1 100644
>>> --- a/arch/arm/boot/dts/omap4-panda-common.dtsi
>>> +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
>>> @@ -36,9 +36,15 @@
>>>  		};
>>>  	};
>>>  
>>> +	hdmi_audio: hdmi_audio@0 {
>>> +		compatible = "linux,hdmi-audio";
>>> +		status = "okay";
>>> +	};
>>> +
>>>  	sound: sound {
>>>  		compatible = "ti,abe-twl6040";
>>>  		ti,model = "PandaBoard";
>>> +		ti,audio-codec = <&hdmi_audio>;
>>
>> I don't think this is going to work. The omap-abe-twl6040 machine driver only
>> handles mcpdm and dmic right know.
>> 'ti,audio-codec' is not even supported and it is kind of misleading naming in
>> this context since twl6040 is also a codec, so why only the dummy-hdmi codec
>> deserves to be called as codec.
> 
> i see what you mean: i thought that hdmi_audio to actually work had to be
> referenced inside the sound node (hence my inclusion there) but i was wrong and
> it had nothing to do with twl6040,
> would this one be ok for you?
> 
> diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
> index 88c6a05..b6dd458 100644
> --- a/arch/arm/boot/dts/omap4-panda-common.dtsi
> +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
> @@ -36,6 +36,11 @@
>                 };
>         };
>  
> +       hdmi_audio: hdmi_audio@0 {
> +               compatible = "linux,hdmi-audio";
> +               status = "okay";
> +       };
> +
>         sound: sound {
>                 compatible = "ti,abe-twl6040";
>                 ti,model = "PandaBoard";
> 
> 
>> Furthermore: we have the omap-hdmi-card machine driver to handle the HDMI
>> audio. It lacks DT support AFAIK but should not be a big deal to add the bindings.
>> To get the hdmi audio working you also need to have phandle for the omap-hdmi
>> DAI, the codec alone is not enough.
>>
>  
> you mean sound/soc/omap/omap-hdmi-card.c? that's exactly what i'm trying to fix.
> 
> With the above patch, plus:
> 
> -CONFIG_DISPLAY_CONNECTOR_HDMI=m
> +CONFIG_DISPLAY_CONNECTOR_HDMI=y
>  CONFIG_DISPLAY_ENCODER_TFP410=m
> -CONFIG_DISPLAY_ENCODER_TPD12S015=m
> +CONFIG_DISPLAY_ENCODER_TPD12S015=y
> 
> to make the omap-hdmi-audio-dai attach (sound/soc/omap/omap-hdmi.c)
> and something like this (that is not upstreamable as i understand
> but is an unfortunate fallout from the board removal[*]):
> 
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -335,6 +335,11 @@ static struct platform_device omap_hdmi_audio = {
>         .id     = -1,
>  };
>  
> +static struct platform_device hdmi_audio_codec = {
> +       .name   = "hdmi-audio-codec",
> +       .id     = -1,
> +};
> +
>  static void __init omap_init_hdmi_audio(void)
>  {
>         struct omap_hwmod *oh;
> @@ -349,6 +354,7 @@ static void __init omap_init_hdmi_audio(void)
>              "Can't build omap_device for omap-hdmi-audio-dai.\n");
>  
>         platform_device_register(&omap_hdmi_audio);
> +       platform_device_register(&hdmi_audio_codec);
>  }
>  #else
>  static inline void omap_init_hdmi_audio(void) {}
> 
> i finally get my OMAPHDMI device back:
> 
> flag@panda:~$ cat /proc/asound/cards 
>  0 [OMAPHDMI       ]: OMAPHDMI - OMAPHDMI
>                       OMAPHDMI
>  1 [PandaBoardES   ]: PandaBoardES - PandaBoardES
>                       PandaBoardES
> 

Yeah, the OMAP4 hdmi audio got hit by the move to DT hard. In legacy boot we
did created the needed devices for us to use but we still lack the DT support
for the HDMI audio (along with the DSS AFAIK).
The stack we have at the moment going to change for sure. I need to sync up
with Tomi and Jyri regarding to this but right now there's no clean (ie
upstreamable ) way to enable HDMI audio.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-19 12:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-18  9:43 [PATCH v2] ARM/dts: hdmi-codec: panda/es dt entries Paolo Pisati
2014-02-19  8:15 ` Peter Ujfalusi
2014-02-19 10:54   ` Paolo Pisati
2014-02-19 12:13     ` Peter Ujfalusi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).