[pulseaudio-discuss] [PATCH 4/8] sink, source: redo state changing code

Georg Chini georg at chini.tk
Wed Feb 21 20:52:04 UTC 2018

On 19.02.2018 15:48, Tanu Kaskinen wrote:
> This adds a pa_suspend_cause_t parameter to the sink/source_set_state()
> functions, and moves part of the work that pa_sink/source_suspend() does
> to sink/source_set_state(). The reason for this code shuffling is that I
> plan to make all suspend cause changes available to modules through the
> state change callbacks. This is the first step towards that.
> Additionally, pa_source_sync_suspend() is changed to also update the
> suspend cause of the monitor source when the suspend cause of the
> monitored sink changes. That probably doesn't have much effect on
> anything, but I think it makes sense to mirror the sink suspend cause in
> the monitor source.
> pa_source_sync_suspend() has also a bug fix: previously it was probably
> possible that a sink might get suspended while in the passthrough mode.
> When the sink then resumed (while still in the passthrough mode),
> pa_source_sync_suspend() would resume also the monitor source, even
> though the monitor source should be kept suspended when the sink is in
> the passthrough mode. Now the monitor source won't be resumed in this
> situation.
> ---
>   src/pulsecore/sink.c   | 125 ++++++++++++++++++++++++++---------------------
>   src/pulsecore/source.c | 128 ++++++++++++++++++++++++++++++-------------------
>   2 files changed, 150 insertions(+), 103 deletions(-)

More information about the pulseaudio-discuss mailing list