[pulseaudio-discuss] [PATCH v0 2/2] bluetooth: Request headset audio during profile switch
Mikel Astiz
mikel.astiz.oss at gmail.com
Thu Nov 29 05:28:18 PST 2012
From: Mikel Astiz <mikel.astiz at bmw-carit.de>
When a headset is having a profile switch, we can either leave the
SCO state unmodified (as it was before this patch) or we can
alternatively request it (as older versions of PA).
This patch tries to avoid a potential regression in case a module
such as module-suspend-on-idle is not present, due to the provided
resume-on-running policy. Without this patch, and without such a policy,
the sink and sources would stay suspended until the user manually
changed the suspend state.
A more sophisticated solution to this problem would be to revert this
patch and implement the resume-on-running policy inside
module-bluetooth-policy.
---
src/modules/bluetooth/module-bluetooth-device.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index d1c386f..66f00e0 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -2010,7 +2010,10 @@ static int setup_transport(struct userdata *u) {
u->transport_removed_slot = pa_hook_connect(&t->hooks[PA_BLUETOOTH_TRANSPORT_HOOK_REMOVED], PA_HOOK_NORMAL,
(pa_hook_cb_t) transport_removed_cb, u);
- bt_transport_acquire(u, FALSE);
+ if (u->profile == PROFILE_HSP || u->profile == PROFILE_A2DP)
+ bt_transport_acquire(u, TRUE);
+ else
+ bt_transport_acquire(u, FALSE);
bt_transport_config(u);
--
1.7.11.7
More information about the pulseaudio-discuss
mailing list