[ this is a repost of the patch - I have not received either positive or negative feedback so far. Please tell me whether this enhancement is worth including. The patch is against current git head of PA ] When I split the 8-channel output to four independent stereo sinks (as described in http://pulseaudio.org/wiki/Modules), the new sinks are all visible in pavucontrol under the same label (which is "Remapped <the original sink name>"), so it is not clear which one user wants to use. One possible way is to fix pavucontrol to use sink names, the other one is to make description configurable in module-remap-sink. This patch implements the second approach. Signed-off-by: Jan "Yenya" Kasprzak <kas at fi.muni.cz> --- src/modules/module-remap-sink.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/module-remap-sink.c b/src/modules/module-remap-sink.c index 119f5b9..54018cc 100644 --- a/src/modules/module-remap-sink.c +++ b/src/modules/module-remap-sink.c @@ -45,6 +45,7 @@ PA_MODULE_LOAD_ONCE(FALSE); PA_MODULE_USAGE( "sink_name=<name for the sink> " "sink_properties=<properties for the sink> " + "sink_description=<textual description of the sink> " "master=<name of sink to remap> " "master_channel_map=<channel map> " "format=<sample format> " @@ -64,6 +65,7 @@ struct userdata { static const char* const valid_modargs[] = { "sink_name", "sink_properties", + "sink_description", "master", "master_channel_map", "format", @@ -351,8 +353,12 @@ int pa__init(pa_module*m) { sink_data.name = pa_sprintf_malloc("%s.remapped", master->name); pa_sink_new_data_set_sample_spec(&sink_data, &ss); pa_sink_new_data_set_channel_map(&sink_data, &sink_map); - k = pa_proplist_gets(master->proplist, PA_PROP_DEVICE_DESCRIPTION); - pa_proplist_setf(sink_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Remapped %s", k ? k : master->name); + if ((k = pa_modargs_get_value(ma, "sink_description", NULL))) { + pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_DESCRIPTION, k); + } else { + k = pa_proplist_gets(master->proplist, PA_PROP_DEVICE_DESCRIPTION); + pa_proplist_setf(sink_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Remapped %s", k ? k : master->name); + } pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_MASTER_DEVICE, master->name); pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_CLASS, "filter"); -- 1.6.0.6 -- | Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> | | GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E | | http://www.fi.muni.cz/~kas/ Journal: http://www.fi.muni.cz/~kas/blog/ | >> If we wanted to trade simplicity and kewl design for usability I think << >> we all know the URL of the Apple Store. --jmorris42 @LWN <<