Announcement

Collapse
No announcement yet.

HDMI audio support for RV730 in radeon/radeonhd?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • HDMI audio support for RV730 in radeon/radeonhd?

    Is there support in either of the OSS drivers for HDMI audio on the RV730 GPU?

    I have an Asus HD 4670 card in what is going to be an HTPC. We have just got ourselves a Sony Bravia KDL37W5500 HDTV. Video output over HDMI is fine but no sound - I get a pop-up message to the effect that device HDS ATI HDMI does not work and the system is dropping to PulseAudio. The TV works fine as a TV and HDMI sound works in WinXP and with fglrx (on F10) so not a direct hardware problem.

    The system is a clean build of F11 and fully updated - I had the same problem on F10, which was the main reason for upgrading. xorg.conf was rebuilt from scratch using Xorg -configure. Version levels are:-
    Fedora 11 (kernel 2.6.29.6-217.2.3.fc11.x86_64)
    xorg-x11-drv-ati.x86_64 6.12.2-14.fc11
    xorg-x11-drv-radeonhd.x86_64 1.2.5-2.10.20090714git.fc11
    I have Option "Audio" "on" and Option "HDMI" "all" in the "Device" section of xorg.conf. I tried removing PulseAudio but made no difference so put it back. I was using mostly radeonhd up until now but switched to radeon as I can't use xrandr to change the resolution on HDMI with radeonhd - although it detects the HDMI port is connected and shows avalable modes, and worked fine with CRT previously. However both drivers appear to behave the same in respect to HDMI sound.

    This looks like the relevant section from syslog:-
    http://pastebin.com/f4d285e08

    This is my current xorg.conf:-
    Code:
    Section "ServerLayout"
    	Identifier     "X.org Configured"
    	Screen      0  "Screen0" 0 0
    	InputDevice    "Mouse0" "CorePointer"
    	InputDevice    "Keyboard0" "CoreKeyboard"
    EndSection
    
    Section "Files"
    	ModulePath   "/usr/lib64/xorg/modules"
    	FontPath     "catalogue:/etc/X11/fontpath.d"
    	FontPath     "built-ins"
    EndSection
    
    Section "Module"
    	Load  "glx"
    	Load  "dri2"
    	Load  "dbe"
    	Load  "record"
    	Load  "extmod"
    	Load  "dri"
    EndSection
    
    Section "InputDevice"
    	Identifier  "Keyboard0"
    	Driver      "kbd"
    EndSection
    
    Section "InputDevice"
    	Identifier  "Mouse0"
    	Driver      "mouse"
    	Option	    "Protocol" "auto"
    	Option	    "Device" "/dev/input/mice"
    	Option	    "ZAxisMapping" "4 5 6 7"
    EndSection
    
    Section "Monitor"
    	#DisplaySize	 1600   900	# mm
    	DisplaySize	500	281	# mm
    	Identifier   "Monitor0"
    	VendorName   "SNY"
    	ModelName    "SONY TV"
    	HorizSync    14.0 - 70.0
    	VertRefresh  48.0 - 62.0
    EndSection
    
    Section "Device"
            ### Available Driver options are:-
            ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
            ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
            ### [arg]: arg optional
            #Option     "NoAccel"            	# [<bool>]
            #Option     "SWcursor"           	# [<bool>]
            #Option     "Dac6Bit"            	# [<bool>]
            #Option     "Dac8Bit"            	# [<bool>]
            #Option     "BusType"            	# [<str>]
            #Option     "CPPIOMode"          	# [<bool>]
            #Option     "CPusecTimeout"      	# <i>
            #Option     "AGPMode"            	# <i>
            #Option     "AGPFastWrite"       	# [<bool>]
            #Option     "AGPSize"            	# <i>
            #Option     "GARTSize"           	# <i>
            #Option     "RingSize"           	# <i>
            #Option     "BufferSize"         	# <i>
            #Option     "EnableDepthMoves"   	# [<bool>]
            #Option     "EnablePageFlip"     	# [<bool>]
            #Option     "NoBackBuffer"       	# [<bool>]
            #Option     "DMAForXv"           	# [<bool>]
            #Option     "FBTexPercent"       	# <i>
            #Option     "DepthBits"          	# <i>
            #Option     "PCIAPERSize"        	# <i>
            #Option     "AccelDFS"           	# [<bool>]
            #Option     "IgnoreEDID"         	# [<bool>]
            #Option     "DisplayPriority"    	# [<str>]
            #Option     "PanelSize"          	# [<str>]
            #Option     "ForceMinDotClock"   	# <freq>
            #Option     "ColorTiling"        	# [<bool>]
            #Option     "VideoKey"           	# <i>
            #Option     "RageTheatreCrystal" 	# <i>
            #Option     "RageTheatreTunerPort" 	# <i>
            #Option     "RageTheatreCompositePort" 	# <i>
            #Option     "RageTheatreSVideoPort" 	# <i>
            #Option     "TunerType"          	# <i>
            #Option     "RageTheatreMicrocPath" 	# <str>
            #Option     "RageTheatreMicrocType" 	# <str>
            #Option     "ScalerWidth"        	# <i>
            #Option     "RenderAccel"        	# [<bool>]
            #Option     "SubPixelOrder"      	# [<str>]
            #Option     "ShowCache"          	# [<bool>]
            #Option     "DynamicClocks"      	# [<bool>]
            #Option     "VGAAccess"          	# [<bool>]
            #Option     "ReverseDDC"         	# [<bool>]
            #Option     "LVDSProbePLL"       	# [<bool>]
            #Option     "AccelMethod"        	# <str>
            #Option     "DRI"                	# [<bool>]
            #Option     "ConnectorTable"     	# <str>
            #Option     "DefaultConnectorTable" 	# [<bool>]
            #Option     "DefaultTMDSPLL"     	# [<bool>]
            #Option     "TVDACLoadDetect"    	# [<bool>]
            #Option     "ForceTVOut"         	# [<bool>]
            #Option     "TVStandard"         	# <str>
            #Option     "IgnoreLidStatus"    	# [<bool>]
            #Option     "DefaultTVDACAdj"    	# [<bool>]
            #Option     "Int10"              	# [<bool>]
            #Option     "EXAVSync"           	# [<bool>]
            #Option     "ATOMTVOut"          	# [<bool>]
            #Option     "R4xxATOM"           	# [<bool>]
    	Option      "Audio"	"on"
    	Option      "HDMI"	"all"
            Option      "AccelMethod" "exa"
            Option      "DRI" "on"
    	Identifier  "Card0"
    	Driver      "radeon"
    	VendorName  "ATI Technologies Inc"
    	BoardName   "RV730XT [Radeon HD 4670]"
    	BusID       "PCI:1:0:0"
    EndSection
    
    Section "Screen"
    	Identifier "Screen0"
    	Device     "Card0"
    	Monitor    "Monitor0"
    	SubSection "Display"
    		Viewport   0 0
    		Depth     1
    	EndSubSection
    	SubSection "Display"
    		Viewport   0 0
    		Depth     4
    	EndSubSection
    	SubSection "Display"
    		Viewport   0 0
    		Depth     8
    	EndSubSection
    	SubSection "Display"
    		Viewport   0 0
    		Depth     15
    	EndSubSection
    	SubSection "Display"
    		Viewport   0 0
    		Depth     16
    	EndSubSection
    	SubSection "Display"
    		Viewport   0 0
    		Depth     24
    	EndSubSection
    EndSection
    Thanks in advance for any help...

    Andrew

  • #2
    Try with radeonhd driver, as in Driver "radeonhd". Where exactly did you pull the HDMI and audio options from? Can't local them in my man pages.

    Comment


    • #3
      I tried with radeonhd - still get the message saying HDMI sound output doesn't work. In syslog I don't get the debug output from alsa-util.c, but still the following output:-
      Code:
      Aug 16 23:50:43 localhost pulseaudio[9383]: pid.c: Stale PID file, overwriting.
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=256, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=384, bytes=384, size=12288, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=384, bytes=384, size=12288, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=384, bytes=384, size=12288, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1101: Too big adjustment 32: adj=128, bytes=128, size=4096, periods=32
      Aug 16 23:50:43 localhost pulseaudio[9383]: alsa-sink.c: Unable to set switch: Operation not permitted
      Aug 16 23:50:43 localhost pulseaudio[9408]: pid.c: Daemon already running.
      I also have the problem of not being able to change mode using xrandr with radeonhd (though this did work with radeonhd on F10).

      A concise reference to the options is here http://wiki.archlinux.org/index.php/ATI#HDMI_with_sound though I have come across references to them elsewhere.

      In System Settings - Multimedia, "PulseAudio" comes below "HTA ATI HDMA" and I can get sound out to headphones when I play the test sound on PulseAudio. Is there any way to get PulseAudio to output to HDMI instead?

      Comment


      • #4
        Several though PA support in applications might not be up-to-speed so you might be better off removing PA and directing sound to the right ALSA card from the program. Afaik theoretically you could do the same over PA if there was good enough application support. Atm it seems the most you can do is setting the default sound output device from PA controls.

        Comment


        • #5
          I also can't setup audio over HDMI with radeonhd. I did it with catalyst, but here I can't. I add required Audio and HDMI lines to xorg.conf and I unmute it, play sound, but I can't hear anything.

          Comment


          • #6
            Some progress... After a series of updates I am now on kernel 2.6.30 (2.6.30.5-43.fc11.x86_64 to be precise). I now no longer get error messages about ATI HDMI not working. I have also removed PulseAudio (this is often recommended with Fedora) though it still appears in the KDE System Settings - Multimedia screen. I have also disabled the onboard cound card.

            I can now play the "Test" sound in System Settings - Multimedia without any error messages...but also without any sound. I get the same thing using aplay- it says it is playing a sound file, but nothing is actually heard.
            Code:
            [root@localhost ~]# aplay -l
            **** List of PLAYBACK Hardware Devices ****
            card 0: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
              Subdevices: 1/1
              Subdevice #0: subdevice #0
            
            [root@localhost ~]# aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav
            Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
            I also changed the "HDMI" option in xorg.conf to the specific output for HDMI as identified by xrandr, but without making any difference:
            Code:
                    Option      "HDMI"     "DVI-D_1"
            I have a further big problem with radeonhd - I can't get it to display at any resolution above 1024x768. If I use the xrandr command line I get the error below, and if I use the KXrandRTray GUI it crashes the X server:
            Code:
            [root@localhost ~]# xrandr
            Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 3840 x 1920
            DVI-D_1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm
               1920x1080      60.0 +
               1280x1024      59.9
               1280x720       60.0
               1024x768       60.0*
               800x600        60.3
               640x480        60.0
            VGA_1 disconnected (normal left inverted right x axis y axis)
            DVI-I_2/digital connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
               1024x768       60.0*
               800x600        60.3
               640x480        59.9
            DVI-I_2/analog disconnected (normal left inverted right x axis y axis)
            
            [root@localhost ~]# xrandr --output DVI-D_1 --mode 1920x1080
            X Error of failed request:  BadMatch (invalid parameter attributes)
              Major opcode of failed request:  149 (RANDR)
              Minor opcode of failed request:  21 (RRSetCrtcConfig)
              Serial number of failed request:  28
              Current serial number in output stream:  28
            However radeon works fine in all these respects.

            radeon and radeonhd package versions are still same as in original post.

            Is there any mileage in compiling radeonhd from source? However the audio patches have been in the main tree for a while now so should be in the Fedora RPMs by now. Could this be specific to either KDE or 64-bit architecture?

            Connexion2000 - exactly which graphics card do you have, and how does your spec compare with mine?

            Thanks,

            Andrew
            Last edited by AndyW; 09-09-2009, 06:37 PM.

            Comment


            • #7
              Another update...

              The motherboard (Gigabyte GA-MA78G-DS3H) has HD 3200 GPU integrated with the 780G chipset, though this is normally disabled in BIOS in favour of the HD 4670 PCI-e card. If I re-enable integrated graphics and connect to this HDMI port, I get sound when I play "Test" in the Multimedia - System Settings screen. It isn't usable (sound keeps cutting out and the screen keeps blanking) but that isn't the point - I get sound with the same Fedora build inc. same radeonhd package and unchanged xorg.conf, same hardware apart from the active GPU and same TV and HDMI cable. This is also despite the system tray volume control saying HDMI audio is muted and volume at 0%!

              This must be a bug with the RV730 in radeonhd - I will log a bug with freedesktop.org.

              Comment


              • #8
                If you disable the onboard audio and you have no other audio card, what performs that function?

                I have similar mboard but s2h. I"ve only used onboard audio and have never had a separate video card so I'm guessing here.

                Seems to me the onboard audio has to be enabled and then you maybe need to run a cable from the spdif header to the video card.

                Then I'm not sure what settings you need to use. When you have onboard audio enabled, what does aplay -l show?

                Comment


                • #9
                  Originally posted by AndyW View Post
                  This must be a bug with the RV730 in radeonhd - I will log a bug with freedesktop.org.
                  I saw a discussion about HDMI audio on R7x0 not working on the radeonhd mailing list (which seems to be down right now or I would link you). I think the devs already know about it.

                  Comment


                  • #10
                    DanL
                    The mailing ist is back, but nothing definitive I could find about whether HDMI audio should work or not. I raised a bug report anyway (#23912), they can disregard it if already work in progress. I saw a mention in one of the mailing list postings of an undocumented xorg.conf setting
                    Code:
                    Option      "AudioWorkaround"   "DVI-D_1"
                    (DVI-D_1 is the HDMI interface as reported by xrandr) but still makes no difference here...

                    It would help if the Xorg wiki had feature tables in order to make it easier to determine whether something like this is meant to be working, has a known bug or has not been implemented yet.

                    forum1793
                    Disabling onboard audio is certainly not a long-term plan, but clarifies things here - there is no other output for audio to go to now. As I said, HDMI audio works with onboard disabled under Windows or with fglrx. I could probably take an output from the on board sound card to the TV, but there might be synchronisation problems, and in any case that defeats the aim of having sound through HDMI. This is the aplay -l output with onboard audio enabled:-
                    Code:
                    [root@localhost ~]# aplay -l
                    **** List of PLAYBACK Hardware Devices ****
                    card 0: SB [HDA ATI SB], device 0: ALC885 Analog [ALC885 Analog]
                      Subdevices: 1/1
                      Subdevice #0: subdevice #0
                    card 0: SB [HDA ATI SB], device 1: ALC885 Digital [ALC885 Digital]
                      Subdevices: 1/1
                      Subdevice #0: subdevice #0
                    card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
                      Subdevices: 0/1
                      Subdevice #0: subdevice #0
                    Last edited by AndyW; 09-22-2009, 01:43 AM.

                    Comment


                    • #11
                      http://lists.opensuse.org/radeonhd/2.../msg00004.html
                      http://lists.opensuse.org/radeonhd/2.../msg00007.html

                      Comment


                      • #12
                        Originally posted by AndyW View Post
                        As I said, HDMI audio works with onboard disabled under Windows or with fglrx. I could probably take an output from the on board sound card to the TV, but there might be synchronisation problems, and in any case that defeats the aim of having sound through HDMI. This is the aplay -l output with onboard audio enabled:-
                        Code:
                        [root@localhost ~]# aplay -l
                        **** List of PLAYBACK Hardware Devices ****
                        card 0: SB [HDA ATI SB], device 0: ALC885 Analog [ALC885 Analog]
                          Subdevices: 1/1
                          Subdevice #0: subdevice #0
                        card 0: SB [HDA ATI SB], device 1: ALC885 Digital [ALC885 Digital]
                          Subdevices: 1/1
                          Subdevice #0: subdevice #0
                        card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
                          Subdevices: 0/1
                          Subdevice #0: subdevice #0
                        Your aplay -l matches mine. I would have thought that with additional video card you would have some additional hdmi output.

                        Good that sound works over hdmi with onboard sound card disabled in bios? If you have no other sound card, then the bios disable must just turn off ports and the onboard sound chip must still be working? If you have no direct cable from sound card/chip to to non-integrated video then the data must be on the pci-express bus. I had not heard that working but also never reviewed it. The problems that other people post regarding various video card sound hdmi problems often discuss a direct connection (sound chip to non-integrated video).

                        So if those bugs are resolved for radeonhd you should be good to go with the opensource drivers. Good luck.

                        Comment


                        • #13
                          Disabling the onboard audio in BIOS doesn't just disable the ports, it completely removes (logically) the device. lspci shows an additional device when I run it with audio enabled. It is the equivalent of physically removing an expansion card.

                          The HDMI audio is an alternative to onboard, at least for sound output. There are advantages to having onboard sound as well, such as audio capture. However for HTPC the integrated HDMI audio is the best output option. If you need surround sound (I don't), headphones etc. you take those from the HDMI output device - either an audio receiver with video passed through to TV, or the TV directly. Taking audio (either analog or digital) from the sound card to the TV is very much second best if HDMI audio is available & working.

                          From some of the mailing list posts it looks like there are problems getting HDMI audio to work with add-on cards. I think developers have focussed on the GPU embedded in the ATI chipsets - which does make sense as it is a more static target and benefits more users. Looks like there is a bug in radeonhd with R730, as the audio device is visible and i don't actually get errors - just lack of sound.

                          Comment


                          • #14
                            I have built radeonhd 1.3 from the git code released last week. Makes no difference to HDMI audio, but I now have the rhd_dump utility (not included in Fedora compiled package).

                            I dumped registers from 7000 to 7900 while running radeonhd and again after installing fglrx. I diffed the output and used it to make a script to apply the fglrx register values one at a time while running radeonhd.

                            It looks like 0x75A0 turns on HDMI audio, along with other things besides. If I change it from 0x00000311 (radeonhd value) to 0x10000310 (fglrx value) the sound comes on - but also changes my resolution from 1920x1080 to what looks like 1024x768, even though xrandr still says it is in 1920x1080 mode. I can't find any way to change it back, though apart from that everything (audio and video) is fine.

                            Maybe if any of the radeonhd developers see this they can advise on fine-tuning the register settings? I saw a posting on the mailing list where the same register (0x75A0) controlled HDMI audio on a different RV7xx chipset, though with different values http://lists.opensuse.org/radeonhd/2.../msg00012.html. In any case hopefully this will be of use for development. If I can find the right value to switch on HDMI audio without messing the resolution and can set it from e.g. a login script I shall be very happy! :-)

                            I have also seen on the mailing list and here that HDMI audio has been ported to the KMS driver due for release with 2.6.32. Does HDMI audio work for RV730 on KMS (i.e. audio problem is to do with KMS vs. non-KMS) or is it a straight port with no difference in outcome?

                            BTW with fglrx the system completely freezes (at any rate X does) somewhere between immediately and a few minutes after logging in. I followed the procedure on Fedora Forums - I had to follow the initrd steps otherwise the display is corrupted, but I didn't regenerate xorg.conf from scratch, so there may be incompatible settings for DRI etc. Much better to use OSS!
                            Last edited by AndyW; 10-14-2009, 04:52 AM.

                            Comment


                            • #15
                              I think it's a straight port. We need to dig up some more info on the audio gating hardware and get that info into code or docs.

                              I haven't heard of anyone successfully enabling audio over HDMI on a 730 with open source drivers yet.

                              Comment

                              Working...
                              X