---
 plugins/hfp_hf_bluez5.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c
index 4c8f412..41ea549 100644
--- a/plugins/hfp_hf_bluez5.c
+++ b/plugins/hfp_hf_bluez5.c
@@ -436,7 +436,7 @@ static DBusMessage *profile_new_connection(DBusConnection 
*conn,
        struct sockaddr_rc saddr;
        socklen_t optlen;
        DBusMessageIter entry;
-       const char *device;
+       const char *device, *driver;
        char local[18], remote[18];
        uint16_t version = HFP_VERSION_1_5;
        int fd, err;
@@ -510,7 +510,15 @@ static DBusMessage *profile_new_connection(DBusConnection 
*conn,
 
        hfp = ofono_modem_get_data(modem);
        hfp->msg = dbus_message_ref(msg);
-       hfp->card = ofono_handsfree_card_create(0, NULL, NULL);
+
+       driver = NULL;
+
+       if (version >= HFP_VERSION_1_6)
+               driver = HFP16_HF_DRIVER;
+
+       hfp->card = ofono_handsfree_card_create(0, driver, hfp);
+       ofono_handsfree_card_set_data(hfp->card, hfp);
+
        ofono_handsfree_card_set_local(hfp->card, local);
        ofono_handsfree_card_set_remote(hfp->card, remote);
 
-- 
1.8.2

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to