libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.61k stars 1.78k forks source link

[RPi 4] 7.1 surround sound audio distortion #8417

Closed kurac338 closed 59 minutes ago

kurac338 commented 11 months ago

I am having trouble running Moonlight-QT application which uses SDL2 library for various integrations.

In particular 7.1 surround sound audio is unusable, while 5.1 works as expected. In the Moonlight community we've narrowed down the issue as Raspberry Pi related. The same codebase works on other hardware and plays 7.1 as expected.

I can only describe the audio as full of artifacts, completely distorted and unrelated to source content. If you use Windows audio configuration / playback test, the chime sounds like a jumping spring in a cartoon šŸ˜….

I am willing to debug and test, but don't know where to start.

OS info:

osmc@osmc:~$ uname -a
Linux osmc 5.15.92-1-osmc #1 SMP PREEMPT Tue Jul 25 00:03:42 UTC 2023 aarch64 GNU/Linux

osmc@osmc:~$ lsb_release -a
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:    11
Codename:   bullseye

Tested using SDL2 commit 4aab2342e9aabc7e506952dbe5e021f3d3604929.

Hardware: RPi4 -> HDMI -> TV -> EARC -> 7.1.4 AVR system

cgutman commented 11 months ago

Specifically I think it's related to the ALSA backend. PulseAudio and PipeWire backends don't have this bug.

slouken commented 4 months ago

https://github.com/libsdl-org/SDL/pull/9753 might help here, @kurac338, can you see if that works for you?

slouken commented 59 minutes ago

No response, I'll go ahead and close this. Please let us know if this is still an issue in SDL 3.