[pulseaudio-discuss] [HEADS-UP] The new 'intended roles' functionality

Lennart Poettering lennart at poettering.net
Tue Jun 23 10:39:24 PDT 2009


Yo!

Another heads-up on a new feature of PA which might be useful for some
embedded use cases, beyond the desktop which I wrote it for.

There's now a new module called "module-intended-roles". It looks for
the PA_PROP_DEVICE_INTENDED_ROLES property on devices and moves
streams which have a role that is listed in the space seperated value
of this property to the device. This happens when a stream is
created, as well as for existing streams on hotplug of devices and on
hot-unplug of devices.

What is this good for? For now only two modules set the property on
their sinks: the bluetooth module sets it to "phone" when in HSP/HFP
mode and the RAOP module sets it to "music". The effect is then that
phone streams are automatically moved to a headset when it becomes
available, resp. that music is automatically moved to a RAOP sink when
it becomes available.

Beyond the static definitions in those two mentioned modules you also
can set the property when loading the alsa modules via
"sink_properties=device.intended_roles=foo" or suchlike. This can be
used for simple policy decisions. 

User-decisions and decisions made by module-stream-restore take
precedence over the decisions of this module. i.e. if a user actively
moves a phone stream away from the headset, then PA will obey and
remember that.

As a side note: module-stream-restore now too is active not only when
new streams are created but also when devices are plugged or
unplugged. 

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list