HQPlayer Embedded Discussion [2023]

A performance increase is noted regarding 4.34.0 HQP embedded.
I am running Ubuntu Server minimal and custom kernel: 5.15.85-jl+
Intel i5 10400 12 gb RAM DDR4
Not that powerful, just a standard Dell desktop.

hqplayerd 4.34.0-153avx2
1x/Nx: poly-sinc-gauss-long / ASDM7EC / SDM 512
multicore=“1”

Another step-up in processing ability noticed here, never could get ASDM7EC @ 512 to run at Nx rates. You are allowing my modest machine to pump out great music, thanks Jussi.

6 Likes

Nice. What DAC?

I have 3 dacs: Denafrips Pontus II, ifi Neo iDSD, and a Gustard x16. They are fed by an ultraRendu NAA.
If it matters, my personal choice is the Pontus II. It is so smooth to my ears.

3 Likes

Warning long technical post…

I have been doing some amateur experiments in trying to get HQP to run on the performance cores of my new i5 13500 processor. When I did cpu-info in the ubuntu operating system, my processor has 20 logical processors, which is made up of 12 logical processors from 6 performance cores that each supports 2 processes (logical processors 0-11 inclusive), and 8 efficiency cores with 1 logical processor (12-19 inclusive). cpu-info output is below.

Packages:
0: Intel 13th Gen Core i5-13500
Microarchitectures:
14x unknown
Cores:
0: 2 processors (0-1), Intel unknown
1: 2 processors (2-3), Intel unknown
2: 2 processors (4-5), Intel unknown
3: 2 processors (6-7), Intel unknown
4: 2 processors (8-9), Intel unknown
5: 2 processors (10-11), Intel unknown
6: 1 processor (12), Intel unknown
7: 1 processor (13), Intel unknown
8: 1 processor (14), Intel unknown
9: 1 processor (15), Intel unknown
10: 1 processor (16), Intel unknown
11: 1 processor (17), Intel unknown
12: 1 processor (18), Intel unknown
13: 1 processor (19), Intel unknown
Logical processors (System ID):
0 (0): APIC ID 0x00000000
1 (1): APIC ID 0x00000001
2 (2): APIC ID 0x00000008
3 (3): APIC ID 0x00000009
4 (4): APIC ID 0x00000010
5 (5): APIC ID 0x00000011
6 (6): APIC ID 0x00000018
7 (7): APIC ID 0x00000019
8 (8): APIC ID 0x00000020
9 (9): APIC ID 0x00000021
10 (10): APIC ID 0x00000028
11 (11): APIC ID 0x00000029
12 (12): APIC ID 0x00000030
13 (13): APIC ID 0x00000032
14 (14): APIC ID 0x00000034
15 (15): APIC ID 0x00000036
16 (16): APIC ID 0x00000038
17 (17): APIC ID 0x0000003a
18 (18): APIC ID 0x0000003c
19 (19): APIC ID 0x0000003e

With HQPE playing, when I do htop I see:

From what I see from cpu-info, the performance threads are 0-11 inclusive, but it seems that HQP is putting most of the resource onto threads 12-19 inclusive, so it seems the wrong way round to me - I would have thought we would want HQPE to put its processes on the performance cores.

I have been playing around with CPU affinity via the taskset command and the pids of the HQP processes to move them to the logical processors in the performance core range and this has had moderate success. For example, with the default setup, I get frequent drop outs when transcoding PCM to DSD 512 using Sinc-M and AMSDM7EC 512+fs, but always the highest loaded process is 13 or 14, which is in the efficiency range. If I move the highest load HQPE processes to the performance core range, I get far far fewer drop outs, which is the moderate success referred to above. The problem is that as soon as I pause the player the processes die and I have to change the affinity of the new processes all over again once I un-pause.

I guessed that HQPE has done all this process affinity under the hood already and I shouldn’t need to mess with affinity manually, so I looked in the HQPE log and it says:

2023/01/27 14:14:07 Processors physical=14 logical=20 performance=14 efficiency=0 groups=1 packages=1 nodes=1

So it is detecting something about the processor, but the result looks incorrect to me since it seems that HQP reckons my processor has all performance cores and no efficiency ones (which is not the case), so it thinks it can put its processes anywhere it likes, and I am guessing that it is putting them on the efficiency cores.

I am rather new to this affinity thing, so I could have got all this wrong but it would be interesting to explore a bit since there might be potential to get some more performance out of a CPU and access more HQP filters (like the Sinc-M test above). Any light shed on this would be appreciated.

BTW my current fave is DSD 512, poly-sinc-long-ip-2s, AMSDM7EC 512+fs, which has been enabled by the purchase of this new processor. V nice balance of presence, space and transients for the electronica I listen to a lot.

1 Like

PS DAC is Holo Spring 3. Really really nice.

I have just tested my theory by taking the rather extreme step of going into the bios and turning off all the efficiency cores in my processor so it only has 6 performance cores with 12 logical processes. After booting HQPE’s log says:

2023/01/27 22:46:43 Processors physical=6 logical=12 performance=6 efficiency=0 groups=1 packages=1 nodes=1

Result in HQPE: I can run DSD 512, Sinc-M and AMSDM7EC 512+fs with no drop outs after about 20 mins (16/44.1 source) without having to mess about with processor affinity because the only cores I have now are performance ones.

So the bizarre conclusion so far is that by turning off half my processor, I get more performance and access to another HQP filter!!

2 Likes

Yes it is incorrect, and happens because the kernel in question doesn’t detect the core types correctly.

Which OS and Linux kernel version are you using?

I’ve never used HQPlayer and want to give it a try. Can I install the embedded version on a NUC10i5 with a fresh Ubuntu 22.04.1 server install?

Yes, it should be pretty straightforward following the information provided on my website. Essentially you need to install just two packages not in Ubuntu package repositories.

And then with Roon I should be able to control/configure it and use it with my existing Roon endpoints/DACs?

At Roon, you only configure HQPlayer as endpoint. And disable the existing ones. Then you select HQPlayer as the endpoint.

Once audio leaves Roon, it is all up to HQPlayer what happens. So you configure all audio outputs and other settings in HQPlayer and your existing Roon endpoints/DACs don’t apply anymore because HQPlayer is then the endpoint from Roon’s perspective. And HQPlayer owns the final endpoints.

In that case I don’t think I can use HQPlayer then. My main endpoint is a Matrix Audio Element i2 which I don’t think supports HQPlayer?

Ubuntu 22.04 LTS:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

Kernel
Linux version 5.15.0-58-generic (buildd@lcy02-amd64-101) (gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023

Yeah, based on their web page and what I know about officially supported HQPlayer streamers, no.

You would be better off with my custom kernel or Ubuntu’s official lowlatency kernel.

But soon there will be 5.19 in the official Ubuntu HWE-branch. So you could hold on for few weeks:

Meanwhile, you could try my custom kernel if you like. Not sure if it will make a difference in this respect though.

1 Like

OK thanks. I have installed your custom kernel. I must confess ignorance of what benefits this will provide – could you enlighten me? A different question - is the processor so new that existing kernels need to be updated to correctly report the performance and efficiency cores, and this is what you are alluding to with the statement about waiting for the new official kernel? Thanks

1 Like

I mostly follow the current long term support kernel version, but with some additional modifications for DAC support etc.

Yes, the processor generation needs to be supported by the kernel to correctly detect different core types and other special features.

1 Like

Thanks for the explanation. I will keep the efficiency cores switched off for the time being until the kernel catches up with the processor. With this config I can run poly-sinc-long-ip-2s, AMSDM7EC 512+fs at DSD 1024 on both 44.1 base and 48 base and this is my current favourite. I can get Sinc M at DSD 512 using the same modulator as well (only on 44.1 base though). I think this is pretty good for a mid range processor like the i5 13500.

3 Likes

I have HQP running on a SonicTransporter i9, converting output from Roon to SDM at DSD512 with the DSD5EC modulator. I can’t mange the 7EC version as this stutters too much - but I am very happy with 5EC.

The only problem is that I cannot play any of the (few) DSD files I have in my library. I have set the config screen to check the ‘Direct SDM’ box and tried various combinations of Integrator and SDM-SDM Conversion but in no use can I get a DSD track to play. Pressing Play in Roon briefly shows the Play symbol and lights up the Signal Path light but within a second or two it reverts to Pause, without the play time counter having advanced from 0:00.

I had thought that using Direct SDM would mean lighter work for the HQP processor than for a conversion from PCM but somehow this doesn’t seem to be the case.

Am I missing something?

I would expect DSD512 to work on your i9. It would be beneficial to try with multicode=“1” instead of default multicore=“auto”. You cannot change this setting from the web interface, it requires manual configuration editing, because such things are supposed to be done by the device manufacturer as part of performance tuning for their hardware. But I don’t know if Andrew of SGC has done any such performance tuning with the settings.

For manual editing, you would need shell access. However, you can work around this by using the backup/restore functionality in HQPlayer. You can then modify the hqplayerd.xml in the backup ZIP on some other computer and then upload it back. Please just be very careful with such, since breaking the XML syntax could “brick” HQPlayer in the device.

Is there some error in HQPlayer log when you attempt playback?