Created attachment 34871 [details] [review]
Patch to prefer UNIPHYA output for DIG1 encoder.
I have a MSI-made Radeon HD 4350 card with a HDMI, DVI and a VGA connector (log says "Card not in database: 0x954F:0x1462:0x1618"). I have a monitor connected to the DVI output and a TV on the HDMI.
With the radeonhd driver from git HDMI audio only works when the HDMI output is initialized first by the driver (for example, when Option "Primary" is set in the Monitor section for the TV in xorg.conf).
It appears the problem is caused by encoder assignments.
This card has two digital output blocks: UNIPHYA for the HDMI connector and UNIPHYE for the DVI.
Audio only works when the DIG1 encoder is assigned to UNIPHYA. If DIG2 is used there is only silence on the TV. I'm not sure whether this is caused by a bug in the driver or limitation of the hardware.
I've confirmed this hypothesis with a simple patch that prefers UNIPHYA for DIG1 (attached).
My patch is obviously specific to my setup, but I'm prepared to help in finding a proper solution.
Created attachment 34872 [details]
Xorg.log with unpatched driver (audio not working)
Created attachment 34873 [details]
Xorg.log with patched driver (audio working)
That's a known bug / limitation of the current implementation for DCE32 cards.
You could switch to KMS, or we could fix the HDMI config register implementation in radeonhd. But i doubt that this really worth the work, because switching to KMS is the real long term solution.
Ok, I guess I'll give KMS and the latest radeon driver a shot.
I see that audio support for >r700 was added to kernel last month.
All code sits in just released 2.6.34-rc4. Can you test it, please?
(In reply to comment #5)
> All code sits in just released 2.6.34-rc4. Can you test it, please?
Interestingly, the original problem is still there with KMS (using kernel 2.6.34-rc4 and latest radeon driver from git).
If I set Option "Primary" on the monitor connected to the DVI output, HDMI audio doesn't work.
Created attachment 35018 [details]
Xorg.log, audio working, KMS with radeon
Created attachment 35020 [details]
Xorg.log, audio not working, KMS with radeon
Created attachment 35021 [details]
xorg.conf, audio working
Created attachment 35022 [details]
xorg.conf, audio not working
Does this issue occur with the preferred ati driver (xf86-vide-ati)? If so, please move this to the Driver/Radeon component.
Development of radeonhd has pretty much halted and development focus is on the ati driver. Please see http://www.x.org/wiki/radeonhd
If the issue does not exist in the ati driver (or if there is no response to this message), this bug will be closed as WONTFIX unless someone contributes a patch.
I'm using the new "radeon" module with KMS now (currently Linux 22.214.171.124, xserver-xorg-video-ati 1:6.13.1-2+squeeze1 as shipped by Debian Squeeze) and there are still problems with HDMI audio I described in comment 6.
I did later found out that when audio isn't working I can get it to work by either power-cycling the TV, or turning on and off the HDMI output via xrandr.
So I'm not sure how encoder selection fits into all of that. It might be a hardware bug on either the graphics card or the TV. But now that I know how to work around it this issue is much less of a problem.
If someone is interested in debugging this I can provide more info. Otherwise feel free to close this bug.
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.