From a36ffa872a1796c4ecba3d97253752ead4af1c78 Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Wed, 3 Apr 2013 20:24:39 -0300 Subject: [PATCH] hfp_hf_bluez5: Use 1.6 card driver --- 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 a6cc1565..ac6189da 100644 --- a/plugins/hfp_hf_bluez5.c +++ b/plugins/hfp_hf_bluez5.c @@ -397,7 +397,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; @@ -471,7 +471,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);