ASoC: hdmi-codec: fix channel info for compressed formats
authorMatthias Reichl <hias@horus.com>
Sat, 24 Jun 2023 16:52:32 +0000 (18:52 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 26 Jun 2023 12:28:55 +0000 (13:28 +0100)
commit7b5162080174ae50e8288574379d339b0fcd1760
treeb39d98688e7048ba03502319c0540afa3e8d3688
parent2d0cad0473bd1ffbc5842be0b9f2546265acb011
ASoC: hdmi-codec: fix channel info for compressed formats

According to CTA 861 the channel/speaker allocation info in the
audio infoframe only applies to uncompressed (PCM) audio streams.

The channel count info should indicate the number of channels
in the transmitted audio, which usually won't match the number of
channels used to transmit the compressed bitstream.

Some devices (eg some Sony TVs) will refuse to decode compressed
audio if these values are not set correctly.

To fix this we can simply set the channel count to 0 (which means
"refer to stream header") and set the channel/speaker allocation to 0
as well (which would mean stereo FL/FR for PCM, a safe value all sinks
will support) when transmitting compressed audio.

Signed-off-by: Matthias Reichl <hias@horus.com>
Link: https://lore.kernel.org/r/20230624165232.5751-1-hias@horus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/hdmi-codec.c