Commit d5f64fa4 authored by Paweł Chmielowski's avatar Paweł Chmielowski Committed by pali

Call pa_sink/source_put after set_volume

Without this after changing profile/reconnecting device volume was set to
maximum.
parent 171bd4a9
......@@ -1645,10 +1645,10 @@ static int start_thread(struct userdata *u) {
if (u->profile == PA_BLUETOOTH_PROFILE_HSP_AUDIO_GATEWAY || u->profile == PA_BLUETOOTH_PROFILE_HFP_AUDIO_GATEWAY)
u->sink->priority = 1500;
pa_sink_put(u->sink);
if (u->sink->set_volume)
u->sink->set_volume(u->sink);
pa_sink_put(u->sink);
}
if (u->source) {
......@@ -1661,10 +1661,10 @@ static int start_thread(struct userdata *u) {
if (u->profile == PA_BLUETOOTH_PROFILE_HSP_AUDIO_GATEWAY || u->profile == PA_BLUETOOTH_PROFILE_HFP_AUDIO_GATEWAY || pa_bluetooth_profile_is_a2dp_source(u->profile))
u->source->priority = 1500;
pa_source_put(u->source);
if (u->source->set_volume)
u->source->set_volume(u->source);
pa_source_put(u->source);
}
return 0;
......
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