aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngela Stegmaier2013-07-03 10:47:30 -0500
committerMisael Lopez Cruz2013-07-22 15:04:27 -0500
commit60bea81aecf0a2c981058f02286470505ba68920 (patch)
treefdd1fa075d25745253251257f230dde09218eed1
parent053b56a5839b653491d623e0670ad72116d90000 (diff)
downloadkernel-audio-60bea81aecf0a2c981058f02286470505ba68920.tar.gz
kernel-audio-60bea81aecf0a2c981058f02286470505ba68920.tar.xz
kernel-audio-60bea81aecf0a2c981058f02286470505ba68920.zip
OMAPDSS: HDMI: Fix GPA Channel Setting and Channel Allocation for 6-Channels
Enable channels 0 to 5 in GPA configuration (GP_CONF1) for the 6 channels case. This fixes an issue where the Audio Sample Packet was carrying 8 channels instead of 6 channels. The new GPA configuration sets the sample_present.sp3 bit to 0, then 0x13 is not a valid channel allocation. So, the channel allocation is set to a valid value (0xb), when the number of channels is 6. Also a typo is fixed in the comments for the eight channel case. Change-Id: I3c987a4efdaf9f9594c99dc1fca1470b53a59355 Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
-rw-r--r--drivers/video/omap2/dss/ti_hdmi_5xxx_ip.c7
-rw-r--r--sound/soc/omap/omap-hdmi.c6
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/ti_hdmi_5xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_5xxx_ip.c
index 1e99149560f0..c77d865b1f99 100644
--- a/drivers/video/omap2/dss/ti_hdmi_5xxx_ip.c
+++ b/drivers/video/omap2/dss/ti_hdmi_5xxx_ip.c
@@ -898,10 +898,15 @@ static void ti_hdmi_5xxx_core_audio_config(struct hdmi_ip_data *ip_data,
898 REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_CONF0, 0, 5, 5); 898 REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_CONF0, 0, 5, 5);
899 /* enable two channels in GPA */ 899 /* enable two channels in GPA */
900 REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_GP_CONF1, 3, 7, 0); 900 REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_GP_CONF1, 3, 7, 0);
901 } else if (cfg->layout == HDMI_AUDIO_LAYOUT_6CH) {
902 /* select HBR/SPDIF interfaces */
903 REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_CONF0, 0, 5, 5);
904 /* enable six channels in GPA */
905 REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_GP_CONF1, 0x3F, 7, 0);
901 } else { 906 } else {
902 /* select HBR/SPDIF interfaces */ 907 /* select HBR/SPDIF interfaces */
903 REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_CONF0, 0, 5, 5); 908 REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_CONF0, 0, 5, 5);
904 /* enable two channels in GPA */ 909 /* enable eight channels in GPA */
905 REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_GP_CONF1, 0xFF, 7, 0); 910 REG_FLD_MOD(core_sys_base, HDMI_CORE_AUD_GP_CONF1, 0xFF, 7, 0);
906 } 911 }
907 912
diff --git a/sound/soc/omap/omap-hdmi.c b/sound/soc/omap/omap-hdmi.c
index b65a57484d08..b60a32faf9ff 100644
--- a/sound/soc/omap/omap-hdmi.c
+++ b/sound/soc/omap/omap-hdmi.c
@@ -193,12 +193,10 @@ static int omap_hdmi_dai_hw_params(struct snd_pcm_substream *substream,
193 193
194 cea->db3 = 0; /* not used, all zeros */ 194 cea->db3 = 0; /* not used, all zeros */
195 195
196 /*
197 * The OMAP HDMI IP requires to use the 8-channel channel code when
198 * transmitting more than two channels.
199 */
200 if (params_channels(params) == 2) 196 if (params_channels(params) == 2)
201 cea->db4_ca = 0x0; 197 cea->db4_ca = 0x0;
198 else if (params_channels(params) == 6)
199 cea->db4_ca = 0xb;
202 else 200 else
203 cea->db4_ca = 0x13; 201 cea->db4_ca = 0x13;
204 202