[pulseaudio-discuss] Need a way to check when start-pulseaudio-x11 fully initialized

John da_audiophile at yahoo.com
Wed Aug 13 14:22:55 PDT 2014





----- Original Message -----
> From: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
> To: John <da_audiophile at yahoo.com>
> Cc: "pulseaudio-discuss at lists.freedesktop.org" <pulseaudio-discuss at lists.freedesktop.org>
> Sent: Wednesday, August 13, 2014 3:52 AM
> Subject: Re: [pulseaudio-discuss] Need a way to check when start-pulseaudio-x11 fully initialized
> 
> On Tue, 2014-08-12 at 15:08 -0700, John wrote:
> 
>>  I need use something to query /usr/bin/pulseaudio and to ask it if it
>>  is fully initialized.  Right now, starting xbmc in stand-alone mode
>>  through a systemd service causes xbmc to start before pulse-audio is
>>  fully initialized which results in xbmc not being able to see all of
>>  the audio devices on the system.  Can someone suggest a method that
>>  will basically return an exit code of 0 when PA is initialized and a
>>  non-0 code when it is not ready?
> 
> What devices XBMC doesn't see? Currently alsa devices are loaded
> synchronously during startup, and client connections are not served
> until the startup is complete. This means that clients should see all
> alsa devices no matter when they connect, because their queries won't be
> served until the startup is complete. Bluetooth devices are a different
> matter, because they're not loaded synchronously.

My system has three devices on it. If I modify /usr/bin/xbmc-standalone to more or less look like the following, all three of the audio sources are detected by xbmc:

  /usr/bin/start-pulseaudio-x11
  sleep 6s
  /usr/bin/xbmc --standalone

If I do not have that "sleep 6s" line in there, only the first device is detected, but it is the one I don't want to use :(

It will be obvious to you in the logs:

1) Link to xbmc.log started WITH the 6sec delay (i.e. works fine): https://gist.github.com/graysky2/25ff0f511945d25e15d8

2) Link to xbmc.log started WITHOUT the 6sec delay (i.e. not all devices are detected): https://gist.github.com/graysky2/65ba59602d4b3f31160f


> Also, it sounds like XBMC doesn't handle hotplugged audio devices? Is
> that really so?


I do not know :/


More information about the pulseaudio-discuss mailing list