DietPi: creating a lean-and-mean Roon Bridge

Excellent, thanks for the confirmation.

It appears this card has its own dtb overlay. Iā€™ve added this card to DietPi-Config.

Run the following command below (copy and paste all) to update dietpi-config, allowing you to select the card:
wget https://raw.githubusercontent.com/Fourdee/DietPi/88d562320a02f70afaa5c6aabe0246ce3738915f/dietpi/dietpi-config -O /DietPi/dietpi/dietpi-config

It will also be available in our next update (DietPi v142).

I need a simple Android SSH app to close my DietPi down each evening. Any recommendations?

Rene - thanks for your help the other night, I got it all working in the one evening

Just pull the power.

just leave it running

I suggest you leave it running. And if you really want to shut it down every night you should put a ā€˜shutdownā€™ command somewhere in a boot script (/etc/init.d/boot.local for example).

Iā€™ve been unceremoniously pulling the power from day one as itā€™s powered from the same extension board as the rest of my hifi and never had an issue. Logs are written to ram, so itā€™s actually not doing any writing to sd card unless you run an update.

This very basic bash script + service, will turn your system off automatically at a specific hour.

Change the power off time by editing /etc/poweroff_specific_time.sh and POWER_OFF_HOUR= after installation. then restart
systemctl restart poweroff_specific_time.service

Just be warned, this simply checks the hour, so if you power back on at any time between POWER_OFF_HOUR:00 and POWER_OFF_HOUR:59, after 120 seconds, the script will trigger the power down, and system will simply shutdown again.

Install:
(Copy paste all)

cat << _EOF_ > /etc/poweroff_specific_time.sh
#!/bin/bash

#Wait for 120 seconds, before starting this script.
sleep 120

POWER_OFF_HOUR=1234 #24h format | eg: 15 = 3pm

while true
do

    CURRENT_HOUR=\$(date +%-H)

    if (( \$CURRENT_HOUR == \$POWER_OFF_HOUR )); then

        poweroff

        break

    fi

    sleep 60

done
_EOF_
chmod +x /etc/poweroff_specific_time.sh

#service
cat << _EOF_ > /etc/systemd/system/poweroff_specific_time.service
[Unit]
Description=Power down system at specific time

[Service]
Type=simple

ExecStart=/bin/bash -c '/etc/poweroff_specific_time.sh'

[Install]
WantedBy=multi-user.target
_EOF_
systemctl daemon-reload
systemctl enable poweroff_specific_time.service
systemctl start poweroff_specific_time.service

To disable this:

systemctl stop poweroff_specific_time.service
systemctl disable poweroff_specific_time.service

Dan,

Just wanted to say thank you for your work on DietPiā€¦ I am using it on two NanoPi Neo boards, running Roon Bridge. Really easy to get up and running, even for a Linux newbieā€¦

I sent you a donation, keep up the good work! :slight_smile:

2 Likes

Dan,

When I use PiCorePlayer with Roon then I get 192kHz output fine as confirmed by Roon and by my processor. However, when I use DietPi then I only get 48kHz max. I solely use HDMI out. I tried the High Sound Quality HDMI option but that did not change the issue.

Please advise.

Thanks
CJ

Is the pi hdmi not limited to 48?

Clearly not as PiCoreplayer is playing 192kHz as confirmed by the processor info screen,

CJ

Just set up my first Pi using DIetPi. Fantastic!

One comment that might help others with similar set up. I was installing the IqAudio Digi+. Set up with DIetPi went very smoothly, but Roon couldnā€™t find the Pi and when I checked, DIetpi didnā€™t find a sound card (used Rene"s check command mentioned above). None of the installed IqAudio flavours worked with the Digi+. After a fair bit of trial and error I found that it works just perfectly using the JustBoom sound card settings. Not sure why that was but donā€™t mind as itā€™s all fine and sounding great

Thanks so much to @Dan_Knight for smoothing the path of my first ever Linux installation. Excellent software and implementation - sending a donation as it is much appreciated!

2 Likes

Hi Richard,

Lets check the ALSA streams to confirm output formats and frequency.

On the PiCorePlayer, play some music through Roon, then run the following command and paste results:
cat /proc/asound/card*/pcm0p/sub0/hw_params

Also, on the PiCorePlayer, please take a screenshot of the HDMI sound card. The supported frequencies should look similar to:

Hi Andrew,

Thanks for the report, iā€™ll look into this, is this the soundcard you currently have?

@ACB

Iā€™ve added the Pi-DIGI+ to dietpi-config. Please update the scripts by running the following commands:

wget https://raw.githubusercontent.com/Fourdee/DietPi/c9e9542d180b84835ea43bbe8e103405e332a1de/dietpi/dietpi-config -O /DietPi/dietpi/dietpi-config

wget https://raw.githubusercontent.com/Fourdee/DietPi/c9e9542d180b84835ea43bbe8e103405e332a1de/dietpi/func/dietpi-set_hardware -O /DietPi/dietpi/func/dietpi-set_hardware

Then select the card in dietpi-config, reboot and see let us know if any issues.

Dan,

Please find attached the pics showing settings and Roon playing a 192kHz 24 bit Rush track. The last pic is of my TV screen showing the HDMI input for the Pi and the info screen overlayed from my processor showing the track being 192kHz.

I ran the command line you requested and received:
access: MMAP_INTERLEAVED
format: S16_LE
channels: 2
rate: 192000 (19200/1)
period size: 3840
buffer size: 15360

Any thoughts appreciated

Thanks
CJ

1 Like

Hi Richard,

Many thanks, yep thats defiantly a 192KHz stream.

I did notice you are using SqueezeBox on the PiCorePlayer, rather than the Roon Bridge. Iā€™ll replicate your setup and see if SqueezeBox is allowing for higher output frequencies.

Thanks - I am using PiCorePlayer rather than Roon Bridge as it works. I did try Roon Bridge when it was first released but did not get HD files to play but figured that was probably due to my own Linux skills. So I thought I would give DietPi a go a install was a breeze. Further my reason for using Roon is the interface and not Roon Bridge.

I am running PiCorePlayer 3.1 standard version (not Audio tweaked one) with Alsa Parameters 80::32:1

CJ

Hi Richard,

Lets try running SqueezeLite on your DietPi system and see if we get 192KHz output.

dietpi-software install 36
apt-get install avahi-daemon -y

Once installed, select the DietPi SqueezeBox player in Roon, play and check output in Roon.