Jump to content
IGNORED

Moode Latency(SQ) Optimizations


Recommended Posts

Hello i did some digging the last few days, and wow i managed to make Moode sound even better, the improvements were mostly about improving OS/CPU Jitter, you guys have to try this and report what you think :)

 

/lib/systemd/system/mpd.service

ExecStart=/usr/bin/taskset -c 3 /usr/local/bin/mpd --no-daemon $MPDCONF

Search the corresponding line and change it accordingly

i didnt play around with prioritys on purpose, because it doesnt play well with camillaDSP (and i couldnt figure out a permanent way to increase CamillaDSP too, if someone can do this let me know :)) BUT the core affinity will get transfered over to CamillaDSP too, unlike task priority

 

/boot/config.txt

[cm4]                                                                                                                                                                                                         
otg_mode=1                                                                                                                                                                                                    
                                                                                                                                                                                                              
[all]                                                                                                                                                                                                         
disable_splash=1                                                                                                                                                                                              
disable_overscan=1                                                                                                                                                                                            
hdmi_drive=2                                                                                                                                                                                                  
hdmi_blanking=1                                                                                                                                                                                               
hdmi_force_edid_audio=1                                                                                                                                                                                       
hdmi_force_hotplug=1                                                                                                                                                                                          
hdmi_group=0                                                                                                                                                                                                  
dtparam=i2c_arm=off                                                                                                                                                                                           
dtparam=i2s=off                                                                                                                                                                                               
dtparam=spi=off                                                                                                                                                                                               
dtparam=audio=off                                                                                                                                                                                             
dtoverlay=disable-wifi                                                                                                                                                                                        
dtoverlay=disable-bt                                                                                                                                                                                          
arm_64bit=1                                                                                                                                                                                                   
                                                                                                                                                                                                              
audio_pwm_mode=1                                                                                                                                                                                              
disable_poe_fan=1                                                                                                                                                                                             
force_eeprom_read                                                                                                                                                                                             
                                                                                                                                                                                                              
[pi4]                                                                                                                                                                                                         
hdmi_force_hotplug:1=1                                                                                                                                                                                        
                                                                                                                                                                                                              
temp_limit=80                                                                                                                                                                                                 
force_turbo=1                                                                                                                                                                                                 
dtparam=sd_overclock=80                                                                                                                                                                                       
arm_freq=720                                                                                                                                                                                                  
#arm_freq_min=600
gpu_freq=240                                                                                                                                                                                                  
#gpu_freq_min=300
gpu_mem=16                                                                                                                                                                                                    
#core_freq=200
#core_freq_min=200
#h264_freq=200
#h264_freq_min=200
#isp_freq=200
#isp_freq_min=200
#v3d_freq=200
#v3d_freq_min=200
#hevc_freq=200
#hevc_freq_min=200
sdram_freq=2160                                                                                                                                                                                               
#sdram_freq_min=2400
#sdram_schmoo=0x021e882c
sdram_schmoo=0x02000020                                                                                                                                                                                       
avoid_pwm_pll=1                                                                                                                                                                                               
over_voltage=-8                                                                                                                                                                                               
#over_voltage_min=0
over_voltage_sdram=-8                                                                                                                                                                                         
#over_voltage_sdram_c=-7
#over_voltage_sdram_i=-7
#over_voltage_sdram_p=-7
disable_pvt=1

its the complete boot/config.txt file,

please watch out with the commented out commands (those are in because underclocking is a ongoing process :)), i use a RPI4 and anything under 700mhz arm frequency will lockup your isolated core after a song change, this took me some time to figure it out

 

/boot/cmdline.txt

isolcpus=domain,3 nohz_full=3 rcu_nocb=3 rcu_nocb_poll=3 skew_tick=1 nowatchdog nosoftlockup idle=poll audit=0 mce=off tsc=reliable smsc95xx.turbo_mode=N

Add those to existing other ones at the end of the line (for best Jitter rejection dont use 2 cores like the usual moode optimizations suggest but 1 core!! this will make high resampling rates not possible tho)

 

And finally we install a package called "tuned" via SSH

Quote

sudo apt install tuned tuned-utils tuned-utils-systemtap

systemctl start tuned
systemctl enable tuned

sudo tuned-adm profile network-latency
sudo tuned-adm verify

 

This is still a ongoing process but im quite happy how it turned out :) specially the cmdline.txt stuff does alot but i also found that tuned will kinda bring the music "out of the speakers" in a more 3D way, you can easly A/B this with those too commands (all changes are completely reverseable, so dont worry):

Quote

sudo tuned-adm profile network-latency

sudo tuned-adm off

 

Would love to hear your subjective changes :) for me there is no doubt that this does improve things alot, there would be quite alot more possible but that will need a RT Kernel

Link to comment

I did some testing with "jitterdebugger" and it actually shows (which in hindsight makes totally sense...) that a higher cpu frequency reduces jitter to a great degree tho if someone does jitterdebugger testing too it doesnt account for tasks that change cpu cores since it just runs 1 task per core, i still think isolcpus does probably the most 

 

i tested a little around and came to these settings

Quote
[cm4]
otg_mode=1
 
[all]
disable_splash=1
disable_overscan=1
hdmi_drive=2
hdmi_blanking=1
hdmi_force_edid_audio=1
hdmi_force_hotplug=1
hdmi_group=0
dtparam=i2c_arm=off
dtparam=i2s=off
dtparam=spi=off
dtparam=audio=off
dtoverlay=disable-wifi
dtoverlay=disable-bt
arm_64bit=1
 
audio_pwm_mode=1
disable_poe_fan=1
force_eeprom_read
 
[pi4]
hdmi_force_hotplug:1=1
 
temp_limit=80
force_turbo=1
avoid_pwm_pll=1
disable_pvt=1
#########################
dtparam=sd_overclock=80
dtparam=sd_poll_once
#########################
arm_freq=1680
#arm_freq_min=600
gpu_freq=560
#gpu_freq_min=300
gpu_mem=16
sdram_freq=3700
#sdram_freq_min=3200
sdram_schmoo=0x02000020
##########################
over_voltage=-5
#over_voltage_min=0
over_voltage_sdram=-5

which is a slight overclock with undervoltage (tho i didnt stress test it), i also removed most of the unneeded stuff

 

the change in sq is quite obvious, tho at first it sounds worse (and quieter for some reason) but i think thats just because less gets "masked", i recommend to listen to it for half a hour and not directly judge :) i think specially noticable is that sibiliance sounds "cleaner"

 

one additional benefit is im able to resample now at 384khz, so i actually "workaround" the dac resampling

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...