[PATCH] HDMI audio support for RV710 and RV730
Hi everybody, I finally figured out what Alex meant with: <agd5f> Zajec: the block routing and dto clock setup is wrong <agd5f> sort of The signal routing depend on the encoder used, not the transmitter. Since I made it depend on the output id (which represents the transmitter) it only worked if you got an 1 to 1 mapping of encoders to transmitters, which is the case in most (if not all) of the mobile and integrated chipsets, because they got an KLDSKP_LVTMA which is always mapped to the second transmitter. But for the RV710, RV730 and probably a lot of other cases, the mapping is done dynamically in RHDAtomOutputAllocFree and DigAllocFree (I figured this out just yesterday after buying an RV710 as an xmas present and playing around with it for a couple of hours). @Alex: Have I done right this time? Additionally Andrew Wasielewski found by try&error that you need to set the first bit in the 0x7604 register to get audio output on this chipsets. I just have to say a big "Thank you" to this guy, because he just tested every bit of code I have thrown at him in the last couple of weeks. I have no idea what the register 0x7604 is good for, but will try to find it out in the next couple of days. A patch is attached, tested and proved to work on both chipsets. @Rafał and the other people with a working setup: Could you make sure that this patch didn't harm your audio output in any way? @Matthias: I think you can commit it as soon as others reported that it works fine and doesn't harm their setup. I will also port it to KMS when my free time allows it, if Alex didn't release his patches earlier. Regards, Christian.
On Fri, Dec 18, 2009 at 11:09 AM, Christian König
Hi everybody,
I finally figured out what Alex meant with: <agd5f> Zajec: the block routing and dto clock setup is wrong <agd5f> sort of
The signal routing depend on the encoder used, not the transmitter. Since I made it depend on the output id (which represents the transmitter) it only worked if you got an 1 to 1 mapping of encoders to transmitters, which is the case in most (if not all) of the mobile and integrated chipsets, because they got an KLDSKP_LVTMA which is always mapped to the second transmitter.
But for the RV710, RV730 and probably a lot of other cases, the mapping is done dynamically in RHDAtomOutputAllocFree and DigAllocFree (I figured this out just yesterday after buying an RV710 as an xmas present and playing around with it for a couple of hours).
@Alex: Have I done right this time?
Additionally Andrew Wasielewski found by try&error that you need to set the first bit in the 0x7604 register to get audio output on this chipsets. I just have to say a big "Thank you" to this guy, because he just tested every bit of code I have thrown at him in the last couple of weeks.
I have no idea what the register 0x7604 is good for, but will try to find it out in the next couple of days. A patch is attached, tested and proved to work on both chipsets.
@Rafał and the other people with a working setup: Could you make sure that this patch didn't harm your audio output in any way?
@Matthias: I think you can commit it as soon as others reported that it works fine and doesn't harm their setup.
I will also port it to KMS when my free time allows it, if Alex didn't release his patches earlier.
Regards, Christian.
Hello Christian, thank you so much for working on this. I will try this patch this week end and report how it works. I am guessing this patch is against the current git right? Also, I am sorry for the stupid question, but what do you mean by porting it to KMS? What is the relationship between HDMI and the KMS? Thank you! John -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
2009/12/18 Christian König
Hi everybody,
I finally figured out what Alex meant with: <agd5f> Zajec: the block routing and dto clock setup is wrong <agd5f> sort of
The signal routing depend on the encoder used, not the transmitter. Since I made it depend on the output id (which represents the transmitter) it only worked if you got an 1 to 1 mapping of encoders to transmitters, which is the case in most (if not all) of the mobile and integrated chipsets, because they got an KLDSKP_LVTMA which is always mapped to the second transmitter.
But for the RV710, RV730 and probably a lot of other cases, the mapping is done dynamically in RHDAtomOutputAllocFree and DigAllocFree (I figured this out just yesterday after buying an RV710 as an xmas present and playing around with it for a couple of hours).
@Alex: Have I done right this time?
Additionally Andrew Wasielewski found by try&error that you need to set the first bit in the 0x7604 register to get audio output on this chipsets. I just have to say a big "Thank you" to this guy, because he just tested every bit of code I have thrown at him in the last couple of weeks.
I have no idea what the register 0x7604 is good for, but will try to find it out in the next couple of days. A patch is attached, tested and proved to work on both chipsets.
@Rafał and the other people with a working setup: Could you make sure that this patch didn't harm your audio output in any way?
@Matthias: I think you can commit it as soon as others reported that it works fine and doesn't harm their setup.
I will also port it to KMS when my free time allows it, if Alex didn't release his patches earlier.
That was unfair race :( I planned to play with RV7xx as I'll get such card on xmas. But you cheated starting earlier :P Thank you for great work. I'll test this on my cards soon :) -- Rafał -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
Am Samstag, den 19.12.2009, 00:05 +0100 schrieb Rafał Miłecki:
2009/12/18 Christian König
: @Rafał and the other people with a working setup: Could you make sure that this patch didn't harm your audio output in any way?
Whoops, not really :( Crash with patch applied
Ups, the attached patch fixed a little bug in rhd_dig.c, probably causing your crash. Please apply on top of the last patch and try again. Regards, Christian.
W dniu 19 grudnia 2009 14:57 użytkownik Christian König
Am Samstag, den 19.12.2009, 00:05 +0100 schrieb Rafał Miłecki:
2009/12/18 Christian König
: @Rafał and the other people with a working setup: Could you make sure that this patch didn't harm your audio output in any way?
Whoops, not really :( Crash with patch applied
Ups, the attached patch fixed a little bug in rhd_dig.c, probably causing your crash. Please apply on top of the last patch and try again.
Thank you for fixing this. I've tested your patch with my notebook (RV620) and PC (RV635). I tested with various resolutions and with both outputs in case of RV635. No regression found. One thing I didn't test is DTS/AC3 as I don't have access to receiver supporting that formats. But I don't think it is something you could break with this patch, could you? *Maybe* I'll able to test RV730 today or tomorrow. If this won't happen until tomorrow, I'll have to wait until 26.12.2009. Also if you would like to see me testing DTS/AC3 on my RV620 I can do this tomorrow evening. -- Rafał -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
W dniu 19 grudnia 2009 16:28 użytkownik Rafał Miłecki
W dniu 19 grudnia 2009 14:57 użytkownik Christian König
napisał: Am Samstag, den 19.12.2009, 00:05 +0100 schrieb Rafał Miłecki:
2009/12/18 Christian König
: @Rafał and the other people with a working setup: Could you make sure that this patch didn't harm your audio output in any way?
Whoops, not really :( Crash with patch applied
Ups, the attached patch fixed a little bug in rhd_dig.c, probably causing your crash. Please apply on top of the last patch and try again.
Thank you for fixing this. I've tested your patch with my notebook (RV620) and PC (RV635). I tested with various resolutions and with both outputs in case of RV635. No regression found.
One thing I didn't test is DTS/AC3 as I don't have access to receiver supporting that formats. But I don't think it is something you could break with this patch, could you?
As expected, AC3 and DTS still work on my RV620 :)
*Maybe* I'll able to test RV730 today or tomorrow. If this won't happen until tomorrow, I'll have to wait until 26.12.2009. Also if you would like to see me testing DTS/AC3 on my RV620 I can do this tomorrow evening.
Unfortunately, I won't be able to test that for now. But as this doesn't regress anything and help you to get audio working, I'm for commiting this :) -- Rafał -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
2009/12/20 Rafał Miłecki
W dniu 19 grudnia 2009 16:28 użytkownik Rafał Miłecki
napisał: W dniu 19 grudnia 2009 14:57 użytkownik Christian König
napisał: Am Samstag, den 19.12.2009, 00:05 +0100 schrieb Rafał Miłecki:
2009/12/18 Christian König
: @Rafał and the other people with a working setup: Could you make sure that this patch didn't harm your audio output in any way?
Whoops, not really :( Crash with patch applied
Ups, the attached patch fixed a little bug in rhd_dig.c, probably causing your crash. Please apply on top of the last patch and try again.
Thank you for fixing this. I've tested your patch with my notebook (RV620) and PC (RV635). I tested with various resolutions and with both outputs in case of RV635. No regression found.
One thing I didn't test is DTS/AC3 as I don't have access to receiver supporting that formats. But I don't think it is something you could break with this patch, could you?
As expected, AC3 and DTS still work on my RV620 :)
*Maybe* I'll able to test RV730 today or tomorrow. If this won't happen until tomorrow, I'll have to wait until 26.12.2009. Also if you would like to see me testing DTS/AC3 on my RV620 I can do this tomorrow evening.
Unfortunately, I won't be able to test that for now. But as this doesn't regress anything and help you to get audio working, I'm for commiting this :)
-- Rafał
So I tried to test it, but all I get is a black screen with git radeonhd. I tried with and without the patches and it is the same. Maybe I did not build it properly? -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
2009/12/21 John Ettedgui
So I tried to test it, but all I get is a black screen with git radeonhd. I tried with and without the patches and it is the same.
Maybe I did not build it properly?
Well, then this is not issue for this thread (as this happens without patches applied). Please compile driver from git with: -O0 -g3 try to start X, and provide /var/log/Xorg.0.log from crashing session. -- Rafał -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
2009/12/21 Rafał Miłecki
2009/12/21 John Ettedgui
: So I tried to test it, but all I get is a black screen with git radeonhd. I tried with and without the patches and it is the same.
Maybe I did not build it properly?
Well, then this is not issue for this thread (as this happens without patches applied).
Please compile driver from git with: -O0 -g3 try to start X, and provide /var/log/Xorg.0.log from crashing session.
Please create bug report on bugs.freedesktop.org for that (don't post here). -- Rafał -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Dec 20, 09 15:29:13 -0800, John Ettedgui wrote:
So I tried to test it, but all I get is a black screen with git radeonhd. I tried with and without the patches and it is the same.
Not that this an excuse for your issues - but you might want to try to
apply the patch against a version of which you know that it works. HDMI
hasn't undergone fundamental changes lately, so the patches might apply :-]
That way we can check whether the patches are ok.
The black screen issue should be dealt with separately. The usual
suspect would be Option "AccelMethod" "shadowfb", otherwise
git-bisecting would be necessary.
The radeonhd wiki describes how to bisect.
Matthias
--
Matthias Hopf
On Mon, Dec 21, 2009 at 10:37 AM, Matthias Hopf
On Dec 20, 09 15:29:13 -0800, John Ettedgui wrote:
So I tried to test it, but all I get is a black screen with git radeonhd. I tried with and without the patches and it is the same.
Not that this an excuse for your issues - but you might want to try to apply the patch against a version of which you know that it works. HDMI hasn't undergone fundamental changes lately, so the patches might apply :-]
That way we can check whether the patches are ok.
The black screen issue should be dealt with separately. The usual suspect would be Option "AccelMethod" "shadowfb", otherwise git-bisecting would be necessary. The radeonhd wiki describes how to bisect.
Matthias
-- Matthias Hopf
__ __ __ Maxfeldstr. 5 / 90409 Nuernberg (_ | | (_ |__ mat@mshopf.de Phone +49-911-74053-715 __) |_| __) |__ R & D www.mshopf.de
I apoligize if I am doing anything wrong: After spending a lot of time I tried something, and the culprit was actually the kernel. Going back to 2.6.31 removed that black screen issue. Now I still get no sound with these patches. I attached my xorg.0.log. Thanks, John
On Dec 21, 09 21:25:46 -0800, John Ettedgui wrote:
After spending a lot of time I tried something, and the culprit was actually the kernel. Going back to 2.6.31 removed that black screen issue.
In that case, kms was active. radeonhd still is neither capable of using KMS nor complaining correctly that it is active :-( Boot 2.6.32 with radeon.modeset=0 and it should work as well.
Now I still get no sound with these patches.
But you didn't get sound before either, correct? So this is no
regression.
Matthias
--
Matthias Hopf
On Tue, Dec 22, 2009 at 8:58 AM, Matthias Hopf
On Dec 21, 09 21:25:46 -0800, John Ettedgui wrote:
After spending a lot of time I tried something, and the culprit was actually the kernel. Going back to 2.6.31 removed that black screen issue.
In that case, kms was active. radeonhd still is neither capable of using KMS nor complaining correctly that it is active :-(
I think Hans sent a patch sent to the ML a while back to check for KMS. Alex -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Dec 22, 09 09:00:56 -0500, Alex Deucher wrote:
I think Hans sent a patch sent to the ML a while back to check for KMS.
Hm. Yes, I do (somehow) remember. I don't remember whether it has
already been applied, though.
Matthias
--
Matthias Hopf
I apoligize if I am doing anything wrong:
After spending a lot of time I tried something, and the culprit was actually the kernel. Going back to 2.6.31 removed that black screen issue. Now I still get no sound with these patches.
I attached my xorg.0.log. The configuration option to turn on HDMI audio is missing. Try adding
Am Montag, den 21.12.2009, 21:25 -0800 schrieb John Ettedgui: the following to you xorg.conf: Option "HDMI" "all" Regards, Christian. -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Tue, Dec 22, 2009 at 1:43 PM, Christian König
I apoligize if I am doing anything wrong:
After spending a lot of time I tried something, and the culprit was actually the kernel. Going back to 2.6.31 removed that black screen issue. Now I still get no sound with these patches.
I attached my xorg.0.log. The configuration option to turn on HDMI audio is missing. Try adding
Am Montag, den 21.12.2009, 21:25 -0800 schrieb John Ettedgui: the following to you xorg.conf:
Option "HDMI" "all"
Regards, Christian.
Ok with this option it works! I thought only "Audio" "On" was required. Thank you, John -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
2009/12/23 John Ettedgui
On Tue, Dec 22, 2009 at 1:43 PM, Christian König
wrote: I apoligize if I am doing anything wrong:
After spending a lot of time I tried something, and the culprit was actually the kernel. Going back to 2.6.31 removed that black screen issue. Now I still get no sound with these patches.
I attached my xorg.0.log. The configuration option to turn on HDMI audio is missing. Try adding
Am Montag, den 21.12.2009, 21:25 -0800 schrieb John Ettedgui: the following to you xorg.conf:
Option "HDMI" "all"
Regards, Christian.
Ok with this option it works! I thought only "Audio" "On" was required.
And you didn't get sound earlier, did you? If so, we have confirmation this patch fixes sound for someone else than only Christian. Plus of course it doesn't introduce regressions :) I guess we can commit it now :) -- Rafał -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Tue, Dec 22, 2009 at 9:32 PM, John Ettedgui
On Tue, Dec 22, 2009 at 1:43 PM, Christian König
wrote: I apoligize if I am doing anything wrong:
After spending a lot of time I tried something, and the culprit was actually the kernel. Going back to 2.6.31 removed that black screen issue. Now I still get no sound with these patches.
I attached my xorg.0.log. The configuration option to turn on HDMI audio is missing. Try adding
Am Montag, den 21.12.2009, 21:25 -0800 schrieb John Ettedgui: the following to you xorg.conf:
Option "HDMI" "all"
Regards, Christian.
Ok with this option it works! I thought only "Audio" "On" was required.
I can confirm that it works now as well (with my Radeon HD 4350). Thank you so much for your work on this, Christian! Samir -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Dec 20, 09 20:40:45 +0100, Rafał Miłecki wrote:
2009/12/18 Christian König
: @Rafał and the other people with a working setup: Could you make sure that this patch didn't harm your audio output in any way?
Ok, as we have positive feedback I committed your patches.
Christian, the From: line in the patches was mangled, I manually
corrected that. Please check your git settings, they used to be perfect.
The original line was:
From: =?utf-8?q?Christian=20K=C3=B6nig?=
W dniu 20 grudnia 2009 20:40 użytkownik Rafał Miłecki
W dniu 19 grudnia 2009 16:28 użytkownik Rafał Miłecki
napisał: *Maybe* I'll able to test RV730 today or tomorrow. If this won't happen until tomorrow, I'll have to wait until 26.12.2009. Also if you would like to see me testing DTS/AC3 on my RV620 I can do this tomorrow evening.
Unfortunately, I won't be able to test that for now. But as this doesn't regress anything and help you to get audio working, I'm for commiting this :)
So I had possibility to test this but it completely didn't work. Not your patch, but getting monitor info for HDMI output: http://bugs.freedesktop.org/show_bug.cgi?id=25822 -- Rafał -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Dec 18, 09 20:09:27 +0100, Christian König wrote:
@Matthias: I think you can commit it as soon as others reported that it works fine and doesn't harm their setup.
Awesome work, Christian!
I'll apply as soon as I have one additional positive reply apart from
Rafal ;-)
Matthias
--
Matthias Hopf
participants (6)
-
Alex Deucher
-
Christian König
-
John Ettedgui
-
Matthias Hopf
-
Rafał Miłecki
-
Samir Unni