Tweaking the audio performance Rpi3

Raspberry Pi related support

Re: Tweaking the audio performance Rpi3

Postby dynobot » 10 Jan 2017, 21:09

Its my understanding that the GPIO pins are not regulated, therefore 1) you will need a regulated power supply 2) no need to solder off the regulators for the onboard connector.

I think these mods/tweaks need to be cleaned up and consolidated into one coherent post.

Also I stumbled onto a pretty good thread from Archimago [he's known for measuring all things audio]. Anyways he measured a RPI and Odroid board along with a windows laptop and ended up with some pretty good settings which help to squeeze the most out of the RPi. I applied them and have to say, I really like what they bring to the table errr ears.

http://archimago.blogspot.com/2017/01/m ... s-usb.html

IMO, the settings he ended up with are a good starting point for what should be "STANDARD" settings for any RPi that is used for audio, no matter what software is being used.
User avatar
dynobot
 
Posts: 56
Joined: 19 May 2014, 15:04
Location: GA-USA

Re: Tweaking the audio performance Rpi3

Postby hondagx35 » 10 Jan 2017, 22:47

Hi Trevor,

If you were to agree that this was a positive and worthwhile improvement, could it be packaged up as an 'alternative' build, perhaps? This might be an easier way to share the benefits with a wider audience who don't want to learn about SSH, Nano, and the stringent demands of unforgiving syntax...!

This should be possible, but there are so many things to do.
Let me see what i can do for the next image.

Frank
User avatar
hondagx35
Moderator
 
Posts: 2543
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Tweaking the audio performance Rpi3

Postby pietpara » 13 Jan 2017, 13:41

Hello,

I am a newbie with a brandnew RaspTouch from Audiophonics.
Reading this thread I wondered if the RaspTouch would be compatible with the settings mentioned here? Has anyone tried this?

Does anyone know whether the RaspTouch also has implemented the fboe hardware changes mentioned earlier?

cheers!
Pietpara
pietpara
 
Posts: 45
Joined: 12 Jan 2017, 21:17

Re: Tweaking the audio performance Rpi3

Postby hondagx35 » 13 Jan 2017, 15:06

Hi Pietpara,

Does anyone know whether the RaspTouch also has implemented the fboe hardware changes mentioned earlier?

No it uses a unmodified Raspberry Pi 3.

If i were you, i would first try to get the device working properly.
There are two different models (ES9023 & ES9018K2) available. which one is yours?

Frank
User avatar
hondagx35
Moderator
 
Posts: 2543
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Tweaking the audio performance Rpi3

Postby pietpara » 13 Jan 2017, 15:25

Hi, my model is the ES9018K2.
And of course I will go step by step.

Thank you :)
pietpara
 
Posts: 45
Joined: 12 Jan 2017, 21:17

Re: Tweaking the audio performance Rpi3

Postby pietpara » 15 Jan 2017, 21:22

Hello all,

Yesterday evening I had a long listening session and then I decided to try out the settings you described. I first of all want to thank rune frost and dynobot for their fantastic inputs here! Also the article by Archimago is a great read.

I implemented the changes and additions to the OrionV2 mode settings and to cmdline.txt. I set 'over_voltage=-4' because I use the internal WiFi still. I also set gpu_mem=16, per Archimago's recommendation.

I did not try the upsampling changes, because I have still a few questions. Nor did I set the CPU core isolation settings for same reason. The MPD is, however, set to a single core as per the "common startup" settings dynobot mentions.

Nevertheless, the difference is immediately clear. A really good improvement already for my RaspTouch with ES9018K2M. The sound is so much more open, alive and present.

Now my questions...

1) A question to Frank about core isolation. In the thread about it, Frank gives examples to isolate cores and to dedicate a core to MPD. The question is whether the example code is ready to use for this or does it need to be adapted for each one's situation? For example, if I understand it right, the example code isolates cores 2 and 3 and dedicates core 3 (if remember well) to MPD. Why isolate core 2 then? Was that just an example?

2) I see there are some 'echo -n performance' commands for cpu0,1 and 2. Not for core 3. Is that because this one is where MPD is isolated on?

3) I noticed that Rune frost removed the 'taskset' command dynobot mentions in from the 'common startup' section to assign MPD to a core. Why? And Frank's example places it in the mpd.service file in stead of in the audio profile. Which is better?

4) To isolate cores Frank gives the following code for cmdline.txt:
root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop isolcpus=2,3

Is this code simply appended to the cmdline.txt recommended by runefrost?

5) Frank mentions code to reload the daemon and restart the service after the code to dedicate a core to mpd. Is this something that needs to be done each boot? Maybe in a startup script? Or only once?

Thanks to all in advance!
Pietpara
pietpara
 
Posts: 45
Joined: 12 Jan 2017, 21:17

Re: Tweaking the audio performance Rpi3

Postby pietpara » 20 Jan 2017, 20:44

Hi,
Sorry for the many questions. ;)
I was hoping someone could help me out.

Have a nice weekend!
pietpara
 
Posts: 45
Joined: 12 Jan 2017, 21:17

Re: Tweaking the audio performance Rpi3

Postby hondagx35 » 20 Jan 2017, 22:19

Hi pietpara,

1) A question to Frank about core isolation. In the thread about it, Frank gives examples to isolate cores and to dedicate a core to MPD. The question is whether the example code is ready to use for this or does it need to be adapted for each one's situation? For example, if I understand it right, the example code isolates cores 2 and 3 and dedicates core 3 (if remember well) to MPD. Why isolate core 2 then? Was that just an example?

Yes, it was only an example.

3) I noticed that Rune frost removed the 'taskset' command dynobot mentions in from the 'common startup' section to assign MPD to a core. Why? And Frank's example places it in the mpd.service file in stead of in the audio profile. Which is better?

The audio profile is the more flexible solution (can be disabled by switching profiles).
Edit:
This does not work use the mpd.service file instead!

4) To isolate cores Frank gives the following code for cmdline.txt:
root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop isolcpus=2,3

Is this code simply appended to the cmdline.txt recommended by runefrost?

Only "isolcpus=2,3" has to be added to cmdline.txt

5) Frank mentions code to reload the daemon and restart the service after the code to dedicate a core to mpd. Is this something that needs to be done each boot? Maybe in a startup script? Or only once?

It has to be done only once, or better reboot.

Frank
User avatar
hondagx35
Moderator
 
Posts: 2543
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Tweaking the audio performance Rpi3

Postby pietpara » 21 Jan 2017, 22:05

Thank you sooo much Frank!

Would you also happen to know what these lines in dkftost's profile do?

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


Also, I set mpd to cpu 3 like this: taskset -c -p 3 $(pidof mpd)

Would that be correct?

How can I check that it indeed runs on cpu3?

Thanks again
Pietpara
pietpara
 
Posts: 45
Joined: 12 Jan 2017, 21:17

Re: Tweaking the audio performance Rpi3

Postby hondagx35 » 22 Jan 2017, 00:55

Hi Pietpara,

Would you also happen to know what these lines in dkftost's profile do?

Please read this.

How can I check that it indeed runs on cpu3?

I would do it like this:
- add " isolcpus=3" to your cmdline.txt
- reboot and play some music
- get access to the console and check the CPU usage
Code: Select all
top

You should see that CPU3 is not used anymore.

- attach mpd to CPU 3
Code: Select all
taskset -c -p 3 $(pidof mpd)

- check the CPU usage again with top
You have to tweak the output to get the last CPU used (see here)

Frank
User avatar
hondagx35
Moderator
 
Posts: 2543
Joined: 11 Sep 2014, 22:06
Location: Germany

support RuneAudio Donate with PayPal

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: smallfat and 0 guests