]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: hdmi-codec: reorder channel allocation list
authorJonas Karlman <jonas@kwiboo.se>
Fri, 15 Nov 2024 04:43:44 +0000 (04:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:40 +0000 (19:51 +0100)
commit565dca66578a85a3b28b74ce29f1eac348d7c8e7
tree27a2354d92d665d7058fc762579ed012efae08d7
parent219960a48771b35a3857a491b955c31d6c33d581
ASoC: hdmi-codec: reorder channel allocation list

[ Upstream commit 82ff5abc2edcfba0c0f1a1be807795e2876f46e9 ]

The ordering in hdmi_codec_get_ch_alloc_table_idx() results in
wrong channel allocation for a number of cases, e.g. when ELD
reports FL|FR|LFE|FC|RL|RR or FL|FR|LFE|FC|RL|RR|RC|RLC|RRC:

ca_id 0x01 with speaker mask FL|FR|LFE is selected instead of
ca_id 0x03 with speaker mask FL|FR|LFE|FC for 4 channels

and

ca_id 0x04 with speaker mask FL|FR|RC gets selected instead of
ca_id 0x0b with speaker mask FL|FR|LFE|FC|RL|RR for 6 channels

Fix this by reordering the channel allocation list with most
specific speaker masks at the top.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Link: https://patch.msgid.link/20241115044344.3510979-1-christianshewitt@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/hdmi-codec.c