ASoC: omap-hdmi-audio: Fix invalid combination of DM_INH and CA
authorMisael Lopez Cruz <misael.lopez@ti.com>
Wed, 22 Apr 2015 13:23:01 +0000 (16:23 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 3 Jun 2015 11:34:14 +0000 (14:34 +0300)
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 <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>
sound/soc/omap/omap-hdmi-audio.c

index 8df303f64e1108a4d6b0f00fe8420ff092756cde..aeef25c0cb3d9fe18256955745b5d2dc4af81e81 100644 (file)
@@ -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);