Page MenuHomeFreeBSD

Make HDMI audio work on some AMD graphic cards
ClosedPublic

Authored by se on Jun 7 2025, 5:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 24, 3:10 PM
Unknown Object (File)
Sat, Sep 20, 9:53 PM
Unknown Object (File)
Thu, Sep 18, 8:56 PM
Unknown Object (File)
Sep 16 2025, 3:20 AM
Unknown Object (File)
Sep 16 2025, 1:18 AM
Unknown Object (File)
Sep 14 2025, 12:11 PM
Unknown Object (File)
Sep 13 2025, 5:46 AM
Unknown Object (File)
Sep 12 2025, 3:42 PM
Subscribers

Details

Summary

This patch fixes audio via HDMI for my RADEON R7-250E graphics card.
Without the patch the CORB value read from the card is 0, preventing the driver from attaching.

hdac0: hdac_get_capabilities: Invalid corb size (0)

With hdac_reset() before hdac_get_capabilities() the driver attaches and works as expected:

hdac0: <ATI Oland HDA Controller> mem 0xfce60000-0xfce63fff irq 55 at device 0.1 on pci10
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
pcm2: <ATI R6xx (HDMI)> at nid 7 on hdaa0
pcm3: <ATI R6xx (HDMI)> at nid 9 on hdaa0
pcm4: <ATI R6xx (HDMI)> at nid 11 on hdaa0
pcm5: <ATI R6xx (HDMI)> at nid 13 on hdaa0

This patch is based on the diff in DragonFlyBSD issue 3026, but contains only the reset, since the other chunks did not seem appropriate (assuming a certain corb size if no valid value can be fetched).

Test Plan

Apply the patch.
Test with AMD graphics card that did not provide audio via HDMI without this patch. A
Test other HDA devices to make sure there are no regressions.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

se requested review of this revision.Jun 7 2025, 5:13 PM

The right diff's path seems messed up ("i/sys/..."), could you please fix that first?

Update diff to be in standard format (had been created with "diff.mnemonicprefix=true").

My own Radeon HDMI worked fine even before the patch, but with the patch it still works.

Please make sure to add "snd_hda: " at the beginning of the commit title.

This revision is now accepted and ready to land.Jun 12 2025, 12:46 AM
This revision was automatically updated to reflect the committed changes.

I will take care of MFC'ing this to stable/14. Thanks.