Distorted USB audio with Tinker Board and DietPi

Yep, good spot, I did question this.

Appears the stock kernel config compiles the modules built in to kernel, instead of load on demand. Although, i’d like to think kernel command line options are applied in both cases.

I’d need to manually config and compile kernel to test this, but I lack the time at the moment.

Great find!

Most likely be an issue with CPU scaling in current kernel/driver.
Our default CPU gov is interactive.

Come to mention it, ASUS did mention that they changed their gov to ondemand for “stability issues”:

13. Change CPU's governor mode as ondemand to provide more stability performance.

Although, no gov should “provide more stability than the other”. Shows a possible flaw with CPU scaling on the ARM and kernel currently.
https://www.asus.com/uk/Single-Board-Computer/Tinker-Board/HelpDesk_Download/

Would be great to see if others can test their DAC’s, based on your results with performance CPU gov, and, ondemand if possible.

Wonderful! It works like a charm with either performance or ondemand!
I decide to set to performance and limit cpu frequency to 600Mhz, keeps things cool and does not load the cpu more than 6% @ 352.8Khz PCM.
Noticed that ondemand definently seems to keep CPU at 1800Mhz…

Thank you both of you for the input and clever ideas!

1 Like

After 1 hour of DSD128 playback:

 ─────────────────────────────────────────────────────
 DietPi CPU Info
 Use dietpi-config to change CPU / performance options
 ─────────────────────────────────────────────────────
 Architecture |     armv7l
 Temp         |     49'c | Optimal temperature.
 Governor     |     performance
                 Current Freq    Min Freq   Max Freq
 CPU0         |      600 MHz      126 MHz    600 MHz
 CPU1         |      600 MHz      126 MHz    600 MHz
 CPU2         |      600 MHz      126 MHz    600 MHz
 CPU3         |      600 MHz      126 MHz    600 MHz
1 Like

Thanks Dan for confirming what I suspected (that the modules may be built-in) and the ASUS link…

On a related note, my box has been playing for a few hours standard resolution; if I convert to DSD128 I see a significant CPU usage increase from RAATServer, from around 5 to 15% (at 400 MHz).
Anyway, the thing is the temperature went up to 56-58C.
Mikael, can you or anyone recommend a good case? I’ve got a plastic one that doesn’t allow for much of natural ventilation at all. An aluminium one perhaps? Thanks!

1 Like

Sorry, not at the moment. I am running “top-less” so to speak! :open_mouth:
I am still confused about the lack of built in audio out, not even a pop, tick or hiss…
Not even over the HDMI… Which makes me a bit wary of soldering on a SPDIF-connector. I think something is not correct on my sample…

1 Like

Mikael, I just enabled all the cards as they show up in the Roon GUI, and played through each; the headphone output turned out to be the last one.

Here’s some potential useful stuff for comparison between you board and mine:

root@asus:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Mojo [Mojo], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: Audio [USB Audio], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Audio [USB Audio], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Audio [USB Audio], device 2: USB Audio [USB Audio #2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: rockchipminiarm [rockchip,miniarm-codec], device 0: ff890000.i2s-i2s-hifi i2s-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

And:

root@asus:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 245f:0815
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0bda:481a Realtek Semiconductor Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And finally:

root@asus:~# amixer -c 0 -d controls
numid=2,iface=MIXER,name=‘PCM Playback Switch’
numid=3,iface=MIXER,name=‘PCM Playback Switch’,index=1
numid=4,iface=MIXER,name=‘PCM Playback Volume’
numid=5,iface=MIXER,name=‘PCM Playback Volume’,index=1
numid=1,iface=PCM,name=‘Playback Channel Map’

root@asus:~# amixer -c 1 -d controls
numid=11,iface=MIXER,name=‘Headphone Playback Switch’
numid=14,iface=MIXER,name=‘Headphone Playback Switch’,index=1
numid=12,iface=MIXER,name=‘Headphone Playback Volume’
numid=15,iface=MIXER,name=‘Headphone Playback Volume’,index=1
numid=6,iface=MIXER,name=‘Mic Capture Switch’
numid=9,iface=MIXER,name=‘Mic Capture Switch’,index=1
numid=7,iface=MIXER,name=‘Mic Capture Volume’
numid=10,iface=MIXER,name=‘Mic Capture Volume’,index=1
numid=8,iface=MIXER,name=‘Extension Unit Switch’
numid=13,iface=MIXER,name=‘SPDIF Playback Switch’
numid=1,iface=PCM,name=‘Capture Channel Map’
numid=3,iface=PCM,name=‘Playback Channel Map’
numid=2,iface=PCM,name=‘Capture Channel Map’,device=1
numid=4,iface=PCM,name=‘Playback Channel Map’,device=1
numid=5,iface=PCM,name=‘Playback Channel Map’,device=2

root@asus:~# amixer -c 2 -d controls
numid=2,iface=PCM,name=‘AUDIO MODE’
numid=1,iface=PCM,name=‘ELD’

Maybe you can spot a difference with your setup?

1 Like

Same here lol :slight_smile:

Might be worth asking these guys if they would consider developing a case for ASUS TB:
https://cogent.design/

Their RPi/C2 cases are pure brilliance.
http://dietpi.com/phpbb/viewtopic.php?f=9&t=773
http://dietpi.com/phpbb/viewtopic.php?f=9&t=730

Dan, I take it you could switch the default governor on image builds for this board? GitHub ticket? :slight_smile:

1 Like

Thanks Dan, those look really good!

Since the ASUS TB fits into an RPi3 case, it would also go into these, right?

Later edit: I just realised the great stuff about the RPi case is the integrated heatsink, which probably won’t go ont op of the SOC in the ASUS…

:wink:

1 Like

External ports all line up, the only issue is the ARM on Rock is larger, and slightly offset. Although, majority of ARM should be covered by heatsink. There may also be an issue with height of ARM.

I’d try it with my case, but I used double sided thermal adhesive pads, so removing case would probably remove the ARM aswell lol.

I think its possible, but verify height/location of ARM on both boards, before purchase.

I did find one that feels sturdy and well made:


Remember to get some rubber paws for though, non included.
It cost me about €20 but made the Tinkerboard a lot more classy!

1 Like

Thanks for the tip Mikael - what temperature is the ATB running when streaming with this case?

Been powered up since last night now, and stays at 52°C. Ambient room temp at around 23-27°C and in “performance” profile limited at 600Mhz. Oh, and i do have the heat sink mounted. The surface of the case is luke warm so it has decent heat dissipation also.
Edit: corrected the temperatures a bit, as the Tinkerboard is actually on my preamp which is warm to the touch.

I am convinced that even semiconductors need some running in, based on experience. And usually average temperatures often go down after a few cycles of warming up and cooling off. It has also changed its sound a bit from where it was brand new and it’s getting better by the hour. This is very good actually! :slight_smile:

Oh, by the way, i saw that the same company had other cases too, even one in aluminium if you would like even better heat dissipation(?)
The stainless one has a nice heft about though and works just fine!

1 Like

Now that the Tinkerboard worked so good with DietPi as an Ethernet2USB bridge i thought id give it a try with some other USB DACs.
Has anybody tried this with the Audioquest DragonFly Red? It provides a horribly distorted sound, a bit like my first tried with DietPi and the old kernel?
I have tried the Dragonfly in other SBCs and am listening to it right now with the SOtM sMS-200 where it works just fine?!?!?

Anybody have any idea why this might be a bad combo?

Might be worth playing with the various otg kernel command line options, and ondemand cpu gov (if not done already):

Appreciate your continued support Dan!
I do have the same settings as previously, which means the otg instructions are still left in the startup sommand line. Havent changed them though.
And power management is fixed on Performance with max CPU set to 600Mhz.

What is a bit confusing is that only the DragonFly Red exhibits this behaviour with heavily distorted audio where my Chord Mojo and HRT HeadStreamer Mobile does not? I tried these three USB/HeadAmp DACs on my NanoPi NEO, also with DietPi (an older version though, Linux 3.4.113-sun8i), and all of them play music flawlessly. The DragonFly does tend to set volume to 100 on any change to either DSP or Device settings though…

Hi Mikael,

Which output frequencies/bit depths and DSD formats have you tried. Do all of them provide distorted audio?

Sounds like a kernel related issue/bug limited to DAC, especially if 3.4.113 is fine. Although, if not done already, i’d update the firmware on the DAC:

However, could also be limited to the ASUS TB, if you have a RPi, would be worth testing with that to rule out kernel 4.x as issue.

First let me extend my thanks once again! It led me to donate some further funds to the DietPi project which i recommend all users of DietPi to do!
The feedback and support from you is unprecedented, i havent seen anything like it before.

This is not a major issue, i can do fine with other USB DAC’s and DDC’s together with the Tinkerboard. I just thought it was a peculiar behaviour and thought i might learn something along the way.

So, the Dragonfly Red is updated to firmware ver. 1.6, the latest available. I have been running it without issues (both standard and upsampled to 88.2/96Khz, it doesn’t do DSD) on the NanoPi Neo, my Audiophonics RaspDac LTE (with a RaspberryPi 2B, DietPi, Linux 4.9.40-v7+) and another Raspberry Pi 2B with a Sabreberry DAC HAT (DietPi, Linux 4.4.50-v7+)

I connected the AQDFR back to the Asus TB again (DietPi, Linux 4.4.71+) and the heavily distorted audio is still present. I did try upsampling using Roon DSP, and the more upsampling the worse the sound. At 88.2/96khz you could barely make out which song was playing.
And as i previously said, the AQDFR sounds fine on all other units i tried, and all other USB DACs/DDCs sounds just fine on the Asus Tinkerboard! :slight_smile:

Once again, i appreciate any help or feedback on this but it is NOT a big issue! I’m just curious and a bit stubborn! :blush:

1 Like

Some good news! I have got the internal audio working on the Tinkerboard!
After the latest updates to DietPi (156?) i decided to give it a go again, stubborn like an ass (donkey)!

In Roon the Tinkerboard with DietPi displays four audio outputs:

  1. Rockchip audio
  2. USB Audio
  3. USB Audio #1
  4. USB Audio #2

From the DietPi-Config meny i selected Audio, en JustBoom and there the ALSA Mixer.
In ALSA Mixer, when you press F6 you can select one of two soundcards, USB Audio and RockChip.
Rockchip doesn’t have any controls in Alsa and i dont know what it does. When selecting USB Audio however ALSA displays two volume controls, like this;
02
The 3.5mm jack is Headphone 1 in this picture. Now, heres the tricky part…
When selecting USB Audio #2 in Roon and using Device controls for volume, Roon controls the Headphone volume, the leftmost slider in the picture. And if you select USB Audio #1 in Roon and set volume control to Device, Roon also controls the leftmost slider, Headphone!

So i cannot control volume on the 3.5mm output in any other way than using ALSA Mixer?.. Is this configurable?
And, is it possible to hide these devices from Roon in a simple way in DietPi?