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

The RPi4 is powered via a power supply that connects to the Pi2AES HAT.

Which OS is this NAA running? Is the type-C interface switched to device (peripheral) mode?

The NAA is running NAA OS 5.13. Yes, I edited the config file to switch the USB C interface to peripheral mode.

My PC recognizes the NAA as “Speakers HQPlayer” when connected via the USB C interface, and everything works in that configuration. So I believe the NAA is set up correctly. The problem appears to be on the iPhone side, it does not recognize the NAA as an output device for some reason.

Do you have a powered USB hub in between providing power to the RPi?

I’m using this feature quite a bit with my iPhone and iPads.

1 Like

No powered USB hub, but since the RPi4 is powered via the HAT my understanding is that a direct C-to-C connection between the IPhone and RPi4 should suffice?

I also tried using an M1 iPad Air as the source and that didn’t work either. Oh well, would have been nice to get this working but I’m all out of ideas.

On an unrelated note, if anyone is wondering whether the Tidal Windows client has been fixed to properly switch sample rates in exclusive mode, the answer is unfortunately no. When I engage exclusive mode the output is resampled to the fixed sample rate configured in Windows.

Yes, it should if you have some PSU hat on it.

But if the NAA doesn’t appear on your HQPlayer, then it is either network issue, or the NAA is not coming up properly. So first thing is to get it selected as input device, before that it won’t do anything useful


Same problem on macOS too last time I tried


I assume Qobuz connect does not connect to HQPe at the moment.
Am I correct? (These are not puns
)

No, not supported at the moment.

1 Like

Different question: is there any way of connecting Shanling CR60 to hqplayer? Like with cheap cd drives. Thank you!

It has digi coax and TOSlink outputs so this can feed HQPlayer using the methods discussed in this thread - HQPlayer wouldn’t know if it is a CD player or Bluesound Node or WiiM Mini streamer (with SPDIF outputs anyway).

The USB output could feed NAA OS like USB sources discussed in this thread. For a CD it is fixed output at PCM44.1kHz

Since auto sample rate switching isn’t required there might be an easier way with USB directly connected to NAA OS or even HQPlayer server.

I’ve never tried a CD player. @jussi_laako might be able to help

The rear:

For just RedBook, there are inexpensive simple Toslink input → USB dongles out there which work fine. Since there’s no need for automatic rate switching in such cases, RedBook is always 44.1k. This approach works also for Spotify, since it is also always 44.1k.

One possibility is also RPi based input NAA, using HifiBerry Digi+I/O hat. They also offer a nice compatible steel case for the combo. Same device can also double as USB input NAA with automatic rate switching.

1 Like

Thank you Jussi
I tried the Hifime UR23 SPDIF Optical to USB converter, but hqplayer does’t recognize it as an input device.

It should work fine. Which OS are you using HQPlayer on? I assume HQPlayer Desktop product here.

Yes:
HQPlayer OS x64 AVX2 build Version 5.12.1

with ASUS ExpertCenter PN52-S9032MD (AMD Ryzen 9
5900HX,

On HQPlayer Embedded, all input devices must be configured by manually editing the /etc/hqplayer/hqplayerd.xml configuration file (please remember to check the file permissions and restart the hqplayerd service after touching the file). On HQPlayer Desktop you can select one input device from Input tab of the Settings dialog. But on Embedded you can have unlimited number of named input devices which to choose from. Limitation is that there’s no graphical interface to configure those, but instead those are configured manually. This is something a “streamer manufacturer” would usually do.

There are few preconfigured devices there that can be modified or used as an example. And some more commented out. You can use “arecord -l” to list the available input devices. This listing gives you the device id needed for the configuration file.

As an update to my previously posted configuration for HQPe to use ALSA loopback as input device, I have recently configured it to use Plexamp as a source. (Disclaimer, this requires a Plex license to use the plexamp app) This is great for me as I prefer to play local hosted media vs subscribing to a streaming service. As much as I appreciates Roon’s ability to manage and present my local library, the sonic analysis and mixes generated by Plex are on another level. Either artist, genre, mood radios it creates are as good as a service like Spotify can do IME.

You can use available scripts to install headless plexamp service (most of the existing scripts out there are described “for raspberry pi”. I used odinb’s github script and found it to not be arm specific, so it worked on amd64 Ubuntu VM.

Then in the audio output settings of the endpoint’s (http IP port 32500) choose the ALSA loopback interface, and activate it as an input in HQPe, voila!

I won’t go into details about how to configure plexamp to output “bitperfect”, there are plenty of resources out there. I played around with being able to output bitperfect stream beyond 44100, and could only get it to setup the ALSA interface automatically based on the first track played. So say the interface is setup 96000, then if the next song is 44100, HQPe will still see a 96000 input stream and filter it based on that. Not ideal for me, so I chose to leave the interface at 44100 as 90% of my library are CD rips at that rate anyways. Playback will still work with 48 or 96 content as Plex is able to transcode on its own.

I can still use Roon or Jplay to play hi-res albums anyways as I am not I am not looking to use one interface exclusively, but rather have options on how I interface with HQPe. It’s rather neat the amount flexibility you get with the interface input capability of HQplayer combined with the simplicity of a loopback interface.

I have an improvement in works that should help on the rate change case here.

2 Likes

At this moment, I am still stuck at getting my iPad connected/recognized as input on my RPI4-based NAA.

What I have done so far:

  1. I have loaded the latest NAA OS software version naa-515-raspberrypi-holored on the memory card of my Bqeel Raspberry 4 Model B, and tested it as a regualr ‘output’ NAA with my T+A 200 dac (replacing my HoloRed NAA. It worked flawlessly.
  2. As one cannot ssh in NAA OS, I have removed the memory card and edited (on a Windows 11 PC) the config.txt file, to put the ’ usb output’ line in comments, and activate (i.e. remove the comment) from the ‘input usb’.

No my questions:

  1. should this enable all 4 usb ports of my PI4 as HQPLayer ‘inputs’?
  2. how can I verify if this is actually working correctly?

Dirk

Yes all four usb ports can be used as NAA output to dac

I’m not sure what this is referring to?

Do you mean enable “peripheral” usb mode ?

No, nothing to do here - those type A ports are only outputs not inputs

The input from USB source is the type C

You using type C ipad?

There is just one line to add to hqplayerd.xml which I shared in PM last week