Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Correction to ONLY_ALSA check
Browse files Browse the repository at this point in the history
  • Loading branch information
advapp authored and advapp committed Apr 1, 2022
1 parent cc29613 commit 77d6ee1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/sof-setup-audio
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ case $SOUNDCARD in # TODO: add realtek support for octopus
;;
esac

if [[ ! -v ONLY_ALSA ]]; then
if [[ -v ONLY_ALSA ]]; then

# Remove PulseAudio
sudo apt purge -y pulseaudio
Expand Down Expand Up @@ -70,20 +70,20 @@ EOF
# Refresh systemd
sudo systemctl daemon-reload

if [[ ! -v ONLY_ALSA ]]; then
if [[ -v ONLY_ALSA ]]; then

# Replace PulseAudio libraries with Apulse, which makes PulseAudio apps work with ALSA
for lib in libpulse-mainloop-glib.so libpulse-simple.so libpulse.so; do

set +e
sudo rm -f /usr/lib/${lib} /usr/lib/${lib}.0 /usr/lib/x86_64-linux-gnu/${lib} /usr/lib/x86_64-linux-gnu/${lib}.0
set -e

sudo ln -s /usr/lib/x86_64-linux-gnu/apulse/${lib} "/usr/lib/${lib}"
sudo ln -s /usr/lib/x86_64-linux-gnu/apulse/${lib}.0 "/usr/lib/${lib}.0"
sudo ln -s /usr/lib/x86_64-linux-gnu/apulse/${lib} "/usr/lib/x86_64-linux-gnu/${lib}"
sudo ln -s /usr/lib/x86_64-linux-gnu/apulse/${lib}.0 "/usr/lib/x86_64-linux-gnu/${lib}.0"

done

elif ! command -v pulseaudio &> /dev/null; then
Expand All @@ -110,4 +110,4 @@ fi
sudo systemctl enable alsa-reload

sync
echo 'Done! Reboot to enable audio'
echo 'Done! Reboot to enable audio'

0 comments on commit 77d6ee1

Please sign in to comment.