Bug 289284 - [patch] AMD Radeon W2100 DisplayPort/HDMI audio does not work
Summary: [patch] AMD Radeon W2100 DisplayPort/HDMI audio does not work
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.3-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Christos Margiolis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-04 01:52 UTC by need.espresso
Modified: 2026-01-09 23:30 UTC (History)
4 users (show)

See Also:


Attachments
Removes conditionals and sets corbsize, with reset (1.97 KB, patch)
2025-09-04 01:52 UTC, need.espresso
no flags Details | Diff
Keep the conditionals, setting 256 instead of failing, and reset (1.02 KB, patch)
2025-09-04 01:53 UTC, need.espresso
no flags Details | Diff
Replace ENXIO with hardcoded sizes... (909 bytes, patch)
2025-12-19 14:01 UTC, need.espresso
no flags Details | Diff
Replace ENXIO with hardcoded sizes... (1023 bytes, patch)
2025-12-23 20:59 UTC, Mark Linimon
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description need.espresso 2025-09-04 01:52:38 UTC
Created attachment 263462 [details]
Removes conditionals and sets corbsize, with reset

Hi,

13.5-RELEASE would not initialize the AMD W2100's DisplayPort (HDMI) audio:

hdac0: <ATI (0xaab0) HDA Controller> mem 0xf1b40000-0xf1b43fff irq 36 at device 0.1 on pci3
hdac0: hdac_get_capabilities: Invalid corb size (0)
device_attach: hdac0 attach returned 6

In researching, I found this series of suggested code changes by avg@:
https://freebsd-current.freebsd.narkive.com/QZiPCBtN/amd64-panic-snd-hda-hdac-get-capabilities-invalid-c
orb-size-0

I can confirm that it fixes the issue -- it now works flawlessly:

hdacc0: <ATI R6xx HDA CODEC> at cad 0 on hdac0
hdaa0: <ATI R6xx Audio Function Group> at nid 1 on hdacc0
[...]
hdac0: <ATI (0xaab0) HDA Controller> mem 0xf1b40000-0xf1b43fff irq 36 at device 0.1 on pci3
hdacc0: <ATI R6xx HDA CODEC> at cad 0 on hdac0
hdaa0: <ATI R6xx Audio Function Group> at nid 1 on hdacc0
pcm0: <ATI R6xx (HDMI)> at nid 3 on hdaa0
pcm1: <ATI R6xx (HDMI)> at nid 5 on hdaa0


Diffs attached:

I heeded the advice in that thread and removed the corbsize and rirbsize checks on my system.
This is the "just-set-256.diff", which has shown no issues in testing.

However, I also thought it may be wanted to only set corbsize/rirbsize in the failure condition, and so
I also made "keep-ifs.diff", which also works fine.

Only one of these diffs is needed.  I am open to refining further if need be.  All credit is avg@'s.

Thanks.
Comment 1 need.espresso 2025-09-04 01:53:49 UTC
Created attachment 263463 [details]
Keep the conditionals, setting 256 instead of failing, and reset
Comment 2 need.espresso 2025-09-04 02:33:54 UTC
Aaand I just went to see if it would apply to 14's sources, and realized that this is already fixed in 14 with just the reset before capabilities:

https://cgit.freebsd.org/src/commit/sys/dev/sound/pci/hda/hdac.c?h=stable/14&id=f482411563d6c9ef1dfef3e59bb9e7fe3b6b4d91

I'll go ahead and close this.  Sorry for the noise.
Comment 3 need.espresso 2025-12-19 14:01:07 UTC
Created attachment 266364 [details]
Replace ENXIO with hardcoded sizes...

Hi,

So I finally upgraded to 14.3-RELEASE and discovered that the reset is *not* enough for my card to work.  (I assumed since the description of the cited bug and fix would be sufficient... it is not, so I am reopening this.)

Attached is a variation of the "keep the conditionals" patch that works for me(TM).  I think it needs a way to actually fail, but I'm not entirely sure how to implement that.  I am happy to rework it -- all I have done is make it force the sizes and removed the ENXIO.

Thanks in advance.
Comment 4 need.espresso 2025-12-19 14:03:32 UTC
Hi,

So I finally upgraded to 14.3-RELEASE and discovered that the reset is *not* enough for my card to work.  (I assumed since the description of the cited bug and fix would be sufficient... it is not.)

Attached is a variation of the "keep the conditionals" patch.  I think it needs a way to actually fail, but not sure how to implement that -- so am happy to rework it.  All I have done, is make it force the sizes and removed the ENXIO.  This works for my card...

Thanks in advance.
Comment 5 Christos Margiolis freebsd_committer freebsd_triage 2025-12-22 17:53:02 UTC
Submitted the patch for review: https://reviews.freebsd.org/D54339

We can continue the discussion there.
Comment 6 need.espresso 2025-12-23 13:49:42 UTC
Thank you for the fast fix!  I can confirm that your patch works great.
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2025-12-23 20:59:05 UTC
Created attachment 266489 [details]
Replace ENXIO with hardcoded sizes...

^Triage: rebase to top of tree and reformat via git diff.
Comment 8 commit-hook freebsd_committer freebsd_triage 2026-01-02 15:50:21 UTC
A commit in branch main references this bug:

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

commit 2455db44ef088797d113397f863d46c50e77134f
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-01-02 15:49:33 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-01-02 15:49:33 +0000

    snd_hda: Default to 256 when corb/rirb is invalid

    PR:             289284
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    emaste
    Differential Revision:  https://reviews.freebsd.org/D54339

 sys/dev/sound/pci/hda/hdac.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2026-01-09 23:29:10 UTC
A commit in branch stable/15 references this bug:

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

commit ed61d50bd404070229a459a98ff1b1e36f6828bb
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-01-02 15:49:33 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-01-09 23:27:22 +0000

    snd_hda: Default to 256 when corb/rirb is invalid

    PR:             289284
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    emaste
    Differential Revision:  https://reviews.freebsd.org/D54339

    (cherry picked from commit 2455db44ef088797d113397f863d46c50e77134f)

 sys/dev/sound/pci/hda/hdac.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)