Commit 710f46dd authored by Marijn Suijten's avatar Marijn Suijten 🦀

HELPNEEDED: Suspending the whole monitor works

parent b0a58c4b
Pipeline #264629 passed with stages
in 5 minutes and 19 seconds
......@@ -2373,13 +2373,21 @@ static void switch_codec_cb_handler(bool success, pa_bluetooth_profile_t profile
pa_sink_input *i;
uint32_t idx;
PA_IDXSET_FOREACH(i, u->sink->inputs, idx) {
PA_IDXSET_FOREACH(i, u->sink->inputs, idx)
pa_sink_input_cork(i, true);
if (u->sink->monitor_source) {
pa_source_suspend(u->sink->monitor_source, true, PA_SUSPEND_INTERNAL);
PA_IDXSET_FOREACH(i, u->sink->monitor_source->outputs, idx)
pa_source_output_cork(i, true);
}
pa_sink_reconfigure(u->sink, spec, false);
PA_IDXSET_FOREACH(i, u->sink->inputs, idx) {
pa_sink_input_cork(i, false);
if (u->sink->monitor_source) {
PA_IDXSET_FOREACH(i, u->sink->monitor_source->outputs, idx)
pa_source_output_cork(i, false);
pa_source_suspend(u->sink->monitor_source, false, PA_SUSPEND_INTERNAL);
}
PA_IDXSET_FOREACH(i, u->sink->inputs, idx)
pa_sink_input_cork(i, false);
pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), PA_SINK_MESSAGE_SETUP_STREAM, NULL, 0, NULL);
......@@ -2388,13 +2396,21 @@ static void switch_codec_cb_handler(bool success, pa_bluetooth_profile_t profile
pa_source_output *i;
uint32_t idx;
PA_IDXSET_FOREACH(i, u->source->outputs, idx) {
PA_IDXSET_FOREACH(i, u->source->outputs, idx)
pa_source_output_cork(i, true);
if (u->source->monitor_of) {
pa_sink_suspend(u->source->monitor_of, true, PA_SUSPEND_INTERNAL);
PA_IDXSET_FOREACH(i, u->source->monitor_of->inputs, idx)
pa_sink_input_cork(i, true);
}
pa_source_reconfigure(u->source, spec, false);
PA_IDXSET_FOREACH(i, u->source->outputs, idx) {
pa_source_output_cork(i, false);
if (u->source->monitor_of) {
PA_IDXSET_FOREACH(i, u->source->monitor_of->inputs, idx)
pa_sink_input_cork(i, false);
pa_sink_suspend(u->source->monitor_of, false, PA_SUSPEND_INTERNAL);
}
PA_IDXSET_FOREACH(i, u->source->outputs, idx)
pa_source_output_cork(i, false);
pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), PA_SOURCE_MESSAGE_SETUP_STREAM, NULL, 0, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment