Bug 299094

Summary: snd_hda: use the pin ELD to select DisplayPort audio framing
Product: Base System Reporter: David Bidner <david>
Component: kernAssignee: Christos Margiolis <christos>
Status: Closed FIXED    
Severity: Affects Only Me CC: christos, ziaee
Priority: ---    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Read the ELD from the output pin to select the correct audio framing. none

Description David Bidner 2026-10-03 14:43:18 UTC
Created attachment 275340 [details]
Read the ELD from the output pin to select the correct 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.
Comment 1 Christos Margiolis freebsd_committer freebsd_triage 2026-10-07 07:09:36 UTC
The change seems fine, what is the functional change in your setup?
Comment 2 David Bidner 2026-10-07 11:38:13 UTC
I tested the equivalent change on DragonFly BSD, with an Intel Kaby Lake audio codec and an LG HDR 4K monitor connected through DisplayPort. I have not tested it on FreeBSD hardware.

Before the change, the driver selected HDMI audio framing even though the output pin's ELD identified DisplayPort. After the change, the captured driver commands used DisplayPort framing, and I could hear console tones and desktop audio.

Correct framing is the change I could verify directly.
Comment 3 Christos Margiolis freebsd_committer freebsd_triage 2026-10-07 11:39:53 UTC
As with 299139, please feel free to submit the patch for review on GitHub or Phabricator, and make sure to include sufficient information (for example what you just described) in the commit message. Thanks.
Comment 4 David Bidner 2026-10-07 13:30:15 UTC
Thanks, I've opened a GitHub PR:
https://github.com/freebsd/freebsd-src/pull/2463

The commit includes the observed framing change and the DragonFly hardware results, with the FreeBSD validation limitation noted.
Comment 5 commit-hook freebsd_committer freebsd_triage 2026-10-14 12:00:30 UTC
A commit in branch main references this bug:

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(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2026-11-01 13:39:39 UTC
A commit in branch stable/15 references this bug:

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(-)