Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Groove On wrote:

Pulseaudio and x-runs (red-lines)
It's a good idea to turn off pulseaudio when running Pianoteq. It periodically wakes up and causes repeated/rhythmic x-runs (red-lines) during playback/performance. Here are the commands to turn it off/on.

To STOP Pulseaudio

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service

To START Pulseaudio

systemctl --user start pulseaudio.socket
systemctl --user start pulseaudio.service

I think the same can be done maybe a bit more cleanly using pasuspender.

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Groove On wrote:
kawsy wrote:

I agree, pulse was creating problems right away so I removed it completely, it got added with lightdm, but was removed easily.

That's a good idea to uninstall both pulseaudio and jackd2. Just Pianoteq + ALSA is very stable, especially for a standalone pianoteq sound module.

kawsy wrote:

My limits.conf currently looks like:
@audio   -  rtprio         90
@audio   -  memlock    unlimited
@audio   -  niceness    -10

Do you think rtprio 90 vs 95 makes a difference?

I think we'd have to test an extreme case to see if there's a difference or not. One of those challenging MIDI files played back with a real-time priority (rtprio) of 90 and then 95 and see if there's any effect on the x-runs (red-lines).

kawsy wrote:

I don't have jack installed yet since Pianoteq is the only app I'm running but I also had it my head to use this as a supercollider box, so probably will need to install it soon.

That was the reason I installed jackd - I thought I might want to run another VST, though they are pretty rare right now on ARM computers. Thank you for mentioning Supercollider, it looks interesting.

What I'd really like to find is a good Hammond organ VST for Linux ARM. Pianoteq does a good job covering the Electric Pianos and looks like Organteq could cover the pipe organs. Unfortunately other fun ones like OBxd are currently x86 only. Maybe the Mac moving to ARM will change that, who knows?!

kawsy wrote:

It'll take me a week or so to get the display mount modeled, I need to spend some time actually practicing before Wednesday or my piano teacher is going to be upset with me!

Exactly! This has been an interesting project, but I'll be really glad to get back to worry about harmonies and not config.ini files.

kawsy wrote:

My plan is to remove the sheet music desk and mount the display something like this PunBB bbcode test I'm just going to just use a floor stand behind the piano for sheet music, the box with the n2+ will be velcro'd behind or underneath.

I'm also going to add a power button next to the display.  I'm hoping eventually to do a version with some extra buttons and rotary encoders, like a zynthian type thing.

Nice, definitely a power button. I'm going to design mine to look more like a large upright metronome, so it can sit on the music desk. I with they'd port Zynthian over to the N2+. He has files to re-compile Zynthian using Ubuntu, but I'm gonna leave that for another enterprising person to do I really want to get back to playing the piano!

I think after the initial "prototype" is running solid for awhile, I'll make a more cohesive "Guide".

I've done something very similar using a Teensy LC, two encoders, some resistors and a 16x2 LCD module to play on my Kawai CL35 with headphones.
I haven't polished the code enough to share it (when it started working, I stopped improving it).
Teensy LC  has native USB-MIDI capabilities. I only use it to set volume and change instruments.
Pianoteq runs headlessly on a Odroid XU4, connected to a ESI UDJ6 usb audio interface. If anyone is interested I can give the code (which is far from being optimized but works).
This could give ideas to someone who wants to build something more serious.
(notice I was so lazy I did not want to change the 3D printer filament, the case did not fit, so I cracked it and glued with adhesive tape... and a long list of to do things)

https://i.postimg.cc/SKz5mtft/imagenA.jpg

https://i.postimg.cc/SsFPR7ZQ/imagenB.jpg

https://i.postimg.cc/sgLqdR7h/imagenC.jpg

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

levinite wrote:
Groove On wrote:

Pulseaudio and x-runs (red-lines)
It's a good idea to turn off pulseaudio when running Pianoteq. It periodically wakes up and causes repeated/rhythmic x-runs (red-lines) during playback/performance. Here are the commands to turn it off/on.

To STOP Pulseaudio

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service

To START Pulseaudio

systemctl --user start pulseaudio.socket
systemctl --user start pulseaudio.service

I think the same can be done maybe a bit more cleanly using pasuspender.

I initially tried pasuspender - but pulseaudio still managed to re-start several times. I swear they built it to be immortal! This is on Ubuntu 20.04 so perhaps it works better on other systems.

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

UPDATE: BLE-MIDI
I got MIDI over Bluetooth working with my Roland FP-30, unfortunately, latency in Linux is noticeable. I compared BLE-MIDI latency between my Macbook Air and Odroid N2+ - Apple has done a very good job optimizing BLE-MIDI, and I find it very usable on MacOS and iOS but in the world of Linux, it still needs work.


**********************************************************
To get BLE-MIIDI up and running, here's what to do:
**********************************************************
1. Get a USB-Bluetooth adapter that works with Linux.
Plugable USB 2.0 Bluetooth® Adapter
https://plugable.com/products/usb-bt4le
This one works out of the box with the Odroid N2+. It was around US$15 on Amazon.

2. Get this cable so you can use the USB 2.0 port on the Odroid N2+
Micro USB 2.0 OTG Adapter
https://www.ugreen.com/products/micro-u...pter-cable
USB 3.0 ports can create radio interference with devices running at 2.4Ghz (like Bluetooth and Wifi).

3. Re-compile and re-install BlueZ
Step-by-step instructions: https://tttapa.github.io/Pages/Ubuntu/S...BlueZ.html
The script/instructions reference BlueZ 5.5, you'll need to update that number to whatever the current version is.

Last edited by Groove On (22-03-2021 07:08)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

That's cool Marcos!

1. On the LCD, how are you getting the name of the Pianoteq preset? Is that hard-coded or are you able to pull the information directly from Pianoteq?

2. How is the Teensy LC communicating with the XU4? Is it over USB or something else?

3. For volume changes, are you sending MIDI CC to Pianoteq or are you adjusting the volume on the operating system?

marcos daniel wrote:

I've done something very similar using a Teensy LC, two encoders, some resistors and a 16x2 LCD module to play on my Kawai CL35 with headphones. I haven't polished the code enough to share it (when it started working, I stopped improving it).
Teensy LC  has native USB-MIDI capabilities. I only use it to set volume and change instruments.
Pianoteq runs headlessly on a Odroid XU4, connected to a ESI UDJ6 usb audio interface. If anyone is interested I can give the code (which is far from being optimized but works). This could give ideas to someone who wants to build something more serious.
(notice I was so lazy I did not want to change the 3D printer filament, the case did not fit, so I cracked it and glued with adhesive tape... and a long list of to do things)

https://i.postimg.cc/SKz5mtft/imagenA.jpg

Last edited by Groove On (22-03-2021 07:16)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Hello!

1) I copied every preset name (the ones I have licenced) to the microcontroller, then applied a mask to select the ones I want to appear, there is not feedback from Pianoteq
(for instance, if I want the first three instruments in thde list to appear, the mask is something like 000...000111, I don't remember how many bits I used, but as I only used a MIDI chanel, I can set up to 64 instruments at the same time, if I want to change the presets, I must change the mask and re flash the microcontroller. I calculate the decimal value of the mask on a spreadsheet.

2) USB-MIDI

3) System volume is fixed, I send a controller value assigned to Pianoteq Volume

The microcontroller is able to be programmed as USB-MIDI + Serial at the same time, I planned to do some things over serial (related with CPU energy management), but I did not continue my project, it just works as it is.

Last edited by marcos daniel (22-03-2021 07:17)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

One other question. I remember you re-compiled your Armbian kernel for the XU4 - what changes did you make to the kernel that you found useful?

marcos daniel wrote:

Hello!

1) I copied every preset name (the ones I have licenced) to the microcontroller, then applied a mask to select the ones I want to appear, there is not feedback from Pianoteq
(for instance, if I want the first three instruments in thde list to appear, the mask is something like 000...000111, I don't remember how many bits I used, but as I only used a MIDI chanel, I can set up to 64 instruments at the same time, if I want to change the presets, I must change the mask and re flash the microcontroller.

2) USB-MIDI

3) System volume is fixed, I send a controller value assigned to Pianoteq Volume

The microcontroller is able to be programmed as USB-MIDI + Serial at the same time, I planned to do some things over serial (related with CPU energy management), but I did not continue my project, it just works as it is.

Last edited by Groove On (22-03-2021 07:17)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

I recompiled the Ubuntu kernel following a post in hardkernel forum (it lacks audio over USB by default, or something like that), but at the end of the day, the process was slow, so I migrated to Armbian without further optimization.
My idea was to remove unused modules and options...
Now, the optimizations made are the ones suggested by moddart. The kernel is stock kernel.

Last edited by marcos daniel (22-03-2021 07:24)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

marcos daniel wrote:

I've done something very similar using a Teensy LC, two encoders, some resistors and a 16x2 LCD module to play on my Kawai CL35 with headphones.

So you got me thinking, I have a couple of micro Pro Arduinos that I can use to build a basic MIDI controller for the Pianoteq sound module.

But then I find out, - they’ve ported the Arduino IDE to run directly on the Odroid N2+. I don’t even need a separate micro controller, it runs right on the Odroid. I can connect all the sensors/buttons/actuator directly to the onboard GPIO pins and program it all in one go. It will also give me direct access to the preset list, so maybe I can make a selector with a dynamically generated list.

Urggghh!!! Every time I think I’m out, they drag me back in!!! Here are the details:
1. https://forum.odroid.com/viewtopic.php?t=37713
2. https://magazine.odroid.com/article/ard...wn-oduino/

Last edited by Groove On (22-03-2021 13:22)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

I really like that design marcos, compact and simple operation!  I'd definitely be interested in seeing whatever code you have.

Regarding Arduino IDE running on the N2+ what?! That opens a ton of possibilities. So cool!

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

kawsy wrote:

Regarding Arduino IDE running on the N2+ what?! That opens a ton of possibilities. So cool!

My brain melted just thinking about the possibilities..

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

kawsy wrote:

I really like that design marcos, compact and simple operation!  I'd definitely be interested in seeing whatever code you have.

Regarding Arduino IDE running on the N2+ what?! That opens a ton of possibilities. So cool!

Here you are my code and files... they are all in spanish and not optimized, if you really are interested in building something similar, let me know, since my project is highly undocumented and unfinished, but I don't want to polish it unless someone needs it.

The control changes the the preset, volumen, dynamics, and brightness of instruments.

https://drive.google.com/file/d/1-b0iz3...sp=sharing

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

groovy wrote:

https://i.postimg.cc/sDB3ZZMM/NY-Steinway-D-Player-Clean-defaults-Blues-Demo-Pi400-perf.png

At the same time my Pi400 drives a vncserver and sends the Pianoteq GUI data per WLAN to the client. The interface in the snapshot had been the 48kHz-USB-DAC in a Korg B2,
1000 Hz kernel,
PiOS 64-bit beta,
governor performance,
PTQ Standard v7.2.0.

Have you updated your OS  with “sudo apt update” and “sudo apt full-upgrade”? When I did this Pianoteq became instable when overclocked.
When I reverted back to the August 64bit image with no updates the system became completely stable at 2000MHz.
How has system stability been on your installation? Any issues with spontaneous reboots or Pianoteq freezing, crashing etc

Last edited by kingfisher (26-03-2021 09:25)
Photographer, cyclist (and now self-made livestream and audio tech for small church in Lund Sweden) , ex-pat American from San Diego living in southern Sweden. IG:catchlight.se

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

kingfisher wrote:

Have you updated your OS  with “sudo apt update” and “sudo apt full-upgrade”? When I did this Pianoteq became instable when overclocked.
When I reverted back to the August 64bit image with no updates the system became completely stable at 2000MHz.
How has system stability been on your installation? Any issues with spontaneous reboots or Pianoteq freezing, crashing etc

I installed the Raspberry PiOS 64-bit (it is still beta / unofficial) and upgraded it classically, just because I'm used to it:

* Login to the root prompt with sudo -i
* apt-get update (this just looks for the newest available packages)
* apt-get -s dist-upgrade (just simulate the dist-upgrade and control, what *would* happen)
* apt-get dist-upgrade (finally the real upgrade to the latest package versions)
* reboot (a new kernel-package wants a reboot)
* apt-get autoremove (to uninstall now unused packages)

There is not much on my system, that could become "unstable", because it is a raspian-lite without desktop-environment (just using a vnc-server) and I removed almost everything, that I don't need for Pianoteq on the Pi400.

I just had a known quirk with the button for ON/OFF, everything else is stable here.

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

groovy wrote:
kingfisher wrote:

Have you updated your OS  with “sudo apt update” and “sudo apt full-upgrade”? When I did this Pianoteq became instable when overclocked.
When I reverted back to the August 64bit image with no updates the system became completely stable at 2000MHz.
How has system stability been on your installation? Any issues with spontaneous reboots or Pianoteq freezing, crashing etc

I installed the Raspberry PiOS 64-bit (it is still beta / unofficial) and upgraded it classically, just because I'm used to it:

* Login to the root prompt with sudo -i
* apt-get update (this just looks for the newest available packages)
* apt-get -s dist-upgrade (just simulate the dist-upgrade and control, what *would* happen)
* apt-get dist-upgrade (finally the real upgrade to the latest package versions)
* reboot (a new kernel-package wants a reboot)
* apt-get autoremove (to uninstall now unused packages)

There is not much on my system, that could become "unstable", because it is a raspian-lite without desktop-environment (just using a vnc-server) and I removed almost everything, that I don't need for Pianoteq on the Pi400.

I just had a known quirk with the button for ON/OFF, everything else is stable here.

I have only added Realvnc to my Raspberry but have also installed the HIFIBerry DAC Pro+ XLR hat, but as I said after running update the system was no longer stable when I ran Pianoteq. I installed from scratch twice and had exactly the same effect after running update. After reverting to the non-updated OS Pianoteq could run for hours at a time at 2000Mhz... Maybe it's the HIFIBerry causing the stabilty probs with the updated OS

Last edited by kingfisher (26-03-2021 11:09)
Photographer, cyclist (and now self-made livestream and audio tech for small church in Lund Sweden) , ex-pat American from San Diego living in southern Sweden. IG:catchlight.se

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

I love reading this stuff even though I am clueless ...ha.. You all are great!

Pianoteq 8, most pianos, Studiologic 73 Piano, Casio Px-560M, PX-S 3000, PX-S 1100, PX-S 7000, Mac i27 and MacBook Pro M3, SS Logic SSL 2

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Hi,

I use also a PiOS64 bit (2Ghz no fan, IQaudio DAC+) with RealVNC. I also tried an update, but beware. I'm running now the orig. PiOS Image witout
any update and it works without problems since weeks!

Rainer

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Groove On wrote:

SOME CONCLUSIONS

- The performance of Pianoteq on the Odroid N2+ comes mainly from the stability of the Performance Index (approx. 34),

I've noticed this, too. Pianoteq likes a STABLE performance index, not one that fluctuates broadly.

which is achieved by assigning the 4 high-performance cores to Pianoteq (taskset command). So, if a note can be played by the N2+, it will most likely be played. Without core assignment, the wild fluctuations drop the performance drastically and general performance is poor. If you take a look at some of the Musical Stress Tests, you'll see that the N2+ Performance Index is generally rock-solid.

I wonder if you get the same/similar performance simply by changing CPU governor to "performance" mode? Or what happens when you do both (performance + assign task to specific cores)?

It also sounds similar to effects of threaded priorities. I like the idea of dedicating cores to OS and dedicating cores to audio tasks, though...

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

ethanay wrote:

I've noticed this, too. Pianoteq likes a STABLE performance index, not one that fluctuates broadly.

Yes, my guess is that the performance of a single-core gives you the BASE Performance Index, while multiple cores gives you a more STABLE Performance Index. I tried this on the Odroid N2+ assigning 1 then 2 then 3 and 4 cores, it was much easier to break the Performance Index with less cores. Modartt did a good job with the multi-threading, as long the OS scheduler is working well, the threads spread across the cores very nicely.

One caveat - I tried assigning 5x cores to Pianoteq (1x low-performance and 4x high-performance) - and that made the PI very un-stable. It seems switching back and forth between the low/high performance cores makes the Performance Index more fragile.

The best of course is a high (single-core) performance index with 4 or more cores. I wonder if 6x or more cores will stabilize it even more. How effective is the multi-threading over 4x cores?

Last edited by Groove On (09-04-2021 06:16)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

ethanay wrote:

I wonder if you get the same/similar performance simply by changing CPU governor to "performance" mode? Or what happens when you do both (performance + assign task to specific cores)?

The default on Ubuntu for the Odroid N2+ is to have all CPUs set to 'Performance' - the only thing I did was assign the 4x high-performance cores, so that's about as good as it's gonna get. (I'm not keen on over-clocking).

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

This is a version 1.0 "garage build" case design. I like the idea of using wood, since it's supposed to be a "piano sound module". Will probably angle the top and add an eye-catching wood finish (like a guitar-style finish). The back and front covers will be 50's retro-style speaker grill/cloth. Touchscreen makes its very user-friendly, though if I ever upgrade this, I'll probably get a bigger screen. I will add the U-He synths to round out the sounds - since they support Linux ARM. Just missing a decent Hammond organ VST on Linux ARM <SIGH>.

Otherwise - functionally, this pianoteq sound module works great - just turn it on and start playing. Everything is off-the-shelf, nothing fancy going on here. After adding the touchscreen, total cost is under US$200 (minus my sweat and effort).

Touchscreen with Pianoteq
https://i.ibb.co/Z1CnLfV/IMG-5209-1.jpg

Overview
https://i.ibb.co/RcFPNLt/IMG-5190-1.jpg

FRONT (eventually covered with speaker grill/cloth) - that is the Odroid N2+ sitting inside.
https://i.ibb.co/b54NtZF/IMG-5247-1.jpg

BACK (eventually covered with speaker grill/cloth) - currently 3 cables: power, USB MIDI, and 3.5mm audio out
https://i.ibb.co/301BC6Z/IMG-5200-1.jpg

TOP - touchscreen (perhaps a sunburst guitar-style finish?)
https://i.ibb.co/NWgSfFD/IMG-5245-1.jpg

Touchscreen
https://i.ibb.co/1Z8Gk2C/IMG-5249-1.jpg

Last edited by Groove On (14-04-2021 16:07)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Cool module!

How is the touchscreen connected? HDMI?
Do you use one single powersupply for the Odroid + screen and what are its specs?

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

groovy wrote:

Cool module!

How is the touchscreen connected? HDMI?
Do you use one single powersupply for the Odroid + screen and what are its specs?

Thanks.

Touchscreen is connected with HDMI and USB cables. It gets power over USB, so only the Odroid power supply is needed. The touchscreen has a 2nd USB power port, but not it’s not needed in this case.

Here are the technical Specs:

https://www.hardkernel.com/shop/odroid-...apability/
5-inch TFT-LCD
800 x 480pixels hardware resolution, configurable by software (up to 1920×1080)
5 finger capacitive touch input (USB ID 16B4:0705)
Power consumption : 500 mA / 5 Volt
Power on/off tact switch
3.5mm audio jack and differential L/R speaker port to support HDMI audio output
OSD menu supports with buttons for power management, brightness/contrast/volume adjustment, etc.
Viewing angle (in degree) : Left 70, Right 70, Up 70, Down 50
Screen Dimensions : 121 x 93.31 x 15 mm Including switch and connectors)
Viewable screen size : 108 x 64 mm (active area)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Ahh, HDMI and USB, thank you!
And good to know, that just a single power supply is needed.

But a little misunderstandig, I asked for the specs of the PS. I heard the N2+ wants a 2 A better 3 A PS. Together with 0.5 A for the touchscreen - does it still work with 2 A in your setup?

Last edited by groovy (15-04-2021 07:33)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

groovy wrote:

I heard the N2+ wants a 2 A better 3 A PS. Together with 0.5 A for the touchscreen - does it still work with 2 A in your setup?

I'm using the 12V/2A power supply. Right now the power supply is running the Odroid N2+, the fan, and touchscreen. Everything seems to be functioning properly. But it's a good point, I wonder what will happen if I use an external audio interface?

Power supply specs:
https://www.hardkernel.com/shop/12v-2a-...y-us-plug/

Last edited by Groove On (15-04-2021 09:53)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

I think the 12V/2A power supply is enough, let me know if my math is off:
--- --- ---
Power Supply gives 24 Watts (12V x 2A)
--- --- ---
1. Touchscreen draws 2.5 Watts (5V x 0.5A)
2. Odroid N2+ under stress:
-  uses 5.9W (@2016/2208MHz)
-  uses 6.2W (@2016/2400MHz)
3. Fan draws 0.9 Watts (5V x 0.18A)

TOTAL draw = 15.5 out of 24 Watts (headroom of 8.5 watts)

ADD Audio Interface 2.5 Watts (5V x 0.5A)
... there's enough wattage left to add a 2nd MIDI controller, keyboard, mouse etc. ...

Last edited by Groove On (15-04-2021 10:34)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

marcos daniel wrote:

On a Odroid XU4, I get better performance using Armbian instead of Ubuntu. I don't know if this is extensible to the N2+.

Indeed with Armbian Buster the N2+ has a slightly higher Performance index (37). Reason could be, that the CPU freq is a bit higher by default:

https://i.postimg.cc/y6m1NSyL/Armbian-Buster-current-minimal-perf-index.png

Quicktest in this example with:

- Odroid N2+
- Armbian (Buster, minimal (without desktop)
- governor performance
- Remote GUI per ssh -X
- taskset -c 2,3,4,5 ./Pianoteq\ 7/arm-64bit/Pianoteq\ 7
- system timer : 4000.000us
- NY Steinway D Prelude, Pianoteq 7.3.0 Trial

Alas I don't know, how to set the output to analog stereo. At the moment HDMI or SPDIF seems to be the default. There are over 50 generic/cryptic items shown in alsamixer - no chance. Attached is the output of amixer, if you want to get an idea of all that fancy options If decoded, analog would work like a charm , I'm sure.

Simple mixer control 'ACODEC',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 0 [0%] [-99999.99dB] [on]
  Front Right: Playback 0 [0%] [-99999.99dB] [on]
Simple mixer control 'ACODEC Left DAC Sel',0
  Capabilities: enum
  Items: 'Left' 'Right'
  Item0: 'Left'
Simple mixer control 'ACODEC Mute Ramp',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'ACODEC Playback Channel Mode',0
  Capabilities: enum
  Items: 'Stereo' 'Mono'
  Item0: 'Stereo'
Simple mixer control 'ACODEC Ramp Rate',0
  Capabilities: enum
  Items: 'Fast' 'Slow'
  Item0: 'Fast'
Simple mixer control 'ACODEC Right DAC Sel',0
  Capabilities: enum
  Items: 'Right' 'Left'
  Item0: 'Right'
Simple mixer control 'ACODEC Unmute Ramp',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_A SINK 1 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 1'
Simple mixer control 'FRDDR_A SINK 2 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_A SINK 3 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_A SRC 1 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'FRDDR_A SRC 2 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_A SRC 3 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_B SINK 1 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 3'
Simple mixer control 'FRDDR_B SINK 2 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_B SINK 3 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_B SRC 1 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'FRDDR_B SRC 2 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_B SRC 3 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_C SINK 1 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_C SINK 2 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_C SINK 3 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_C SRC 1 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_C SRC 2 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_C SRC 3 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'TDMIN_A SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7' 'IN 8' 'IN 9' 'IN 10' 'IN 11' 'IN 12' 'IN 13' 'IN 14' 'IN 15'
  Item0: 'IN 0'
Simple mixer control 'TDMIN_B SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7' 'IN 8' 'IN 9' 'IN 10' 'IN 11' 'IN 12' 'IN 13' 'IN 14' 'IN 15'
  Item0: 'IN 0'
Simple mixer control 'TDMIN_C SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7' 'IN 8' 'IN 9' 'IN 10' 'IN 11' 'IN 12' 'IN 13' 'IN 14' 'IN 15'
  Item0: 'IN 0'
Simple mixer control 'TDMIN_LB SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7' 'IN 8' 'IN 9' 'IN 10' 'IN 11' 'IN 12' 'IN 13' 'IN 14' 'IN 15'
  Item0: 'IN 0'
Simple mixer control 'TDMOUT_B Gain Enable',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'TDMOUT_B Lane 0',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_B Lane 1',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_B Lane 2',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_B Lane 3',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_B SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2'
  Item0: 'IN 0'
Simple mixer control 'TDMOUT_C Gain Enable',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'TDMOUT_C Lane 0',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_C Lane 1',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_C Lane 2',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_C Lane 3',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_C SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2'
  Item0: 'IN 0'
Simple mixer control 'TOACODEC Lane Select',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 0 [0%]
Simple mixer control 'TOACODEC OUT EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'TOACODEC SRC',0
  Capabilities: enum
  Items: 'I2S A' 'I2S B' 'I2S C'
  Item0: 'I2S A'
Simple mixer control 'TODDR_A SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7'
  Item0: 'IN 0'
Simple mixer control 'TODDR_B SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7'
  Item0: 'IN 0'
Simple mixer control 'TODDR_C SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7'
  Item0: 'IN 0'
Simple mixer control 'TOHDMITX',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'TOHDMITX I2S SRC',0
  Capabilities: enum
  Items: 'I2S A' 'I2S B' 'I2S C'
  Item0: 'I2S B'
Simple mixer control 'TOHDMITX SPDIF SRC',0
  Capabilities: enum
  Items: 'SPDIF A' 'SPDIF B'
  Item0: 'SPDIF A'

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Is the overclocked CPU the reason for the Performance Index of 37? Are you getting lower performance outside of Armbian?

For comparison, here is the default CPU speed on Odroid N2+
https://i.ibb.co/TvmqM4p/INT48k64samples-2.png

groovy wrote:

... with Armbian Buster the N2+ has a slightly higher Performance index (37). Reason could be, that the CPU freq is a bit higher by default:

https://i.postimg.cc/y6m1NSyL/Armbian-Buster-current-minimal-perf-index.png

Last edited by Groove On (19-04-2021 07:04)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

I think so. But I had nothing to do, it is Armbian out of the box.
With Ubuntu (minimal) I had the common Perf index 34 on that SBC.

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Although the performance of Armbian Buster_current on the Odroid N2+ is great, the analog stereo support is still in development as it seems.

So I went back one release to Armbian Buster_legacy, which has the older kernel (4.9.y instead of 5.10.y). Audio works out of the box, default is Analog Stereo at the 3.5mm jack (TRS).

The default settings in the alsamixer are reasonable, advanced features like EQ, Noisegate, DRC and so on are disabled.

Cpufreq is 2208 MHz max in this legacy image and Perf index is 34/35 -- all in all very similar to the standard Ubuntu image (same roots in Debian).

Future projects could be
- the compilation of the kernel with Armbian's build system (-> 1000 Hz system timer)
- a native MIDI-Interface at the 4-pin UART (-> USB free)
- a wifi dongle for remote screens (-> tablet/smartphone/PC)

Just in reference to my recent post ... this is the amixer output of the Buster_legacy image:

Simple mixer control 'I2SIn CLK',0
  Capabilities: enum
  Items: '0' '3000000' '6000000' '12000000'
  Item0: '0'
Simple mixer control 'Audio In Source',0
  Capabilities: enum
  Items: 'TDMIN_A' 'TDMIN_B' 'TDMIN_C' 'SPDIFIN' 'PDMIN' 'FRATV' 'TDMIN_LB' 'LOOPBACK_A' 'FRHDMIRX' 'LOOPBACK_B' 'SPDIFIN_LB' 'EARCRX_DMAC' 'RESERVED_0' 'RESERVED_1' 'RESERVED_2' 'VAD'
  Item0: 'TDMIN_A'
Simple mixer control 'Audio Out Sink',0
  Capabilities: enum
  Items: 'TDMIN_A' 'TDMIN_B' 'TDMIN_C' 'SPDIFIN' 'PDMIN' 'FRATV' 'TDMIN_LB' 'LOOPBACK_A' 'FRHDMIRX' 'LOOPBACK_B' 'SPDIFIN_LB' 'EARCRX_DMAC' 'RESERVED_0' 'RESERVED_1' 'RESERVED_2' 'VAD'
  Item0: 'TDMIN_A'
Simple mixer control 'Audio hdmi-out mute',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Audio spdif format',0
  Capabilities: enum
  Items: '2 CH PCM' 'DTS RAW Mode' 'Dolby Digital' 'DTS' 'DD+' 'DTS-HD' 'Multi-channel LPCM' 'TrueHD' 'DTS-HD MA' 'HIGH SR Stereo LPCM'
  Item0: '2 CH PCM'
Simple mixer control 'Audio spdif mute',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Audio spdifin source',0
  Capabilities: enum
  Items: 'spdifin pad' 'spdifout' 'N/A' 'HDMIRX'
  Item0: 'spdifin pad'
Simple mixer control 'DAC Digital',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 254
  Mono:
  Front Left: Playback 251 [99%] [-11.25dB]
  Front Right: Playback 251 [99%] [-11.25dB]
Simple mixer control 'DAC Extra Digital Gain',0
  Capabilities: enum
  Items: '0dB' '6dB' '12dB' '18dB'
  Item0: '0dB'
Simple mixer control 'DRC enable',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'EQ Volume Pos',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 1
  Mono: 0 [0%]
Simple mixer control 'EQ ch1 volume',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 255
  Mono: 207 [81%]
Simple mixer control 'EQ ch2 volume',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 255
  Mono: 207 [81%]
Simple mixer control 'EQ enable',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'EQ master volume',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 1023
  Mono: 831 [81%]
Simple mixer control 'EQ master volume mute',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'EQ/DRC Channel Mask',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 255
  Mono: 3 [1%]
Simple mixer control 'EQ/DRC Lane Mask',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 1 [7%]
Simple mixer control 'EQ/DRC Req Module',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 1 [14%]
Simple mixer control 'LINE_OUT mute',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'NG counter thd',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 65535
  Mono: 2048 [3%]
Simple mixer control 'NG enable',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'NG noise thd',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 32767
  Mono: 0 [0%]
Simple mixer control 'NG signal thd',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 32767
  Mono: 0 [0%]
Simple mixer control 'SPDIFIN Audio Type',0
  Capabilities: enum
  Items: 'LPCM' 'AC3' 'EAC3' 'DTS' 'DTS-HD' 'TRUEHD' 'PAUSE'
  Item0: 'LPCM'
Simple mixer control 'SPDIFIN audio samplerate',0
  Capabilities: enum
  Items: 'N/A' '32000' '44100' '48000' '88200' '96000' '176400' '192000'
  Item0: 'N/A'
Simple mixer control 'audio inskew set',0
  Capabilities: enum
  Items: '0' '1' '2' '3' '4' '5' '6'
  Item0: '0'
Simple mixer control 'audio locker enable',0
  Capabilities: enum
  Items: 'Disable' 'Enable'
  Item0: 'Disable'
Simple mixer control 'tdmout_c binv set',0
  Capabilities: enum
  Items: '0' '1'
  Item0: '0'

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Thanks for sharing!

I'm wondering if you are really routing audio through ALSA? My experience from Raspis (currently 4B slightly overclocked) is that there is a huge performance improvement when using an external DAC and setting Pianoteq to "Direct hardware device without any conversions" (or the oppositve is the case, when using the Raspi's internal headphone jack the whole thing gets unplayable).

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Hello eriks,

one advantage of the Odroid N2+ is, that it has a dedicated soundchip onboard, connected via I2S bus. A Raspberry Pi hasn't, it only "emulates" digital audio with PWM (pulse width modulation). That's one reason, why most are using USB-Audio or heads. Another is, that the generic usb-audio driver is usually supported. But USB adds latency and has to share ressources with other devices on the USB-host. At least it is one more external device.

That ALSA generally works with the N2+ shows the legacy OS image from hardkernel.com. These OS images depend on the boardmaker and their cooperation with the hardware suppliers. They want to sell a usable board at some point in time.

But the mainline linux-kernel develops in the meantime and often is far ahead of those legacy "snapshots". When hardware suppliers, like AMLogic (soundchip), do not keep track or publish ALSA settings to the open source community, regression is possible. I guess this is what happens at the moment with the Odroid N2+.

With a little luck onboard analog stereo of the Odroid N2+ can be reanimated by reverse-engineering in the *newer* mainline images, like Armbian current ...

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Finally found a solution!

The second of the three audio devices of the Odroid N2+ is the analog stereo output. This can be set to default by creating an /etc/asound.conf with

pcm.!default {
        type plug
        slave {
        pcm "hw:0,1"
        }
}

(https://wiki.odroid.com/odroid-n2/appli...note/sound)

But as mentioned in my previous posts the mixer settings to enable the analog channels are not specified and very obscure.

I could only find a few potential value mappings in the internet at ...
https://github.com/tobetter/odroid-alsa...a.postinst
...
and set them in the alsamixer.

I could not find all value pairs in the mixer, for example "amixer sset 'SPDIFOUT SRC SEL' 'IN 2' || true" did not exist.

But to my big surprise analog audio works with that subset of mixer settings!

SD-card image is the current Armbian Buster with 2.4 GHz.

Here is a copy of my amixer output:

Simple mixer control 'ACODEC',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 222 [87%] [-12.33dB] [on]
  Front Right: Playback 222 [87%] [-12.33dB] [on]
Simple mixer control 'ACODEC Left DAC Sel',0
  Capabilities: enum
  Items: 'Left' 'Right'
  Item0: 'Left'
Simple mixer control 'ACODEC Mute Ramp',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'ACODEC Playback Channel Mode',0
  Capabilities: enum
  Items: 'Stereo' 'Mono'
  Item0: 'Stereo'
Simple mixer control 'ACODEC Ramp Rate',0
  Capabilities: enum
  Items: 'Fast' 'Slow'
  Item0: 'Fast'
Simple mixer control 'ACODEC Right DAC Sel',0
  Capabilities: enum
  Items: 'Right' 'Left'
  Item0: 'Right'
Simple mixer control 'ACODEC Unmute Ramp',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_A SINK 1 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 1'
Simple mixer control 'FRDDR_A SINK 2 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_A SINK 3 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_A SRC 1 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'FRDDR_A SRC 2 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_A SRC 3 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_B SINK 1 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 2'
Simple mixer control 'FRDDR_B SINK 2 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_B SINK 3 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_B SRC 1 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'FRDDR_B SRC 2 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_B SRC 3 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_C SINK 1 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 3'
Simple mixer control 'FRDDR_C SINK 2 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_C SINK 3 SEL',0
  Capabilities: enum
  Items: 'OUT 0' 'OUT 1' 'OUT 2' 'OUT 3' 'OUT 4' 'OUT 5' 'OUT 6' 'OUT 7'
  Item0: 'OUT 0'
Simple mixer control 'FRDDR_C SRC 1 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'FRDDR_C SRC 2 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FRDDR_C SRC 3 EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'TDMIN_A SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7' 'IN 8' 'IN 9' 'IN 10' 'IN 11' 'IN 12' 'IN 13' 'IN 14' 'IN 15'
  Item0: 'IN 0'
Simple mixer control 'TDMIN_B SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7' 'IN 8' 'IN 9' 'IN 10' 'IN 11' 'IN 12' 'IN 13' 'IN 14' 'IN 15'
  Item0: 'IN 0'
Simple mixer control 'TDMIN_C SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7' 'IN 8' 'IN 9' 'IN 10' 'IN 11' 'IN 12' 'IN 13' 'IN 14' 'IN 15'
  Item0: 'IN 0'
Simple mixer control 'TDMIN_LB SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7' 'IN 8' 'IN 9' 'IN 10' 'IN 11' 'IN 12' 'IN 13' 'IN 14' 'IN 15'
  Item0: 'IN 0'
Simple mixer control 'TDMOUT_B Gain Enable',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'TDMOUT_B Lane 0',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_B Lane 1',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_B Lane 2',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_B Lane 3',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_B SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2'
  Item0: 'IN 0'
Simple mixer control 'TDMOUT_C Gain Enable',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'TDMOUT_C Lane 0',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_C Lane 1',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_C Lane 2',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_C Lane 3',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'TDMOUT_C SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2'
  Item0: 'IN 1'
Simple mixer control 'TOACODEC Lane Select',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 0 [0%]
Simple mixer control 'TOACODEC OUT EN',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'TOACODEC SRC',0
  Capabilities: enum
  Items: 'I2S A' 'I2S B' 'I2S C'
  Item0: 'I2S C'
Simple mixer control 'TODDR_A SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7'
  Item0: 'IN 0'
Simple mixer control 'TODDR_B SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7'
  Item0: 'IN 0'
Simple mixer control 'TODDR_C SRC SEL',0
  Capabilities: enum
  Items: 'IN 0' 'IN 1' 'IN 2' 'IN 3' 'IN 4' 'IN 5' 'IN 6' 'IN 7'
  Item0: 'IN 0'
Simple mixer control 'TOHDMITX',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'TOHDMITX I2S SRC',0
  Capabilities: enum
  Items: 'I2S A' 'I2S B' 'I2S C'
  Item0: 'I2S B'
Simple mixer control 'TOHDMITX SPDIF SRC',0
  Capabilities: enum
  Items: 'SPDIF A' 'SPDIF B'
  Item0: 'SPDIF A'

After all that ugly code one foto of the material world, Odroid N2+ and the nice little headphone amp Fiio E5:
https://i.postimg.cc/rwNh0s2M/Odroid-N2-plus-Fiio-E5.jpg

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Nice job! This a big help in getting the audio up and running on other Linux distributions.

groovy wrote:

Finally found a solution!

The second of the three audio devices of the Odroid N2+ is the analog stereo output. This can be set to default by creating an /etc/asound.conf with

pcm.!default {
        type plug
        slave {
        pcm "hw:0,1"
        }
}
Last edited by Groove On (24-04-2021 08:42)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Thank you,

I hope this (obscure) workaround helps until
hardkernel.com and Amlogic contribute with human readable alsamixer settings in the mainline kernel. They could sell much more of their nice boards -- with a "Rosetta stone" available.

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

I have a kernel with 1000 Hz system timer under Armbian Buster now.
There seem to be several ways, in short the way I have chosen: Build a complete (minimal) SD-card image inclusive the modified kernel option and copy (dd) the image to a new SD-card.

At least it was just running the interactive script ./compile.sh mentioned on the homepage:
https://docs.armbian.com/Developer-Guid...eparation/

My native build environment was an INTEL i3 laptop with Debian Buster (that I already had used for the compilation of a Raspberry Pi image in the past), so it is a "cross-compilation" for ARM.

Everything works as expected and the CPU on the Odroid N2+ is so powerful, that I don't see any performance drop by the now higher 1 ms resolution.

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

groovy wrote:

I have a kernel with 1000 Hz system timer under Armbian Buster now.

... Everything works as expected and the CPU on the Odroid N2+ is so powerful, that I don't see any performance drop by the now higher 1 ms resolution.

That is very encouraging. Based on your efforts and Marcos Daniel, I tried Armbian again, (Focal XFCE version).

- I do also feel Armbian runs more cleanly than Ubuntu from Hard Kernel. I will switch over to Armbian since I feel it offers more out-of-the-box performance benefits for running Pianoteq - with the analog 3.5mm out and 1000Hz system timer being the main issues.

- overclocking the CPU to 2.4Ghz with armbian-config was painless. performance index is now 37, up from 34 - and armbian-config also let me un-install extra programs I didn’t need.

- I tried running Pianoteq with and without taskset. The Armbian CPU scheduler is much better behaved with 6-cores giving a steady performance index of 37, none of the wild performance index fluctuations of Ubuntu. I feel that assigning the 4x high-performance cores still lowers the audio load slightly, but the difference between assigning 4x high-performance or a mix 6x high/low performance cores is now very minimal.

- Additionally, I wonder if running all 6x cores, slightly increases the audio load, but, makes the Performance Index more stable?

- another benefit of Armbian - it basically runs read-only. I find myself switching my “Pianoteq Sound Module” on/off like any other audio hardware or appliance, so read-only was on my to-do list to make sure that the OS didn’t get corrupted.

- There is also an armbian-config setting to run Armbian completely read-only, but I still have to test the setting to see if it will let Pianoteq save changes. Otherwise, by default, Armbian runs “mostly” read-only, which is pretty good already.

- The XFCE desktop is more touchscreen friendly I can easily setup shortcuts on the desktop to run scripts for troubleshooting, and even better, I can setup script to re-launch Pianoteq with different configurations.

- The JACK sound server also ran much more smoothly on Armbian. I mainly use ALSA with Pianoteq, but I want JACK configured in case I want to record in Reaper. I didn’t feel comfortable doing this in Ubuntu, but I feel more confident in the stability/responsiveness of Armbian. I tested JACK through HDMI audio and played some demanding pieces for around 15 minutes (actual playing not MIDI files), normally I’d get a few x-runs in Ubuntu, but zero x-runs on Armbian!

- the default PulseAudio settings in Armbian are also very “quiet”. I didn’t notice any of the common PulseAudio glitches from Ubuntu. I’m still disablingPulseAudio on startup, but it’s nice that it’s setup for minimal fuss.

- USB latency seems the same between Ubuntu and Armbian, but I’m noticing more and more, the N2+ onboard sound chip has much less latency than my USB audio interfaces. And while the USB audio interfaces are very usable, but I find myself gravitating towards playing thru the onboard sound - (unlike the Raspberry Pi which is in the opposite situation).

Re: 3.5mm analog audio and 1000Hz system timer
I still need to do the technical deep dive to get these two features working, but they’re next on my list. Additionally, I'd like to lower the "connection interval" for MIDI over Bluetooth (BLE-MIDI).

Wish List:
- Real-Time Kernel (not just real-time scheduling) - it probably won’t make a difference for everyday playing, but I want to see if we get better performance/stability in extreme cases (e.g. demanding pieces where polyphony soars above 128, heavy presets with extra mics, f/x and heavy pedaling). - and most of all, eliminating x-runs.

- In the long run, maybe create an Armbian-Pianoteq distribution image, with all these optimizations baked in.

Last edited by Groove On (29-04-2021 04:03)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

So I got the 3.5mm audio jack working, thanks to groovy's find/instructions above, but it's really annoying that I don't understand 'WHY' it worked Initially, under ALSA, I could not select the 3.5mm audio jack in Pianoteq (listed as device #2), afterwards it was available. Looks like the amixer Simple Control for the 3.5mm audio jack is called 'ACODEC'.

Note: 1. it didn't enable SPDIF audio 2. JACK audio server still only outputs to HDMI audio - but at least we're one step closer to getting it all working!

For posterity:

1. Edit /etc/asound.conf with

pcm.!default {
        type plug
        slave {
        pcm "hw:0,1"
        }
}

2. Run the following command lines in a shell script.

amixer sset 'FRDDR_A SINK 1 SEL' 'OUT 1' || true
amixer sset 'FRDDR_A SRC 1 EN' 'on' || true
amixer sset 'TDMOUT_B SRC SEL' 'IN 0' || true
amixer sset 'TOHDMITX I2S SRC' 'I2S B' || true
amixer sset 'TOHDMITX' 'on' || true

amixer sset 'FRDDR_B SINK 1 SEL' 'OUT 2' || true
amixer sset 'FRDDR_B SRC 1 EN' 'on' || true
amixer sset 'TDMOUT_C SRC SEL' 'IN 1' || true
amixer sset 'TOACODEC SRC' 'I2S C' || true
amixer sset 'TOACODEC OUT EN' 'on' || true
amixer sset 'TOACODEC Lane Select' '0' || true
amixer sset 'ACODEC' '255'

amixer sset 'FRDDR_C SINK 1 SEL' 'OUT 3' || true
amixer sset 'FRDDR_C SRC 1 EN' 'on' || true
amixer sset 'SPDIFOUT SRC SEL' 'IN 2' || true

alsactl store
Last edited by Groove On (29-04-2021 06:22)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Hello,
have been busy too

Inspired by the work of forum user Neo -- Kudos to you! -- I tried to use the serial port (UART) of the Odroid N2+ for MIDI input. A few things have changed from N2 to N2+ and from the legacy to a mainline OS. Took a while to find out, that the serial port is /dev/ttyAML1 now. Persistent is the old problem, that 31250 baud for MIDI is not easy selectable, just the classical rates like 9600, 19200, 38400, 57600 and so on are supported.

I had to find and hack the source code "meson_uart.c" of the driver, that (brute)forces it to clock with 31250 Hz whenever 38400 is selected. I have absolutely no plan of coding in C and was just damn lucky that my small modification works

Now a MIDI break-out-box (with an opto-coupler) can be connected with pin 10 (RX) of the N2+. On the foto you can see my Adafruit MIDI FeatherWing on the left side:

https://i.postimg.cc/t7Q1y56F/Adafruit-MIDI-Breakout-Box-with-Odroid-N2.jpg

The glue between the classic serial MIDI data and ALSA is the small program ttymidi. Once it is listening on /dev/ttyAML1 a new midi input in Pianoteq appears.

My first test with a MIDI sequencer as source has been successful, Pianoteq replayed everything like a clockwork.

At the moment I see it more than a feasibility-study, because it is a bit overcomplicated to enable 31250 baud. But if you just want to configure it once and then fire-up-and-forget, it is already wonderful and "wirespeed" ...

Last edited by groovy (01-05-2021 19:18)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Wow that's fantastic - Atari level MIDI latency, might be doable on the N2+!

groovy wrote:

Inspired by the work of forum user Neo -- Kudos to you! -- I tried to use the serial port (UART) of the Odroid N2+ for MIDI input. A few things have changed from N2 to N2+ and from the legacy to a mainline OS. Took a while to find out, that the serial port is /dev/ttyAML1 now. Persistent is the old problem, that 31250 baud for MIDI is not easy selectable, just the classical rates like 9600, 19200, 38400, 57600 and so on are supported.

I had to find and hack the source code "meson_uart.c" of the driver, that (brute)forces it to clock with 31250 Hz whenever 38400 is selected. I have absolutely no plan of coding in C and was just damn lucky that my small modification works

Now a MIDI break-out-box (with an opto-coupler) can be connected with pin 10 (RX) of the N2+. On the foto you can see my Adafruit MIDI FeatherWing on the left side:

https://i.postimg.cc/t7Q1y56F/Adafruit-MIDI-Breakout-Box-with-Odroid-N2.jpg

The glue between the classic serial MIDI data and ALSA is the small program ttymidi. Once it is listening on /dev/ttyAML1 a new midi input in Pianoteq appears ... if you just want to configure it once and then fire-up-and-forget, it is already wonderful and "wirespeed" ...

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

I'm still plugging away at the ALSA sound configuration on Armbian. It's basically working, it's still a bit squishy on the back-end.

1. JACK (specifically the GUI - Qjackctl) - doesn't see the analog 3.5mm jack, it defaults to HDMI audio. I was able to use Ubuntu Studio Controls as a workaround. It may be a good replacement as a JACK GUI and it does some other useful audio things. Mainly, it can configure/start/stop JACK - and most importantly it can see the 3.5mm audio jack and tell JACK to use it on startup.

This is the install command for Ubuntu Studio Controls. please note: only works on Armbian Focal since it's based on Ubuntu. It does not work on Armbian Buster / Debian.

sudo apt-get install -y ubuntustudio-controls

2. As a baseline audio configuration, I'm trying to match up the Linux audio files between Ubuntu-MATE (Hard Kernel) and Armbian. Most of it seems good to go, it's mainly /etc/asound.conf and the amixer settings that need clarification

/etc/asound.conf
I dropped the working Ubuntu-MATE /etc/asound.conf file into Armbian. It's slightly different, but works fine. The pcm section is for audio playback, the ctl section is for hardware control.

pcm.!default{
    type hw
    card 0
    device 1
}

ctl.!default{
    type hw
    card 0
}

amixer settings
Ubuntu-MATE and Armbian decided to use different names/labels for the amixer controls, so some manual work to get it sorted out. (Interestingly, the amixer names/labels in Armbian match the ones in Manjaro ARM ... but I don't recommend Manjaro ARM, it's very glitchy on many levels and I went running back to Armbian.)

3. Overall Performance
I agree with groovy, there's something more going on with Armbian than just the higher 2.4Ghz overclock. There are performance tweaks in Armbian that make it run smoother.

taskset
I did another MIDI file stress-test and got slightly better performance in Ambian running 6x cores vs. taskset and 4x cores. The Armbian CPU/thread schedule does a very good job across all 6x cores - no large fluctuations, and it seems to give Pianoteq a few extra gears to use on the extreme/demanding parts. So I think in Armbian no need for taskset - just run it straight with all 6x cores.

Last edited by Groove On (02-05-2021 06:26)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Atari

:-) It is an Ataroid.

pcm.!default {
    type hw
    card 0
    device 1
}

ctl.!default {
    type hw
    card 0
}

These settings are equivalent to mine, but I adopt yours now. Better readable and - although there is just one ctl (mixer) on-board - the entry explicitly names and selects it.

taskset
I still have the best results dedicating the 4 big cores to Pianoteq.
(taskset -c 2,3,4,5 ./Pianoteq\ 7/arm-64bit/Pianoteq\ 7)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

groovy wrote:

taskset
I still have the best results dedicating the 4 big cores to Pianoteq.
(taskset -c 2,3,4,5 ./Pianoteq\ 7/arm-64bit/Pianoteq\ 7)

Yes, I do think for general playing, taskset with the 4x high-performance cores does give you better performance, on my system the audio load is slightly lower with taskset enabled. Only under extreme conditions where I forced Pianoteq to crash, did the extra cores come into play - and then it didn't stop Pianoteq crashing, it just crashed "less" with 6x cores vs. 4x cores - (by extreme conditions I mean MAX audio settings, a heavy preset with mics/fx and a wicked MIDI file).

One thing I learned today - NOT TO DO - do not install the Ubuntu Studio Installer (UbuntuStudio-Controls by itself is fine and useful) but the full Ubuntu Studio hosed the audio installation with PulseAudio and all kinds of nonsense running behind the scenes. Urgh.

But because of that I did learn that you can use dd to create an image from an SD card (like a reverse Balena Etcher), so once I've got a 'perfect install' - I'll use dd create a backup image so I can always restore to a clean working state.

One funny thing to try - if you turn off the onscreen keyboard, the Blues Demo should play through with PI of 38 ... so if you want that extra point ...

Last edited by Groove On (02-05-2021 11:27)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

What is the latency of Odroid N2+ with serial MIDI and onboard audio?

I measured the time between the MIDI byte and the analog signal and  found 9.1 ms -->

https://i.postimg.cc/Zn0gvvdc/UART-MIDI-event-Onboard-analog-stereo-out-N2-48k-Hz-64s-9-1ms.png
|
|
When I replace the onboard audio of the Odroid with my external Scarlett 2i2gen2 it is 12.0 ms -->
https://i.postimg.cc/xTLrvHZx/UART-MIDI-event-2i2gen2-out-N2-48k-Hz-64s-12ms.png
|
|
And with two USB-peripherals, Edirol UM-1SX and Scarlett 2i2 gen2, I got 13 ms -->

https://i.postimg.cc/wv1Z7sJk/UM-1-SX-MIDI-event-2i2gen2-out-N2-48k-Hz-64s-13ms.png
|
|
Pianoteq running in all examples with 48 kHz and 64 samples, system timer 1000 Hz.

Not much difference in my opinion. Eventually the setup with 9.1 ms is fast enough, that buffersizes of 128 samples (instead of 64) could be used without noticable lag. Advantage would be an ultimative headroom.

Depends on the usecase, which scenario is the best. Besides latency two other factors should not be forgotten. MIDI accuracy ("jitter") and the congruency of the audio and tactile feedback.

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Time to finalize my observations. As already supposed, the Odroid system with onboard serial/UART and onboard audio has with 128 samples nearly the same latency as a similar USB-based system with 64 samples (RPi400 with USB-MIDI and 2i2 gen2) -->

12.8 ms @ 128samples versus 11.5 ms @ 64 samples.

The reason is the flatter slope with increasing buffersizes when the onboard components are used (and not the external USB devices). Documented in the green line that I added now to the diagram already known from here

https://i.postimg.cc/HswvHyPM/Lag-vs-Samplebuffer-now-with-Odroid-onboard-audio.png

This flatter slope and the lower latency at the same time has two advantages:

* 128 samples buffer gives Pianoteq more time for computing, than 64 samples (no xruns).

* The flat slope gives you a finer grained control over the individually preferred latency just by varying the buffersize.

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Nice work groovy! It's good to see all this in context.

- that 9.1ms latency / 64 buffer is really sweet; a nice win for the UART / I2S bus (plus 1000Hz system timer).

- glad you ran the test with 128 buffer as I feel that's the sweet spot for rock-solid stability (no x-runs with demanding pieces) - 64 runs very, very clean, but when I play intermediate/advanced pieces, I get an occasional random x-run out of the blue. It's only a handful per hour so there may still be a gremlin in the system, but maybe for those harder pieces, I just need to wait for a speedier ARM CPU to get a rock-solid stable playback at 64 - otherwise one-step up to 128 is still very good. *note - and I may change my mind about 64 after I've implemented all your optimizations.

- why do you think, over USB - the 2i2/Rpi runs slightly faster than the Korg B2?

- one thing I noticed at lower buffer sizes, the differences in latency are very small, but at larger buffer sizes, the differences in latency start to become significant.

Last edited by Groove On (04-05-2021 02:39)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Thank you.
Would be cool to nail down those very rare spikes. They seem to be completely unrelated to the audio load of Pianoteq, because it is flat on a low level before and after a spike. I'm sure somewhere in the processlist is an answer.

- why do you think, over USB - the 2i2/Rpi runs slightly faster than the Korg B2?

Because it is a static amount of ~2 ms (in other words audio buffersize independent), I think it is hardware related. For example the 2i2 gen2 is UAC2 capable (don't confuse this with USB2). UAC2 is known to have better streaming latency than UAC1 by the use of USB microframes. But this had been already mentioned in the linked thread.

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

groovy wrote:

Would be cool to nail down those very rare spikes. They seem to be completely unrelated to the audio load of Pianoteq, because it is flat on a low level before and after a spike. I'm sure somewhere in the processlist is an answer.

Definitely in Ubuntu by Hard Kernel, there are kernel gremlins stealing CPU cycles from Pianoteq. Armbian did a really good job with stripping down their kernel - so I'm not sure if there are still gremlins or if I'm just pushing the limits of the CPU.  I'll start a thread over on the Armbian forums to see if they can clarify what optimizations they did and what we could do to further strip down the kernel.

I'd love to optimize a kernel just for audio throughput. If all the CPU stealing general-purpose gremlins were cleared out, we might not ever need a hard real-time kernel.

On a side-note, I just saw that ARM released specs for a 128-core CPU, so all this could get interesting when they start making ARMv9 SOC boards. Funnily enough they're calling it the Neoverse N2.

Last edited by Groove On (05-05-2021 05:10)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

Here's a "sort-of-documented" script to configure sound in amixer/alsamixer. It's in the same order as listed in alsamixer and I noted if the lines are for the 3.5mm jack, HDMI or SPDIF.

#!/bin/bash

# 3.5MM JACK, set to max gain
amixer sset 'ACODEC' '255'

# HDMI - set in/out channels (src/sink)
amixer sset 'FRDDR_A SINK 1 SEL' 'OUT 1' || true
amixer sset 'FRDDR_A SRC 1 EN' 'on' || true

# 3.5MM JACK - set in/out channels (src/sink)
amixer sset 'FRDDR_B SINK 1 SEL' 'OUT 2' || true
amixer sset 'FRDDR_B SRC 1 EN' 'on' || true

# SPDIF - set in/out channels (src/sink)
amixer sset 'FRDDR_C SINK 1 SEL' 'OUT 3' || true
amixer sset 'FRDDR_C SRC 1 EN' 'on' || true

# SPDIF??? TDMOUT
amixer sset 'TDMOUT_B SRC SEL' 'IN 0' || true
amixer sset 'TDMOUT_C SRC SEL' 'IN 1' || true

# 3.5MM JACK
amixer sset 'TOACODEC SRC' 'I2S C' || true
amixer sset 'TOACODEC OUT EN' 'on' || true
amixer sset 'TOACODEC Lane Select' '0' || true

# HDMI
amixer sset 'TOHDMITX I2S SRC' 'I2S B' || true
amixer sset 'TOHDMITX' 'on' || true

# SAVE NEW CONFIGURATION
alsactl store

Last edited by Groove On (05-05-2021 05:07)

Re: Insanely great performance on ARM-64bit (Pianoteq, Odroid N2+, Linux)

kawsy wrote:

The Hifi Shield 2 is now working with the Odroid N2+

https://forum.odroid.com/viewtopic.php?...mp;t=41967

Support for the board is now included in the kernel. This is awesome if you want balanced outputs on the N2+. I haven't tried Pianoteq yet, but the outputs work and sound great.

I've designed a box for the pair. If anyone would like to build it, I'll be putting the STL files on thingiverse tomorrow.  Can't wait to try this with Pianoteq!

Hi Kawsy,

Forgive me if you're already aware of this but I'd be a little careful making those balanced outs from the HiFi Shield directly available to the outside world, without any buffering in the signal path.

Looking at Hard Kernel's schematic for the HiFi Shield board, those outs are coming directly off the 5242 DAC chip, and, looking at Texas Instruments' data sheet for that chip, the minimum allowable load resistance on them is 2k (ohm). The 'nominal' figure is 10k, which is pretty high.

I think I'm right in saying that you'd normally reckon to buffer high impedance outs like that with some low output impedance stage, typically an op amp, just as Hard Kernel have done for their unbalanced outputs on this board. My guess is that HK are making the balanced outs available on a header so that users can construct their own buffering arrangements, including balanced line drivers.

I think it's possible that without any buffers you could end up frying your DAC chip by plugging it into certain devices.

I'm investigating getting some balanced outs from the N2+ myself but, rather than using the HK HiFi shield, going the whole hog and doing the DA conversion myself too. My eventual aim is to get multiple independent outputs (I need six) although I'm a way off that just now.

Best, Ian.

N1X - PT Pro - Linux