Bug 90777 - radeon/audio: Removed CRC control programing broke HDMI audio in Linux 4.0
Summary: radeon/audio: Removed CRC control programing broke HDMI audio in Linux 4.0
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords: bisected
Depends on:
Blocks:
 
Reported: 2015-05-29 22:09 UTC by James Le Cuirot
Modified: 2015-12-14 19:50 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to revert commit against 4.1-rc5 (1.64 KB, text/plain)
2015-05-29 22:09 UTC, James Le Cuirot
no flags Details
proper fix (1.08 KB, patch)
2015-06-01 22:13 UTC, Alex Deucher
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description James Le Cuirot 2015-05-29 22:09:58 UTC
Created attachment 116160 [details]
Patch to revert commit against 4.1-rc5

After upgrading to Linux 4.0 or above (latest tried is 4.1-rc5), HDMI audio stopped working from my Radeon HD 4670 to my Yamaha RX-V775 receiver on the second output. Strangely, it continued to work to my Acer monitor on the primary output.

I bisected this back to 8ffea8570d5a7e9dd3c10349ebc3bd79487ae30b, which is amusingly titled "removed unnecessary CRC control". I guess it's not so unnecessary, after all! This does not cleanly revert against 4.1-rc5 as the surrounding code has been removed but simply adding these single lines back where they were is enough to get it working again. Please see the attached patch.

The change also affects Evergreen, which I cannot test but a Gentoo user reported what appears to be the same issue on his Mobility Radeon HD 5430.

https://forums.gentoo.org/viewtopic-p-7755600.html
Comment 1 James Le Cuirot 2015-05-29 22:26:31 UTC
I should add that using xrandr to try and force audio on that output doesn't help. I normally use this to switch between my monitor and my receiver.
Comment 2 Alex Deucher 2015-06-01 22:13:45 UTC
Created attachment 116221 [details] [review]
proper fix

The CRC registers don't need to be programmed.  The driver was just updating the wrong register when setting up the ACR packet control.
Comment 3 Itzamna 2015-06-02 14:41:17 UTC
(In reply to Alex Deucher from comment #2)
> Created attachment 116221 [details] [review] [review]
> proper fix
> 
> The CRC registers don't need to be programmed.  The driver was just updating
> the wrong register when setting up the ACR packet control.

Hello Alex,

Sadly, your patch does not fix HDMI audio on my machine (kernel 4.0.4; Radeon HD 7970). Reverting commit 8ffea8570d5a7e9dd3c10349ebc3bd79487ae30b does fix the issue.

- Itzamna
Comment 4 Alex Deucher 2015-06-02 14:46:36 UTC
(In reply to Itzamna from comment #3)
> Hello Alex,
> 
> Sadly, your patch does not fix HDMI audio on my machine (kernel 4.0.4;
> Radeon HD 7970). Reverting commit 8ffea8570d5a7e9dd3c10349ebc3bd79487ae30b
> does fix the issue.
> 
> - Itzamna

What hardware and kernel are you using?
Comment 5 Alex Deucher 2015-06-02 14:48:42 UTC
(In reply to Itzamna from comment #3)
> Hello Alex,
> 
> Sadly, your patch does not fix HDMI audio on my machine (kernel 4.0.4;
> Radeon HD 7970). Reverting commit 8ffea8570d5a7e9dd3c10349ebc3bd79487ae30b
> does fix the issue.

Sorry, I missed the 7970 part.  This patch is not relevant to your board.  It should fix James's issue.
Comment 6 Alex Deucher 2015-06-02 14:59:06 UTC
(In reply to Itzamna from comment #3)
> Hello Alex,
> 
> Sadly, your patch does not fix HDMI audio on my machine (kernel 4.0.4;
> Radeon HD 7970). Reverting commit 8ffea8570d5a7e9dd3c10349ebc3bd79487ae30b
> does fix the issue.

Does audio work properly on your board with the latest 4.1 kernel from Linus' tree?  Specifically make sure it has this patch:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2d1c18bba15daf89d75ce475ecd2068f483aa12f
Comment 7 James Le Cuirot 2015-06-02 21:36:06 UTC
That does indeed fix it here, thanks Alex.
Comment 8 James Le Cuirot 2015-06-09 19:53:24 UTC
I see this went into 4.1-rc7 so closing.
Comment 9 Shimi Chen 2015-07-25 12:53:17 UTC
My HDMI audio also does not work since 4.0.
I tried installing the mainline 4.2rc3 kernel and it is not fixed.
Reverting to 3.17.6 fixes the issue.
I'm using Arch Linux and a laptop with Radeon HD 4570.

Should I report a separate bug?
Comment 10 James Le Cuirot 2015-07-25 14:30:32 UTC
(In reply to Shimi Chen from comment #9)
> My HDMI audio also does not work since 4.0.
> I tried installing the mainline 4.2rc3 kernel and it is not fixed.
> Reverting to 3.17.6 fixes the issue.
> I'm using Arch Linux and a laptop with Radeon HD 4570.
> 
> Should I report a separate bug?

I think you should. Sound was still working for me thanks to this fix as of 4.2rc1. It's worth noting that multichannel PCM only started working for me around 3.18 so userspace may be seeing your card a little differently. My system gets confused between the EDID sent by my AV unit vs the EDID sent by my stereo monitor so I had to add this line to /etc/modprobe.d/alsa.conf to get surround working reliably.

options snd-hda-codec-hdmi static_hdmi_pcm=1
Comment 11 Maximilian Böhm 2015-11-05 00:18:03 UTC
Definitely still broken on Linux 4.2 and 4.3 RC7. Works here with 3.18.
Comment 12 James Le Cuirot 2015-12-14 19:50:30 UTC
(In reply to Maximilian Böhm from comment #11)
> Definitely still broken on Linux 4.2 and 4.3 RC7. Works here with 3.18.

Please don't hijack this bug. I'm on 4.3.2 and it's working fine. You must have a different issue.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.