sink, source: Document why we force reconfigure on passthrough toggle

This commit is contained in:
Arun Raghavan 2022-07-22 08:34:45 -04:00
parent bfb5e03e83
commit 78f12b7445
2 changed files with 8 additions and 2 deletions

View file

@ -1605,7 +1605,10 @@ void pa_sink_reconfigure(pa_sink *s, pa_sample_spec *spec, pa_channel_map *map,
desired_spec.rate = default_rate;
}
/* We don't expect to change only the channel map, so we don't check that */
/* We don't expect to change only the channel map, so we don't check that.
* If the passthrough state is toggled, we want to continue through and
* make sure volumes are restored and the sink can toggle passthrough
* state if it's keeping track. */
if (pa_sample_spec_equal(&desired_spec, &s->sample_spec) && passthrough == pa_sink_is_passthrough(s))
return;

View file

@ -1176,7 +1176,10 @@ void pa_source_reconfigure(pa_source *s, pa_sample_spec *spec, pa_channel_map *m
desired_spec.rate = default_rate;
}
/* We don't expect to change only the channel map, so we don't check that */
/* We don't expect to change only the channel map, so we don't check that.
* If the passthrough state is toggled, we want to continue through and
* make sure volumes are restored and the source can toggle passthrough
* state if it's keeping track. */
if (pa_sample_spec_equal(&desired_spec, &s->sample_spec) && passthrough == pa_source_is_passthrough(s))
return;