[pulseaudio-discuss] [PATCH] rtp-send: Don't inhibit suspending when connected to a monitor source
Tanu Kaskinen
tanu.kaskinen at linux.intel.com
Tue Feb 18 02:00:30 PST 2014
The flag was originally set unconditionally, but it was removed in
298ffffd1a3cf5ac4fbfe9cf793a5eb59162f892, because the flag broke the
use case where a normal source (e.g. a microphone) was used. The flag
makes sense only with monitor sources, which should get suspended when
nothing is playing to the monitored sink to avoid consuming bandwidth
for sending silence.
---
src/modules/rtp/module-rtp-send.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c
index 581e6be..eb31ed1 100644
--- a/src/modules/rtp/module-rtp-send.c
+++ b/src/modules/rtp/module-rtp-send.c
@@ -378,6 +378,9 @@ int pa__init(pa_module*m) {
pa_source_output_new_data_set_sample_spec(&data, &ss);
pa_source_output_new_data_set_channel_map(&data, &cm);
+ if (s->monitor_of)
+ data.flags = PA_SOURCE_OUTPUT_DONT_INHIBIT_AUTO_SUSPEND;
+
pa_source_output_new(&o, m->core, &data);
pa_source_output_new_data_done(&data);
--
1.8.3.1
More information about the pulseaudio-discuss
mailing list