[pulseaudio-discuss] [PATCH 04/21] alsa: Ensure that sinks and sources have descriptions
Tanu Kaskinen
tanu.kaskinen at linux.intel.com
Wed Jun 19 08:40:01 PDT 2013
I have never seen the description missing, but from reading the code
it seems that in some cases the description might be missing.
---
src/modules/alsa/alsa-sink.c | 3 +++
src/modules/alsa/alsa-source.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 0f82df6..7c8db2e 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -2307,6 +2307,9 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
goto fail;
}
+ if (!pa_proplist_contains(u->sink->proplist, PA_PROP_DEVICE_DESCRIPTION))
+ pa_proplist_sets(u->sink->proplist, PA_PROP_DEVICE_DESCRIPTION, u->sink->name);
+
if (pa_modargs_get_value_u32(ma, "deferred_volume_safety_margin",
&u->sink->thread_info.volume_change_safety_margin) < 0) {
pa_log("Failed to parse deferred_volume_safety_margin parameter");
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index 15b6aeb..6541c91 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -2004,6 +2004,9 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
goto fail;
}
+ if (!pa_proplist_contains(u->source->proplist, PA_PROP_DEVICE_DESCRIPTION))
+ pa_proplist_sets(u->source->proplist, PA_PROP_DEVICE_DESCRIPTION, u->source->name);
+
if (pa_modargs_get_value_u32(ma, "deferred_volume_safety_margin",
&u->source->thread_info.volume_change_safety_margin) < 0) {
pa_log("Failed to parse deferred_volume_safety_margin parameter");
--
1.8.1.2
More information about the pulseaudio-discuss
mailing list