Tweaking the audio performance Rpi3

Raspberry Pi related support

Re: Tweaking the audio performance Rpi3

Postby Discovery » 22 Jan 2017, 11:14

I find it useful to use 'top -u mpd', which only shows the mpd activity (this is where the main music processing is taking place).
Discovery
 
Posts: 110
Joined: 06 May 2015, 08:22
Location: Cambridgeshire, UK

Re: Tweaking the audio performance Rpi3

Postby pietpara » 22 Jan 2017, 12:30

Great!!!

I did that and CPU3 is at 0.0/0.0 almost all the time. Occasionally, however, I see it go to maybe 0.6/0.0.

And then with top I see mpd running on CPU3, but cpu usage is nearly 0.0. I mean that in the process list I see mpd using around 1.6%, but in the cpu list at the top cpu3 remains showing 0.0/0.0 almost all the time.

Is that expected behavior?

Another question, now that I understand the 'performance' setting of 'governor'.
If 'performance' means setting CPU to max frequency, then how does this play with the settings suggested by Archimago, underclocking the ARM to reduce jitter, like so:
arm_freq=800
sdram_freq=400
core_freq=400
?

Is this contradicting each other?
pietpara
 
Posts: 48
Joined: 12 Jan 2017, 21:17

Re: Tweaking the audio performance Rpi3

Postby Discovery » 22 Jan 2017, 12:37

Hi pietpara,

You appear to have isolated CPU3 but have you assigned the mpd process to it? See Frank's instructions in the-new-4-core-raspberry-pi-t862-40.html#p5401

Frank (or others) may be able to provide a more detailed answer to your second question but I believe Archimago's approach of under-clocking the Pi is different to the approach used by Frost_dk. I found it useful to create a second SD card and run it in a spare Pi to compare each together to hear the differences.
Discovery
 
Posts: 110
Joined: 06 May 2015, 08:22
Location: Cambridgeshire, UK

Re: Tweaking the audio performance Rpi3

Postby hondagx35 » 22 Jan 2017, 12:45

User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Tweaking the audio performance Rpi3

Postby pietpara » 22 Jan 2017, 13:26

Hi, thanks everyone.

@Discovery: i used the taskset command in the Orion profile as per the code given elsewhere in this thread.

@Frank: if the 'performance' setting for governor is meant to set it constant at it's highest frequency then I guess that we should set this setting on all 4 cores, and not just 0,1 and 2, as in the code from dk_frost or dynobot, but also on the isolated core #3, right?


And just for clarity, I see mpd running on cpu3 in top, using about 1.6% cputime. But I see the cpu3 at 0.0/0.0 in the cpu core load list at the top of 'top'.

I will nevertheless try what you said, placing it in mpd.service.

Best
Pietpara
pietpara
 
Posts: 48
Joined: 12 Jan 2017, 21:17

Re: Tweaking the audio performance Rpi3

Postby s.k. » 22 Jan 2017, 14:06

Hi
I would to tweaking the audio performance of my RPI2 according to the suggestions made on the topic.
So I intent to:
• To isolate cpu core No 3 (isolcpus=3) and assign it to mpd though mpd.service (taskset -c 3 )

• Modify the cmdline by adding :“dwc_otg.nak_holdoff_enable=1”, “dwc_otg.fiq_fix_enable=0” and “dwc_otg.microframe_schedule=1” (everything else is already there)

• Modify the config by adding Overclocking options for Pi2 :
force_turbo=1
boot_delay=1
arm_freq=1000
sdram_freq=500
core_freq=250
over_voltage=2
temp_limit=80
gpu_mem=16
hdmi_blanking=2

• Modify the “orion_optimize.sh” by adding in “common startup” the :
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)
renice -10 -p 3
renice -10 -p 12
renice -10 -p 16
renice -10 -p 20

AND in OrionV2 the :

if [ "$1" == "OrionV2" ]; then
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
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

Does the above make sense ?
Is there something missing or need modification?
My Raspberry Pi2 is connected with a HiFiBerry Digi+.
Do I need to use SOXR tweak ?

Thanks in advance!
Regards
Stavros
RPi2B Rev 1.1, Allo DigiOne, ATXRaspi, 16x2 OLED display - running rAudio
s.k.
 
Posts: 113
Joined: 04 Jan 2017, 08:38

Re: Tweaking the audio performance Rpi3

Postby Discovery » 22 Jan 2017, 14:19

Hi Stavros,

Why not try it? The worst case is that you have to spend two minutes copying the original image back to the SD card if it doesn't work.
Discovery
 
Posts: 110
Joined: 06 May 2015, 08:22
Location: Cambridgeshire, UK

Re: Tweaking the audio performance Rpi3

Postby s.k. » 22 Jan 2017, 15:03

Hi Discovery
I am intent to do so.
I am only concern if I have cover the right way all the tweak aspects.
By the way except listening, is there another way to understand differences ?
Regards
Stavros
RPi2B Rev 1.1, Allo DigiOne, ATXRaspi, 16x2 OLED display - running rAudio
s.k.
 
Posts: 113
Joined: 04 Jan 2017, 08:38

Re: Tweaking the audio performance Rpi3

Postby Discovery » 22 Jan 2017, 15:13

I believe the only thing that counts is whether it sounds better to YOU.

Other than listening? I expect you'll want to play your music more often, and will want to try all your old favourites to see how much better they sound! :-)
Discovery
 
Posts: 110
Joined: 06 May 2015, 08:22
Location: Cambridgeshire, UK

Re: Tweaking the audio performance Rpi3

Postby ianhaynes » 22 Jan 2017, 15:28

Pi 2, Ver. 0.5b, IQAudio DAC+
ianhaynes
 
Posts: 207
Joined: 04 Mar 2015, 12:51

support RuneAudio Donate with PayPal

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: Bing [Bot] and 10 guests