Solved AMD GPU sound via HDMI

I have an AMD gpu HD 6870 which perform well with stock driver from base. Playing video on monitor connected via mini-DP port also was without an issue. But there is no sound to my TV connected via HDMI port of GPU. I can hear audio from rear panel by jack headphone. I tried as per handbook and some hints available here. I have the following,
Code:
$ cat /dev/sndstat
Installed devices:
pcm0: <ATI R6xx (HDMI)> (play) default
pcm1: <Realtek ALC892 (Rear Analog 7.1/2.0)> (play/rec)
pcm2: <Realtek ALC892 (Front Analog)> (play/rec)
pcm3: <Realtek ALC892 (Rear Digital)> (play)
pcm4: <Realtek ALC892 (Onboard Digital)> (play)
No devices installed from userspace.

$ mixer
Mixer vol        is currently set to 100:100
Mixer pcm      is currently set to 100:100

$ mplayer -ao oss:/dev/dsp0 file.mkv    { no sound, only video}
But there is some garbage on screen when use cat /dev/urandom /dev/dsp. If required I may provide some more information.
Some one may have audio through HDMI port of an AMD GPU. But still there are some few threads of not that much lucky. There is still a PR not resolved. This is really required FreeBSD to become a future nice Desktop. Hope some one seriously care and help.
 
I have,
pcm0: <ATI R6xx (HDMI)> (play)
When I do,
cat /dev/random > /dev/dsp0.11
This works fine

I have in sysctl.conf,
hw.snd.default_unit=1
hw.snd.maxautovchans=16
dev.pcm.1.play.vchans=6
dev.pcm.1.rec.vchans=2

In rc.conf,
kld_list="/boot/modules/radeonkms.ko linux64 linux linux_common snd_driver "
 
First I have installed graphics/drm-legacy-kmod and modified rc.conf and /etc/sysctl.conf using default unit as 0. I failed to understand why you use default unit as 1 whereas you have pcm0 for HDMI (default ?).
Still no sound on HDMI. I have only /dev/dsp0.0 after using mpv. Again /dev/urandom produce garbage on screen. What is in your /dev/dsp*?
 
Indeed, I have two sound cards but can use both. So for default HDMI it has to be hw.snd.default_unit=0
ls -al /dev/dsp* gives :
/dev/dsp0.X with X the number of the virtual channels who where dynamically opened.

You could try drm-kmod instead of the legacy one,


AMDRadeon HD 6800Northern Islands / BartsWorks9.3, 10.0Post 11.2 use "radeonkms" kernel module via drm-kmod port
 
Earlier I have tried drm-kmod on 12.1-STABLE for blank screen only. I shall now try that 'with those linux modules.
I had those six virtual channels after tried from "vlc" audio tab. May be something related with "AMD High Definition Audio Drivers" from AMD or in house.
 
That surprised me also. Earlier I think have seen once "in" & "out" also but never again. I have to check on board.
 
After using radeonkms.ko from gaphics/drm-kmod now there is sound via AMD GPU HDMI. Thanks to all kms-drm developers and Alain De Vos for pointing in right direction. I think virtual channel settings in /etc/sysctl became redundant. This means audio via HDMI is possible in Desktop also.
 
radeonkms is the old driver ? the new driver is amdgpu for amd graphics card.
I use amdgpu and have no sound either on displayport or hdmi !
Tell me what settings you made you loaded the "older" radeon driver ?


After using radeonkms.ko from gaphics/drm-kmod now there is sound via AMD GPU HDMI. Thanks to all kms-drm developers and Alain De Vos for pointing in right direction. I think virtual channel settings in /etc/sysctl became redundant. This means audio via HDMI is possible in Desktop also.
 
You have to use graphics/drm-kmod, it will install proper module for your GPU. However for older one you need to change in /etc/rc.conf for radeonkms.ko. Also you need to set default sound output at hdmi port.
 
No displayport sound even with old radeonkms driver !
:-(
I also have an nvidia geforce 1050ti am i gonna have sound via displayport with that graphics card ?
Cause my amd rx580 nitro+ doesn't want to work !

You have to use graphics/drm-kmod, it will install proper module for your GPU. However for older one you need to change in /etc/rc.conf for radeonkms.ko. Also you need to set default sound output at hdmi port.
 
Theoretically the opensource drm-kmod should be superior to proprietary nvidia but in practice has way too many problems to even considered an option on FreeBSD !
Gnome and Bspwm doesn't even start with either amdgpu or radeon i don't have a clue i made all settings !
Xfce starts but with radeon driver it seems to be faster with a compositor compared to amdgpu this is not good anyway.
With nvidia the system feels snappier and i have zero problems !
I'm a linux user since 1999 and this kind of problems reminds me the first time i was messing with linux, i even had to make my own kernel for my potato pc to run fast and have support for some expansion cards i had back then.
The only problem is that freebsd installation process takes some time , plenty of time and pkg servers don't take full advantage of my high speed internet even though i switched them to .eu. mirror,
of course on .eu. the download speed is much better but still limited. And imagine doing the same job for two pcs and a laptop . Its painful download all these pkgs, make settings in configuration files etc etc.


I myself have audio over nvidia graphics HDMI, but audio over DisplayPort is definitive available. If you need confirmation:

 
Also no sound or touchpad on laptop !
There are some problems with hardware compatibility i guess, my laptop has a realtek alc sound chip. I have no sound at all .
 
After updating the system, again I have lost audio through HDMI. Also the new radeonkms.ko from moules results in kernel panic during loading. So I have to use that from kernel and so no HDMI audio. I understand that this can hapen for any STABLE version. Wonder if HDMI audio is available for all supported AMD GPU by default.There was Thread 50950 indicating some stable solutions from sidetone.
 
Back
Top