MQA HID support and Signal Path

Roon Core Machine

Intel NUC7i5BNK with 16 GB of RAM, running Roon OS (a ROCK build)

Networking Gear & Setup Details

Ubiquiti UniFi USG firewall, UniFi switches, and UniFi access points

Connected Audio Devices

Raspberry Pi 4 B running VitOS for RPi4 and Khadas Tone2 Pro USB DAC
Kernel: Linux VitOS 5.4.80-1-rt44-ARCH #1 SMP PREEMPT_RT Fri Dec 4 09:07:40 UTC 2020 armv7l GNU/Linux
Raspberry Pi Zero 2 W running DietPi v7.9.3 and Khadas Tone2 Pro USB DAC
Kernel: Linux zero 5.10.63-v8+ #1488 SMP PREEMPT Thu Nov 18 16:16:16 GMT 2021 aarch64 GNU/Linux

Number of Tracks in Library

30,513 tracks

Description of Issue

This is a kind-of nerdy, but I’ve been trying to figure out how my VitOS endpoints are able to display the full signal path when playing MQA tracks, including MQA Decoding and Rendering steps performed by the DAC, while other endpoints can not do this.

For example, here’s the Signal path while playing an MQA album playing via VitOS and my Khadas Tone2 Pro DAC, which is an MQA Decoder and Renderer.

It’s pretty nifty that we can see what’s happening past the endpoint, all of the way to “Analog output”.

I’m hoping to figure out why this works on VitOS so that I can get the same thing working on other endpoints, like DietPi, iFi ZEN Stream, etc. Here’s what I see in RAATServer_log.txt during initialization of the DAC:

12/25 12:05:39 Trace: [RAAT::Tone2 Pro] [output/alsa] getting hardware info
12/25 12:05:39 Trace: [RAAT::Tone2 Pro] pcm card id Pro
12/25 12:05:39 Trace: [RAAT::Tone2 Pro] pcm card name Tone2 Pro
12/25 12:05:39 Trace: [RAAT::Tone2 Pro] pcm card longname Khadas Tone2 Pro at usb-0000:01:00.0-1.4, high speed
12/25 12:05:39 Trace: [RAAT::Tone2 Pro] pcm card mixername USB Mixer
12/25 12:05:39 Trace: [RAAT::Tone2 Pro] pcm card components USB3353:a002
12/25 12:05:39 Trace: [RAAT::Tone2 Pro] pcm card driver USB-Audio
12/25 12:05:39 Trace: [RAAT::Tone2 Pro] pcm card usb id 3353:a002
12/25 12:05:39 Trace: [RAAT::Tone2 Pro] RAAT__mqa_usb_device_try_create(3353:a002)
12/25 12:05:39 Trace: [RAAT::Tone2 Pro] usb device 3353:a002 has MQA HID support
12/25 12:05:39 Trace: [RAAT::Tone2 Pro] [output/alsa] probing formats

I think the bit about “usb device 3353:a002 has MQA HID support” may be the key to what I’m looking for. Here are the log entries that I see when I connect the same DAC to an endpoint running DietPi v7.9.3:

12/25 04:14:05 Trace: [RAAT::Tone2 Pro] [output/alsa] getting hardware info
12/25 04:14:05 Trace: [RAAT::Tone2 Pro] pcm card id Pro
12/25 04:14:05 Trace: [RAAT::Tone2 Pro] pcm card name Tone2 Pro
12/25 04:14:05 Trace: [RAAT::Tone2 Pro] pcm card longname Khadas Tone2 Pro at usb-3f980000.usb-1, high speed
12/25 04:14:05 Trace: [RAAT::Tone2 Pro] pcm card mixername USB Mixer
12/25 04:14:05 Trace: [RAAT::Tone2 Pro] pcm card components USB3353:a002
12/25 04:14:05 Trace: [RAAT::Tone2 Pro] pcm card driver USB-Audio
12/25 04:14:05 Trace: [RAAT::Tone2 Pro] pcm card usb id 3353:a002
12/25 04:14:05 Trace: [RAAT::Tone2 Pro] RAAT__mqa_usb_device_try_create(3353:a002)
12/25 04:14:05 Trace: [RAAT::Tone2 Pro] usb device 3353:a002 does not have MQA HID support
12/25 04:14:05 Trace: [RAAT::Tone2 Pro] [output/alsa] probing formats

Note that the results from the RAAT__mqa_usb_device_try_create() call are different, reporting that the device “does not have MQA HID support”

And, the signal path does not show the information past the endpoint as it did with VitOS:

In both cases, the LED indicators on the DAC report MQA Studio for this album (as shown below), so all seems to be working as expected as far as actual playback goes, but it would be nice to get the full Signal path display working.

The audio configuration is identical for both outputs, but here are the screenshots. VitOS first and DietPi second:



I can upload the complete RAATServer_log.txt and dmesg output from both endpoints if that would be helpful.

1 Like

especially the lines

vs.

might be indicative, ending in “-1.4” vs “-1”
Maybe something like a kernel regression?
@MichaIng might be able to chime in here, being Mr. Diet-Pi …

Here’s another data point. The iFi ZEN Stream is running a much older kernel:

Linux ifi-zen-stream 4.4.167+ #23 SMP Fri May 14 14:35:44 CST 2021 aarch64 GNU/Linux

Here’s what it sees when setting up the DAC:

12/17 03:46:22 Trace: [RAAT::Tone2 Pro] [output/alsa] getting hardware info
12/17 03:46:22 Trace: [RAAT::Tone2 Pro] pcm card id Pro
12/17 03:46:22 Trace: [RAAT::Tone2 Pro] pcm card name Tone2 Pro
12/17 03:46:22 Trace: [RAAT::Tone2 Pro] pcm card longname Khadas Tone2 Pro at usb-xhci-hcd.0.auto-1.4, high speed
12/17 03:46:22 Trace: [RAAT::Tone2 Pro] pcm card mixername USB Mixer
12/17 03:46:22 Trace: [RAAT::Tone2 Pro] pcm card components USB3353:a002
12/17 03:46:22 Trace: [RAAT::Tone2 Pro] pcm card driver USB-Audio
12/17 03:46:22 Trace: [RAAT::Tone2 Pro] pcm card usb id 3353:a002
12/17 03:46:22 Trace: [RAAT::Tone2 Pro] RAAT__mqa_usb_device_try_create(3353:a002)
12/17 03:46:22 Trace: [RAAT::Tone2 Pro] usb device 3353:a002 does not have MQA HID support
12/17 03:46:22 Trace: [RAAT::Tone2 Pro] [output/alsa] probing formats

Like my DietPi endpoint above, the Signal path shows nothing past the endpoint. I thought it was just because the ZEN Stream uses such an old kernel. Apparently there’s more to it than that. The USB line ends in “-1.4”, similar to VitOS, so that does not seem to be the key either.

I’m wondering if VitOS uses a different set of kernel modules for USB Audio than DietPi and Volumio. If so, perhaps all that I need to do is add the missing module to get RAAT__mqa_usb_device_try_create() to detect MQA HID support in the DAC, completing the Signal path.

I may try using strace to work out the differences in system calls and results for RAAT__mqa_usb_device_try_create() on VitOS vs the other two, but this would be much easier to sort out with access to the source code. :wink:

Hoping the Roon Labs engineers are getting some rest this week. We can work on this together in January.

… dang … good luck …

1 Like

I’ve been through this and it can be a bit of a nightmare. A while back I built a custom linux distro for the old Intel Atom NUCs. I had trouble with this very thing and honestly can’t remember if I was able to resolve it reliably or not. IIRC it came down to having a specific libC version installed as well as a specific configuration for the USB driver.

Ultimately, this is below the level at which Roon operates and requires the USB driver to recognize the HID side channel presented by the MQA DAC.

1 Like

Oh for sure. I agree that this is not a “problem” with Roon. Roon Bridge is just making some system calls and responding based on what it’s getting back from the USB driver in the kernel. Differences in libC versions could affect the results as well. Thanks for the tip.

Knowing what combination of kernel modules, libraries, and configuration will make this work would be really cool though. Somehow, the Silent Angel folks who put VitOS together figured it out. Perhaps I’ll ask them.

Not using VitOS, but did they make it impossible to SSH into it to poke around a bit?

No. The default username and password for VitOS is root/root. LOL. Easy to login and poke around.

It’s also easy to mess things up by updating all of the packages to the latest versions with a pacman -Syu. Over the last couple of years, the Silent Angel folks have released a new VitOS build around Christmas time, but I’ve not seen anything new this year. Reflashing with the latest complete image is the only way I know to keep things current.

DietPi uses the official Raspberry Pi kernel and firmware:

I’ve not much experience with USB DACs and MQA in particular, whether this can be affected by the (generic) USB driver or the DAC driver only. Did you have a look through the available device tree overlays whether there is one for this or a compatible USB DAC? firmware/README at master · raspberrypi/firmware · GitHub
Probably also the manufacturer provides kernel modules and/or overlays which are added/enabled by default on VitOS as it’s a distro designed for music playback explicitly. Asking them is surly a good idea :slight_smile:.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.