On Thu, 2016-02-18 at 20:52 +0900, Sangchul Lee wrote: > Fix improper uncork behavior when using this module with "global=1" argument. > > Signed-off-by: Sangchul Lee <sc11.lee at samsung.com> > --- > Â src/modules/module-role-cork.c | 18 +++++++++++++++++- > Â 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/src/modules/module-role-cork.c b/src/modules/module-role-cork.c > index 7c0f59f..7a4a0c0 100644 > --- a/src/modules/module-role-cork.c > +++ b/src/modules/module-role-cork.c > @@ -90,6 +90,22 @@ static bool shall_cork(struct userdata *u, pa_sink *s, pa_sink_input *ignore) { > Â Â Â Â Â return false; > Â } > Â > +static bool shall_corks(struct userdata *u, pa_sink *s, pa_sink_input *ignore) { > +Â Â Â Â bool ret = false; > + > +Â Â Â Â pa_assert(u); > + > +Â Â Â Â if (u->global) { > +Â Â Â Â Â Â Â Â uint32_t idx; > +Â Â Â Â Â Â Â Â PA_IDXSET_FOREACH(s, u->core->sinks, idx) > +Â Â Â Â Â Â Â Â Â Â Â Â if ((ret = shall_cork(u, s, ignore))) > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break; > +Â Â Â Â } else > +Â Â Â Â Â Â Â Â ret = shall_cork(u, s, ignore); > + > +Â Â Â Â return ret; > +} > + > Â static inline void apply_cork_to_sink(struct userdata *u, pa_sink *s, pa_sink_input *ignore, bool cork) { > Â Â Â Â Â pa_sink_input *j; > Â Â Â Â Â uint32_t idx, role_idx; > @@ -166,7 +182,7 @@ static pa_hook_result_t process(struct userdata *u, pa_sink_input *i, bool creat > Â Â Â Â Â if (!i->sink) > Â Â Â Â Â Â Â Â Â return PA_HOOK_OK; > Â > -Â Â Â Â cork = shall_cork(u, i->sink, create ? NULL : i); > +Â Â Â Â cork = shall_corks(u, i->sink, create ? NULL : i); > Â Â Â Â Â apply_cork(u, i->sink, create ? NULL : i, cork); > Â > Â Â Â Â Â return PA_HOOK_OK; This issue should now be fixed in the merged cork/ducking code in src/modules/stream-interaction.c. You may want to check the behaviour of the new code. --Â Tanu