File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# ==============================================================================
33# Check device information and adjust Pulse
44# ==============================================================================
5- ALSA_CARDS=" $( aplay -l) "
5+ declare tsched
6+ readonly ALSA_CARDS=" $( aplay -l) "
67
78# RaspberryPi
89if echo " ${ALSA_CARDS} " | grep -q " \[bcm2835 ALSA\]" ; then
910 bashio::log.info " Found RaspberryPi system"
11+ tsched=false
1012
11- sed -i " s/module-udev-detect/module-udev-detect tsched=0/" /etc/pulse/system.pa
1213# Odroid N2
1314elif echo " ${ALSA_CARDS} " | grep -q " \[G12B-ODROID-N2\]" ; then
1415 bashio::log.info " Found Odroid N2 system"
16+ tsched=false
1517
16- sed -i " s/module-udev-detect/module-udev-detect tsched=0/" /etc/pulse/system.pa
18+ else
19+ tsched=true
1720fi
21+
22+ # Generate config
23+ bashio::var.json \
24+ tsched " ^${tsched} " \
25+ | tempio \
26+ -template /usr/share/tempio/system.pa \
27+ -out /etc/pulse/system.pa
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ load-module module-switch-on-port-available
2828load-module module-switch-on-connect
2929
3030### Automatically load driver modules depending on the hardware available
31- load-module module-udev-detect
31+ load-module module-udev-detect {{ if not .tsched }}tsched=0{{ end }}
3232load-module module-bluetooth-discover
3333
3434### Load several protocols
You can’t perform that action at this time.
0 commit comments