Just reset everything and now get sound via Roon Ready but nothing still via HQPlayer…Bizarre!
I’ll try disabling Roon Ready as suggeested.
Just reset everything and now get sound via Roon Ready but nothing still via HQPlayer…Bizarre!
I’ll try disabling Roon Ready as suggeested.
Strange. Really doesnt make any sense. Modules appear to be loaded for the USB card.
Playback open error: -16,Device or resource busy
Just bear in mind, as Roon and HQPlayer target specific cards, and, only 1 ALSA stream can be active at any time on a card, you’ll need to stop Roon playback (possibly even exit it), before playing from HQPlayer. Same for visaversa.
I’ll setup a test system, see if we can try and debug this further.
Cheers Dan, appreciated
Ok, i’ve got a cheap china-town USB dac, try the following:
Disable onboard rpi card/modules, frees up some memory:
/DietPi/dietpi/func/dietpi-set_hardware soundcard none
We also need to enable dtparam=audio=on, for any soundcard on RPi:
sed -i '/dtparam=audio=/c\dtparam=audio=on' /DietPi/config.txt
Reboot:
reboot
Set asound.conf (click link to view all, then copy and paste all into SSH term)
http://pastebin.com/3RdmpAfZ
Run basic sound test:
speaker-test -c2 -r 44100
If errors and no sound, try:
speaker-test -c2 -r 44100 -D hw:0,0
Then report back with results and we’ll go on from there.
Still no joy Dan…sorry to be a pain
These are the results after reboot
root@DietPi:~# SOUNDCARD_TARGET_CARD=1
}
root@DietPi:~# SOUNDCARD_TARGET_DEVICE=0
root@DietPi:~#
root@DietPi:~# 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_
root@DietPi:~# speaker-test -c2 -r 44100
speaker-test 1.0.28
Playback device is default
Stream parameters are 44100Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Sample format not available for playback: Invalid argument
Setting of hwparams failed: Invalid argument
root@DietPi:~# speaker-test -c2 -r 44100 -D hw:0,0
speaker-test 1.0.28
Playback device is hw:0,0
Stream parameters are 44100Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
Playback open error: -2,No such file or directory
HQPayer results
2016/12/28 18:06:25 networkaudiod Copyright (C) 2011-2016 Jussi Laako / Signalyst. All rights reserved.
2016/12/28 18:06:25 asoundlib version: 1.0.28
* 2016/12/28 18:06:39 discovery from [::ffff:192.168.0.8]:49252
* 2016/12/28 18:06:39 discovery from [::ffff:192.168.0.8]:49252
+ 2016/12/28 18:06:40 connection from [::ffff:192.168.0.8]:49455
2016/12/28 18:06:40 Found ALSA device: hw:1,0 - iFi (by AMR) HD USB Audio (DOP2: USB Audio
2016/12/28 18:06:40 begin disconnection
- 2016/12/28 18:06:40 ALSA backend uninitialized
- 2016/12/28 18:06:40 disconnected [::ffff:192.168.0.8]:49455
+ 2016/12/28 18:06:40 connection from [::ffff:192.168.0.8]:49456
- 2016/12/28 18:06:40 ALSA backend uninitialized
2016/12/28 18:06:40 Set channels: 2 (2)
2016/12/28 18:06:40 ALSA device: hw:1,0
2016/12/28 18:06:40 ALSA access mode: 3
2016/12/28 18:06:40 ALSA PCM format: S32_LE
2016/12/28 18:06:40 ALSA PCM bits: 32
2016/12/28 18:06:40 ALSA PCM physical width: 32
2016/12/28 18:06:40 ALSA PCM rates: 44100 - 768000
2016/12/28 18:06:40 ALSA DSD format:
# 2016/12/28 18:06:40 initialization failure: clALSAMiniEngine::Initialize(): snd_pcm_format_physical_width(): Invalid argument
2016/12/28 18:06:43 begin disconnection
- 2016/12/28 18:06:43 ALSA backend uninitialized
- 2016/12/28 18:06:43 disconnected [::ffff:192.168.0.8]:49456
* 2016/12/28 18:06:43 discovery from [::ffff:192.168.0.8]:55442
* 2016/12/28 18:06:43 discovery from [::ffff:192.168.0.8]:55442
+ 2016/12/28 18:06:44 connection from [::ffff:192.168.0.8]:49457
2016/12/28 18:06:44 Found ALSA device: hw:1,0 - iFi (by AMR) HD USB Audio (DOP2: USB Audio
2016/12/28 18:06:44 begin disconnection
- 2016/12/28 18:06:44 ALSA backend uninitialized
- 2016/12/28 18:06:44 disconnected [::ffff:192.168.0.8]:49457
Thanks.
Ok, strange, claims it does not support 44.1khz 16bit.
Which nano DAC are you running, does it support 384khz/32bit (http://ifi-audio.com/home/products/nano/)
yes that’s the one Dan
Ok, lets check supported rates/bit
arecord --dump-hw-params
root@DietPi:~# arecord --dump-hw-params
arecord: main:722: audio open error: No such file or directory
root@DietPi:~# root@DietPi:~# arecord --dump-hw-params
-bash: root@DietPi:~#: command not found
Ok, lets check everything was applied correctly:
aplay -l cat /DietPi/config.txt | grep dtpara cat /etc/asound.conf
root@DietPi:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
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:~# cat /DietPi/config.txt | grep dtpara
dtparam=audio=on
dtparam=i2c_arm=off
dtparam=i2c1=off
dtparam=spi=off
root@DietPi:~# cat /etc/asound.conf
I just connected the ifi directly to the macbook pro Dan and it worked fine, so dac’s ok
This is empty, didn’t get applied correctly, possible due to SSH client not handling/sending clipboard correctly.
Lets try adding it in manually again:
nano /etc/asound.conf
Add the following:
pcm.!default { type hw card 1 device 0 } ctl.!default { type hw card 1 device 0 }
Save changes (ctrl+x, y, enter)
Now dump supported formats/bits:
arecord --dump-hw-params
I just connected the ifi directly to the macbook pro Dan and it worked fine, so dac’s ok
Yep, says on their site should work nativily on Linux/Mac. Think if we can find the supported sample rates, should get this fixed pretty quickly.
Dan Ive just gone into that file and those lines are showing.
Shall I delete and repaste?
Nope they look fine. Bizarre, i think your RPi is possessed lol
Ok, lets try specifying card:
arecord -D hw:1,0 --dump-hw-params
Failing that, not sure what else we can try. But it does appear to be “broken” at basic ALSA level.
root@DietPi:~# arecord -D hw:1,0 --dump-hw-params
arecord: main:722: audio open error: No such file or directory
Has this USB DAC worked on official Raspbian, just curious if we get the same results?
I’ve had it working on Picoreplayer and also Jussi’s NAA image with no problems
This really is strange. Everything is setup correctly, it should be functional.
From what ALSA is telling us, its failing to even open a basic audio stream on the DAC.
If you have not tried it already, please try a fresh image and installation of DietPi. Then apply the changes we did here:
Failing that, just wondering if @RBM would be willing to assist us on this, try DietPi on a RPi with his iFi Nano DAC. See if we get same results?