[OE-core] PulseAudio in Sato

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Tue Apr 21 15:49:13 UTC 2015


Hi,

I started the work to enable PulseAudio in Sato images 
(https://bugzilla.yoctoproject.org/show_bug.cgi?id=7517). The first 
problem I faced is that PulseAudio isn't starting automatically. When 
using PulseAudio in a graphical session, the normal way to start the 
server is to rely on autospawning, which means that when the first 
client tries to use PulseAudio, the server gets automatically started by 
libpulse. That's not working in Sato, because the graphical session runs 
as root in Sato, and autospawning is disabled when running as root. Why? 
Well, at least one reason for the disabling is that if the user runs 
some random stuff with sudo, starting another PulseAudio server in the 
background for root will likely mess up the audio in the user's main 
session when the two servers are trying to access the same hardware.

My first thought was that Sato should work more like a normal system, 
and not run the graphical session as root, but then I thought that there 
probably are embedded systems with graphics where it makes sense to run 
everything as root, so that's a valid use case to support. Therefore, it 
would make sense to modify PulseAudio so that it would allow 
autospawning for root. That should be configurable, however, and root 
autospawning should be enabled only on these everything-running-as-root 
systems.

I'm planning to add a new option to /etc/pulse/client.conf: 
"allow-autospawn-for-root". I'm not sure how to meet the goal of 
disabling that option by default, and enabling it in Sato. I think it 
could be done so that the default version of client.conf would be 
packaged in the main pulseaudio recipe, and then there would be a 
separate recipe, "pulseaudio-client-conf-sato", which would replace the 
default pulseaudio-client-conf package. (Currently client.conf is in the 
libpulse package, so it would have to be split off into its own package 
first.) I don't know if this is the best way to do it, feedback would be 
very welcome.

-- 
Tanu



More information about the Openembedded-core mailing list