Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: omap-hdmi-audio: Force channel allocation only for OMAP4

There is a constraint in the OMAP4 HDMI IP that requires to use
the 8-channel code when transmitting more than two channels.

The constraint doesn't apply for OMAP5 so don't force the channel
allocation in the sound driver as it can be done specifically for
OMAP4 later in the hdmi4 core.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>

authored by

Misael Lopez Cruz and committed by
Tomi Valkeinen
88359b99 65c8b464

+9 -4
+7
drivers/video/fbdev/omap2/dss/hdmi4_core.c
··· 654 654 hdmi_write_reg(av_base, HDMI_CORE_AV_AUD_DBYTE(2), info_aud->db3); 655 655 sum += info_aud->db3; 656 656 657 + /* 658 + * The OMAP HDMI IP requires to use the 8-channel channel code when 659 + * transmitting more than two channels. 660 + */ 661 + if (info_aud->db4_ca != 0x00) 662 + info_aud->db4_ca = 0x13; 663 + 657 664 hdmi_write_reg(av_base, HDMI_CORE_AV_AUD_DBYTE(3), info_aud->db4_ca); 658 665 sum += info_aud->db4_ca; 659 666
+2 -4
sound/soc/omap/omap-hdmi-audio.c
··· 210 210 211 211 cea->db3 = 0; /* not used, all zeros */ 212 212 213 - /* 214 - * The OMAP HDMI IP requires to use the 8-channel channel code when 215 - * transmitting more than two channels. 216 - */ 217 213 if (params_channels(params) == 2) 218 214 cea->db4_ca = 0x0; 215 + else if (params_channels(params) == 6) 216 + cea->db4_ca = 0xb; 219 217 else 220 218 cea->db4_ca = 0x13; 221 219