From 88359b99d0841d0def5dffff911875dfc78a94fa Mon Sep 17 00:00:00 2001 From: Misael Lopez Cruz Date: Wed, 22 Apr 2015 16:23:00 +0300 Subject: 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 Signed-off-by: Jyri Sarha Signed-off-by: Tomi Valkeinen Acked-by: Mark Brown --- sound/soc/omap/omap-hdmi-audio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sound') 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, 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; -- cgit v1.2.3 From 516034787e06834816e9a0435499690704f01c47 Mon Sep 17 00:00:00 2001 From: Misael Lopez Cruz Date: Wed, 22 Apr 2015 16:23:01 +0300 Subject: ASoC: omap-hdmi-audio: Fix invalid combination of DM_INH and CA DM_INH = 1 (stereo downmix prohibited) and CA = 0x00 (Channel Allocation: FR, FL) is an invalid combination according to the HDMI Compliance Test 7.31 "Audio InfoFrame". Signed-off-by: Misael Lopez Cruz Signed-off-by: Jyri Sarha Signed-off-by: Tomi Valkeinen Acked-by: Mark Brown --- sound/soc/omap/omap-hdmi-audio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/omap/omap-hdmi-audio.c b/sound/soc/omap/omap-hdmi-audio.c index 8df303f64e11..aeef25c0cb3d 100644 --- a/sound/soc/omap/omap-hdmi-audio.c +++ b/sound/soc/omap/omap-hdmi-audio.c @@ -217,7 +217,11 @@ static int hdmi_dai_hw_params(struct snd_pcm_substream *substream, else cea->db4_ca = 0x13; - cea->db5_dminh_lsv = CEA861_AUDIO_INFOFRAME_DB5_DM_INH_PROHIBITED; + if (cea->db4_ca == 0x00) + cea->db5_dminh_lsv = CEA861_AUDIO_INFOFRAME_DB5_DM_INH_PERMITTED; + else + cea->db5_dminh_lsv = CEA861_AUDIO_INFOFRAME_DB5_DM_INH_PROHIBITED; + /* the expression is trivial but makes clear what we are doing */ cea->db5_dminh_lsv |= (0 & CEA861_AUDIO_INFOFRAME_DB5_LSV); -- cgit v1.2.3