Use pipewire as the sound provider.

This commit is contained in:
Storm Dragon 2022-03-25 03:04:09 -04:00
parent 560639ca78
commit 946601f24b

View File

@ -45,7 +45,7 @@ help() {
done | sort done | sort
exit 0 exit 0
} }
# Array of command line arguments # Array of command line arguments
declare -A command=( declare -A command=(
[h]="This help screen." [h]="This help screen."
@ -54,19 +54,19 @@ declare -A command=(
[s:]="image size in GB, default is 4." [s:]="image size in GB, default is 4."
[v:]="Version of the Raspberry Pi for which you are building. (3|4 default)" [v:]="Version of the Raspberry Pi for which you are building. (3|4 default)"
) )
# Convert the keys of the associative array to a format usable by getopts # Convert the keys of the associative array to a format usable by getopts
args="${!command[*]}" args="${!command[*]}"
args="${args//[[:space:]]/}" args="${args//[[:space:]]/}"
while getopts "${args}" i ; do while getopts "${args}" i ; do
case "$i" in case "$i" in
h) help;; h) help ;;
l) l)
imageLanguage="${OPTARG}.UTF-8" imageLanguage="${OPTARG}.UTF-8"
;; ;;
n) n)
imageName="${OPTARG}" imageName="${OPTARG}"
;; ;;
s) s)
if [[ "${OPTARG}" =~ ^[[:digit:]]+$ ]]; then if [[ "${OPTARG}" =~ ^[[:digit:]]+$ ]]; then
imageSize="${OPTARG}G" imageSize="${OPTARG}G"
@ -74,7 +74,7 @@ while getopts "${args}" i ; do
echo "Image size must be numeric." echo "Image size must be numeric."
exit 1 exit 1
fi fi
;; ;;
v) v)
if [[ "${OPTARG}" =~ ^[34]$ ]]; then if [[ "${OPTARG}" =~ ^[34]$ ]]; then
imageVersion="${OPTARG}" imageVersion="${OPTARG}"
@ -82,13 +82,13 @@ while getopts "${args}" i ; do
echo "Image version must be 3 for the Raspberry Pi 3, or 4 for the Raspberry Pi 4 (default)." echo "Image version must be 3 for the Raspberry Pi 3, or 4 for the Raspberry Pi 4 (default)."
exit 1 exit 1
fi fi
;; ;;
*) *)
exit 1 exit 1
;; ;;
esac esac
done done
# make sure variables are set, or use defaults. # make sure variables are set, or use defaults.
export imageVersion="${imageVersion:-4}" export imageVersion="${imageVersion:-4}"
export imageSize="${imageSize:-4G}" export imageSize="${imageSize:-4G}"
@ -166,7 +166,10 @@ pacman -Syyu --needed --noconfirm \
man-pages \ man-pages \
networkmanager \ networkmanager \
ntp \ ntp \
pulseaudio \ pipewire \
pipewire-alsa \
pipewire-jack \
pipewire-pulse \
rhvoice-voice-bdl \ rhvoice-voice-bdl \
rng-tools \ rng-tools \
rsync \ rsync \
@ -174,6 +177,7 @@ pacman -Syyu --needed --noconfirm \
w3m \ w3m \
wget \ wget \
wireless-regdb \ wireless-regdb \
wireplumber \
xdg-user-dirs \ xdg-user-dirs \
xdg-utils xdg-utils
@ -205,18 +209,20 @@ cd yay
makepkg -si --noconfirm makepkg -si --noconfirm
cd ~ cd ~
rm -rf yay rm -rf yay
yay -S --noconfirm fake-hwclock-git fenrir-git growpartfs log2ram yay -S --noconfirm fenrir-git growpartfs log2ram
rm -rf .cache/yay rm -rf .cache/yay
/usr/share/fenrirscreenreader/tools/configure_pulse.sh /usr/share/fenrirscreenreader/tools/configure_pipewire.sh
exit exit
systemctl --global enable pulseaudio # Enable linger so that hopefully sound will start at login.
/usr/share/fenrirscreenreader/tools/configure_pulse.sh touch /var/lib/systemd/linger/stormux
systemctl --global enable pipewire.service pipewire-pulse.service
/usr/share/fenrirscreenreader/tools/configure_pipewire.sh
# Configure sudo for group wheel, remove nopasswd for the stormux user # Configure sudo for group wheel, remove nopasswd for the stormux user
echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel
# Set the hostname # Set the hostname
echo stormux > /etc/hostname echo stormux > /etc/hostname
# Enable services # Enable services
systemctl enable brltty.path cronie.service fake-hwclock.service fenrirscreenreader.service log2ram.service NetworkManager.service ntpd.service systemctl enable brltty.path cronie.service fenrirscreenreader.service log2ram.service NetworkManager.service ntpd.service
# Update fstab for Raspberry Pi 4. # Update fstab for Raspberry Pi 4.
#[[ $imageVersion -eq 4 ]] && sed -i 's/mmcblk0/mmcblk1/g' /etc/fstab #[[ $imageVersion -eq 4 ]] && sed -i 's/mmcblk0/mmcblk1/g' /etc/fstab