linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/hdmi: Consider ELD is invalid when no SAD is present
@ 2021-12-02  7:33 Kai-Heng Feng
  2021-12-02  8:03 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Kai-Heng Feng @ 2021-12-02  7:33 UTC (permalink / raw)
  To: tiwai
  Cc: Kai-Heng Feng, Jaroslav Kysela, Kai Vehmanen,
	Guennadi Liakhovetski, Ranjani Sridharan, Hui Wang, alsa-devel,
	linux-kernel

There's a system that reports a bogus HDMI audio interface:
$ cat eld#2.0
monitor_present         1
eld_valid               1
monitor_name
connection_type         DisplayPort
eld_version             [0x2] CEA-861D or below
edid_version            [0x3] CEA-861-B, C or D
manufacture_id          0xe430
product_id              0x690
port_id                 0x0
support_hdcp            0
support_ai              0
audio_sync_delay        0
speakers                [0xffff] FL/FR LFE FC RL/RR RC FLC/FRC RLC/RRC FLW/FRW FLH/FRH TC FCH
sad_count               0

Since playing audio is not possible without SAD, also consider ELD is
invalid for this case.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 sound/pci/hda/patch_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 415701bd10ac8..e7c2f3167f311 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1535,7 +1535,7 @@ static void update_eld(struct hda_codec *codec,
 		}
 	}
 
-	if (!eld->eld_valid || eld->eld_size <= 0) {
+	if (!eld->eld_valid || eld->eld_size <= 0 || eld->info.sad_count <= 0) {
 		eld->eld_valid = false;
 		eld->eld_size = 0;
 	}
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda/hdmi: Consider ELD is invalid when no SAD is present
  2021-12-02  7:33 [PATCH] ALSA: hda/hdmi: Consider ELD is invalid when no SAD is present Kai-Heng Feng
@ 2021-12-02  8:03 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2021-12-02  8:03 UTC (permalink / raw)
  To: Kai-Heng Feng
  Cc: tiwai, Jaroslav Kysela, Kai Vehmanen, Guennadi Liakhovetski,
	Ranjani Sridharan, Hui Wang, alsa-devel, linux-kernel

On Thu, 02 Dec 2021 08:33:35 +0100,
Kai-Heng Feng wrote:
> 
> There's a system that reports a bogus HDMI audio interface:
> $ cat eld#2.0
> monitor_present         1
> eld_valid               1
> monitor_name
> connection_type         DisplayPort
> eld_version             [0x2] CEA-861D or below
> edid_version            [0x3] CEA-861-B, C or D
> manufacture_id          0xe430
> product_id              0x690
> port_id                 0x0
> support_hdcp            0
> support_ai              0
> audio_sync_delay        0
> speakers                [0xffff] FL/FR LFE FC RL/RR RC FLC/FRC RLC/RRC FLW/FRW FLH/FRH TC FCH
> sad_count               0
> 
> Since playing audio is not possible without SAD, also consider ELD is
> invalid for this case.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

Thanks, applied.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-02  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02  7:33 [PATCH] ALSA: hda/hdmi: Consider ELD is invalid when no SAD is present Kai-Heng Feng
2021-12-02  8:03 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).