diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2014-12-17 11:18:44 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-12-19 14:26:47 +0100 |
commit | e0b7cd73531eda84e4ec7362754a9a4f7b760c37 (patch) | |
tree | a6fc65e1dfa4525c59b570f038e2c8aeefbd82dc /android/hal-handsfree.c | |
parent | 21d4d3b7a7b2d410e24e4574adc17057b1996a9e (diff) | |
download | bluez-e0b7cd73531eda84e4ec7362754a9a4f7b760c37.tar.gz |
android/handsfree: Add initial support for configure WBS commmand
This adds required IPC message and handler for configure WBS command.
Diffstat (limited to 'android/hal-handsfree.c')
-rw-r--r-- | android/hal-handsfree.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/android/hal-handsfree.c b/android/hal-handsfree.c index 2c638e622..279b26a46 100644 --- a/android/hal-handsfree.c +++ b/android/hal-handsfree.c @@ -832,11 +832,22 @@ static void cleanup(void) #if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0) static bt_status_t configure_wbs(bt_bdaddr_t *bd_addr, bthf_wbs_config_t config) { - /* TODO: implement */ + struct hal_cmd_handsfree_configure_wbs cmd; - DBG(""); + DBG("%u", config); + + if (!interface_ready()) + return BT_STATUS_NOT_READY; - return BT_STATUS_UNSUPPORTED; + if (!bd_addr) + return BT_STATUS_PARM_INVALID; + + memcpy(cmd.bdaddr, bd_addr, sizeof(cmd.bdaddr)); + cmd.config = config; + + return hal_ipc_cmd(HAL_SERVICE_ID_HANDSFREE, + HAL_OP_HANDSFREE_CONFIGURE_WBS, + sizeof(cmd), &cmd, NULL, NULL, NULL); } #endif |