git: a1b3329affb9 - stable/15 - snd_hda: use the pin ELD to select DisplayPort audio framing

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Sun, 01 Nov 2026 13:38:52 UTC
The branch stable/15 has been updated by christos:

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

commit a1b3329affb949ce5d14f8af373b215faa51cdcc
Author:     David Bidner <david@crap.solutions>
AuthorDate: 2026-10-03 14:04:32 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-11-01 13:38:25 +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
    
    (cherry picked from commit 29449b3e468cb1673814dc6452e82035b3c2a628)
---
 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 c03cbc216030..0f81d114eb30 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,