Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24ccfc55 authored by Ricardo Neri's avatar Ricardo Neri Committed by Tomi Valkeinen
Browse files

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: default avatarRicardo Neri <ricardo.neri@ti.com>
parent 6ec355d6
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1152,6 +1152,14 @@ static void ti_hdmi_4xxx_core_audio_config(struct hdmi_ip_data *ip_data,
	r = FLD_MOD(r, cfg->en_parallel_aud_input, 2, 2);
	r = FLD_MOD(r, cfg->en_spdif, 1, 1);
	hdmi_write_reg(av_base, HDMI_CORE_AV_AUD_MODE, r);

	/* Audio channel mappings */
	/* TODO: Make channel mapping dynamic. For now, map channels
	 * in the ALSA order: FL/FR/RL/RR/C/LFE/SL/SR. Remapping is needed as
	 * HDMI speaker order is different. See CEA-861 Section 6.6.2.
	 */
	hdmi_write_reg(av_base, HDMI_CORE_AV_I2S_IN_MAP, 0x78);
	REG_FLD_MOD(av_base, HDMI_CORE_AV_SWAP_I2S, 1, 5, 5);
}

static void ti_hdmi_4xxx_core_audio_infoframe_cfg(struct hdmi_ip_data *ip_data,