Commit cc1101d4 authored by Marijn Suijten's avatar Marijn Suijten 🦀

FIXUP bluetooth: Delay A2DP Absolute Volume setup until property is available

Set passthrough mode AFTER setting up callbacks, otherwise a volume
change of 100% would be sent to the rendering device while PA meanwhile
applies no attenuation (plays at max volume). This is unnaceptably loud.
parent b268433a
......@@ -2428,8 +2428,15 @@ static void sink_set_a2dp_remote_controlled(pa_sink *s) {
// pa_sink_set_set_volume_callback(s, sink_set_volume_cb);
// s->n_volume_steps = A2DP_MAX_GAIN + 1;
// Temporarily disable volume callback to change to passthrough
// This would otherwise send 100% to the sink, which is not
// nice on the ears...
pa_sink_set_set_volume_callback(s, NULL);
/* Reset local attenuation */
pa_sink_set_set_volume_callback(s, sink_set_volume_cb);
static pa_hook_result_t transport_tx_volume_gain_changed_cb(pa_bluetooth_discovery *y, pa_bluetooth_transport *t, struct userdata *u) {
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