[pulseaudio-discuss] Description for virtual sinks

Lennart Poettering lennart at poettering.net
Thu Mar 26 07:40:08 PDT 2009

On Thu, 26.03.09 14:24, Colin Guthrie (gmane at colin.guthr.ie) wrote:

>>> Is there any particular reason that it is not possible to set the
>>> description when making a sink with module-remap-sink (or his friends
>>> module-combine, module-tunnel-sink, etc.)?
>>> It seems that the description is always derived from the master sink, but I
>>> would like to customize it, because this is the name that is shown in
>>> interfaces like pavucontrol.
>> It has been a long time item ony my todo list to allow setting
>> arbitrary properties (including the description string) on all
>> sinks/sources from the module parameters. Should be relatively easy to
>> add but hasn't happened yet. Patches always welcome.
> I added this to the airport sink recently... is this the approach you'd  
> take (it's a fairly direct "description="blah"" argument) or do you want  
> something more generic that copes with more things?
> If you outline the approach I may take a stab.

Right now a lof of modules take parameters like "sink_name",
"source_name", "card_name" or just "name". I'd like to see that they
would also take parameters like "sink_proplist", "source_proplist",
"card_proplist" and just "proplist". The string passed in there would
then be parsed with pa_proplist_from_string() and merged into the
sink's/source's/card's proplist with
pa_proplist_update(PA_UPDATE_REPLACE), right before they are _put().

This would require adding a new call pa_modargs_get_proplist() or suchlike.

The only non-trivial issue here is that the two parsers don't
interfere with each other. i.e. that doing stuff like 

   proplist="foo='bar waldo' yippieh='wow'"

is parsed properly. And that it still is possible to include quotation
marks of all kinds in the property strings.

I haven't looked at the parsers/state machines in
pa_proplist_from_string() and pa_modarg recently but you might even be
lucky that they are already capable of dealing with this properly
without changes.


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

More information about the pulseaudio-discuss mailing list