[pulseaudio-discuss] [PATCH] rtp-send: Don't inhibit suspending when connected to a monitor source

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Sat Feb 22 01:49:07 PST 2014

On Tue, 2014-02-18 at 12:00 +0200, Tanu Kaskinen wrote:
> 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.

I believe this commit message isn't entirely accurate about the
motivation for 298ffffd. Based on a recent discussion with Ben, the use
case that broke was actually one where a monitor source was used (Ben,
correct me if I'm wrong). So the situation is that some people want
rtp-send to produce silence when nothing is playing to a sink that is
being monitored, and some people want the RTP stream to pause. I think
the right thing to do is to by default set the DONT_INHIBIT_AUTO_SUSPEND
flag when capturing from a monitor source and leave it unset otherwise,
but allow the user to override this policy with a module argument.

I'll make a patch that adds an "allow_suspend_on_idle" argument to

> ---
>  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)
> +
>      pa_source_output_new(&o, m->core, &data);
>      pa_source_output_new_data_done(&data);


More information about the pulseaudio-discuss mailing list