Tweaking the audio performance Rpi3

Raspberry Pi related support

Re: Tweaking the audio performance Rpi3

Postby hondagx35 » 26 Jan 2017, 00:27

Hi pietpara,

have you read the link you posted from top to the end?
So, in summary, in light of all the above, our recommendation here at BitPerfect is that you do NOT use BitPerfect to upsample for you, unless you have conducted some extensive listening tests and determined that upsampling sounds better in your system. These tests should include serious auditioning of BitPerfect’s three SoX algorithms.


Upsampling, oversampling, xxxsampling, .... ????
because the ESS need not upsample anymore.

Are you shure?

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

Re: Tweaking the audio performance Rpi3

Postby pietpara » 26 Jan 2017, 22:43

Hello Frank,

I am not using upsampling now. It is not my goal to use this SOX thing.

One of my biggest hobbies is to "conduct some extensive listening tests". I just love to listen to music, compare, discuss with similar fanatics, share and all of that.

And, since I came across this thread mentioning possible improvements with tweaks, I started playing with each of them, to feed my craving for my hobby with the little nifty new device, the RaspTouch, that I had been reading so much good about, and have been eagerly anticipating, with it's equally infamous ES9018 DAC.

So, if with my audio equipment, my ears and brain, and my room, this SOX sounds better to me than without, I would like to use it, no matter what engineers may say about it. Mind you, I'm a physicist too. :lol:

That's really all there is to it for me.
:D

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

Re: Tweaking the audio performance Rpi3

Postby DomieMic65 » 05 Mar 2017, 18:19

I will try to give a very simple answer the way I understnd it from the things I have read to some forums, to the question:
"why should someone bother upsampling?"

It is because the way Delta Sigma DACs work.
They do upsample internally in order to make the D to A conversion, filter etc..! From 44.1 it goes it up to the highest possible I think and then after the conversion and filtering is done it goes it back to 44.1 (very simplistic and may be not quite right sequence of things but you get the picture).
So if this upsample is made by the computer and not the DAC sometimes -depending on the DAC- may have better result than leaving the DAC to do all the work!
You save some conversion steps...

That is how I understand why upsampling might have a benefit in sound!
And from my tests on Macs and PCs I hear an improvement when upsampling!
I do not know if it will be the same with the RPi but it is nice to have options No?

Excuse my not at all technical explanation...
DomieMic65
 
Posts: 41
Joined: 12 Feb 2017, 21:04

Re: Tweaking the audio performance Rpi3

Postby DomieMic65 » 10 Mar 2017, 11:17

I managed with the help of a friend to make all the above tweaks and I think that they worth the effort!

I also think that when
over_voltage=-10 is set to -5 there is also a benefit.
What is the minimum that can be used?
Thank you!!

Now I must see what I can do about a linear power supply.

Sent from my Nexus 5X
DomieMic65
 
Posts: 41
Joined: 12 Feb 2017, 21:04

Re: Tweaking the audio performance Rpi3

Postby nzlowie » 11 Mar 2017, 09:02

Hi all
Do these tweaks also improve the performance when using digital out? I have a hifiberry Didi + and thought that it supplied a pure bit perfect digital output stream.....
This is on a pi2 and I thought it sounded pretty good!

Sent from my Moto G (4) using Tapatalk
nzlowie
 
Posts: 13
Joined: 23 May 2016, 10:16

Re: Tweaking the audio performance Rpi3

Postby Discovery » 11 Mar 2017, 12:37

Hi nzlowie,

There's more to good sound quality than just being bit-perfect - If that's all it took, all bit-perfect DAC streamers would sound identical, wouldn't they...?

The more subtle effects start with jitter, and other artifacts in the signal that influence the outcome.

My advice is not to worry too much about understanding the theory but to try the practice, i.e. listen for differences yourself. If they exist (and are positive), you'll enjoy your music more. I don't fully understand nuclear physics but I'm happy to accept that electricity is available to power my hi-fi, regardless of how it was generated.

Regards,

Trevor
Discovery
 
Posts: 110
Joined: 06 May 2015, 08:22
Location: Cambridgeshire, UK

Re: Tweaking the audio performance Rpi3

Postby DomieMic65 » 30 Mar 2017, 21:15

I wan to ask.. is the SOXR resampler installed to the MPD of the latest 0.4Beta?
If yes how can I enable it?

the
Code: Select all
mpd -V

does not show that it is
Code: Select all
root@runeaudio(rw):~# mpd -V
Music Player Daemon 0.19.19-dsd

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008-2014 Max Kellermann <max@duempel.org>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Database plugins:
 simple proxy upnp

Storage plugins:
 local smbclient nfs

Neighbor plugins:
 smbclient upnp

Decoders plugins:
 [mad] mp3 mp2
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [faad] aac
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
 [pcm]

Output plugins:
 null fifo pipe alsa jack httpd

Encoder plugins:
 null vorbis wave flac

Input plugins:
 file alsa curl ffmpeg smbclient nfs mms

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud cue embcue

Protocols:
 file:// http:// https:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// smb:// nfs:// alsa://


Is this right?
DomieMic65
 
Posts: 41
Joined: 12 Feb 2017, 21:04

Re: Tweaking the audio performance Rpi3

Postby DomieMic65 » 02 Apr 2017, 18:16

finally managed to install MPD 0.20.6 to Rune and now..
Code: Select all
Apr 02 18:31 : decoder: audio_format=44100:16:2, seekable=true
Apr 02 18:31 : alsa_output: opened hw:0,0 type=HW
Apr 02 18:31 : alsa_output: buffer: size=90..131072 time=255..371520
Apr 02 18:31 : alsa_output: period: size=45..65536 time=127..185760
Apr 02 18:31 : alsa_output: default period_time = buffer_time/4 = 371519/4 = 92879
Apr 02 18:31 : alsa_output: format=S32_LE (Signed 32 bit Little Endian)
Apr 02 18:31 : alsa_output: buffer_size=131072 period_size=32768
Apr 02 18:31 : output: opened plugin=alsa name="Evo Dac Two" audio_format=352800:32:2
Apr 02 18:31 : soxr: soxr engine 'double-precision'
Apr 02 18:31 : soxr: samplerate conversion ratio to 8.00
Apr 02 18:31 : output: converting in=44100:16:2 -> f=44100:16:2 ->out=352800:32:2


with the core 3 running MPD at about 25-30% load

Code: Select all
root@runeaudio(rw):~# top
top - 20:14:12 up 1 day,  2:47,  1 user,  load average: 0.35, 0.30, 0.28
Tasks: 138 total,   1 running, 137 sleeping,   0 stopped,   0 zombie
%Cpu0  :   1.5/1.5     3[||                                                                                                  ]
%Cpu1  :   0.6/0.0     1[|                                                                                                   ]
%Cpu2  :   0.6/0.0     1[|                                                                                                   ]
%Cpu3  :  23.4/0.0    23[|||||||||||||||||||||||                                                                             ]
GiB Mem : 19.0/0.947    [                                                                                                    ]
GiB Swap:  0.0/0.000    [                                                                                                    ]
DomieMic65
 
Posts: 41
Joined: 12 Feb 2017, 21:04

Re: Tweaking the audio performance Rpi3

Postby Kilgore » 05 Apr 2017, 04:53

Discovery wrote:Hi nzlowie,

There's more to good sound quality than just being bit-perfect - If that's all it took, all bit-perfect DAC streamers would sound identical, wouldn't they...?

The more subtle effects start with jitter, and other artifacts in the signal that influence the outcome.

Trevor


I also wonder about nzlowie's question.

When discussing effects and improvements I think we must make a distinction between output via s/pdif and USB. With USB there is a conversion step at both ends....first in the Pi and the second in the DAC. This is not the case with the coax s/pdif output. It is possible that many of the suggested tweaks overcome the shortcomings of using USB for transmission. I'm only guessing, but I expect that many (most?) users with external DACs are using USB. Not many users state this, but I guess if they are using a digi+ they would say so.

I have a digi+ and I will be using some of the tweaks, but mainly those around underclocking and voltage lowering. It gets mighty hot here in summer so I am hoping that I can reduce the power requirements and lower the operating temperature of my rig in order to avoid over heating issues.
[Rune 0.4 Beta / Rasbperry Pi 3 / Pi 7" touch screen / HiFi Digi+ Pro / Optical / Schiit Bifrost MB]
User avatar
Kilgore
 
Posts: 70
Joined: 05 Mar 2014, 06:05
Location: Melbourne

Re: Tweaking the audio performance Rpi3

Postby andrea » 15 Jun 2017, 10:22

Hi,
I'm newbie Rune user.
I applied all changes in this thread to improve sound quality and actually improved a lot!!
One thing I do not understand: I seemed to understand that with these settings it was also said to PI to use one CPU (always the same) for the player but, when I look at using CPUs with the top command I see that it is not always the same to have 50-60% of the work, ut it changes continuously. Once it's the cpu0 it soon becomes the cpu3, cpu2, ​​and so on...
I remember that with Moode to always use a cpu there was a parameter in config.tx or cmdline.txt that said something like "cpu_isolate" and also the MPD launch script had a "-c x" parameter (if I do not remember well ) where "x" was the CPU number to use.
Is the behavior that I find normal or have I forgotten something?

My changes are these:

chattr -i /etc/mpd.conf
Nano /etc/mpd.conf
Add this to the active source:
format "192000:24:2"
samplerate_converter "soxr very high"
then :
Chattr +i /etc/mpd.conf

Example Content
audio_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.txt
Rune 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=2

Please 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.txt
N.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=0

Orion 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 20

Also in /var/www/command/orion_optimize.sh
Find 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

User avatar
andrea
 
Posts: 2
Joined: 15 Jun 2017, 10:00

support RuneAudio Donate with PayPal

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 6 guests
cron