SDL icon indicating copy to clipboard operation
SDL copied to clipboard

[RPi 4] 7.1 surround sound audio distortion

Open kurac338 opened this issue 2 years ago • 2 comments

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

kurac338 avatar Oct 21 '23 16:10 kurac338

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

cgutman avatar Oct 21 '23 21:10 cgutman

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

slouken avatar May 22 '24 16:05 slouken

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

slouken avatar Oct 06 '24 17:10 slouken