I've compiled a list of all of Rune Frost's changes for the RPi3. Please see below.
I've used 'nano' as my line editor, and reference this in the instructions. It's simple to use but doesn't allow copy and paste of multiple lines. If you have a better editor, that's great.
All the text to be entered or modified is in
orange text.
Please read the instructions carefully if you wish to edit the mpd.conf file (to enable the soxr upsampler). If you don't use chattr before and after the changes won't be saved...
Once the changes have been made, reboot the Pi and then select the 'OrionV2' profile from the Settings menu.
Warning: all computers need perfect syntax. If this doesn't work, just recreate a new SD card from the original image and start again.
Lastly, all credit to Rune Frost and Dynobot for their efforts in devising these mods, and a special mention to the ever-helpful Frank (hondagx35) for providing unstinting assistance.
Simpler AlternativeIf you're not feeling brave, Dynobot suggested a useful article which makes some comparitively simple changes in /boot/config.txt This will give an improvement but, from personal experience, the changes below have a much more obvious (and beneficial) effect. You choose. The article is here:
http://archimago.blogspot.co.uk/2017/01 ... s-usb.html--------------------------------------------------------------------------------------------------------------------------------------------------------------
Nightly BuildThe nightly builds has to be enabled and updated to enable the kernel optimizations.
Nightly builds are based on the latest development code, which means they are probably unstable and definitely not documented. As such, your mileage may vary.
Updating to these builds is better suited for more experienced users and developers, although everyone is welcome to test them and provide feedback.
Currently, development is progressing along different branches in the RuneUI repository: dev branch - closer to the main branch, this is likely to be merged with main on a regular basis next branch - a more experimental one, typically intended to be the next version of RuneAudio.
These are the required steps to switch from the main branch to another one (the following example refers to the dev branch):
delete the contents of /var/www (including hidden files)
DOUBLE CHECK the path before entering the command!
rm -rf /var/www/{*,.*}clone the 'dev' branch on your device (notice the -b dev)
git clone -b dev https://github.com/RuneAudio/RuneUI.git/ /var/wwwclear the PHP OPcache
curl -s http://localhost/clearreboot your device
As final step, always remember to hard refresh the cache of your browser. How to:
http://www.refreshyourcache.com/en/cache/To Use SOXR Upscaler (optional – may not work well with all DACs)Use SOXR to upscale to 192Khz/16bit ( this really depends on the DAC, some will get better performance as the SOXR is a better resampler than some of the integrated ones).
The chattr –i command must precede the edit and the chattr +I must follow the edit. The mpd.conf file is locked for editing - the first chattr command unlocks it; the second locks it after changes.
Please note – the ‘active source’ is usually the section that has ‘enabled “yes”’ in it. In the example below, this is my USB Audio DAC – the second section, where the lines have been added.
Note: Other upsampling values also work, e.g. 96000:16:2
chattr -i /etc/mpd.conf
Nano /etc/mpd.confAdd this to the active source:
format "192000:24:2"
samplerate_converter "soxr very high"then :
Chattr +i /etc/mpd.confExample Contentaudio_output {
name "bcm2835 ALSA_1"
type "alsa"
device "hw:1,0"
dsd_usb "yes"
auto_resample "no"
auto_format "no"
}
audio_output {
name "USB Audio DAC"
type "alsa"
device "hw:0,0"
dsd_usb "yes"
auto_resample "no"
auto_format "no"
format "192000:16:2"
samplerate_converter "soxr very high" enabled "yes"
}
Changes to /boot/config.txtRune Frost tells me that the changes in this file to the Dram and frequency settings add an 'analogue' sound to the output. Always a good thing...
Note: some of these values may be already present.
nano /boot/config.txt
max_usb_current=1
# memory options
#gpu_mem=64
gpu_mem=16
# Overclocking options
force_turbo=1
avoid_pwm_pll=1
arm_freq=666
over_voltage=-10
gpu_freq=333
# sdram overclock
sdram_freq=333
sdram_schmoo=0x02000020
over_voltage_sdram_p=-5
over_voltage_sdram_i=-14
over_voltage_sdram_c=-6
disable_pvt=1
# HDMI disable
hdmi_blanking=2Please note: Rune Frost advises that when the ARM voltage is lower than -7, the integrated wi-fi will stop working. If wi-fi is required, you can still use an edimax (or similar) dongle for wi-fi. But going below -7 is quite noticeable.. perhaps it is because of the internal wifi/bluetooth is also then disabled
It should be noted that the best internet link is always an ethernet cable. If your router is not near your hi-fi, a good quality powerplug extender works well for the author, e.g. TP-Link AV500, or similar.
Changes to /boot/cmdline.txtN.B. Some of these parameters are already present.
Nano /boot/cmdline.txt dwc_otg.microframe_schedule=0
dwc_otg.nak_holdoff_enable=1
dwc_otg.fiq_fix_enable=0
dwc_otg.microframe_schedule=1
smsc95xx.turbo_mode=N
dwc_otg.lpm_enable=0Orion Optimize Mods (/var/www/command/orion_optimize.sh)nano /var/www/command/orion_optimize.sh##################
# common startup #
##################
#if [ "$PID" != null ]; then
#echo "Set priority for: cifsd"
#renice -20 $PID
#fi
cifsprio pid=$(pidof cifsd)
echo "Set normal priority for: rune_SY_wrk"
renice 20 $(pgrep rune_SY_wrk)
echo "Set normal priority for: rune_PL_wrk"
renice 20 $(pgrep rune_PL_wrk)
echo "Set normal priority for: smbd"
renice 19 $(pidof smbd)
echo "Set normal priority for: nmbd"
renice 19 $(pidof nmbd)
#runeFrost
renice -10 -p 3
renice -10 -p 12
renice -10 -p 16
renice -10 -p 20Also in /var/www/command/orion_optimize.shFind the Sound Profiles section (see below), then modify the ‘# mod 3’ section to look like following lines. This content replaces the original parameters so the original lines must be deleted. Alternatively, they can be commented out by putting a ‘#’ at the start of each line.
##################
# Sound Profiles
##################
# mod 3
if [ "$1" == "OrionV2" ]; then
# runefrost version
ifconfig eth0 mtu 9000
ifconfig wlan0 mtu 9000
ifconfig eth0 txqueuelen 4000
ifconfig wlan0 txqueuelen 4000
echo 0 > /proc/sys/vm/swappiness
modKschedLatency hw=$2 s01=120000 s02=2000000 s03=2000000 s04=2000000 s05=2000000 s06=2000000 s07=2000000 s08=2000000 s09=2000000 s10=2000000 u01=2 u02=2 u03=2 u04=2 u05=2 u06=2 u07=2 u08=2 u09=2 u10=2
#runeFrost
echo -n performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo -n performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo -n performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo 1000000 > /proc/sys/kernel/sched_latency_ns
echo 100000 > /proc/sys/kernel/sched_min_granularity_ns
echo 25000 > /proc/sys/kernel/sched_wakeup_granularity_ns
echo 1 > /proc/sys/kernel/hung_task_check_count
echo 20 > /proc/sys/vm/stat_interval
echo -1 > /proc/sys/kernel/sched_rt_runtime_us
echo 5 > /proc/sys/vm/dirty_background_ratio
sleep 2
mpdprio_nice
echo "(OrionV2) sound signature profile"
fi