Airsonic and HiFiBerry DAC+ on RPi 3b+

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
pecan_pie
Posts: 5
Joined: Thu Feb 21, 2019 11:19 pm

Airsonic and HiFiBerry DAC+ on RPi 3b+

Post by pecan_pie » Thu Feb 28, 2019 11:41 pm

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: https://airsonic.github.io/docs/transcode/#on-debian-9, looks like the link to ffmpeg is not created correctly, https://github.com/MichaIng/DietPi/blob ... ware#L9196

I removed the link created on DietPi install, https://github.com/MichaIng/DietPi/blob ... ware#L9196, and pretty much followed the airsonic instructions and was able to get past this error.

Code: Select all

[email protected]:~# ls -alh /usr/bin/ffmpeg
-rwxr-xr-x 1 root root 14M Apr 19  2017 /usr/bin/ffmpeg
[email protected]:~# ls -alh /mnt/dietpi_userdata/airsonic/transcode
lrwxrwxrwx 1 airsonic dietpi 15 Feb 28 12:11 /mnt/dietpi_userdata/airsonic/transcode -> /usr/bin/ffmpeg
[email protected]:~# rm /mnt/dietpi_userdata/airsonic/transcode 
[email protected]:~# mkdir /mnt/dietpi_userdata/airsonic/transcode
[email protected]:~# cd /mnt/dietpi_userdata/airsonic/transcode/
[email protected]:/mnt/dietpi_userdata/airsonic/transcode# ln -s /usr/bin/ffmpeg
[email protected]:/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
[email protected]:/mnt/dietpi_userdata/airsonic/transcode# chown -h airsonic:dietpi ffmpeg 
[email protected]:/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, https://airsonic.github.io/docs/jukebox ... evice-name, which simply outputs:

Code: Select all

[email protected]:/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?

User avatar
MichaIng
Site Admin
Posts: 1807
Joined: Sat Nov 18, 2017 5:21 pm

Re: Airsonic and HiFiBerry DAC+ on RPi 3b+

Post by MichaIng » Wed Mar 06, 2019 1:01 am

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 ... i-software
Changelog: https://github.com/MichaIng/DietPi/comm ... 9bd15ddc5e

Please verify the dtoverlay is leaded correctly:

Code: Select all

dtoverlay hifiberry-dacplus
dtoverlay -l

pecan_pie
Posts: 5
Joined: Thu Feb 21, 2019 11:19 pm

Re: Airsonic and HiFiBerry DAC+ on RPi 3b+

Post by pecan_pie » Wed Mar 06, 2019 1:36 am

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

Code: Select all

[email protected]:~# dtoverlay -l
No overlays loaded
[email protected]:~# dtoverlay hifiberry-dacplus
* Failed to apply overlay '0_hifiberry-dacplus' (kernel)

User avatar
MichaIng
Site Admin
Posts: 1807
Joined: Sat Nov 18, 2017 5:21 pm

Re: Airsonic and HiFiBerry DAC+ on RPi 3b+

Post by MichaIng » Wed Mar 06, 2019 2:30 am

Hum, but the overlay exists, right?

Code: Select all

dtoverlay -a | grep hifiberry
It is an I2C soundcard if I found the correct info. Could you try:

Code: Select all

modprobe i2c-bcm2708
dtparam i2c_arm=on
dtparam i2c1=on
dtoverlay hifiberry-dacplus
If this works, then you can apply this settings persistently:

Code: Select all

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

pecan_pie
Posts: 5
Joined: Thu Feb 21, 2019 11:19 pm

Re: Airsonic and HiFiBerry DAC+ on RPi 3b+

Post by pecan_pie » Wed Mar 06, 2019 2:40 am

It's there but unfortunately still fails

Code: Select all

[email protected]:~# dtoverlay -a | grep hifiberry
  hifiberry-amp
  hifiberry-dac
  hifiberry-dacplus
  hifiberry-digi
  hifiberry-digi-pro
[email protected]:~# modprobe i2c-bcm2708
[email protected]:~# dtparam i2c_arm=on
[email protected]:~# dtparam i2c1=on
[email protected]:~# 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.

Post Reply