From eff4833be15b9718c9c7726811607b76e2b3e4c2 Mon Sep 17 00:00:00 2001 From: Sugar Zhang Date: Tue, 4 Apr 2023 09:38:08 +0800 Subject: [PATCH] ASoC: hdmi-codec: Fix "ELD Bypass Switch" CA info should be ignored in the ELD Bypass Situation. Fixes: c6c61f86799b ("ASoC: hdmi-codec: Add option for ELD bypass") Signed-off-by: Sugar Zhang Change-Id: I02265570ebcf4d17558b604644dcf5e9425f06cb --- sound/soc/codecs/hdmi-codec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index e5673ccfd016..4d3725ba45e9 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -352,6 +352,9 @@ static int hdmi_codec_get_ch_alloc_table_idx(struct hdmi_codec_priv *hcp, unsigned long spk_mask; const struct hdmi_codec_cea_spk_alloc *cap = hdmi_codec_channel_alloc; + if (hcp->eld_bypass) + return 0; + spk_alloc = drm_eld_get_spk_alloc(hcp->eld); spk_mask = hdmi_codec_spk_mask_from_alloc(spk_alloc);