Page MenuHomeFreeBSD

Make HDMI audio work on some AMD graphic cards
ClosedPublic

Authored by se on Sat, Jun 7, 5:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 28, 9:18 PM
Unknown Object (File)
Sat, Jun 28, 2:42 PM
Unknown Object (File)
Thu, Jun 26, 6:28 PM
Unknown Object (File)
Thu, Jun 26, 5:33 PM
Unknown Object (File)
Wed, Jun 25, 10:06 PM
Unknown Object (File)
Tue, Jun 24, 5:14 PM
Unknown Object (File)
Wed, Jun 18, 4:12 PM
Unknown Object (File)
Tue, Jun 17, 12:47 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 Skipped
Unit
Tests Skipped

Event Timeline

se requested review of this revision.Sat, Jun 7, 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.Thu, Jun 12, 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.