Linux Audio device busy
#1
Trying XBMCbuntu Frodo RC1 I can't get audio to work with an external player, it appears XBMC is hogging the audio hardware?

The error from the external player is
Code:
[AO_ALSA] alsa-lib: pcm_hw.c:1293:(snd_pcm_hw_open) open '/dev/snd/pcmC0D7p' failed (-16): Device or resource busy
[AO_ALSA] Playback open error: Device or resource busy
Failed to initialize audio driver 'alsa:device=hw=0.7'

Audio works if XBMC is exited only.

Is this a known issue, is there some workaround for external players?
Reply
#2
hmm,

try setting this in advancedsettings.xml

Code:
<advancedsettings>
  <audio>
    <streamsilence>0</streamsilence>
  </audio>
</advancedsettings>

see AudioEngine#Advanced_settings (wiki)
"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott
Reply
#3
i'm having the same issue trying to launch emulators. i dont think the streamsilence feature is working anymore (it was, i remember having problems with my AVR clicking a bunch from the siginal stopping and starting and freeing up the audio device) but as of late i tryed to install some emulators and none of them can grab the sound device while xbmc is running even with that setting in davanced settings. ived tryed a lot of variations
Reply
#4
(2012-12-15, 09:05)lrusak Wrote: hmm,

try setting this in advancedsettings.xml

Code:
<advancedsettings>
  <audio>
    <streamsilence>0</streamsilence>
  </audio>
</advancedsettings>

see AudioEngine#Advanced_settings (wiki)

I can see this message in the debug so it appears that AE is suspending
Code:
DEBUG: CSoftAE::Suspend - Suspending AE processing
But still get no audio and the same error from external player.
Reply
#5
Unfortunately the ALSA implementation of that is not working - Windows only for that feature right now.
System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon  AVR-3808CI  - Denon DVD-5900 Universal Player  - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray  - X-Box 360  - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
Reply
#6
(2012-12-16, 04:51)DDDamian Wrote: Unfortunately the ALSA implementation of that is not working - Windows only for that feature right now.

@DDDamian: do you know what the status of ALSA support for this feature is? I'm about to get a wireless keyboard/mouse so I can use Advanced Launcher to watch a web browser e.g. but having to kill XBMC in order to watch YouTube or listen to Spotify is sub-optimal. I'm not sure if I want to mess with my setup enough to try out Pulseaudio either, I've had horrible experiences with it in the past.
Perhaps the ALSA suspend feature could have some additional limitations such as only doing anything useful if GUI sounds are disabled completely? That would avoid having to constantly suspend/resume.
Reply
#7
FYI

2032 (GH issue)
2074 (GH issue)
http://forum.xbmc.org/showthread.php?tid=147938
http://forum.xbmc.org/showthread.php?tid=150963
http://forum.xbmc.org/showthread.php?tid=148428
http://forum.xbmc.org/showthread.php?tid=136140
http://forum.xbmc.org/showthread.php?tid=150791
http://forum.xbmc.org/showthread.php?pid=1266056

I've openend ticket for listing dmix devices which would be a workaround for these issues.
http://trac.xbmc.org/ticket/13966

Let's hope someone finds the time to fix it. I'm still searching for it, time that is.
Reply
#8
@Falcon1

Stop spamming!!

uNi
Reply
#9
Hi uNi,

I was just trying to unify the posts on the issue. I'm sorry you feel spammed by me. That was certainly not my intention.

Kind regards
Reply
#10
Hey guys,

I have discovered that xbmc somehow locks the alsa device only durring startup.
If for some reason some other application is ussing the sound device at that time xbmc doesnt keep the alsa device busy.
When the other application terminates you have a launched xbmc with sound that is not locked.

For me i use the following 'hack'

cat .xinitrc
Code:
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi
mplayer /home/Jo/10secondsemptysound.mp3 &
xbmc-standalone
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Audio device busy00