diff --git a/android/hal-handsfree-client.c b/android/hal-handsfree-client.c
index 23cbd53..35929c5 100644
--- a/android/hal-handsfree-client.c
+++ b/android/hal-handsfree-client.c
sizeof(cmd), &cmd, NULL, NULL, NULL);
}
+static bt_status_t call_action(bthf_client_call_action_t action, int index)
+{
+ struct hal_cmd_hf_client_call_action cmd;
+
+ DBG("");
+
+ if (!interface_ready())
+ return BT_STATUS_NOT_READY;
+
+ cmd.action = action;
+ cmd.index = index;
+
+ return hal_ipc_cmd(HAL_SERVICE_ID_HANDSFREE_CLIENT,
+ HAL_OP_HF_CLIENT_CALL_ACTION, sizeof(cmd), &cmd,
+ NULL, NULL, NULL);
+}
+
static void cleanup(void)
{
struct hal_cmd_unregister_module cmd;
.volume_control = volume_control,
.dial = dial,
.dial_memory = dial_memory,
+ .handle_call_action = call_action,
.cleanup = cleanup
};
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 1c57657..dc563e4 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
int32_t location;
} __attribute__((packed));
+#define HAL_HF_CLIENT_ACTION_CHLD_0 0x00
+#define HAL_HF_CLIENT_ACTION_CHLD_1 0x01
+#define HAL_HF_CLIENT_ACTION_CHLD_2 0x02
+#define HAL_HF_CLIENT_ACTION_CHLD_3 0x03
+#define HAL_HF_CLIENT_ACTION_CHLD_4 0x04
+#define HAL_HF_CLIENT_ACTION_CHLD_1x 0x05
+#define HAL_HF_CLIENT_ACTION_CHLD_2x 0x06
+#define HAL_HF_CLIENT_ACTION_ATA 0x07
+#define HAL_HF_CLIENT_ACTION_CHUP 0x08
+#define HAL_HF_CLIENT_ACTION_BRTH_0 0x09
+#define HAL_HF_CLIENT_ACTION_BRTH_1 0x10
+#define HAL_HF_CLIENT_ACTION_BRTH_02 0x11
+
+#define HAL_OP_HF_CLIENT_CALL_ACTION 0x0a
+struct hal_cmd_hf_client_call_action {
+ uint8_t action;
+ uint8_t index;
+} __attribute__((packed));
+
/* Notifications and confirmations */
#define HAL_POWER_OFF 0x00
diff --git a/android/handsfree-client.c b/android/handsfree-client.c
index d51ba86..6319b85 100644
--- a/android/handsfree-client.c
+++ b/android/handsfree-client.c
HAL_OP_HF_CLIENT_DIAL_MEMORY, HAL_STATUS_UNSUPPORTED);
}
+static void handle_call_action(const void *buf, uint16_t len)
+{
+ DBG("Not Implemented");
+ ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_HANDSFREE_CLIENT,
+ HAL_OP_HF_CLIENT_CALL_ACTION, HAL_STATUS_UNSUPPORTED);
+}
+
static const struct ipc_handler cmd_handlers[] = {
/* HAL_OP_HF_CLIENT_CONNECT */
{ handle_connect, false,
/* HAL_OP_HF_CLIENT_DIAL_MEMORY */
{ handle_dial_memory, false,
sizeof(struct hal_cmd_hf_client_dial_memory) },
+ /* HAL_OP_HF_CLIENT_CALL_ACTION */
+ { handle_call_action, false,
+ sizeof(struct hal_cmd_hf_client_call_action) },
};
bool bt_hf_client_register(struct ipc *ipc, const bdaddr_t *addr)