aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRicardo Neri <ricardo.neri@ti.com>2012-05-03 13:27:12 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-11 08:17:09 -0400
commit24ccfc5541b11f1e6ffcf10f5ce94370440d6c75 (patch)
tree6657224dc42aa28ad885ca5ae9c399579bda669e /drivers
parent6ec355d6c79e811a3b7f85ca6b22fa4bd7b1bbfc (diff)
OMAPDSS: HDMI: OMAP4: Remap speaker order to match ALSA order
As of today, the only know user of the DSS HDMI audio support is ASoC. Hence, it makes sense to remap the speaker order to match the ALSA speaker order. In the future, a dynamic mapping mechanism may be implemented. Remapping is needed as the HDMI speaker order is FL/FR/LFE/C/RL/RR/ RLC-FLC/RRC-FLC while the ALSA order is FL/FR/RL/RR/C/LFE/SL/SR. Refer to CEA-861 Section 6.6.2 for further details. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
index 1ce77f37ab50..667c960e10b9 100644
--- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
+++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
@@ -1152,6 +1152,14 @@ static void ti_hdmi_4xxx_core_audio_config(struct hdmi_ip_data *ip_data,
1152 r = FLD_MOD(r, cfg->en_parallel_aud_input, 2, 2); 1152 r = FLD_MOD(r, cfg->en_parallel_aud_input, 2, 2);
1153 r = FLD_MOD(r, cfg->en_spdif, 1, 1); 1153 r = FLD_MOD(r, cfg->en_spdif, 1, 1);
1154 hdmi_write_reg(av_base, HDMI_CORE_AV_AUD_MODE, r); 1154 hdmi_write_reg(av_base, HDMI_CORE_AV_AUD_MODE, r);
1155
1156 /* Audio channel mappings */
1157 /* TODO: Make channel mapping dynamic. For now, map channels
1158 * in the ALSA order: FL/FR/RL/RR/C/LFE/SL/SR. Remapping is needed as
1159 * HDMI speaker order is different. See CEA-861 Section 6.6.2.
1160 */
1161 hdmi_write_reg(av_base, HDMI_CORE_AV_I2S_IN_MAP, 0x78);
1162 REG_FLD_MOD(av_base, HDMI_CORE_AV_SWAP_I2S, 1, 5, 5);
1155} 1163}
1156 1164
1157static void ti_hdmi_4xxx_core_audio_infoframe_cfg(struct hdmi_ip_data *ip_data, 1165static void ti_hdmi_4xxx_core_audio_infoframe_cfg(struct hdmi_ip_data *ip_data,