Roon lost control of the Audio device - HQP Desktop

Enabled logging nine hours ago and haven’t had a “lost control” error since.

That must be the fix!

:crazy_face:

What is your content source? Some spinning HDD?

combination of 1TB SSD on mac mini and Qobuz/Tidal stream.

I asked because one common source of such problems is something going to sleep. For example typical issue of HDD spinning down, and then for next track it needs to spin up and that causes enough delay for HQPlayer to give up.

Gotcha.

yeah, i have a few spare mac mini’s besides the Roon core, and it’s those that are running HQP. I have everything set to never sleep.

To clarify… it’s not when i start to play something that the “lost control” error happens. It will be in the middle of a track. And it seems to happen in waves. Some days, no problem. Perfect. All good.

Other days (or stretches) it happens often.

I’ve rebooted the mac, restarted hqplayer, rebooted the ethernet switch, rebooted the comcast cable modem, rebooted the RPi running RoPieeeXL, etc…

Haven’t been able to pin down any one thing.

if i switch the zone to the Chromecast Audio dongle (same system and DAC), the error NEVER happens.

So that’s something. I think.

I may decide to eliminate HQPlayer from the chain, just to test.

For 95% of my listening, I don’t need HQP. It’s just when I’m having a “listening session” that I appreciate the uptick in sound quality.

1 Like

One such case recently was caused by Microsoft’s anti-virus software on a Windows machine. Since it inserts itself as a proxy between Roon and HQPlayer network connection. And then it starts scanning the content. And as it’s a stream, it collects and scans ever growing amount of data until limit is reached. At some point it begins to lag too much.

But overall, this sounds like a network issue somewhere on the Source → Roon → HQPlayer → NAA path.

Have you tried running NAA OS on the RPi instead? At least that is pretty easy to try.

2 Likes

I have not. I’ve gotten so familiar with RoPieeeXL (which supports HQP NAA), that I haven’t been tempted to scrub it for any other Roon-friendly OS.

Although, I do have a spare Raspberry Pi (shhhh don’t tell anyone!), so maybe I’ll give it a go.

There’s nothing to configure on NAA OS, you just boot it up and it is ready to go. In addition, if you just have a spare microSD card, it is very easy to swap the card. You don’t need to touch your current one.

4 GB card is enough for NAA OS.

I downloaded the hqplayer-embedded-4.34.1-raspberrypi4.img file, and tried to flash a microSD with it, using BalenaEtcher, but it kept failing. So that must not be the way to go? Are you saying I just need to copy the .img file to the microSD card and put it in a Pi?

Or what am I not getting?

If you are on Windows try Rufus … and download the NAA image, not the HQP OS one

… anyway to use Balena Etcher you must unzip it before flashing

1 Like

on a mac.

Yep, was trying to flash the .img file, as above. Not the zip file.

but where’s the NAA file? Not seeing that in the list of files. (Maybe I’m looking in the wrong spot.)

Can you share the link to the NAA download page?

at the bottom of the HQPlayer 4 Desktop web-page there is a section dedicated to NAA (Network Audio Daemon);
you’ll find the link there (better to teach you how to cook, instead of serving you dinner :slight_smile: )

ok, looks like this file?

naa-431-raspberrypi4.7z

That’s it ….

ok, to clarify all this… i just copy the img file to the microSD, don’t flash with Balena?

(because I tried flashing with BalenaEtcher on my Mac and it keeps failing. I’ve tried to erase the MicroSD a few times with Disk Utility, but it makes no difference.)

EDIT: I feel like i’m asking stupid questions, but the flash keeps failing.

getting this error:

EBUSY: resource busy or locked, open '/ dev / rdisk2

Moving on.

From a terminal window (Terminal.app) , run the following commands:

  • identify which disk device is your SD card run “diskutil list”; in my case it’s device disk2
% diskutil list
[ . . . ]
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *4.0 GB     disk2
   1:             Windows_FAT_32 <U+2068>boot<U+2069>                    268.4 MB   disk2s1
   2:                      Linux <U+2068><U+2069>                        3.7 GB     disk2s2
%
  • if your SD card has any valid fileystems, macOS will try automount them; we need to unmount any mounted filesystems first, using “diskutil unmountDisk disk2” (replace disk2 with your disk device):
% diskutil unmountDisk disk2
Unmount of all volumes on disk2 was successful
%
  • as a sysadmin user, we need to copy the disk image to the SD card using DD command (replace disk2 with your disk device, identified in first step)
# dd if=naa-431-raspberrypi4.img of=/dev/rdisk2 bs=1024k
2000+0 records in
2000+0 records out
2097152000 bytes transferred in 387.840145 secs (5407259 bytes/sec)
#

be very careful when you identify the disk drive of your SD card; if you select the wrong drive, last command can permanently wipe your data

1 Like

thank you!

unmountDisk worked, and now the flash is progressing :+1:

EDIT… ok, I’m pretty much a dummy on this stuff.

Could NOT figure out how to get Roon to see this new instance of HQPlayer. Or how to connect to it to configure it. (Still can’t find it on the network to point a browser to it. It’s not showing up as a Raspberry Pi device.)

Anyway, I was under the assumption that this would become a roon endpoint, but apparently I was wrong.

It is HQPlayer NAA endpoint, nothing else. It is not supposed to appear under Roon. If you are using HQPlayer, HQPlayer is the ultimate endpoint from Roon’s perspective. And then where the audio output goes is HQPlayer’s business and Roon doesn’t even know about it.

yep, got it.

I’m pretty committed to the roon + hqplayer ecosystem that I can’t see myself avoiding roon for this.

I’d rather try to solve the “lost control” problem!

I appear to be having the same issue @jussi_laako. I used to run a Roon Core on the same PC as HQPlayer but recently switched to a dedicated Core using HQPlayer in a networked setting, and this has resulted in the “Roon lost control of the audio device” error. Timing is inconsistent, sometimes it happens after 20 minutes, sometimes it runs for several hours before suddenly stopping. After enabling logging the error appears to be a timeout, as described on this line:
! 2023/04/19 08:39:47 clHQPlayerEngine::Execute(): clStreamReaderHTTP::Read(): read timeout 2

Below is a larger excerpt from the log file, in case it helps:

  2023/04/19 08:34:27 End of track at 405.01/0/-405.01
& 2023/04/19 08:34:27 Next  (1165)
  2023/04/19 08:34:27 Idle request
  2023/04/19 08:34:28 Stop request (tail)
& 2023/04/19 08:34:28 Stop...
- 2023/04/19 08:34:29 ASIO output engine stopped
- 2023/04/19 08:34:29 Playback engine stopped
& 2023/04/19 08:34:29 ...stopped
  2023/04/19 08:34:29 Set volume: -3 +
& 2023/04/19 08:34:29 Playlist clear
& 2023/04/19 08:34:29 Playlist add URI: http://192.168.0.242:30000/93e9562764964ce4ab673df88653827b/stream.raw
  2023/04/19 08:34:29 Offload: resampler=disabled convolution=disabled
& 2023/04/19 08:34:29 Play
  2023/04/19 08:34:29 Offload: resampler=disabled convolution=disabled
+ 2023/04/19 08:34:29 Playback engine running
  2023/04/19 08:34:30 SDM conversion parameters (8, 0)
  2023/04/19 08:34:30 DSD 6 dB gain disabled
  2023/04/19 08:34:30 Rate or blocksize change triggered
  2023/04/19 08:34:30 Rate: 44100, block size: 3528, frame size: 588
  2023/04/19 08:34:30 Block size: 3528 (sample: 3)
  2023/04/19 08:34:30 Playback engine ratio: 2.17687
  2023/04/19 08:34:30 Filter: extended poly sinc 2
  2023/04/19 08:34:30 Dither: triangular probability density function for 24-bit
  2023/04/19 08:34:30 Set volume: -3 +
  2023/04/19 08:34:30 Offload: resampler=disabled convolution=disabled
  2023/04/19 08:34:30 Initialization complete, starting audio engine
  2023/04/19 08:34:30 Teams: 1
  2023/04/19 08:34:30 Places: 1
  2023/04/19 08:34:30 Parallel threads: 8
  2023/04/19 08:34:30 Nested parallelism: 4
  2023/04/19 08:34:30 Parallel pipelines: 4
  2023/04/19 08:34:30 ASIO output channels: 0 in / 2 out
  2023/04/19 08:34:30 ASIO output channel map:
  2023/04/19 08:34:30 	0: Analogue 1/SPDIF 1
  2023/04/19 08:34:30 	1: Analogue 2/SPDIF 2
  2023/04/19 08:34:30 ASIO output buffer sizes: 1728/1728/1728 granularity: 0
  2023/04/19 08:34:30 ASIO output using ASIO buffer size: 1728
  2023/04/19 08:34:30 ASIO output latencies: 2112/2880
  2023/04/19 08:34:30 ASIO output not using ASIO output ready notifications
  2023/04/19 08:34:30 ASIO output engine started at 96 kHz, 2 channels, 1728 sample buffer (2 channels)
+ 2023/04/19 08:34:30 ASIO output engine running at: 96000
  2023/04/19 08:34:32 Offload: resampler=disabled convolution=disabled
! 2023/04/19 08:39:47 clHQPlayerEngine::Execute(): clStreamReaderHTTP::Read(): read timeout 2
  2023/04/19 08:39:47 Stop request (reset)
& 2023/04/19 08:39:47 Stop...
- 2023/04/19 08:39:48 ASIO output engine stopped
- 2023/04/19 08:39:48 Playback engine stopped
& 2023/04/19 08:39:48 ...stopped
  2023/04/19 08:39:48 Set volume: -3 +
- 2023/04/19 08:39:48 Control ended from 192.168.0.242:38468

If there is any other info necessary I’d be glad to share.