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