My Volumio project

I got my first Raspberry Pi 3 Model B+ about four months ago, which is now running a Nextcloud installation. I put it into a Flirc heat sink case and used a 128 GB micro SD card. It sees very little traffic, so I hope it lasts a long time.

My second Raspberry Pi 3 Model B+ arrived about a month ago with a HiFiBerry Digi+ hat, a small heat sink and a HiFiBerry Universal case. The music is stored on a 250 GB SATA HDD using a SATA to USB cable.
My goal was to create a music server that could deliver my CD’s as FLAC digitally to my DAC.
The last month was used to copy my 400+ CD’s into FLAC files and find cover photos. What a task, I’m glad I’m done with that…
I also spent an evening cleaning up the meta data in the FLAC files using the Mp3tag Windows application.

I have only used my Volumio setup a few times, but I’m impressed with the improved accessibility of my CD collection and ease of use.
It is really easy to find what I want to hear, and I’m especially happy about the album playback, which handles CD’s with no gap between track nicely. I was worried that I might experience gaps on those CD’s.

I have used both the free and payed iOS app, but I think that the web page is my choice as more cover images are shown there than in the apps.
What have you done to get more album covers displayed in the apps?

I’m also a little confused over the HiFiBerry Digi+ configuration in Volumio.
There are three settings that I need to make a decision for (picture taken from volumio.org Docs):

I have selected HiFiBerry Digi for both the Output device and DAC Model options, and Yes in I2S DAC option. Is that correct?
The HiFiBerry Digi+ is not a DAC, but an I2S transport. But I guess that’s OK.

Is it correct that the HiFiBerry Digi+ does not have a built in volume control?
Nothing happens when I use the volume wheel or buttons. The wheel goes back to 100% at next screen refresh.

/Mogens

You are correct as far as I am aware, there is no hardware control built into the Hifiberry Digi+

I have added an on/off button with built-in LED from Adafruit: Mini Illuminated Momentary Pushbutton - Blue Power Symbol.

I use the wake function on GPIO3. The RPi will wake up from halt state if GPIO3 is momentarily grounded.
But I couldn’t use GPIO3 for shutdown, as that is used for I2C when e.g. a HiFiBerry Digi+ hat is mounted.
So I use GPIO17 instead. So GPIO3 and GPIO17 are connected to one side of the button, the other side to GND.
To make the shutdown work /boot/config.txt needs a little tweaking:

dtoverlay=gpio-shutdown
dtparam=gpio_pin=17

So now I have a functioning on/off button. But I’d also like to illuminate the button.
One guide uses the UART TxD output on pin 8, which again requires a change to /boot/config.txt ot enable the uart, but the Volumio image won’t boot when I do that. So that’s not an option.

I then tried to add a python script to turn on GPIO14 (TxD), but the installed Python2 and the rpi gpio python package does not know the RPi3B+ board.
So I found this guide to manipulate GPIO without Python.
So now I can turn on and off the LED connected to GPIO14.

ledon.sh

#!/bin/sh
echo "14" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio14/direction
echo "1" > /sys/class/gpio/gpio14/value

ledoff.sh

#!/bin/sh
echo "0" > /sys/class/gpio/gpio14/value

I then wanted to use the @reboot crontab feature, but there is no crontab on the Volumio image, so I created a systemd service definition, following this guide:

[Unit]
Description=Service to turn on GPIO14 at startup
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/home/volumio/ledon.sh

[Install]
WantedBy=multi-user.target

That does turn on the LED, but it’s very late in the boot process.
Do any of you know of other/better targets to use?

/Mogens

A picture of the project:

IMG_0547r.jpg

/Mogens

Hi Deepo, i’m trying to do the same button behaviour but the gpio-shutdown parameter doesn’t work.

I have the latest Volumio version installed on a Pi3 B+.

I tried with a fresh installation, with or without DAC (AMP2), also the default GPIO3 to shutdown but nothing.

It only boots up from GPIO3.
The official button plugins works but i would prefer to have just one button with GND connection.

GPIO 3 is occupied by I2C communication, so you need to use another GPIO for shutdown. I used GPIO 17, as you can read above.

/Mogens

that’s what i did but on Volumio i can’t get it working, the same config on Raspbian works.

dtoverlay=gpio-shutdown
dtparam=gpio_pin=17

I can only say that it works for me (with Digi+), so my advice is to try another GPIO port.
Your DAC may block other GPIO’s than the Digi+.

/Mogens

This is the content of my /boot/config.txt file:

initramfs volumio.initrd
gpu_mem=16
max_usb_current=1
dtparam=audio=on
audio_pwm_mode=2
dtparam=i2c_arm=on
disable_splash=1
hdmi_force_hotplug=1

dtoverlay=gpio-shutdown
dtparam=gpio_pin=17

#### Volumio i2s setting below: do not alter ####
dtoverlay=hifiberry-digi

/Mogens