How to get Dragonfly USB DAC working

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
wizardofoz
Posts: 13
Joined: Sat Dec 17, 2016 6:34 am

How to get Dragonfly USB DAC working

Post by wizardofoz »

I have a V1 pi and am trying to get the DragonFly V1.0 USB DAC to be recognised.

Im not great with Linux but can edit stuff and get things setup if I know what to do.

Looking to run roon bridge but awaiting a Pi 3 to be delivered so having a play with DietPi in the meantime on my old Pi with LMP or airplay or other way to play.

I see the USB DAC in aplay -L and -l and I can see where to edit the sound card in the config.txt but I'm running out of ideas on what to put in where...alsamizer only seed PCM device

any help is much appreciated

Ultimately I will be IQAudio DigiAMP+
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: How to get Dragonfly USB DAC working

Post by Fourdee »

wizardofoz wrote: Ultimately I will be IQAudio DigiAMP+
a. For Pi-DAC+, Pi-DACZero, Pi-DAC Pro and Pi-DigiAMP+ use the iqaudio-dacplus
This uses the same dtoverlay as dacplus, when your ready to use this device, go to dietpi-config > Audio Options > Soundcard and select:

Code: Select all

"iqaudio-dacplus" "Pi-DAC+"
I see the USB DAC in aplay -L and -l and I can see where to edit the sound card in the config.txt but I'm running out of ideas on what to put in wher
Firstly, lets disable the onboard RPi soundcard to save on resources, and, remove them from aplay results:
Go to dietpi-config > Audio Options > Soundcard and select None, then reboot system

If alsamixer does not work at this point, we will most likely need to setup a /etc/asound.conf, if you can paste the results of:

Code: Select all

aplay -l
aplay -L
Once we find the target device and card, i'll create one you can use.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
wizardofoz
Posts: 13
Joined: Sat Dec 17, 2016 6:34 am

Re: How to get Dragonfly USB DAC working

Post by wizardofoz »

Code: Select all

root@DietPi95:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default
sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
dmix:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample mixing device
dmix:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample snooping device
hw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Hardware device with all software conversions
sysdefault:CARD=DragonFly
    AudioQuest DragonFly, USB Audio
    Default Audio Device
front:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    Front speakers
surround21:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    Direct sample mixing device
dsnoop:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    Direct sample snooping device
hw:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    Direct hardware device without any conversions
plughw:CARD=DragonFly,DEV=0
    AudioQuest DragonFly, USB Audio
    Hardware device with all software conversions

root@DietPi95:~# aplay -l
**** 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: DragonFly [AudioQuest DragonFly], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@DietPi95:~# 
There you go...not sure why but every time I pug in the DragonFly the Red LED comes on on the Pi and then it appears to halt for a few seconds then resumes ...restarting as my SSH connection drops too and uptime setts to 0 ...

At least I do get some audio output via HDMI to the TV but the quality is not great of course.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: How to get Dragonfly USB DAC working

Post by Fourdee »

wizardofoz wrote: There you go...
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: DragonFly [AudioQuest DragonFly], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
Thanks.

Looks like RPi onboard is still enabled, you'll need to reboot system after setting soundcard to none in dietpi-config > audio options > soundcard.

This one is if you disabled the RPi onboard soundcard (copy and paste all into ssh):

Code: Select all

SOUNDCARD_TARGET_CARD=0
SOUNDCARD_TARGET_DEVICE=0
cat << _EOF_ > /etc/asound.conf
pcm.!default {
    type hw
    card $SOUNDCARD_TARGET_CARD
    device $SOUNDCARD_TARGET_DEVICE
}
ctl.!default {
    type hw
    card $SOUNDCARD_TARGET_CARD
    device $SOUNDCARD_TARGET_DEVICE
}
_EOF_
This one is if you did not disable the RPi onboard soundcard:

Code: Select all

SOUNDCARD_TARGET_CARD=1
SOUNDCARD_TARGET_DEVICE=0
cat << _EOF_ > /etc/asound.conf
pcm.!default {
    type hw
    card $SOUNDCARD_TARGET_CARD
    device $SOUNDCARD_TARGET_DEVICE
}
ctl.!default {
    type hw
    card $SOUNDCARD_TARGET_CARD
    device $SOUNDCARD_TARGET_DEVICE
}
_EOF_
not sure why but every time I pug in the DragonFly the Red LED comes on on the Pi and then it appears to halt for a few seconds then resumes ...restarting as my SSH connection drops too and uptime setts to 0 ...
Doesnt sound good, possibly a sudden drop in voltage/power when the USB device is connected, what PSU are you using (eg: 5v/2a official RPi)?. Or could be a faulty USB DAC.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
wizardofoz
Posts: 13
Joined: Sat Dec 17, 2016 6:34 am

Re: How to get Dragonfly USB DAC working

Post by wizardofoz »

Thanks for that...Ill have a go and see if I can at least have some utility from the old pi...and a seldom used DragonFly too. Powersupply is 1A so could probably be a drop at pluging in...seems to be OK once its it tho so maybe OK.

My new Pi 3 should arrive today and I have a loaner IQAudio DigiAMP+ to plonk on it so I hope that goes smoothly. Its replacing a macmini/Emotiva DC-1 DAC and Mini-X amp. Ill have to forego my phono input - but have other TT setups I can use so no issue.

so far DietPi is a breeze to setup and get running. Might try and do a how to for IQAudio and Roon, but also going to try the Allo reclocker etc options soon as I can get one ordered.

OK I have the DragonFly as the only device in the aplay results...now alsamixer is not found

Code: Select all

root@DietPi95:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: DragonFly [AudioQuest DragonFly], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@DietPi95:~# alsamixer
cannot open mixer: No such file or directory
root@DietPi95:~# cat /etc/asound.conf
pcm.!default {
    type hw
    card 0
    device 0
}
ctl.!default {
    type hw
    card 0
    device 0
}
root@DietPi95:~# 
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: How to get Dragonfly USB DAC working

Post by Fourdee »

wizardofoz wrote: Powersupply is 1A so could probably be a drop at pluging in...seems to be OK once its it tho so maybe OK.
If your planning to use HATs on a RPi 3, 1A may not be enough and you'll most likely experience filesystem corruption. Ideally 5v/2A PSU as a minimum.

OK I have the DragonFly as the only device in the aplay results...now alsamixer is not found
card 1:
Appears the card is comming up as number 1, so this should do it:

Code: Select all

SOUNDCARD_TARGET_CARD=1
SOUNDCARD_TARGET_DEVICE=0
cat << _EOF_ > /etc/asound.conf
pcm.!default {
    type hw
    card $SOUNDCARD_TARGET_CARD
    device $SOUNDCARD_TARGET_DEVICE
}
ctl.!default {
    type hw
    card $SOUNDCARD_TARGET_CARD
    device $SOUNDCARD_TARGET_DEVICE
}
_EOF_
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
wizardofoz
Posts: 13
Joined: Sat Dec 17, 2016 6:34 am

Re: How to get Dragonfly USB DAC working

Post by wizardofoz »

Ok the old pi is using the 1A supply...the new pi is using a 19V 3A supply via the IQAudio DigiAMP+ board...no I am trying to get this to work.

Roon sees it, plays but no audio..the MUTE led is on on the IQA amp board...trying to get that off now.

Also updating the Pi firmware so its a bit busy now doing that...Will update this post with progress...

Anything I should not have turned on in Audio like EQ or 384K etc?
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: How to get Dragonfly USB DAC working

Post by Fourdee »

wizardofoz wrote: Anything I should not have turned on in Audio like EQ or 384K etc?
They should be fine, i've posted a reply to your Roon post: https://community.roonlabs.com/t/dietpi ... dan_knight

Could do with more system information, If you can paste results of following, i'd be grateful:

Code: Select all

lsmod
cat /boot/config.txt | grep dtoverlay=
cat /boot/dietpi.txt | grep soundcard=
cat /etc/asound.conf
aplay -l
amixer -c0
# or
amixer -c1
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
wizardofoz
Posts: 13
Joined: Sat Dec 17, 2016 6:34 am

Re: How to get Dragonfly USB DAC working

Post by wizardofoz »

All good now with the RPi 3 as per posts on the Roon Community thread but as requested here is the working setup with the IQAudIO DigiAMP+

Code: Select all

root@DietPi93:~# lsmod
Module                  Size  Used by
brcmfmac              186403  0 
brcmutil                5661  1 brcmfmac
cfg80211              428431  1 brcmfmac
snd_soc_pcm512x_i2c     2243  1 
snd_soc_pcm512x        17268  1 snd_soc_pcm512x_i2c
regmap_i2c              3393  1 snd_soc_pcm512x_i2c
rfkill                 16037  2 cfg80211
snd_soc_iqaudio_dac     3828  1 
snd_soc_bcm2835_i2s     6354  2 
snd_soc_core          125949  3 snd_soc_pcm512x,snd_soc_bcm2835_i2s,snd_soc_iqaudio_dac
snd_pcm_dmaengine       3391  1 snd_soc_core
snd_pcm                75762  4 snd_soc_pcm512x,snd_soc_core,snd_soc_iqaudio_dac,snd_pcm_dmaengine
snd_timer              19288  1 snd_pcm
bcm2835_gpiomem         3040  0 
snd                    51908  5 snd_soc_core,snd_timer,snd_pcm
i2c_bcm2708             4834  0 
bcm2835_wdt             3225  0 
uio_pdrv_genirq         3164  0 
uio                     8000  1 uio_pdrv_genirq
fuse                   84037  1 
ipv6                  347594  18 

Code: Select all

root@DietPi93:~# cat /boot/config.txt | grep dtoverlay=
#dtoverlay=none
dtoverlay=iqaudio-dacplus,auto_mute_amp

Code: Select all

root@DietPi93:~# cat /boot/dietpi.txt | grep soundcard=
soundcard=iqaudio-dacplus

Code: Select all

root@DietPi93:~# cat /etc/asound.conf
pcm.!default {
    type hw
    card 0
    device 0
}
ctl.!default {
    type hw
    card 0
    device 0
}

Code: Select all

root@DietPi93:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: IQaudIODAC [IQaudIODAC], device 0: IQaudIO DAC HiFi pcm512x-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Code: Select all

root@DietPi93:~# amixer -c0
Simple mixer control 'DSP Program',0
  Capabilities: enum
  Items: 'FIR interpolation with de-emphasis' 'Low latency IIR with de-emphasis' 'High attenuation with de-emphasis' 'Fixed process flow' 'Ringing-less low latency FIR'
  Item0: 'FIR interpolation with de-emphasis'
Simple mixer control 'Analogue',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 1
  Mono:
  Front Left: Playback 1 [100%] [0.00dB]
  Front Right: Playback 1 [100%] [0.00dB]
Simple mixer control 'Analogue Playback Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 1
  Front Left: 1 [100%] [0.80dB]
  Front Right: 1 [100%] [0.80dB]
Simple mixer control 'Auto Mute',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [off]
  Front Right: Playback [off]
Simple mixer control 'Auto Mute Mono',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Auto Mute Time Left',0
  Capabilities: enum
  Items: '21ms' '106ms' '213ms' '533ms' '1.07s' '2.13s' '5.33s' '10.66s'
  Item0: '21ms'
Simple mixer control 'Auto Mute Time Right',0
  Capabilities: enum
  Items: '21ms' '106ms' '213ms' '533ms' '1.07s' '2.13s' '5.33s' '10.66s'
  Item0: '21ms'
Simple mixer control 'Clock Missing Period',0
  Capabilities: enum
  Items: '1s' '2s' '3s' '4s' '5s' '6s' '7s' '8s'
  Item0: '1s'
Simple mixer control 'Deemphasis',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Digital',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 207
  Mono:
  Front Left: Playback 182 [88%] [-12.50dB] [on]
  Front Right: Playback 182 [88%] [-12.50dB] [on]
Simple mixer control 'Max Overclock DAC',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 40
  Mono: 20 [50%]
Simple mixer control 'Max Overclock DSP',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 40
  Mono: 19 [48%]
Simple mixer control 'Max Overclock PLL',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 20
  Mono: 0 [0%]
Simple mixer control 'Volume Ramp Down Emergency Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Down Emergency Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '4dB/step'
Simple mixer control 'Volume Ramp Down Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Down Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '1dB/step'
Simple mixer control 'Volume Ramp Up Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Up Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '1dB/step'
Post Reply