I want to set a Raspberry Pi up as a networked PulseAudio server.

I did this

  • Static IP: /etc/dhcpcd.conf
  • Unattended upgrades: apt-get install unattended-upgrades
  • apt-get install pulseaudio pulseaudio-module-zeroconf avahi-daemon
  • Enable avahi-daemon
  • amixer cset numid=3 1   (to default audio output to 3.5mm)
  • /etc/pulse/system.pa: load-module module-native-protocol-unix auth-anonymous=1
    load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.1.0/24
    load-module module-zeroconf-publish
  • /etc/pulse/daemon.conf: resample-method = copy && default-sample-rate = 44100
  • Add a simple pulseaudio service file running: pulseaudio --system --realtime --disallow-exit --no-cpu-limit --disallow-module-loading --disallow-exit
  • On laptop and desktop: /etc/pulse/default.pa: load-module module-zeroconf-discover

A2DP

  • cat <<EOF >/etc/dbus-1/system.d/pulseaudio-bluetooth.conf
    <busconfig>

    <policy user="pulse">
    <allow send_destination="org.bluez"/>
    </policy>

    </busconfig>
    EOF
  • apt-get install bluetooth