<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.freebsd.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.freebsd.org/bugzilla/"
          
          maintainer="bugmeister@FreeBSD.org"
>

    <bug>
          <bug_id>299094</bug_id>
          
          <creation_ts>2026-10-03 14:43:18 +0000</creation_ts>
          <short_desc>snd_hda: use the pin ELD to select DisplayPort audio framing</short_desc>
          <delta_ts>2026-11-01 13:39:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Base System</product>
          <component>kern</component>
          <version>Unspecified</version>
          <rep_platform>Any</rep_platform>
          <op_sys>Any</op_sys>
          <bug_status>Closed</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>Affects Only Me</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Bidner">david</reporter>
          <assigned_to name="Christos Margiolis">christos</assigned_to>
          <cc>christos</cc>
    
    <cc>ziaee</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1447700</commentid>
    <comment_count>0</comment_count>
      <attachid>275340</attachid>
    <who name="David Bidner">david</who>
    <bug_when>2026-10-03 14:43:18 +0000</bug_when>
    <thetext>Created attachment 275340
Read the ELD from the output pin to select the correct audio framing.

hdaa_audio_setup() reads the converter widget&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1448288</commentid>
    <comment_count>1</comment_count>
    <who name="Christos Margiolis">christos</who>
    <bug_when>2026-10-07 07:09:36 +0000</bug_when>
    <thetext>The change seems fine, what is the functional change in your setup?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1448314</commentid>
    <comment_count>2</comment_count>
    <who name="David Bidner">david</who>
    <bug_when>2026-10-07 11:38:13 +0000</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1448316</commentid>
    <comment_count>3</comment_count>
    <who name="Christos Margiolis">christos</who>
    <bug_when>2026-10-07 11:39:53 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1448334</commentid>
    <comment_count>4</comment_count>
    <who name="David Bidner">david</who>
    <bug_when>2026-10-07 13:30:15 +0000</bug_when>
    <thetext>Thanks, I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1449393</commentid>
    <comment_count>5</comment_count>
    <who name="">commit-hook</who>
    <bug_when>2026-10-14 12:00:30 +0000</bug_when>
    <thetext>A commit in branch main references this bug:

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

commit 29449b3e468cb1673814dc6452e82035b3c2a628
Author:     David Bidner &lt;david@crap.solutions&gt;
AuthorDate: 2026-10-03 14:04:32 +0000
Commit:     Christos Margiolis &lt;christos@FreeBSD.org&gt;
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&apos;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 &lt;david@crap.solutions&gt;
    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(-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1453696</commentid>
    <comment_count>6</comment_count>
    <who name="">commit-hook</who>
    <bug_when>2026-11-01 13:39:39 +0000</bug_when>
    <thetext>A commit in branch stable/15 references this bug:

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

commit a1b3329affb949ce5d14f8af373b215faa51cdcc
Author:     David Bidner &lt;david@crap.solutions&gt;
AuthorDate: 2026-10-03 14:04:32 +0000
Commit:     Christos Margiolis &lt;christos@FreeBSD.org&gt;
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&apos;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 &lt;david@crap.solutions&gt;
    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(-)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>275340</attachid>
            <date>2026-10-03 14:43:18 +0000</date>
            <delta_ts>2026-10-03 23:43:39 +0000</delta_ts>
            <desc>Read the ELD from the output pin to select the correct audio framing.</desc>
            <filename>0001-snd_hda-fix-DisplayPort-audio-framing.patch</filename>
            <type>text/plain</type>
            <size>1409</size>
            <attacher name="David Bidner">david</attacher>
            
              <data encoding="base64">RnJvbSBhMmRlYmE0NDBjZDNhNGNhNDU4ZTcxZWFiMjUzNzQ4NTQ3ZmZiOWE0IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBEYXZpZCBCaWRuZXIgPGRhdmlkQGNyYXAuc29sdXRpb25zPgpE
YXRlOiBTYXQsIDMgT2N0IDIwMjYgMTY6MDQ6MzIgKzAyMDAKU3ViamVjdDogW1BBVENIXSBzbmRf
aGRhOiB1c2UgdGhlIHBpbiBFTEQgdG8gc2VsZWN0IERpc3BsYXlQb3J0IGF1ZGlvIGZyYW1pbmcK
CmhkYWFfYXVkaW9fc2V0dXAoKSByZWFkcyB0aGUgY29udmVydGVyIHdpZGdldCdzIEVMRCB3aGVu
IGNob29zaW5nIGJldHdlZW4KSERNSSBhbmQgRGlzcGxheVBvcnQgYXVkaW8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