Odroid C2 HiFi Shield, DietPi and HQP NAA

Will do, thanks for offering.

We still have a lot to do for the RPi stretch support 1st, as thats our test-bed into Stretch. Once thats improved (fixes here will also take effect on other devices), we’ll look at releasing the Stretch image for C2.

RPi Stretch status: https://github.com/Fourdee/DietPi/issues/475

1 Like

@Dan_Knight, I compared our outputs and this is what I got:

luchoh@LatchezsMacBook ~/TEMP> diff mine.txt dan.txt
1c1
< amixer -c 1
---
> root@DietPi:~# amixer -c 1
45c45
<   Mono: Playback [on]
---
>   Mono: P▒▒▒{&▒> [on]

I checked: the only difference is your output which somehow got garbled… so it seems they are identical.

With NAA it’s unlistenable at 192KHz. I didn’t even try at native resolution.

After that, I tried RAAT. Pops at native resolution.

Next, I happen to have an iFi DSD Micro BL. I connected it via USB to the Odroid C2 and RAAT. I hear the occasional pops - same as HIFI Shield 2 via I2S, so I suspect my initial hypothesis was incorrect - it is not the shield, but rather the configuration.

By the way, I used to have the same device, but with Ubuntu Xenial and it worked great with a USB DAC. Unfortunately I can’t figure out where I found this Xenial distro for C2. I’ll look and if I can - I’ll install it again and report.

1 Like

I’ll run some tests today and see if I can replicate on my Shield 2.

I checked: the only difference is your output which somehow got garbled… so it seems they are identical.

I love this forum, but it really doesn’t handle code formatting that well lol :slight_smile:

Hi Dan,

Roon Forum uses Discourse, another open source initiative :sunglasses:.

1 Like

@Dan_Knight - it’s the shield.

So I switched to USB and still had trouble as you remember. Which is not what my experience was before.

So, there were two more possibilities left: the distro or the hardware.

I installed Xenial/RAAT/NAA. Same problem.

Then I removed the shield. I can play 384KHz and DSD256 without problems now. Higher frequencies are garbled, but most likely due to my transcoding hardware.

Case closed. I’ll re-flash my SD Card to DietPi Stretch and report.

As always - thank you! Your efforts are greatly appreciated!

1 Like

Gutted. Does sound like a possible faulty unit.

Before thinking of sending it back for a replacement, last things i’d recommend checking:

  • Shield 2 (odroid-hifishield-2) is selected in dietpi-config > Audio Options > sound card
  • Check for any i2s/c errors in dmesg (Can ignore all entries below 12s as thats boot, look for enties after that, one should appear for each time you start/stop playback)

Unable to test NAA daemon + HQPlayer, trial expired :cry:

Hi Dan,
It does if code tags are use when posting

[code]This is code[/code]

I’ve just updated @Latchezar_Hristov post to include them, and your previous post was updated yesterday.
There both look a lot better now.

1 Like

@Dan_Knight, my situation is quite a soap opera…

So, I installed DietPi again, migrated to stretch, gave the NAA Nice of -5, policy of SCHED_FIFO and priority of 64 the pops were still there. With USB DAC and without the HIFI Shield.
I removed the HDMI cable. Same thing.
I removed the UPS.

Gone. Pops are gone.

I can upsample (hardly) to 784KHz and DSD256, though there are interruptions.
DSD128 and PCM384 plays without any glitches.

So I’d say we have an Alpha Debian Stretch DietPi for Odroid C2. Of course, that is as much as NAA/RAAT are concerned. I understand how much work remains to test the rest of the scripts, etc.

Next I will test the HIFI Shield without the UPS and report.

Perhaps we should branch our part of the thread to a separate one - HQP NAA - Odroid C2? Moderators?

NAA manages it’s own internal thread priorities by itself with different threads running at different priorities on purpose. So no need to adjust anything externally…

Upsampling to 768k PCM is not heavy, much lighter than upsampling to DSD128. So likely this is more like network bandwidth issue or the NAA device running out of steam (you could check with “top”).

1 Like

You’re absolutely correct, that was the issue. Working fine directly out of the Mac without network.

I’d agree as the CPU stays below 6-7% at any time.

Thank you @jussi_laako for your input!

Quick update for those who use Odroid C2.
I am able to play all rates that my iDSD Micro BL supports: PCM768 and DSD512.

The trick was to install ARMBIAN Ubuntu 16.04.1 LTS 3.14.79-odroidc2 and add armhf architecture.
From time to time I need to reboot the unit as NAA fails with Failed to set scheduling parameters: (1) Operation not permitted and no number of networkaudiod restarts would help.
Other than that, it works fine and I’m quite happy.

1 Like

This is not fatal problem and happens due to kernel configuration…

@jussi_laako - you are correct, I don’t mind this personally, but it could be a problem if you integrate the NAA into a full DAC solution.
I have NAA (BBB Botic) -> Hermes -> Cronus -> I2S -> DAM 1021 and I’m loving it. Works great at PCM384 (I don’t use the DSD option of the DAC - it seems weird to do it on a R2R DAC). I have the battery installed and all and it works great, because I can shut the DAC down and BBB gracefully shuts down shortly.
However, I was planning on doing s similar thing for DSC1 (preferably DSC2, when it comes out):
NAA (Odroid C2) -> Reclocker (I am on GB for Ian’s) -> I2S -> DSC1/2. I would rather not have to restart this from time to time.

Long story short: do you know which kernel parameters are affecting this? If I have to - I’ll recompile the kernel, though I’m not looking forward to doing this :slight_smile:

Assuming you are running networkaudiod as root or as user that has sufficient permissions through audio-group.
It is the cgroups / group scheduling. If your system has systemd, you need to have cgroups for it to boot up, but you only need to have the most minimal cgroups support enabled, no group scheduling or other process controls.

1 Like
root@odroidc2:~# ps aux | grep networkaudiod
root       937  5.6  0.4  18360  7100 ?        S<Lsl 16:23  23:43 /usr/sbin/networkaudiod
root      4828  0.0  0.0   4280   904 pts/0    S+   23:20   0:00 grep --color=auto networkaudiod

I am running it as root on vanilla Armbian 64 (Ubuntu Xenial):

Linux odroidc2 3.14.79-odroidc2 #20 SMP PREEMPT Fri Dec 30 18:46:17 CET 2016 aarch64 aarch64 aarch64 GNU/Linux

I suspect the default configuration during install has set the nice-ness to -10:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
  937 root      10 -10   17976   6736   1696 S  17.0  0.4  24:27.54 networkaudiod

Finally, the dirty secret is that I used the stretch deb packages from your repo - there are no Ubuntu packages for ARM Xenial in your repo.

I hope that helps.

Do you have a link or location of the the specific image that worked on the C2?

So is it possible to use Odroid C2 as a NAA? I don’t know much about Linux. I just installed Ubuntu Mate on C2, but failed to install the Network Audio Daemon, Xenial from HQP website, due to wrong ARM architecture. What should I do then?? Thank you.

@Ringo_Hung please check this post and for more information - the thread it belongs to:

I used this option to make it work about 6 months ago and I’m quite happy: I’m streaming Roon -> HQPlayer at DSD512. It works flawlessly. For comparison, I get “turntable pops” when I’m using sMS-200 even at DSD256.
Also, I cannot find any audible degradation of sound when using Odroid C2 vs the supposedly superior SOTM device at lower bitrates (where pops do not occur), so I gave up trying to make it work.

Let me know if I can help further.

Not currently in DietPi, as we lack the ARMv8 binaries for NAA Daemon:

Resurrecting an old thread as my set up is virtually the same and I have not been able to play DSD files (either original DSD or HQP upsampled DSD through to the NAA)…is there a configuration I need to make in Dietpi to ‘switch’ on’ DSD files?

I have been upsampling and playing DSD files using HQP on a PC and SOTM sms-200 for some time . It works perfectly. But I’ve been inspred by these threads and the fact that I’d like to experiment with removing USB from my audio chain. So…

  • I bought an ODroid C2
  • I have a hat made by IANCANADA from diyaudio which enables DSD and PCM output to pure I2S stream which I can hook straight into my DAC.

So, I can get PCM upsampling perfectly and it sounds fabulous. But I cannot get HQPlayer to recognise that the NAA and DAC should be able to accept DSD.

I am assuming that I haven’t configured something in dietpi correctly. When I looked at the soundcard settings, there were three options, HDMI, hifi-shield plus and hifi shield 2. When I choose the hifi-shield option I get perfect PCM…but how do I get DSD?

Thanks for any help you can give!
Crom