Diet Pi, Roon Bridge, HQP and iFi Nano

Hi,

After a little help.

I’ve installed dietpi 1.4 and I am trying to set up my ifi Nano dac with it.

Where do I set usb dac as an option as there is no mention in the sound card section?

My nano is showing in HQPlayer as a network dac but says failed to load.

Cheers

Wayne

@Wayne_Bull1

Hi,

We don’t currently support USB DAC’s in dietpi-config yet, but we’ll look into it.

I’ll need some information from your system, but we should be able to get it up and running for you fairly quickly.

Please paste the results from these commands
aplay -l lsmod lsusb

Thanks for the reply Dan,

Here’s the results, cheers.

root@DietPi:~# root@DietPi:~# aplay -l
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: AudioDOP2 [iFi (by AMR) HD USB Audio (DOP2], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@DietPi:~# lsmod
Module                  Size  Used by
nfsd                  244942  13
8192cu                555865  0
cfg80211              440988  1 8192cu
-bash: root@DietPi:~#: command not found
rfkill                 15589  2 cfg80211
snd_usb_audio         118736  0
root@DietPi:~# **** List of PLAYBACK Hardware Devices ****
-bash: ****: command not found
root@DietPi:~# card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
-bash: card: command not found
root@DietPi:~#   Subdevices: 8/8
-bash: Subdevices:: command not found
root@DietPi:~#   Subdevice #0: subdevice #0
-bash: Subdevice: command not found
root@DietPi:~#   Subdevice #1: subdevice #1
-bash: Subdevice: command not found
root@DietPi:~#   Subdevice #2: subdevice #2
-bash: Subdevice: command not found
root@DietPi:~#   Subdevice #3: subdevice #3
-bash: Subdevice: command not found
root@DietPi:~#   Subdevice #4: subdevice #4
-bash: Subdevice: command not found
root@DietPi:~#   Subdevice #5: subdevice #5
-bash: Subdevice: command not found
root@DietPi:~#   Subdevice #6: subdevice #6
-bash: Subdevice: command not found
root@DietPi:~#   Subdevice #7: subdevice #7
-bash: Subdevice: command not found
root@DietPi:~# card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
-bash: card: command not found
root@DietPi:~#   Subdevices: 1/1
-bash: Subdevices:: command not found
root@DietPi:~#   Subdevice #0: subdevice #0
-bash: Subdevice: command not found
root@DietPi:~# card 1: AudioDOP2 [iFi (by AMR) HD USB Audio (DOP2], device 0: USB Audio [USB Audio]
-bash: syntax error near unexpected token `('
root@DietPi:~#   Subdevices: 1/1
-bash: Subdevices:: command not found
root@DietPi:~#   Subdevice #0: subdevice #0
-bash: Subdevice: command not found
root@DietPi:~# root@DietPi:~# lsmod
-bash: root@DietPi:~#: command not found
root@DietPi:~# Module                  Size  Used by
-bash: Module: command not found
root@DietPi:~# nfsd                  244942  13
-bash: nfsd: command not found
root@DietPi:~# 8192cu                555865  0
-bash: 8192cu: command not found
root@DietPi:~# cfg80211              440988  1 8192cu
-bash: cfg80211: command not found
root@DietPi:~# rfkill                 15589  2 cfg80211
-bash: rfkill: command not found
root@DietPi:~# snd_usb_audio         118736  0
-bash: snd_usb_audio: command not found
1 Like

Which SSH client are you using, looks like the bash prompt is not handling text output correctly? Might be worth resetting the terminal
setterm -reset

card 1: AudioDOP2 [iFi (by AMR) HD USB Audio (DOP2], device 0: USB Audio [USB Audio]

Ok so its card 1. Lets set that as the default soundcard on system.

Create a file /etc/asound.conf with the following lines:
pcm.!default { type hw card 1 device 0 } ctl.!default { type hw card 1 device 0 }

Save changes, then restart NAA Daemon with dietpi-services restart. Sound should now be functional with NAA Daemon.

Hi Dan,

I’m using putty as a SSH client.

You’ll have to excuse me, I’m new to this…how do I create the file?

nano /etc/asound.conf

Copy and paste Daniel’s lines

Close and save: CTRL-X, y, enter

1 Like

Still no joy Dan.
These are my readings after the change

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: AudioDOP2 [iFi (by AMR) HD USB Audio (DOP2], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
root@DietPi:~# lsmod
Module                  Size  Used by
nfsd                  244942  13
8192cu                555865  0
cfg80211              440988  1 8192cu
rfkill                 15589  2 cfg80211
snd_usb_audio         118736  1
snd_hwdep               5727  1 snd_usb_audio
snd_usbmidi_lib        19673  1 snd_usb_audio
snd_rawmidi            18260  1 snd_usbmidi_lib
snd_seq_device          3621  1 snd_rawmidi
snd_bcm2835            20089  0
snd_pcm                75620  3 snd_bcm2835,snd_usb_audio
snd_timer              18688  1 snd_pcm
snd                    51434  9 snd_bcm2835,snd_usb_audio,snd_hwdep,snd_timer,snd_pcm,snd_rawmidi,snd_usbmidi_lib,snd_seq_device
bcm2835_gpiomem         3040  0
bcm2835_wdt             3225  0
uio_pdrv_genirq         3164  0
uio                     8000  1 uio_pdrv_genirq
fuse                   82597  1
ipv6                  345214  77
root@DietPi:~# lsusb

This is my HQplayer screenshot:-

This is looking good, Wayne.

What is the exact error message? Can you screenshot it?

There you go @RBM. Thanks for your help.

The ifi is working in Roon as long as I select the Roon Ready option but won’t work via HQplayer.

@Wayne_Bull1

Lets run a basic sound test, should hear some whitenoise on the USB DAC:
speaker-test -c2

Press CTRL+C to cancel

skip that…not working roon ready now either

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy

dietpi-services stop

rerun test

speaker-test 1.0.28

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Sample format not available for playback: Invalid argument
Setting of hwparams failed: Invalid argument

Restart NAA daemon:
systemctl start networkaudiod

Then reselect USB dac in HQplayer and test play.

same ‘failed to load’ error Dan.

Think I might resort back to the pi-dac+

What settings should I have in Dietpi menu Audio options Dan?

I’ve ran the iFi nano off a Cubox running NAA for a few months – this should work the same.

A few more things to try:

  • Set dietpi-config > Audio Options > Soundcard to ‘none’
  • Disable Roon Bridge for now: systemctl disable roonbridge
  • Remove asound.conf: rm /etc/asound.conf
  • Restart the Pi with iFi turned on
  • Retry selecting the iFi in HQP

If you intend to use just the iFi, you can set sound card to none (not HAT drivers, no drivers for internal sound options (3,5mm jack/HDMI).

1 Like