Airsonic and HiFiBerry DAC+ on RPi 3b+

I’m trying to get airsonic running on my RPi 3b+ with a HiFiBerry DAC+ but running into issues. I received the following error:

java.io.IOException: Cannot run program “/mnt/dietpi_userdata/airsonic/transcode/ffmpeg”: error=20, Not a directory

After digging I found these instructions: Setting up transcoding binaries - Airsonic, looks like the link to ffmpeg is not created correctly, DietPi/dietpi/dietpi-software at master · MichaIng/DietPi · GitHub

I removed the link created on DietPi install, DietPi/dietpi/dietpi-software at master · MichaIng/DietPi · GitHub, and pretty much followed the airsonic instructions and was able to get past this error.

root@airsonic:~# ls -alh /usr/bin/ffmpeg
-rwxr-xr-x 1 root root 14M Apr 19  2017 /usr/bin/ffmpeg
root@airsonic:~# ls -alh /mnt/dietpi_userdata/airsonic/transcode
lrwxrwxrwx 1 airsonic dietpi 15 Feb 28 12:11 /mnt/dietpi_userdata/airsonic/transcode -> /usr/bin/ffmpeg
root@airsonic:~# rm /mnt/dietpi_userdata/airsonic/transcode 
root@airsonic:~# mkdir /mnt/dietpi_userdata/airsonic/transcode
root@airsonic:~# cd /mnt/dietpi_userdata/airsonic/transcode/
root@airsonic:/mnt/dietpi_userdata/airsonic/transcode# ln -s /usr/bin/ffmpeg
root@airsonic:/mnt/dietpi_userdata/airsonic/transcode# ls -alh
total 8.0K
drwxr-xr-x 2 root     root   4.0K Feb 28 12:35 .
drwxrwxr-x 9 airsonic dietpi 4.0K Feb 28 12:33 ..
lrwxrwxrwx 1 root     root     15 Feb 28 12:35 ffmpeg -> /usr/bin/ffmpeg
root@airsonic:/mnt/dietpi_userdata/airsonic/transcode# chown -h airsonic:dietpi ffmpeg 
root@airsonic:/mnt/dietpi_userdata/airsonic/transcode# ls -alh
total 8.0K
drwxr-xr-x 2 root     root   4.0K Feb 28 12:35 .
drwxrwxr-x 9 airsonic dietpi 4.0K Feb 28 12:33 ..
lrwxrwxrwx 1 airsonic dietpi   15 Feb 28 12:35 ffmpeg -> /usr/bin/ffmpeg

I’m able to stream to a device, but I still can’t get any sound from the HiFiBerry

Tried this, Setting up jukebox player - Airsonic, which simply outputs:

root@airsonic:/mnt/dietpi_userdata/airsonic# java audioDevList 
Available mixers:
PulseAudio Mixer

I update the player to Java Jukebox, and select PulseAudio Mixer for the Audio device, but still nothing. Any ideas?

Indeed the installer expects the /mnt/dietpi_userdata/airsonic/transcode dir to exist on install, which seems to be not always the case, so it puts the symlink there instead of inside the dir as expected. I will fix that, so the dir is failsafe created first and the symlink placed inside correctly.

Fixed for v6.22 with: https://github.com/MichaIng/DietPi/blob/dev/dietpi/dietpi-software
Changelog: https://github.com/MichaIng/DietPi/commit/cdecf0a454b1f57b5e8ce117e5e6a59bd15ddc5e

Please verify the dtoverlay is leaded correctly:

dtoverlay hifiberry-dacplus
dtoverlay -l

Ah, I tried to list it first and indeed it is not loaded. Unfortunately the command to load it failed

root@airsonic:~# dtoverlay -l
No overlays loaded
root@airsonic:~# dtoverlay hifiberry-dacplus
* Failed to apply overlay '0_hifiberry-dacplus' (kernel)

Hum, but the overlay exists, right?

dtoverlay -a | grep hifiberry

It is an I2C soundcard if I found the correct info. Could you try:

modprobe i2c-bcm2708
dtparam i2c_arm=on
dtparam i2c1=on
dtoverlay hifiberry-dacplus

If this works, then you can apply this settings persistently:

G_CONFIG_INJECT 'i2c-bcm2708' 'i2c-bcm2708' /etc/modules
G_CONFIG_INJECT 'dtparam=i2c_arm=' 'dtparam=i2c_arm=on' /DietPi/config.txt
G_CONFIG_INJECT 'dtparam=i2c1=' 'dtparam=i2c1=on' /DietPi/config.txt

It’s there but unfortunately still fails

root@airsonic:~# dtoverlay -a | grep hifiberry
  hifiberry-amp
  hifiberry-dac
  hifiberry-dacplus
  hifiberry-digi
  hifiberry-digi-pro
root@airsonic:~# modprobe i2c-bcm2708
root@airsonic:~# dtparam i2c_arm=on
root@airsonic:~# dtparam i2c1=on
root@airsonic:~# dtoverlay hifiberry-dacplus
* Failed to apply overlay '2_hifiberry-dacplus' (kernel)

Found this thread and I get the same behavior. I’m able to set dtoverlay=hifiberry-dac but not hifiberry-dacplus. The light on the top of the HFB comes on. I’ve had it working with Volumio so I know it’s possible and the HFB itself is not broken.