aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisael Lopez Cruz <misael.lopez@ti.com>2015-04-22 09:23:00 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-06-03 07:34:02 -0400
commit88359b99d0841d0def5dffff911875dfc78a94fa (patch)
tree6c84a0be0af905407cf23f65185f47a9c176aaea
parent65c8b46400752d54291e976d60ab13bfe5bb06b8 (diff)
ASoC: omap-hdmi-audio: Force channel allocation only for OMAP4
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>
-rw-r--r--drivers/video/fbdev/omap2/dss/hdmi4_core.c7
-rw-r--r--sound/soc/omap/omap-hdmi-audio.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/video/fbdev/omap2/dss/hdmi4_core.c b/drivers/video/fbdev/omap2/dss/hdmi4_core.c
index 2b8bd220fde6..fa72e735dad2 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi4_core.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi4_core.c
@@ -654,6 +654,13 @@ static void hdmi_core_audio_infoframe_cfg(struct hdmi_core_data *core,
654 hdmi_write_reg(av_base, HDMI_CORE_AV_AUD_DBYTE(2), info_aud->db3); 654 hdmi_write_reg(av_base, HDMI_CORE_AV_AUD_DBYTE(2), info_aud->db3);
655 sum += info_aud->db3; 655 sum += info_aud->db3;
656 656
657 /*
658 * The OMAP HDMI IP requires to use the 8-channel channel code when
659 * transmitting more than two channels.
660 */
661 if (info_aud->db4_ca != 0x00)
662 info_aud->db4_ca = 0x13;
663
657 hdmi_write_reg(av_base, HDMI_CORE_AV_AUD_DBYTE(3), info_aud->db4_ca); 664 hdmi_write_reg(av_base, HDMI_CORE_AV_AUD_DBYTE(3), info_aud->db4_ca);
658 sum += info_aud->db4_ca; 665 sum += info_aud->db4_ca;
659 666
diff --git a/sound/soc/omap/omap-hdmi-audio.c b/sound/soc/omap/omap-hdmi-audio.c
index 4775da4c4db5..8df303f64e11 100644
--- a/sound/soc/omap/omap-hdmi-audio.c
+++ b/sound/soc/omap/omap-hdmi-audio.c
@@ -210,12 +210,10 @@ static int hdmi_dai_hw_params(struct snd_pcm_substream *substream,
210 210
211 cea->db3 = 0; /* not used, all zeros */ 211 cea->db3 = 0; /* not used, all zeros */
212 212
213 /*
214 * The OMAP HDMI IP requires to use the 8-channel channel code when
215 * transmitting more than two channels.
216 */
217 if (params_channels(params) == 2) 213 if (params_channels(params) == 2)
218 cea->db4_ca = 0x0; 214 cea->db4_ca = 0x0;
215 else if (params_channels(params) == 6)
216 cea->db4_ca = 0xb;
219 else 217 else
220 cea->db4_ca = 0x13; 218 cea->db4_ca = 0x13;
221 219