git: 29449b3e468c - main - snd_hda: use the pin ELD to select DisplayPort audio framing

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Wed, 14 Oct 2026 11:59:59 UTC
The branch main has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=29449b3e468cb1673814dc6452e82035b3c2a628

commit 29449b3e468cb1673814dc6452e82035b3c2a628
Author:     David Bidner <david@crap.solutions>
AuthorDate: 2026-10-03 14:04:32 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-10-14 11:57:40 +0000

    snd_hda: use the pin ELD to select DisplayPort audio framing
    
    hdaa_audio_setup() reads the converter widget's ELD when choosing
    between HDMI and DisplayPort audio infoframes. ELD is stored on the
    output pin, so the converter has no ELD and the driver selects HDMI
    framing even when the connected display uses DisplayPort.
    
    Read the ELD from the output pin to select the correct audio framing.
    
    The equivalent change was tested on DragonFly BSD with an Intel Kaby
    Lake display-audio codec and an LG HDR 4K monitor connected over
    DisplayPort. Before the change, converter node 2 had no ELD, while
    output pin 5 had an 83-byte ELD identifying DisplayPort. Captured driver
    commands programmed HDMI audio infoframe bytes (84 01 0a 70 01 00 00
    00). After applying the change and rebooting, the commands used the
    existing DisplayPort form (84 1b 44 01 00 00 00), and console tones and
    desktop audio were audible.
    
    PR:             299094
    Signed-off-by:  David Bidner <david@crap.solutions>
    Reviewed by:    christos
    MFC after:      2 weeks
    Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2463
---
 sys/dev/sound/pci/hda/hdaa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c
index 38dfb4cc7759..8f0d76669548 100644
--- a/sys/dev/sound/pci/hda/hdaa.c
+++ b/sys/dev/sound/pci/hda/hdaa.c
@@ -2008,8 +2008,8 @@ hdaa_audio_setup(struct hdaa_chan *ch)
 			/* Write HDMI/DisplayPort audio infoframe. */
 			hda_command(ch->devinfo->dev,
 			    HDA_CMD_SET_HDMI_DIP_INDEX(0, nid, 0x00));
-			if (w->eld != NULL && w->eld_len >= 6 &&
-			    ((w->eld[5] >> 2) & 0x3) == 1) { /* DisplayPort */
+			if (wp->eld != NULL && wp->eld_len >= 6 &&
+			    ((wp->eld[5] >> 2) & 0x3) == 1) { /* DisplayPort */
 				hda_command(ch->devinfo->dev,
 				    HDA_CMD_SET_HDMI_DIP_DATA(0, nid, 0x84));
 				hda_command(ch->devinfo->dev,