Solved Passthrough devices not listed if they're busy during startup
#1
Hey guys,

I just realized that if the device I use for passthrough audio is busy / in-use (for example MPD playing music) while XBMC is starting up, it will NOT be listed under the "Passthrough output device" list, and will not be available for passthrough audio for that instance of XBMC.

If nothing is using the device during startup it's listed just fine.

Is there a way to force XBMC to use a specific device for passthrough audio no matter if it's being used or not? I remember in versions previous to Frodo you could specify a custom device, but that option seems to be gone now. (I'm sure this is a side affect of the AudioEngine switch, which overall is really great!).

My setup is as follows
  • Arch Linux x86_64, Linux 3.8.8
  • XBMC 12.2 (From Arch's package manager)

I have one HDMI output that feeds to my DAC. I have dmixer which uses this device and is set as the default PCM device, so if anything is making sound during XBMC's startup it's in use.

Here is my /etc/asound.rc, a debug xbmc.log with the device in use (mpd playing music), and a debug xbmc.log without the device in use.
Reply
#2
Enable debug logging via advancedsettings.xml and you will see, that it tells something about "device is busy" while enumerating the devices.

So to answer your question:
Quote:Is there a way to force XBMC to use a specific device for passthrough audio no matter if it's being used or not?

no

Just saw that debug logging is already enabled via that file. So we could be a bit more verbose here, yes.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
Thanks for the feedback fritsch,

I just looked through the xbmc log I posted for when the device was busy during startup. It doesn't look like it says anything about the device being busy. However, comparing the two logs, the one without the device busy has the HDMI device listed when enumerating devices, while the other doesn't. Nothing we didn't already know though.

Edit: Actually I just realized this is probably because I didn't have debugging enabled via advanced settings, but in the GUI. So debug logging wasn't on during the device enumeration.

I suppose my solution for now will be to ensure MPD isn't using the audio device before it starts, so my .xinit will look something like this

Code:
# Make sure MPD isn't using the audio device while XBMC starts
# If it is then xbmc won't use the HDMI device for passthrough
mpc stop

dwm &
exec xbmc

I'm still a little curious why XBMC can't detect devices while they're busy. If anyone has any insight on that I'd love to hear it.

For now I'll mark this thread as solved though.
Reply
#4
The answer is quite easy. xbmc opens every device on enumeration and checks for capabilities.
https://github.com/xbmc/xbmc/blob/master...nkALSA.cpp check the TryDevice Method and start with looking at EnumerateDevicesEx
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

Logout Mark Read Team Forum Stats Members Help
Passthrough devices not listed if they're busy during startup0