Blog IndexPosts by TagHome

HiFiBerry with PulseAudio over Network

Posted <2018-05-29 Tue 17:59> by Aaron S. Jackson.

My HifiBerry Digi arrived today. This is a small hat which sits on top of a Raspberry Pi and outputs high quality audio over optical or coax. I chose optical, and fed this straight into my new NAD amplifier. The amplifier has a 24bit 192KHz DAC built into it, which is getting into absolute placebo zone. I can now stream from my laptop to the Raspberry Pi over the local network at the same bit depth and rate. Here are the configs:

On the Pi:

/boot/config.conf

dtparam=audio=on # REMOVE (OR COMMENT OUT) THIS LINE
dtoverlay=hifiberry-digi # ADD THIS LINE

/etc/pulse/daemon.conf

default-sample-format = s24le
default-sample-rate = 192000

You may wish to change the above on the client too, assuming your WiFi is fast or you are running over cabled Ethernet.

/etc/pulse/system.conf

load-module module-native-protocol-tcp auth-anonymous=1
load-module module-zeroconf-publish

/etc/systemd/system/pulseaudio.service

[Unit]
Description=PulseAudio Daemon

[Install]
WantedBy=multi-user.target

[Service]
Type=simple
PrivateTmp=true
ExecStart=/usr/bin/pulseaudio --system --realtime --disallow-exit --no-cpu-limit

Start this of course with:

sudo systemctl start pulseaudio

On the client:

load-module module-zeroconf-discover
load-module module-dbus-protocol

Kill and restart pulseaudio, at which point from the Pulse Audio mixer you will be able to redirect audio out from a process to the daemon running on your raspberry Pi. There isn't much more to it, it should just work, as long as I remembered all the steps. :)

Wanting to leave a comment?

Comments and feedback are welcome by email (aaron@nospam-aaronsplace.co.uk).

Related posts:

Tags: audio

Blog IndexPosts by TagHome

Copyright 2007-2024 Aaron S. Jackson (compiled: Mon 30 Sep 12:34:19 BST 2024)