Skip to content

Instantly share code, notes, and snippets.

@aleksasiriski
Last active April 4, 2024 07:40
Show Gist options
  • Save aleksasiriski/75b8fd4329b6a7cf3e5fbce552f5798f to your computer and use it in GitHub Desktop.
Save aleksasiriski/75b8fd4329b6a7cf3e5fbce552f5798f to your computer and use it in GitHub Desktop.
Bootstrap Dell Wyse 3040 with Spotifyd using ALSA on fresh Alpine install.
#!/usr/bin/env bash
# Enable https repos
sed 's/http:/https:/g' /etc/apk/repositories
# Update packages
apk update
# Install intel firmware
apk add linux-firmware-intel
# Install ALSA with rtkit
apk add rtkit dbus alsa-utils alsa-lib alsaconf alsa-ucm-conf
addgroup root audio
rc-update add dbus
rc-update add rtkit
rc-update add alsa
# Set default audio device to card1 (usb)
sed 's/defaults.ctl.card 0/defaults.ctl.card 1/g' /usr/share/alsa/alsa.conf
sed 's/defaults.pcm.card 0/defaults.pcm.card 1/g' /usr/share/alsa/alsa.conf
# Install Spotifyd
apk add spotifyd
rc-update add spotifyd
# Configure Spotifyd
rm /etc/spotifyd.conf
echo -e '[global]
use_mpris = false
bitrate = 320
no_audio_cache = true
volume_normalisation = true
normalisation_pregain = -10
autoplay = true
device_type = "speaker"' | tee -a /etc/spotifyd.conf
# Start services
rc-service dbus start
rc-service rtkit start
rc-service alsa start
rc-service spotifyd start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment