drew diver // tired, since 1985

๐Ÿ”Š Last played: "" by from the album (via last.fm)

Hello World

Wednesday, May 11, 2022 by Drew Diver

Hello! My own Hugo blog and design from scratch!

filed under: testing

ShairPort-Sync

Wednesday, May 11, 2022 by Drew Diver

I recently purchased the IQaudio DAC+ to get “24โ€‘bit 192kHz high-resolution digital audio” for use with ShairPort-Sync. This took a few hours to get going because the unit is billed as plug and play which it definitely was not. My assumption is if you run the Raspbian desktop GUI you can select the audio source from the menu bar. For our use case we want the Raspbian Lite installer running headless.

Initial Pi Setup

Be sure to run the raspi-config wizard after installing the Raspbian Lite image to setup the correct locale, expand the file system to use the entire microSD card, set the correct timezone, etc.

Next we update our apt repo and install the necessary packages for ShairPort-Sync.

sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install autoconf automake avahi-daemon build-essential git libasound2-dev libavahi-client-dev libconfig-dev libdaemon-dev libpopt-dev libssl-dev libtool xmltoman -y

ShairPort-Sync Install

Clone the ShairPort-Sync repo to the Pi and enter the directory.

git clone https://github.com/mikebrady/shairport-sync.git
cd shairport-sync
autoreconf -i -f
./configure --with-alsa --with-avahi --with-ssl=openssl --with-systemd --with-metadata
make && sudo make install
sudo service shairport-sync start
sudo systemctl enable shairport-sync
cd ..
git clone https://github.com/mikebrady/shairport-sync-metadata-reader.git
cd shairport-sync-metadata-reader
autoreconf -i -f
./configure
make
sudo make install

DAC+ Setup

Via pinout.xyx the board communicates over I2C.

I believe this can be handled one of two ways, either uncomment dtparam=i2c_arm=on in the /boot/config.txt or via the raspi-config you can enable P5 I2C under the Interface Options.

From the DAC+ documentation, let’s adjust the /boot/config.txt settings.

We comment out the dtparam option to disable the built-in audio and add in our newly attached DAC+:

# Enable audio (loads snd_bcm2835)
# dtparam=audio=on
dtoverlay=iqaudio-dacplus

ShairPort-Sync Configuration

Here’s where it got tricky, I eventually found an unrelated forum post regarding an application called “Raspotify” with a similar issue. Adapting that idea and combing the ShairPort-Sync GitHub repo I discovered a similar conf file where I could manually enter the hardware info.

Run aplay -l

card 2: IQaudIODAC [IQaudIODAC], device 0: IQaudIO DAC HiFi pcm512x-hifi-0 [IQaudIO DAC HiFi pcm512x-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

So, card 2 at device 0.

Edit /usr/local/etc/shairport-sync.conf and find the alsa settings:

alsa = 
{
    output_device = "hw:2,0";
    mixer_control_name = "PCM";
    mixer_device = "hw:2";
}

Then run sudo systemctl reload shairport-sync for the changes to take effect.

filed under: airplay tutorial raspberry pi audio

Re-discovering my Personal Music Collection

Wednesday, Jan 26, 2022 by Drew Diver

Apple Music is slow… Spotify sucks…

Recently I’ve been re-discovering and pruning my “old” digital music collection. It definitely was a snapshot of my tastes around 2015 or so before I started using any various streaming service full time.

The CD drive on my old Mac Pro has never been worked so hard. I’ve begun ripping all my old CD’s to FLAC and placing on my Plex server, Plex’s “Plexamp” app is awesome. No ads, no albums randomly disappearing or all of a sudden alerting me that I am “Not authorized in this region.”

My listening habits are now slower, no longer do I have that feeling of an endless void in music (most of which) I don’t care about or will only listen once and forget amongst the daily onslaught of new releases. Honestly, we are all creatures of habit and just paying for the album or song is cheaper than renting. Bandcamp, word of mouth, second-hand CD sales (practically free in this medium) and following some specific labels I trust has been refreshing. Not to mention revisiting a lot of old label samplers and albums I’d long forgotten about and are not available via streaming.

filed under: plex streaming self-hosted audio