From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx> The hfgw card profile (headset role of the HFP Bluetooth profile) has some particularities that make it unsuitable for idle-timeout-based suspension. The motivation starts with the fact that the remote end (the phone) will report to the user whether the audio is being routed to the headset or not. However, several use-cases require that the user is not reported such condition: outband ringing, simulated held calls where the audio is just silenced, multi-phone use-cases, etc. Additionally, there are IOP issues: some phones do not handle correctly suspending and resuming SCO. Therefore this patch exploits a module-specific property such that module-suspend-on-idle will not suspend the sink and source of the hfgw card profile. --- src/modules/bluetooth/module-bluetooth-device.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 2d5c072..aac7e9d 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -1723,6 +1723,9 @@ static int add_sink(struct userdata *u) { pa_proplist_sets(data.proplist, "bluetooth.protocol", profile_to_string(u->profile)); if (u->profile == PROFILE_HSP) pa_proplist_sets(data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone"); + else if (u->profile == PROFILE_HFGW) + pa_proplist_sets(data.proplist, "module-suspend-on-idle.timeout", "3600"); + data.card = u->card; data.name = get_name("sink", u->modargs, u->address, &b); data.namereg_fail = b; @@ -1784,6 +1787,8 @@ static int add_source(struct userdata *u) { pa_proplist_sets(data.proplist, "bluetooth.protocol", profile_to_string(u->profile)); if (u->profile == PROFILE_HSP) pa_proplist_sets(data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone"); + else if (u->profile == PROFILE_HFGW) + pa_proplist_sets(data.proplist, "module-suspend-on-idle.timeout", "3600"); data.card = u->card; data.name = get_name("source", u->modargs, u->address, &b); -- 1.7.7.6