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

Yes, this one is from Desktop’s settings.xml, but the contents are the same. On Embedded in particular you would add “name” attribute to make the input named. You can do it with Desktop as well, if you want to use something else than “default” which is short for the unnamed default entry you configure through GUI.

Yes, if you have two HQPlayer OS instances, change name of at least one of those through /etc/hostname

And if you have multiple HQPlayer Embedded instances (licenses) you’d also want to rename the HQPlayer from the config page in web interface.

When NAA name is not set explicitly through /etc/default/networkaudiod the system’s hostname is used as a name of the NAA.

NAA OS auto-generates unique hostnames, but HQPlayer OS doesn’t do this as it would make it impossible to access web interface or use it with Roon using mDNS through the hqplayer.local address.

1 Like

If I have HQP Desktop v4 , I can’t really use this new RPi4 NAA input feature correct ?

This is restricted to HQP v5 only ?

Possibly yes, I have not tested with v4. It is obsolete version from this perspective.

On v5 this just works by selecting the virtual device from Input tab of settings dialog and then using the input. No need to touch any config files manually.

1 Like

Ok upgraded to v5 Desktop and testing with RPi4 NAA for HQP input, it works very very well.

When I’m at my desktop I actually prefer using Tidal Desktop this way vs Tidal Connect to WiiM Mini because Tidal Connect doesn’t support ‘auto play’ at all

I find that to be a useful for discovering music similar to recently played.

I changed between 44.1k and 48k based tracks alternating and no issues with garbled sound - but I was practical about it, letting 5 seconds pass before changing.

I don’t hate any track enough to need to change < 5 seconds :grin:

Maybe faster changes cause it?

So far, very reliable.

RPi4 is happily powered by USB 3.0 port of my Mac which is also sending the Tidal Desktop data, single cable only required - I don’t need a powered USB hub

Will try iPad later (with Apple adapter of course)

3 Likes

For static rates, RPi4 + HifiBerry Digi+ I/O seems to work surprisingly well. Pretty inexpensive and simple one box input NAA for fixed rates, such as CD spinners or Spotify. HifiBerry also sells nice black steel case for this.

2 Likes

So…Rather than trawling through and piecing things together.

Is there any chance of getting a “sticky” that shows the pathway for all this to work?

Is it on the HQPlayer website, what software or hardware is required to get Apple Music/spotify/SoundCloud etc passing through HQPlayers magic?

There are many different scenarios. I think I will make some more documentation about few of the many possibilities.

If you are on macOS or Windows, for example Spotify has been relatively straightforward through loopback drivers for some time since it is static 44.1k sample rate source. Same goes for old school CD spinner.

The challenge has been with those cases where the sample rate changes on the fly. And Apple Music on macOS has been extra challenge, since even as-is it has not been able to change output rate even though the source rate changes. While on iOS it changes output rate just fine. LosslessSwitcher solves that on macOS. And now combined with LosslessSwitcher and BlackHole, HQPlayer can get Apple Music at varying source rates.

Then another aspect is the hardware path, where HQPlayer becomes “just another output device”. Which is most general purpose approach for various sources. For example with the USB Audio Class input support, combined with Digi+ I/O on the same little device both varying rate USB sources and static rate S/PDIF sources are covered as single input NAA.

So two major paths:

  1. Pure software path (no additional hardware)
  2. Hardware path (through additional hardware device)

Through (2) you can use things like iPad/iPhone or WiiM as source.

I’m such a fan of HQPlayer, that I want it involved in all my various streaming listening set ups. So I’m really pleased with the thought of Apple Music and Soundcloud having the HQP sound added.

Software only could be possible for me.

I could use my Mac mini (which has been dedicated to HQPD) with the LosslessSwitcher app plus black hole, with Apple Music and SoundCloud apps, playing along my current Roon pathway.

I probably choose between Roon/Qobuz/Tidal or Apple,SC, maybe even use BBC sounds app too then.

Would I be able to simply flick from using Roon to Apple and back? Or am I missing something?

Testing with Apple Music HiRez from iPad.

I’m running latest HQP OS with hqplayerd disabled on the RPi4.

And I changed hostmame of the Pi4 to rpi4naainput and in my v5 HQP Embedded I simply added:

<input address="rpi4naainput" channel_offset="0" device="USB Audio (RPi4)" format="pcm" ipv6="1" name="RPi4 USB input" pack_sdm="1" period_time="0" samplerate="0" short_buffer="0" type="network6"/>

I forgot my newer iPad is USB-C. I use a standard UGreen USB-C powered hub and it works beautifully. From the USB hub just a single cable providing power and data to RPi4.

It’s nice when Apple (forced by EU rules) uses standardised connections that just work.

Amazon.com

Great work @jussi_laako !!

I will test my POE HAT with RPi4. It should mean less cables and less power drain from iOS source, not needing charging cable. Maybe

3 Likes

Thanks for that. I was wondering how to make Embedded work in that way! Now working fine here with my Pi4 UAC to HQP Embedded and source of Tidal or Qobuz apps running on Windows 11.

3 Likes

Can confirm this works great with the Pi4 powered over its ethernet cable - less cables hanging off the mobile USB source

Not a problem with a laptop/desktop with USB3.0 port - this can power the RPi4 fine for me

1 Like

There are now also new NAA OS 4.6.0 images available with the USB Audio support.

1 Like

Can I use the same Windows machine (A) running NAA to send and receive audio to/from HQP running on a different (beefier) Windows machine (B)?

Point is, on (A) I’ve the main DAC connected and that’s selected as the NAA output on HQP running on (B). This runs perfectly with Roon.

But for Tidal running on (A) is there any way to route the audio to the NAA daemon so that it can be picked up by the NAA input of HQP on (B) and send it back to (A) after upsampling (as done with the Roon setup)?

No, only one NAA per machine.

Why this instead of using Tidal through Roon and letting it send it to HQPlayer?

For native app experience. Could also potentially extend to other streaming services.

Then what do the input devices on the same machine (where the output DAC is connected) reported by NAA mean?

All devices are listed under input and output devices. But if you configure something behind NAA (1) for both input and output, it won’t work. The other one will fail to connect since the NAA is already reserved for the other direction.

You can of course have two NAAs, one for input and another one for output. Or you can have input side on NAA and output on locally connected DAC. Or like I have for example on one Windows server, I have local RME HDSPe AIO card for inputs and output happens over network to a NAA. You can of course also have both locally connected input and output as long as they are not the same device.

Hi Jussi,
I’m planning to use a Pi4 connect to my Windows Surface Pro as NAA input to play Spotify to my main HQP embedded machine. I could not find any document explains how I could configure the NAA after flashed the image to the microSD card.
What should be changed in the config.txt file before booting up?
What should be configured in my HQP embedded machine so that it can take the signal in when Spotify app in my Surface Pro play and out put to the connected input NAA Pi4?
If I understand correctly, LAN will work automatically. However, if I want to use WIFI connection, how can I join this input Pi4 NAA to my WiFI network.
Thank you.

Thanks. Understood.
What if I virtualize the node using ESXi or proxmox and run two VMs booted from the NAA images, pass through input and output devices to the respective instances? Both VMs will be connected to the same network of course.

Is this worth trying?

NAA itself doesn’t need any configuration. But above on this thread you can find the <input> element description you need to add to the hqplayerd.xml in order for the NAA input to appear. On NAA OS, the NAA gets unique name based on the hardware. So this part is specific to a particular input.

So it needs to be something like:

<input address="naa-XXXXXX" device="USB Audio (RPi4)"
 ipv6="1" name="NAA USB Audio" samplerate="0"
 short_buffer="0" type="network6"/>
2 Likes