12-09-2018, 06:12 AM
(12-08-2018, 03:13 PM)Edward Wrote: /boot/config.txt@Edward... Thanks for publishing your experience.
disable_splash=1
hdmi_drive=2
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=audio=off
dtoverlay=allo-digione
#dtoverlay=pi3-disable-wifi
dtoverlay=pi3-disable-bt
arm_freq=1000
sdram_freq=500
core_freq=400
gpu_freq=300
over_voltage=-3
over_voltage_sdram=-3
max_usb_current=0
Newly created file in /usr/local/sbin/sound.sh....change permimssions with sudo chmod 755 sound.sh then put the path to this file in /etc/rc.local
Find your audio threads with this command and substitute them with the ones below.
ps -eLo pid,cls,rtprio,pri,nice,cmd | grep -i "irq"
Look for ksoftirq [should be four of them], mine are numbers 7, 14, 19, 24.
#!/bin/bash
#Reduce Audio thread latency
chrt -f -p 83 7
chrt -f -p 83 14
chrt -f -p 83 19
chrt -f -p 83 24
#Reduce USB latency
modprobe snd-usb-audio nrpacks=1
#Reduce MPD and OS latency
chrt -f -p 81 $(pidof mpd)
taskset -c -p 1 $(pidof mpd)
#Note mmcblk0 should be your hard drive usually sdX for x86 vs ARM
echo noop > /sys/block/mmcblk0/queue/scheduler
echo 2 > /sys/block/mmcblk0/queue/rq_affinity
echo 0 > /proc/sys/vm/swappiness
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
exit
Can you, please, describe your hardware set-up?