[RFCv3 18/20] bluetooth: Call HandsfreeAudioCard.Connect() on non-optional acquire

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jo?o Paulo Rechi Vita <jprvita@xxxxxxxxxxxxx>

When the HFP sink/source is resumed and the transport is not acquired a
new Audio Connection should be started by the HF. This is needed to
support audio call transfer from the AG to the HF triggered by the HF.
---
 src/modules/bluetooth/bluetooth-util.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c
index a00dac7..0fd4c8e 100644
--- a/src/modules/bluetooth/bluetooth-util.c
+++ b/src/modules/bluetooth/bluetooth-util.c
@@ -1873,6 +1873,12 @@ int pa_bluetooth_transport_acquire(pa_bluetooth_transport *t, bool optional, siz
         if (t->profile == PROFILE_HFGW) {
             struct handsfree_card *hf_card = pa_hashmap_get(t->device->discovery->hf_cards, t->path);
 
+            if (!optional) {
+                pa_assert_se(m = dbus_message_new_method_call(t->owner, t->path, "org.ofono.HandsfreeAudioCard", "Connect"));
+                pa_assert_se(dbus_connection_send(pa_dbus_connection_get(t->device->discovery->connection), m, NULL));
+                return -1;
+            }
+
             /* The correct block size should take into account the SCO MTU from
              * the Bluetooth adapter and (for adapters in the USB bus) the MxPS
              * value from the Isoc USB endpoint in use by btusb and should be
-- 
1.7.11.7



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux