From: Misael Lopez Cruz <[email protected]>

OMAP4 HDMI IP uses the 8-channel layout with 8-channel speaker
allocation mask when transmitting more than two channels.  But
the channel count field (CC) of the Audio InfoFrame's DB1 is
not updated for 8-channels.

As per HDMI Compliance Test 7.31 "Audio InfoFrame", CC = 7 is
required for 8-channels CA masks (0x13 and 0x1F).

Signed-off-by: Misael Lopez Cruz <[email protected]>
Signed-off-by: Jyri Sarha <[email protected]>
---
 drivers/video/fbdev/omap2/dss/hdmi4_core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/omap2/dss/hdmi4_core.c 
b/drivers/video/fbdev/omap2/dss/hdmi4_core.c
index 7eafea5..2b8bd22 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi4_core.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi4_core.c
@@ -795,7 +795,9 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct 
hdmi_wp_data *wp,
 
        /*
         * the HDMI IP needs to enable four stereo channels when transmitting
-        * more than 2 audio channels
+        * more than 2 audio channels.  Similarly, the channel count in the
+        * Audio InfoFrame has to match the sample_present bits (some channels
+        * are padded with zeroes)
         */
        if (channel_count == 2) {
                audio_format.stereo_channels = HDMI_AUDIO_STEREO_ONECHANNEL;
@@ -807,6 +809,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct 
hdmi_wp_data *wp,
                                HDMI_AUDIO_I2S_SD1_EN | HDMI_AUDIO_I2S_SD2_EN |
                                HDMI_AUDIO_I2S_SD3_EN;
                acore.layout = HDMI_AUDIO_LAYOUT_8CH;
+               audio->cea->db1_ct_cc = 7;
        }
 
        acore.en_spdif = false;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to