summaryrefslogtreecommitdiff
path: root/android/handsfree.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2014-12-17 11:18:44 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-12-19 14:26:47 +0100
commite0b7cd73531eda84e4ec7362754a9a4f7b760c37 (patch)
treea6fc65e1dfa4525c59b570f038e2c8aeefbd82dc /android/handsfree.c
parent21d4d3b7a7b2d410e24e4574adc17057b1996a9e (diff)
downloadbluez-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/handsfree.c')
-rw-r--r--android/handsfree.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/android/handsfree.c b/android/handsfree.c
index 7fbe64b5d..da89623ed 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -2496,6 +2496,24 @@ failed:
HAL_OP_HANDSFREE_PHONE_STATE_CHANGE, status);
}
+static void handle_configure_wbs(const void *buf, uint16_t len)
+{
+ const struct hal_cmd_handsfree_configure_wbs *cmd = buf;
+ uint8_t status;
+
+ switch (cmd->config) {
+ case HAL_HANDSFREE_WBS_NONE:
+ case HAL_HANDSFREE_WBS_NO:
+ case HAL_HANDSFREE_WBS_YES:
+ default:
+ status = HAL_STATUS_FAILED;
+ break;
+ }
+
+ ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_HANDSFREE,
+ HAL_OP_HANDSFREE_CONFIGURE_WBS, status);
+}
+
static const struct ipc_handler cmd_handlers[] = {
/* HAL_OP_HANDSFREE_CONNECT */
{ handle_connect, false,
@@ -2537,6 +2555,9 @@ static const struct ipc_handler cmd_handlers[] = {
/* HAL_OP_HANDSFREE_PHONE_STATE_CHANGE */
{ handle_phone_state_change, true,
sizeof(struct hal_cmd_handsfree_phone_state_change) },
+ /* HAL_OP_HANDSFREE_CONFIGURE_WBS */
+ { handle_configure_wbs, false,
+ sizeof(struct hal_cmd_handsfree_configure_wbs) },
};
static sdp_record_t *headset_ag_record(void)