WIP: main/linux-rpi: fix distorted sound with PulseAudio
The audio driver on the Raspberry Pi does not work properly with PulseAudio time-based scheduling.
Adding the SNDRV_PCM_INFO_BATCH
flag, makes sure that PulseAudio disables time-based scheduling by default.
This is the equivalent of setting tsched=0
in the PulseAudio configuration.
Tested on my Raspberry Pi 3 running postmarketOS and KODI as UI. Without this patch, watching any video on KODI results into choppy audio.
If the patch can be successfully applied, I can upstream it to the Linux kernel.
Based on: https://github.com/torvalds/linux/commit/7f2430cda819a9ecb1df5a0f3ef4f1c20db3f811
Edited by Dylan Van Assche