Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to acquire device: Device or resource busy [hw:0,0] #5

Open
Ziggomatic opened this issue Sep 22, 2017 · 6 comments
Open

Unable to acquire device: Device or resource busy [hw:0,0] #5

Ziggomatic opened this issue Sep 22, 2017 · 6 comments

Comments

@Ziggomatic
Copy link

I'm using RPi3, latest moode and IQaudIO Pi-DAC Pro, connect to RCA speaker. just tried clone repo and key file, then

/home/pi/spotify-connect-web/spotify-connect-web --playback_device hw:0,0 -m Digital --mixer_device_index 0 --bitrate 320 --name "moOde Connect" --key /home/pi/spotify-connect-web/spotify_appkey.key

but an error appear same as title. here's are log and my environment. what am i wrong? and how fix?

pi@moode:~ $ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
plugequal
equal
crossfeed
ladspa
default:CARD=IQaudIODAC
    IQaudIODAC, 
    Default Audio Device
sysdefault:CARD=IQaudIODAC
    IQaudIODAC, 
    Default Audio Device
dmix:CARD=IQaudIODAC,DEV=0
    IQaudIODAC, 
    Direct sample mixing device
dsnoop:CARD=IQaudIODAC,DEV=0
    IQaudIODAC, 
    Direct sample snooping device
hw:CARD=IQaudIODAC,DEV=0
    IQaudIODAC, 
    Direct hardware device without any conversions
plughw:CARD=IQaudIODAC,DEV=0
    IQaudIODAC, 
    Hardware device with all software conversions
pi@moode:~ $ 

pi@moode:~ $ amixer controls
numid=6,iface=MIXER,name='DSP Program'
numid=3,iface=MIXER,name='Analogue Playback Boost Volume'
numid=2,iface=MIXER,name='Analogue Playback Volume'
numid=10,iface=MIXER,name='Auto Mute Mono Switch'
numid=11,iface=MIXER,name='Auto Mute Switch'
numid=8,iface=MIXER,name='Auto Mute Time Left'
numid=9,iface=MIXER,name='Auto Mute Time Right'
numid=7,iface=MIXER,name='Clock Missing Period'
numid=5,iface=MIXER,name='Deemphasis Switch'
numid=4,iface=MIXER,name='Digital Playback Switch'
numid=1,iface=MIXER,name='Digital Playback Volume'
numid=20,iface=MIXER,name='Max Overclock DAC'
numid=19,iface=MIXER,name='Max Overclock DSP'
numid=18,iface=MIXER,name='Max Overclock PLL'
numid=16,iface=MIXER,name='Volume Ramp Down Emergency Rate'
numid=17,iface=MIXER,name='Volume Ramp Down Emergency Step'
numid=12,iface=MIXER,name='Volume Ramp Down Rate'
numid=13,iface=MIXER,name='Volume Ramp Down Step'
numid=14,iface=MIXER,name='Volume Ramp Up Rate'
numid=15,iface=MIXER,name='Volume Ramp Up Step'
pi@moode:~ $ 

Loading Spotify library...
min_volume_range: 0.0
Using libspotify_embedded version: release-esdk-1.20.0-v1.20.0-g594175d4
SpInit: 0
playback_volume: 65535
corected_playback_volume: 100
public key: zxhOMKoag8pIiRK+6hAR5u/FOVZnLUSjoLoc7wF9qI9t2J6i2Lt93Rj9pJIG6veMv1eutKHYdA8QABxdHcyeE/stL0W4oeMcLlq/rLvmmZ5iCNbCap8jrPNeY1ql2qG4
device id: 78dc3452-8f39-451d-a050-10814a71cfdc
remote name: moOde Connect
account req: PREMIUM
device type: AUDIODONGLE
kSpConnectionNotifyLoggedIn
mwfJaB+SmRYJps7gAI9JwZM/KcI/Qp90HIgOzAiZnYoURAilL1W5gx13KQIBZR983E9cDzMZ6gXsPIbQOGoJdbnT4L4EQw1hPzsrXII3sZrLrTt48L8xtJbiNcFaOHi+cLmOCUf8a5kPkGEbFN+y5ghOLxssyQzWLum+WAz1QyY=
kSpPlaybackNotifyPlay
playback_seek: 99243
kSpPlaybackNotifyTrackChanged
192.168.10.5 - - [2017-09-23 00:19:33] "GET /login/_zeroconf?action=getInfo HTTP/1.1" 200 605 0.018189
kSpPlaybackNotifyBecameActive
kSpPlaybackNotifyTrackChanged
playback_seek: 101069
kSpPlaybackEventAudioFlush
kSpPlaybackNotifyPlay
Unable to acquire device:  Device or resource busy [hw:0,0]
192.168.10.5 - - [2017-09-23 00:19:35] "GET /login/_zeroconf?action=getInfo HTTP/1.1" 200 605 0.015974
192.168.10.5 - - [2017-09-23 00:19:37] "GET /login/_zeroconf?action=getInfo HTTP/1.1" 200 605 0.016330
192.168.10.5 - - [2017-09-23 00:19:39] "GET /login/_zeroconf?action=getInfo HTTP/1.1" 200 605 0.015938
kSpPlaybackNotifyBecameInactive
playback_seek: 108729
playback_seek: 108519
^CkSpPlaybackEventAudioFlush
kSpConnectionNotifyLoggedOut
pi@moode:~ $ 
@RafaPolit
Copy link
Owner

Hello Ziggomatic,

It appears you are almost done!

By any chance was there music playing through MPD or any other means (like airplay) at the time of running? This setup is dependent on all other sources being stop before starting the new one. That works the other way around as well: you would need to stop spotify before trying to use MPD to play your local music.

Other things to try:

  • Try to implement the ALSA softvol solution. So:

create an /etc/asound.conf file (sudo) and, in your case, put something like:

pcm.softvol {
  type softvol
  slave {
    pcm "hw:IQaudIODAC"
  }
  control {
    name "Master"
    card 0
  }
}

and then restart and run (be sure to have the volume down!):

$ speaker-test -Dsoftvol -c2

Do you hear static on your speakers first left then right? If yes, then you can change the running command to:

/home/pi/spotify-connect-web/spotify-connect-web --playback_device softvol -m Master --mixer_device_index 0 --bitrate 320 --name "moOde Connect" --key /home/pi/spotify-connect-web/spotify_appkey.key

I like that approach as it separates the main volume from the spotify volume that would be controlled through your devices. It may have some side effects on onboard DACs, I am only using external DAC so I am not that familiar with your scenario.

Please report back any progress so others can benefit from your experience!

Thanks, best regards,
Rafa.

@Ziggomatic
Copy link
Author

Ziggomatic commented Sep 22, 2017

Rafa thanks for advice!
I've tried disable airplay,upnp,dlna
then create asound.conf, reboot rpi, I heard pink noise and run command. but nothing has changed...

Unable to acquire device:  Device or resource busy [softvol]

@RafaPolit
Copy link
Owner

I know this is a bit crazy, but: have you tried just connecting to the Moode Conect from Spotify clients even with the error? The seaking message afterwards may indicate it's working nonetheless?

As far as I can tell, you have it all working! Te me know, there are a couple of other packages that seem a bit more straightforward to install.

@RafaPolit
Copy link
Owner

Also, which version of Moode are you using and which approach for Spotify-connect-web? Are you using the pre-built version or are you running from source (as per the Moode 4.0 instructions)?

@Ziggomatic
Copy link
Author

using moode 3.8.4. and how can i use 4.0?

@mickvdv
Copy link

mickvdv commented Oct 28, 2017

I am experiencing the same issue (also with the IQaudIODAC). Has anyone found a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants