From eb7c912edd858a3dfe94c66a29d5f9bde52b5c10 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 26 Apr 2023 11:01:43 +0200 Subject: [PATCH] Drop tsched ALSA parameter for Raspberry Pi devices (#138) Presumably the newer audio drivers in Linux 5.15/6.1 do not require this parameter any longer. Tests on HAOS 9.5 and HAOS 10.1 with the VLC add-on (using latest Alpine 3.17) provided mp3 and TTS playback without dropouts (on the 3.5mm analog audio jack). --- rootfs/etc/cont-init.d/pulse-config.sh | 23 ------------------- .../{usr/share/tempio => etc/pulse}/system.pa | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100755 rootfs/etc/cont-init.d/pulse-config.sh rename rootfs/{usr/share/tempio => etc/pulse}/system.pa (96%) diff --git a/rootfs/etc/cont-init.d/pulse-config.sh b/rootfs/etc/cont-init.d/pulse-config.sh deleted file mode 100755 index c310575..0000000 --- a/rootfs/etc/cont-init.d/pulse-config.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/with-contenv bashio -# ============================================================================== -# Check device information and adjust Pulse -# ============================================================================== -declare tsched - -# shellcheck disable=SC2155 -readonly ALSA_CARDS="$(aplay -l)" - -# RaspberryPi -if [[ "${ALSA_CARDS}" =~ \[bcm2835.*?\] ]]; then - bashio::log.info "Found RaspberryPi system" - tsched=false -else - tsched=true -fi - -# Generate config -bashio::var.json \ - tsched "^${tsched}" \ - | tempio \ - -template /usr/share/tempio/system.pa \ - -out /etc/pulse/system.pa diff --git a/rootfs/usr/share/tempio/system.pa b/rootfs/etc/pulse/system.pa similarity index 96% rename from rootfs/usr/share/tempio/system.pa rename to rootfs/etc/pulse/system.pa index 5e597a0..a245e15 100644 --- a/rootfs/usr/share/tempio/system.pa +++ b/rootfs/etc/pulse/system.pa @@ -28,7 +28,7 @@ load-module module-switch-on-port-available load-module module-switch-on-connect ### Automatically load driver modules depending on the hardware available -load-module module-udev-detect {{ if not .tsched }}tsched=0{{ end }} +load-module module-udev-detect load-module module-bluetooth-discover ### Load several protocols