From d1d72995452e4e6d0d80d1db4074a38d5f9699ea Mon Sep 17 00:00:00 2001 From: Andrea Bondavalli Date: Wed, 29 Jan 2020 18:51:40 +0100 Subject: [PATCH] Added script to stop PulseAudio, this uses and keeps busy the ALSA playback and capture devices causing troubles. Added termination of PulseAudio during the demo. --- README.md | 1 + daemon/scripts/disable_pulseaudio.sh | 10 ++++++++++ run_demo.sh | 6 ++++++ 3 files changed, 17 insertions(+) create mode 100755 daemon/scripts/disable_pulseaudio.sh diff --git a/README.md b/README.md index 9777665..1a9c9fe 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ To run a simple demo use the [run\_demo.sh](run_demo.sh) script. See [script not The demo performs the following operations: * setup system parameters +* stop pulse audio, this uses and keeps busy the ALSA playback and capture devices causing troubles * install the ALSA RAVENNA/AES67 module * start the ptp4l as master clock on the network loopback device * start the AES67 daemon and creates a source and a sink according to the status file in the demo directory diff --git a/daemon/scripts/disable_pulseaudio.sh b/daemon/scripts/disable_pulseaudio.sh new file mode 100755 index 0000000..212a197 --- /dev/null +++ b/daemon/scripts/disable_pulseaudio.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo autospawn = no > $HOME/.config/pulse/client.conf +pulseaudio --kill +rm $HOME/.config/pulse/client.conf + +systemctl --user stop pulseaudio.socket > /dev/null 2>&1 +systemctl --user stop pulseaudio.sservice > /dev/null 2>&1 + + diff --git a/run_demo.sh b/run_demo.sh index 4a643ff..b90e350 100755 --- a/run_demo.sh +++ b/run_demo.sh @@ -41,9 +41,15 @@ trap cleanup EXIT #configure system parms sudo sysctl -w net/ipv4/igmp_max_memberships=64 + #stop pulseaudio, this seems to open/close ALSA continuosly +echo autospawn = no > $HOME/.config/pulse/client.conf +pulseaudio --kill >/dev/null 2>&1 +rm $HOME/.config/pulse/client.conf +#disable pulseaudio systemctl --user stop pulseaudio.socket > /dev/null 2>&1 systemctl --user stop pulseaudio.sservice > /dev/null 2>&1 + #install kernel module sudo insmod 3rdparty/ravenna-alsa-lkm/driver/MergingRavennaALSA.ko