FreeBSDDesktop / kms-drm

the DRM part of the linuxkpi-based KMS
63 stars 26 forks source link

Audio over HDMI plays too fast #244

Open zviratko opened 4 years ago

zviratko commented 4 years ago

Hi, my hardware is Ryzen 2600, ASRock Tiachi Ultimate X470 motherboard Sapphire Radeon Vega64

HDMI is connected to an LG C7V TV

This is supposed to be a NAS, co there's no X/Wayland running, but I'd like to get audio working correctly.

At the moment, all audio plays too fast. I tried mpg321 and mpv. mpv with -ao null "plays" at the correct speed with oss, the timer just runs fast and the audio is too fast also.

I tried changing rates (dev.pcm.1.play.vchanrate etc.) and while I can get it to play @22050 (and the lower quality is audible) it does nothing to the speed of the audio.

If I had to guess, I'd say it plays at about 200% of normal speed.

Any hints on troubleshooting/debugging this?

Thank you

zviratko commented 4 years ago

I found a "workaround" If I enable Deep Colour on the TV for this HDMI port, audio works just fine. If I switch it back off, audio is too fast again.

The problem with that is, thay I get no picture before amdgpu is loaded, neither in BIOS or efifb, so that's not really a way for me.

I have no idea what's going on, it is not actually running with HDR anyway...

Now I tried connecting the HDMI to my Soundbar, audio works fine but I only get 1920x1080 instead of 4K. Not a big deal.

However, I still think it should be fixed.... unless the problem is in the TV ;-)

valpackett commented 4 years ago

hm, my vega doesn't play audio (over displayport) at all right now. (Used to work in the past, maybe on an RX 480 though..)

Did you configure any tunables like compat.linuxkpi.amdgpu_hw_i2c?

If I enable Deep Colour on the TV for this HDMI port, audio works just fine

Interesting. Does this happen on other operating systems?

This is supposed to be a NAS

A Vega in a NAS? Are you going to mine cryptocurrency on it or something? :)

zviratko commented 4 years ago

I did not try any of these tunables, only dev.pcm.1, hw.snd... (with absolutely no effect).

Interesting. Does this happen on other operating systems?

No idea, I think it worked fine on Ubuntu (18.04? 20.04? I know I tried it once, then never used it).

A Vega in a NAS? Are you going to mine cryptocurrency on it or something? :)

I had W10 vitualized with GPU passthrough working (no idea if I can resurrect it on FreeBSD, yet). Hardly used it, though, so then it was hashcat, some crypto stuff, folding@home... But the main problem why I got it was because it was known to work fine in EFI, while my old 1060 did not work with efifb (not even BIOS had a picture without CSM).

hselasky commented 4 years ago

Could you dump dmesg?

zviratko commented 4 years ago

Sorry for the delay, I've been on a rather long holiday :-) I updated to the most recent CURRENT and updated to drm-devel-kmod-5.2.g20200602 HDMI is now directly connected to the TV. HDMI Ultra Deep Color (AKA HDR) is DISABLED. Music still plays too fast.

dmesg attached dmesg.txt