ASoC: omap-hdmi-audio: Force channel allocation only for OMAP4
authorMisael Lopez Cruz <misael.lopez@ti.com>
Wed, 22 Apr 2015 13:23:00 +0000 (16:23 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 3 Jun 2015 11:34:02 +0000 (14:34 +0300)
There is a constraint in the OMAP4 HDMI IP that requires to use
the 8-channel code when transmitting more than two channels.

The constraint doesn't apply for OMAP5 so don't force the channel
allocation in the sound driver as it can be done specifically for
OMAP4 later in the hdmi4 core.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>
drivers/video/fbdev/omap2/dss/hdmi4_core.c
sound/soc/omap/omap-hdmi-audio.c

index 2b8bd220fde61715280d1c0b69b862c051c8b47e..fa72e735dad2f995c127a265cd6b82a43bf9c73c 100644 (file)
@@ -654,6 +654,13 @@ static void hdmi_core_audio_infoframe_cfg(struct hdmi_core_data *core,
        hdmi_write_reg(av_base, HDMI_CORE_AV_AUD_DBYTE(2), info_aud->db3);
        sum += info_aud->db3;
 
+       /*
+        * The OMAP HDMI IP requires to use the 8-channel channel code when
+        * transmitting more than two channels.
+        */
+       if (info_aud->db4_ca != 0x00)
+               info_aud->db4_ca = 0x13;
+
        hdmi_write_reg(av_base, HDMI_CORE_AV_AUD_DBYTE(3), info_aud->db4_ca);
        sum += info_aud->db4_ca;
 
index 4775da4c4db56529bbc0a6bd6be0b7b2a24370f0..8df303f64e1108a4d6b0f00fe8420ff092756cde 100644 (file)
@@ -210,12 +210,10 @@ static int hdmi_dai_hw_params(struct snd_pcm_substream *substream,
 
        cea->db3 = 0; /* not used, all zeros */
 
-       /*
-        * The OMAP HDMI IP requires to use the 8-channel channel code when
-        * transmitting more than two channels.
-        */
        if (params_channels(params) == 2)
                cea->db4_ca = 0x0;
+       else if (params_channels(params) == 6)
+               cea->db4_ca = 0xb;
        else
                cea->db4_ca = 0x13;