Using any audio source with HQPlayer - Spotify, Amazon, Apple Music, YouTube Music, Deezer, Soundcloud [2023]

“input” element defaults to the default backend of the particular platform. Thus “alsa” on Linux, “coreaudio” on macOS and “wasapi” on Windows. If you want to refer to a NAA, you need to tell that the input you are talking about is a NAA backend input.

So you have “network” and “network6” options. Former is IPv4 and latter IPv6. Whenever possible, I recommend using IPv6.

1 Like

Someone tested it and it sort of works, but it seems to be buggy at iOS side. So the sample rate it happens to use depends on what has been played earlier.

Oops yes ipv6 is missing

Will add and retry

If something can send it DoP encoded, then it should theoretically work. Although only really tested through direct HQPlayer inputs and not yet through NAA inputs. DSD64 can go over optical/coaxial S/PDIF since it needs only 176.4k PCM as carrier.

1 Like

@jussi_laako so for a brief moment I see the DoP64 showing as input in Client app.

But then it stops.

Log is below

 2024/03/11 09:45:20 Initialization complete, starting audio engine
+ 2024/03/11 09:45:20 NAA input network engine starting...
  2024/03/11 09:45:20 NAA input network format: 2822400/24/2 [pcm]
  2024/03/11 09:45:20 NAA input network PCM streaming
# 2024/03/11 09:45:20 clReadAudio::Read(): clNetEngine::Start(): start: clALSAEngine::Start(): clALSAEngine::SetParametersHW(): snd_pcm_hw_params_set_rate(): Invalid argument
? 2024/03/11 09:45:20 clReadAudio::Read(): starting failed, attempt to reinitialize...
  2024/03/11 09:45:20 NAA input attempting to uninitialize...
  2024/03/11 09:45:20 NAA input attempting to initialize...
  2024/03/11 09:45:20 NAA input set channels: 2 (2)
  2024/03/11 09:45:20 NAA input network Audio IPv6 support enabled
  2024/03/11 09:45:20 NAA input discovery from 0.0.0.0
& 2024/03/11 09:45:20 NAA input discovered network audio: name='rpi4naainput' version='Signalyst Network Audio Daemon 5.0.0'  @192
& 2024/03/11 09:45:20 NAA input discovered network audio: name='rpi4naainput' version='Signalyst Network Audio Daemon 5.0.0'  @192.
  2024/03/11 09:45:21 NAA input discovery from ::
& 2024/03/11 09:45:21 NAA input discovered network audio: name='rpi4naainput' version='Signalyst Network Audio Daemon 5.0.0'  @[fe80::d
& 2024/03/11 09:45:21 NAA input discovered network audio: name='rpi4naainput' version='Signalyst Network Audio Daemon 5.0.0'  @[fe80
  2024/03/11 09:45:22 NAA input discovered 1 Network Audio Adapters
+ 2024/03/11 09:45:22 NAA input connect to [fe80: [ipv6]
  2024/03/11 09:45:22 NAA input initial format: 0/24/2 [pcm]
  2024/03/11 09:45:22 NAA input set channels: 2 (2)
  2024/03/11 09:45:22 NAA input rate set unknown or empty, setting virtual rate
  2024/03/11 09:45:22 NAA input set sampling rate: 44100 (44100)
  2024/03/11 09:45:22 NAA input network format: 44100/24/2 [pcm]
  2024/03/11 09:45:22 NAA input network format: 48000/24/2 [pcm]
  2024/03/11 09:45:22 NAA input network format: 88200/24/2 [pcm]
  2024/03/11 09:45:22 NAA input network format: 96000/24/2 [pcm]
  2024/03/11 09:45:22 NAA input network format: 176400/24/2 [pcm]
  2024/03/11 09:45:22 NAA input network format: 192000/24/2 [pcm]
? 2024/03/11 09:45:22 NAA input requested rate not available, setting virtual rate
  2024/03/11 09:45:22 NAA input set sampling rate: 2822400 (2822400)
+ 2024/03/11 09:45:22 NAA input network engine starting...
  2024/03/11 09:45:22 NAA input network format: 2822400/24/2 [pcm]
  2024/03/11 09:45:22 NAA input network PCM streaming
! 2024/03/11 09:45:23 clHQPlayerEngine::Execute(): clReadAudio::Read(): clNetEngine::Start(): start: clALSAEngine::Start(): clALSAEngine::SetParametersHW(): snd_pcm_hw_params_set_rate(): Invalid argument
  2024/03/11 09:45:23 Stop request (reset)
& 2024/03/11 09:45:23 Stop...
- 2024/03/11 09:45:23 NAA output network engine stopping...
- 2024/03/11 09:45:23 NAA output network engine stopped
- 2024/03/11 09:45:23 Playback engine stopped
& 2024/03/11 09:45:23 ...stopped
  2024/03/11 09:45:23 Set volume: 0 +
  2024/03/11 09:45:23 Audio transport: rate=0 channels=0 format=auto buffer=0 (normal)
  2024/03/11 09:45:23 NAA input rate set unknown or empty, setting virtual rate
  2024/03/11 09:45:23 NAA input set sampling rate: 176400 (176400)
  2024/03/11 09:45:24 NAA input network Audio IPv6 support enabled
  2024/03/11 09:45:24 NAA input discovery from 0.0.0.0
& 2024/03/11 09:45:24 NAA input discovered network audio: name='rpi4naainput' version='Signalyst Network Audio Daemon 5.0.0'  @192
& 2024/03/11 09:45:24 NAA input discovered network audio: name='rpi4naainput' version='Signalyst Network Audio Daemon 5.0.0'  @192
  2024/03/11 09:45:25 NAA input discovery from ::
& 2024/03/11 09:45:25 NAA input discovered network audio: name='rpi4naainput' version='Signalyst Network Audio Daemon 5.0.0'  @[fe80
& 2024/03/11 09:45:25 NAA input discovered network audio: name='rpi4naainput' version='Signalyst Network Audio Daemon 5.0.0'  @[fe80::d
  2024/03/11 09:45:26 NAA input discovered 1 Network Audio Adapters
+ 2024/03/11 09:45:26 NAA input connect to [fe80::0]:43210 [ipv6]
  2024/03/11 09:45:26 NAA input initial format: 0/24/2 [pcm]
  2024/03/11 09:45:26 NAA input set channels: 2 (2)
  2024/03/11 09:45:26 NAA input rate set unknown or empty, setting virtual rate
  2024/03/11 09:45:26 NAA input set sampling rate: 44100 (44100)
  2024/03/11 09:45:26 NAA input network format: 44100/24/2 [pcm]
  2024/03/11 09:45:26 NAA input network format: 48000/24/2 [pcm]
  2024/03/11 09:45:26 NAA input network format: 88200/24/2 [pcm]
  2024/03/11 09:45:26 NAA input network format: 96000/24/2 [pcm]
  2024/03/11 09:45:26 NAA input network format: 176400/24/2 [pcm]
  2024/03/11 09:45:26 NAA input network format: 192000/24/2 [pcm]

@rhqp looks like back in 2022 I tried to do this with RME , doing the same thing , DoP64 over TOSlink and had the same issues. First it was over NAA and then I connected the RME direct to HQP Embedded Server and same issue.

1 Like

Good to know that this hasn’t been working for long.

Let’s see when @jussi_laako has time to check a DSD64 stream through NAA input. As he has mentioned, it’s at 176.4K PCM bandwidth as DoP, so could be a NAA bug or configuration issue?

I’ll certainly add the Eversolo DMP-A6 which can stream 5.1 DSD over HDMI from SACD ISO rips.

1 Like

Atmos 2.0 works. I guess that is it. It (the 2.0) must work since it is required for Atmos on Headphones.
I don’t think Atmos 5.1 works, since there is no interface to “configure speakers” in Midi app on iPad as it can be done on MacOS. But i had my hope high.

I tried another approach:
Apple Music => BlackHole (+ LosslessSwitcher) => HQPd => Merging Hapi => speakers
Sample rate switching seems working. Not perfectly, because i have a stutter for 2-3 initial seconds while SR switch is in progress, but for “album mode listening” it is passable.
The screenshot is not perfect because HQPd input and output are the same 96k, but you have to believe me, it works.

That is not ideal solution for me. I did not want to run HQPd on Mac. Apple Music supposed to output 6 channels to OS NAA so i can use HQPd on remote host.
I hope Miska will get to the bottom of that and will figure out / tell me, why OS NAA can handle 2-channels (stereo) only in my case.

Yes this method has been working for several people for some months now

You tried to feed NAA OS. Is it running on RPi4?

Did you adjust number of input channels on NAA OS? Maybe default is only 2ch

@Chunhao_Lee is our Atmos expert here, I’m sure he can help

Yeah, trying to switch to 2.8 MHz 24-bit is not going to work…

Yes but you can also see PCM176.4k screenshot, also didn’t work either

I thought rather ask, I’d just try both anyway

Should I try 2.8 MHz 1-bit ? And do I enter that in hqplayerd.xml ?

How to specify bit depth?

I don’t think it is going to work without some work. Either at HQPlayer or NAA side, or both. I’ve had it working for ages with direct HQPlayer input, but the NAA part was only tested briefly at some point. I have not paid much attention to it, since practically nobody has been using it.

When it’s working, the input format should be stated for example as 2.8M/1 and not something like 24-bit.

I’m happy to give it one last try.

How to specify 1-bit in hqplayerd.xml ?

Yes, it is RPI4 with NAA OS. It works from Ipad and Mac, but only for 2 channels.
When i get back home tonight i will look at networkaudiod.xml, if there are any “channel” parameters in there. Thank you for suggestion.

1 Like

This way has no issue for Apple Music Atmos. Please check your BlackHole is 16ch or 64ch version. Both can assign 5.1.2 or 7.1.4 channels output.

Please change the Dolby Atmos to “Automatic” in Music app’s setting. It’ll decode and channel mapping to your speaker layout setting in Audio MIDI Setup.

Did you run the networkaudiod on your Mac?

1 Like

I don’t have any issues with this playing Atmos to my 5.1 speakers (except for 2-3 sec stutter when sample rate switch occurs.
There is no NAA OS involved here.
Setup in this scenario is:
[ Apple Music on Mac → BlackHole (+ LosslessSwitcher) → HQPd on Mac → MAD ASIO] => [ Merging Hapi ] => [ 5.1 speakers ]

No. I run NAA OS on RPi4 with enabled “USB slave device” and connected from Mac over USB-C-to-USB-C cable.

I already use correct config in Apple Music:

I have problem with such setup:
[ Apple Music on Mac → Playback Inactive (seen as 2 outs in Midi settings no matter what i do) ] => [ NAA OS on RPI4 (with USB Audio input configured to 2 channels as well as configured to 6 channels) ] => [ HQPd on Windows ]

Whatever i set up in networaudiod.xml on RPi4 (= 2 channel or 6 channel input device), the “Playback Inactive” device is presented in MacOS’ “Audio Midi setup” as 2 channel device.

1-Playback Inactive is output on Mac:
1-Playback-Inactive is output on Mac

2-Playback-Inactive-2-outs-only:

3-NAA OS-as-input-in-HQPd:

4-NAA OS-configured-as-6channel-input-as-seen-in HQPd:

Thank you for your help.

I am not sure if that could contribute to “Playback Inactive” being only 2-outs, but i found this in HQPd’s log:

  2024/03/13 19:48:12 NAA input set channels: 2 (2)
  2024/03/13 19:48:12 NAA input network Audio IPv6 support enabled
  2024/03/13 19:48:12 NAA input discovery from 0.0.0.0
  2024/03/13 19:48:13 NAA input discovery from ::
& 2024/03/13 19:48:13 NAA input discovered network audio: name='naa-470306bc' version='Signalyst Network Audio Daemon 5.0.0'  @[fe80::da3a:ddff:fe48:88f4%17]:43210
& 2024/03/13 19:48:13 NAA input discovered network audio: name='naa-470306bc' version='Signalyst Network Audio Daemon 5.0.0'  @[fe80::da3a:ddff:fe48:88f4%17]:43210
  2024/03/13 19:48:14 NAA input discovered 1 Network Audio Adapters
+ 2024/03/13 19:48:14 NAA input connect to [fe80::da3a:ddff:fe48:88f4%17]:43210 [ipv6]
? 2024/03/13 19:48:14 NAA input network QoS functionality not available
  2024/03/13 19:48:15 NAA input initial format: 0/32/6 [pcm]
  2024/03/13 19:48:15 NAA input set channels: 6 (6)
  2024/03/13 19:48:15 NAA input rate set unknown or empty, setting virtual rate
  2024/03/13 19:48:15 NAA input set sampling rate: 48000 (48000)
  2024/03/13 19:48:15 NAA input network format: 48000/32/6 [pcm]

NAA input set channels: 2 (2)
and 3 sec later:
NAA input set channels: 6 (6)
but networkaudiod.xml in RPI4 is configured to 6 channels all that time.

The USB audio protocol of RPi’s gadget mode is V1.0. It will be recognized as 2ch device on Mac. So the Audio MIDI Setup won’t show other speaker layout options. Best way is to run networkaudiod on Mac and use BlackHole 16ch to trigger DD+ decode.

2 Likes