HQP NAA - Raspberry Pi

Continuing the discussion from Raspberry Pi Support:

2 Likes

Hi Muski,

I’ve just bought an RPI2 which I intend to dedicate as an HQ NAA. I was planning on the most minimal Ethernet in /USB out installation that I could find. I am getting an SDA card with NOOB installed and was looking closely at DietPi.

As I understand it DietPi is a minimal Rasbian image and Rasbpian is an unofficial port of Debian Wheezy (7)armhf. The HQP network daemon, however, is written for Debian Jessie (8) and I have not seen whether there are any backwards compatibility issues for Rasbian.

In November 2012 the Signalyst News page shows a version of NAA was released for Raspberry Pi, but the link is no longer active.

I am by no means skilled in Linux admin and am sort of hoping that a combination of DietPi and the Jessie NAA will play nicely together. I’ll let you know of anything else I find.

Edit: The post by Miska/Jussi in this thread regarding Beaglebone installation may also be a handy guide to Raspeberry Pi 2 installation. I haven’t yet finished reading the thread.

Edit 2: Updated instructions for Jessie. Haven’t seen anything directed to RPi2 yet.

What are you doing with the RPi and HQPlayer? And a BBB?

I don’t have a BBB. I am intending to use an RPi2 as an HQ Player Network Audio Adaptor (NAA). An NAA is effectively a network endpoint for HQP. It is recognised as an output by HQP and converts Ethernet to USB.

Thanks andybob & Steve for your advice. I’ll give it a go later this week when I have some time. I’m using Volumio on an RPI2 with a HifiBerry Digi+ card right now.

Andybob, let us know if you make any progress.

Thanks,
muski

As I mentioned over on the HQPlayer integration thread, getting this working was remarkably simple.

I already had Volumio running on my Raspberry Pi 2 + Hifiberry Digi+ card and an Edimax EW-7811UTC wifi adapter for high-speed 802.11ac connectivity (which I needed for playback of higher-resolution DSD & 192kHZ PCM files). Worked fine, but Volumio was so kludgy,

I did a fair amount of reading the past few days, and remembered reading that the HQPlayer NAA stuff could work alongside MPD. So on a whim I tried a variant of something I saw on a post by Miska on computeraudiophile.com.

I ssh’ed into my RPI2 and tried:

apt-get install libasound2 alsa-utils

wget http://www2.signalyst.com/bins/naa/debian_wheezy/raspberry_pi/networkaudiod_2.0.5-20_armhf.deb

dpkg -i networkaudiod_2.0.5-20_armhf.deb networkaudiod_2.0.5-20_armhf.deb

I went back into HQPlayer Desktop on my iMac, changed the Backend to NetworkAudioAdapter and much to my surprise, under Device there was snd_pi_hifiberry_digi! I changed the SDM Pack to DoP and was in business.

To simplify things I first played back a local file from HQPlayer, but once it worked, I switched over to Roon—actually RoonServer + HQPlayer running on my iMac, controlled by the Roon iPad app.

1 Like

Andy, I’m also trying to do something similar - run HQPlayer NAA on a small Linux device. Except in my case on a couple of Wandboards I have lying around. I’ve not had the time to actually try but have done some research and it sounds like Debian Stretch may be an easier way to go since the needed kernel patches are already built in…I’m very unfamiliar with Linux and figured the pre-applied kernel patches will make things easier. Just thought I’d pass that along. Good luck and let us know how it goes!

1 Like

Hi Muski,

Very interested how you got HQPlayer working on the Rpi2.

Would it be possible to give a foolproof explanation of how you did it?

i.e. what I need to load on my sd card and how to configure everything?

I already have HQPlayer on my macbook pro.

My RPi2 is currently running mood player.

Many Thanks

Wayne

1 Like

Hi Wayne,

Just to clarify, what @muski has done, and what I plan to do, is to instal the Network Audio Adaptor (NAA) software for HQP onto a Pi. The Pi is under spec to run HQP itself.

An NAA is an output that HQP recognises over Ethernet or WiFi. It is a very thin client, optimised to run as minimally as possible. The software is published on the Signalyst webpage as NAA daemon for anyone with an HQP licence.

Installing the NAA software on a Pi will let you send audio over a network from HQP to the Pi, but it won’t let you run HQP on the Pi.

Sorry if I’m telling you things you know, but I did not want people to get the impression that the Pi can run HQP itself.

Hi Andy,

Thanks for the info. Couple of questions if I may…

My knowledge on Linux is very limited.

When you say install the naa onto the pi, is this done the same way as writing an image to the sd card the same way as volumio or moode is done?

I currently have a iqaudio i2s dac in my pi but could also connect a usb iFi nano idsd

Would these dacs be ok for the naa?

I have a full hqplayer licence and currently run it alongside Roon direct from my macbook pro.

The naa would be nice so I could use my macbook just as a controller

Many thanks

Wayne

Hi Wayne,

I’m also no Linux buff, I’m hoping I won’t need to be.

As I understand it @muski is not writing an image to the SD card (which would replace the OS on the card) but is downloading and unpacking the library and NAA software onto the SD.

The three Linux commands @muski used to do this are set out in his post. Although I wonder if the first should refer to “alsa utils” rather than “alas utils” ?

I have no experience of the DACs you refer to, but don’t see why you couldn’t use them. In general terms I understand any DAC supported by ALSA will work.

My Pi arrives on the 29th and I’ll set out what I do in this thread. Be pleased to hear how others go in the meantime.

Cheers for the help Andy

I might have a crack at it tomorrow then.

I’ll keep the thread posted

Hopefully @muski can add a little more detail to the procedure as well.

Holy Christmas… That was easy:

Keep in mind that my first Pi is just one day old… ;-)To keep things easy, I followed the exact procedure lined out by @muski above (more efficient installations are probably possible, but that’s for later):

1 - Flash the Volumio IMG to SD card and config Volumio for any audio options you may have (DAC, Digi+, whatever). Reboot and verify sound is working OK in Volumio.

2 - SSH into your Pi in a terminal window (OS X Terminal will work, or Putty for Windows):

ssh root@your.ip.number.here

Enter the password (volumio)

Copy and paste the three exact lines from @muski’s post. Ignore the error messages.

Reboot the Pi (just to be sure).

3 - In HQ Player Settings, choose Backend > NetworkAudioAdapter and Device > Whateveryourdeviceis.

That’s all there is. Really. Now off to RTFM from Signalyst. I’m pretty sure that’ll keep me off the streets during Christmas… :wink:

2 Likes

For those who’ve got NAA running on a RPi2 - have you managed to get DSD to play?

I looked into this a while ago and found out that the NIC on the RPi2 is on the USB bus, so the bandwidth for the USB DAC and NIC is shared

Got this working a treat as well now.

Thanks for the instructions Rene.

I did exactly the same except I am using moode rather than volumio.

What I found was that I had to copy muski’s 3 lines into notepad first and then paste into putty.

I think that the little number at the end of the web address was confusing issues when pasting direct.

I’ll try with DSD shortly once I’ve swapped my RPi2 dac’s around.

Finally able to free my Macbook Pro up. Happy Days

DSD Streaming working ok through HQPlayer NAA

Hi –

Glad that a couple of people got this working. Thanks for pointing out a couple of typos that I fixed (the spell-checker indeed swapped alsa for alas!).

And yes it supports DSD (DoP in my case). I’ve played back DSF files and PCM files upsampled to DSD by HQPlayer. Both were fine.

And to clarify this gets the RPI2 running as an HQPlayer Network Audio Adapter (NAA), so you need to have a full version of HQPlayer running somewhere. I run HQPlayer and RoonServer on my iMac in one room, with the NAA feeding my Devialet 800.

If you don’t have the fully-licensed version of HQPlayer on a Mac the HQPlayer Desktop app will just quit after 30 minutes. After that you can try relaunching it, but it won’t connect to the NAA for 24 hours (beware: it kind of makes you think your NAA is not working, but then it works fine the next day…)

A few other things…

While my initial experiment involved installing the NAA packages on my RPI2 running Volumio, I’ve since tried a cleaner and more minimal configuration with an image of RASPBIAN JESSIE LITE that boots much faster (and probably has fewer services running in the background).

Download it at https://www.raspberrypi.org/downloads/raspbian/
(second image on the page). Follow the installation guide link at the top of the page to create an image on a MicroSD card for your Pi.

Until you install a wifi driver, you’ll need to physically connect the RPI2 using an Ethernet cable. Then power it up…

Using the Terminal app on the Mac, I logged in using:

ssh -l pi raspberrypi.local

With password raspberry

(With raspberrypi.local and you don’t have to track down the IP address of your Pi. BTW, the equivalent for Volumio is ssh -l root volumio.local, with a password of Volumio).

Next it’s probably a good idea to:

sudo apt-get update
sudo apt-get upgrade

And then install the NAA package:

sudo apt-get install libasound2 alsa-utils
sudo wget http://www2.signalyst.com/bins/naa/debian_wheezy/raspberry_pi/networkaudiod_2.0.5-20_armhf.deb
sudo dpkg -i networkaudiod_2.0.5-20_armhf.deb networkaudiod_2.0.5-20_armhf.deb

This will install the NAA software and configure it to run as a service in the background. At this point the NAA should appear in the HQPlayer desktop app on your Mac or PC (under Preferences).

You can log out of the RPI with using

exit

And you’re all set. BTW, if you’re having trouble connecting and want to see what’s going on with the RPI, log in as above, stop the service and run it in the foreground (where you’ll see the connection messages in the terminal). Do this with:

sudo /etc/init.d/networkaudiod stop

networkaudiod

You’ll see the status messages. If all’s well, use Ctrl-C to kill it, then turn the service back on with:

sudo /etc/init.d/networkaudiod start

In terms of audio out, it looks like you can get audio out from both the USB and HDMI outputs, but I’ve not tried them. On my RPI2 I have installed a HifiBerry Digi+ card https://www.hifiberry.com/digiplus/ (with isolated outputs) and connect my SPDIF to my DAC. I’m very happy with it. I also recommend their case and power supply. You’ll need to configure it according to their Guide “Configuring Linux 3.18.x” (the only tricky thing here is that you’ll need to use a Linux editor to modify some files),

Lastly, if you want to connect your RPI2 by wifi, you’ll need to get a USB adapter and install the drivers for it. Some common adapters may be included the Jessie Lite distribution, but I"m not sure which ones. When I was using Volumio, I found I couldn’t play back DSD files with a basic 2.4GHz 802.11g adapter–there wasn’t enough bandwidth and I’d get dropouts. HQPlayer may not need as much bandwidth, so 802.11g may be enough—worth a try.

In my case, I got an Edimax EW-7811UTC for 5GHz 802.11n and 802.11ac. Mine maxes out at the USB 1.0 limit of 434Mbps from my Apple Time Capsule—plenty fast enough for DSD. In fact, even 802.11n at 150 Mbps is fast enough to play DSD and 192kHz files. But this adapter is tough to configure—PM me if you want some tips.

Hope this helps.

Cheers,
Muski

2 Likes

Ha… These were my plans for today – thanks for making it a lot easier, @muski! :wink:

Just follow the above instructions and you’ll be set in no time. My Pi is running markedly cooler as well.

Note that manually configuring the Digiplus in Raspbian Jessy (Lite) is slightly different from the old instructions on the Hifiberry website.

Good point. I can’t exactly remember what I did, but I know you can skip the first step of removing the drivers from the blacklist. Don’t install mplayer!

Curious what network adapter and what wifi speed you’re using? Does it play DSD files?

Cheers,
Muski

Taking a tip from the horse’s mouth (@jussi_laako in a different thread), I updated the Debian Jessie install on my Pi to Debian Stretch and was subsequently able to load the 3.1 package of networkaudiod instead of the older 2.0.5 mentioned above.

Of course veils lifted, basses deepened and soundstages grew beyond recognition.

But apart from that, it feels good to be up-to-date. :smile: