From: Jo?o Paulo Rechi Vita <jprvita@xxxxxxxxxxxxx> During transport setup and configuration phase for PROFILE_HFP_AG the transport should not try to be acquired. The file descriptor will be passed through NewConnection(), instead. --- src/modules/bluetooth/module-bluetooth-device.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index ace99e8..1ec4f79 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -1806,7 +1806,7 @@ static void bt_transport_config_a2dp(struct userdata *u) { } static void bt_transport_config(struct userdata *u) { - if (u->profile == PROFILE_HSP || u->profile == PROFILE_HFGW) { + if (u->profile == PROFILE_HSP || u->profile == PROFILE_HFGW || u->profile == PROFILE_HFP_AG) { u->sample_spec.format = PA_SAMPLE_S16LE; u->sample_spec.channels = 1; u->sample_spec.rate = 8000; @@ -1847,8 +1847,9 @@ static int setup_transport(struct userdata *u) { if (u->profile == PROFILE_A2DP_SOURCE || u->profile == PROFILE_HFGW) bt_transport_acquire(u, true); /* In case of error, the sink/sources will be created suspended */ - else if (bt_transport_acquire(u, false) < 0) - return -1; /* We need to fail here until the interactions with module-suspend-on-idle and alike get improved */ + else if (u->profile == PROFILE_A2DP || u->profile == PROFILE_HSP) + if (bt_transport_acquire(u, false) < 0) + return -1; /* We need to fail here until the interactions with module-suspend-on-idle and alike get improved */ bt_transport_config(u); -- 1.7.11.7