hfp_hf_bluez5: Use 1.6 card driver

This commit is contained in:
Vinicius Costa Gomes 2013-04-03 20:24:39 -03:00 committed by Denis Kenzior
parent dd24a39d2f
commit a36ffa872a
1 changed files with 10 additions and 2 deletions

View File

@ -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);