]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/kernel-video.git/blobdiff - drivers/video/omap2/dss/ti_hdmi_5xxx_ip.c
Merge branch 'p-ti-android-3.8.y-video'
[android-sdk/kernel-video.git] / drivers / video / omap2 / dss / ti_hdmi_5xxx_ip.c
index 232d708df0e2e50e4dd092160b1a30a6032d54ec..c77d865b1f99a0042291f794d79a05905129e1ad 100644 (file)
@@ -898,10 +898,15 @@ static void ti_hdmi_5xxx_core_audio_config(struct hdmi_ip_data *ip_data,
                REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_CONF0, 0, 5, 5);
                /* enable two channels in GPA */
                REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_GP_CONF1, 3, 7, 0);
+       } else if (cfg->layout == HDMI_AUDIO_LAYOUT_6CH) {
+               /* select HBR/SPDIF interfaces */
+               REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_CONF0, 0, 5, 5);
+               /* enable six channels in GPA */
+               REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_GP_CONF1, 0x3F, 7, 0);
        } else {
                /* select HBR/SPDIF interfaces */
                REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_CONF0, 0, 5, 5);
-               /* enable two channels in GPA */
+               /* enable eight channels in GPA */
                REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_GP_CONF1, 0xFF, 7, 0);
        }
 
@@ -924,8 +929,10 @@ static void ti_hdmi_5xxx_core_audio_infoframe_cfg
 {
        void __iomem *core_sys_base = hdmi_core_sys_base(ip_data);
 
+       /* Channel count and coding type fields in AUDICONF0 are swapped */
        hdmi_write_reg(core_sys_base, HDMI_CORE_FC_AUDICONF0,
-               info_aud->db1_ct_cc);
+               (info_aud->db1_ct_cc & CEA861_AUDIO_INFOFRAME_DB1CC)<<4 |
+               (info_aud->db1_ct_cc & CEA861_AUDIO_INFOFRAME_DB1CT)>>4);
 
        hdmi_write_reg(core_sys_base, HDMI_CORE_FC_AUDICONF1,
                info_aud->db2_sf_ss);