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

Got it, thanks. You mentioned that the SMSL DL300 had a firmware issue that prevented DSD Direct mode from working properly. How do I test an AKM based DAC for this issue?

Anyone know simplest way to setup just PCM44.1kHz input to feed webrowser audio (Spotify, Tidal , Apple Music) into HQPlayer on Ubuntu ?

macOS we have simple Blackhole.

Linux equivalent? I know you can setup some ALSA loopback thing? Can anyone please share
steps how to do this?

I only need PCM44.1kHz input rate

I seem to have this in my /etc/asound.conf:

pcm.loopout {
        type hw
        card Loopback
        device 0
        subdevice 0
        format S16_LE
        rate 44100
        channels 2
}

pcm.loopin {
        type hw
        card Loopback
        device 1
        subdevice 0
        format S16_LE
        rate 44100
        channels 2
}

ctl.loopout {
        type hw
        card Loopback
}

ctl.loopin {
        type hw
        card Loopback
}

And I remember that you need to “modprobe snd-aloop” for it to work. I have not used it in a very long time, so things may have changed since.

You can then also set it as default:

pcm.!default {
       type hw
       card "loopin"
}

ctl.!default {
       type hw
       card "loopin"
}
1 Like

I am late to the party and I am trying to setup this now but I don’t quite understand what to add to the hqplayerd.xml described in Step #2.

Btw, I am using Hpdp version 5 and NAA OS v5

A cool new feature now with iOS 18 and macOS 15 is iPhone screen mirroring on Mac.

So even in a HiFi room you can leave it on the HiFi rack.

Still need a Macbook on the couch to control (would be great to use an iPad to control iPhone - maybe coming).

A nice little thing possibly for Apple Music Hi-Res, Tidal iOS app users etc.

Does it also work with iPad? Sorry, I have not my home work on this feature… :sweat_smile:

Although iPhone SE would be rather inexpensive dedicated source, WiFi-only iPad Mini is rather nice too and can serve as a nice display as well.

I have iPad Mini as a controller device anybody can use in the livingroom.

1 Like

Sadly not yet. Hopefully next

Looks like there are some other limitations as well:

According to a random person on Reddit (could be real, could be fake) “Apple has stated that, due to the DMA, it will not be available in the EU.”

Thanks to @IgorSki about CD transport connectivity, I was able to connect not only a CD transport but also my iPad through a USB-Toslink adapter, and now I can play Youtube Music (44.1K) and Soundcloud (48K), but for other services that have different bitrate content I have to switch manually. I used the following input but it does not give me any sound:

<input address="naa-xxxxxxxx" device="hw:CARD=sndrpihifiberry,DEV=0" ipv6="0" name="DigiIO @Any" samplerate="0" type="network"/>

Am I missing anything, or samplerate=0 does not work.
Sorry if it is a redundant question, long thread

1 Like

For iPad with automatic rate switching, best is to just connect through USB to RPi4 based input NAA. Then automatic rate switching works. I use it quite a lot with Apple Music.

1 Like

Hello @jussi_laako ,

I thought that NAA could be used to get upsampled data from HQPlayer and send it to dac. Do you have some tutorial how to configure such device to work with iPad and then stream is send it to HQPlayer? I guess there should be some hardware requirements and configuration to do.

It is both ways, from some device into HQPlayer and then from HQPlayer to some device.

This thread covers the topic in quite detail! One of the best places to check how to set it up if you read back a bit.

1 Like

I had planned to write up a Wiki but not yet.

I would recommend getting an RPi4 and fanless case. Burn NAA OS image to microSD card for the RPi4.

Get a USB-C PD hub like this below - connect your iPad to the “host” port of the hub. Below is what I have but lots of docking stations will work.

Use a USB Type A to Type C cable to connect hub’s USB 3.1 port (1.5 amp) to RPi4’s USB-C port.

Power the USB-C hub of course.

In HQPlayer Desktop you select NAA RPi4 as “Input”.

Once you have the hardware check back in and we can go into more detail.

1 Like

Thank you for providing these instructions. I have a powered dock manufactured by Hyper, which appears to be compatible. Additionally, my Raspberry Pi 5B arrived today. I plan to work on setting it up this week and will provide an update regarding any challenges encountered or the overall success of the process.

1 Like

Ok I don’t know which model dock exactly but since you have everything, you might as well try it.

When you load HQPlayer Desktop you need to select this sample rate stream URL /2/0 (or something like that , I’m not at my computer to check it exactly)

If things are working correctly your iPad will show an audio output “Playback Inactive” - ironically this is what you want to see, it means it is working

Hello,

I would like to provide an update on my progress with the NAA configuration.

I have successfully flashed the NAA image with a modified config file that includes the following lines:

#dtoverlay=dwc2,dr_mode=host
dtoverlay=dwc2,dr_mode=peripheral

I am working with both HQPlayer Desktop on Windows and HQPlayer Embedded. For HQPlayer Embedded, I attempted to modify the hqplayer.xml file, which was empty initially. I added the following content:

<?xml version="1.0" encoding="UTF-8"?>
<hqplayer>
   <audio>
     <input address="naa-d86841c8" device="USB Audio (RPi5)" name="NAA USB Audio" samplerate="0" short_buffer="0" type="network4"/>
   </audio>
</hqplayer>

Unfortunately, this configuration did not work, so I suspect there may be an error in my approach.

Regarding HQPlayer Desktop, the situation seems a bit better: I can see the NAA listed under Inputs. However, when I select “Playback Inactive” on my iPad and play music, there is no audio output in either HQPlayer or my DAC.

Below, I’ve included a portion of the logs from HQPlayer for further context:

2024/11/27 21:22:13 NAA input set channels: 2 (2)
2024/11/27 21:22:13 NAA input network Audio IPv6 support disabled
2024/11/27 21:22:13 NAA input discovery from 0.0.0.0
2024/11/27 21:22:13 NAA input discovered network audio: name='naa-d86841c8' version='Signalyst Network Audio Daemon 5.1.2' @192.168.1.142:43210
2024/11/27 21:22:13 NAA input discovered 1 Network Audio Adapters
2024/11/27 21:22:14 NAA input connect to 192.168.1.142:43210 [ipv4]
2024/11/27 21:22:15 NAA input initial format: 0/32/2 [pcm]
2024/11/27 21:22:15 NAA input set channels: 2 (2)
2024/11/27 21:22:15 NAA input rate set unknown or empty, setting virtual rate
2024/11/27 21:22:15 NAA input set sampling rate: 44100 (44100)
2024/11/27 21:22:15 NAA input network format: 44100/32/2 [pcm]
2024/11/27 21:22:15 Audio transport: rate=0 channels=0 format=auto buffer=0 (short)
2024/11/27 21:22:16 Set filter: 30 / 30
2024/11/27 21:22:16 Set oversampling: 40 / 43
2024/11/27 21:22:16 Set dither: 9
2024/11/27 21:22:16 Set modulator: 20
2024/11/27 21:22:16 AutoSDM disabled
2024/11/27 21:22:16 Audio engine is normal
2024/11/27 21:22:16 ASIO output format set to DSD
2024/11/27 21:22:16 ASIO output DSD buffer size is in bits
2024/11/27 21:22:16 ASIO output rates available:
2024/11/27 21:22:16 	2822400
2024/11/27 21:22:16 	3072000
2024/11/27 21:22:16 	5644800
2024/11/27 21:22:16 	6144000
2024/11/27 21:22:16 	11289600
2024/11/27 21:22:16 	12288000
2024/11/27 21:22:16 	22579200
2024/11/27 21:22:16 	24576000
2024/11/27 21:22:16 	45158400
2024/11/27 21:22:16 	49152000
2024/11/27 21:22:16 ASIO output channels: 0 in / 2 out
2024/11/27 21:22:16 ASIO output channel map:
2024/11/27 21:22:16 	0: Left
2024/11/27 21:22:16 ASIO output DSD format MSB1
2024/11/27 21:22:16 	1: Right
2024/11/27 21:22:16 IntegratorM: FIR2
2024/11/27 21:22:16 Audio engine SDM mode enabled
2024/11/27 21:22:16 Volume control disabled
2024/11/27 21:22:16 Automatic output rate switching enabled

From the logs, it appears that the NAA is successfully discovered and connected, and the format and channels are being correctly initialized. However, there is no subsequent audio output.

I would appreciate any advice or suggestions on how to resolve this issue.

Thank you for your assistance.

The default configuration for hqplayerd service is in /etc/hqplayer/hqplayerd.xml and “input” elements are inside the “engine” element.

If you run hqplayerd under your login session (unusual but supported), the configuration is in “~/.hqplayer” directory.

After modifying the configuration file, please remember to restart the hqplayerd service! Otherwise HQPlayer doesn’t know that the configuration has been changed.

You need to load the “audio:default/0/2” URI to the playlist first, once it appears there, you can start playback. This starts playback from the configured input with auto-detected sampling rate.

1 Like

Just to document here again, this is also known to work USB hub for RPi4 input NAA. I have two of such setups:

Note, you need to use one of the blue ports, the yellow charging ports don’t pass data.

1 Like

Thanks, Jussi! That really helped. Got my desktop HQPlayer setup working :star_struck: . I’ll give the embedded version a shot later when I have some free time.

2 Likes