[PATCH 28/39] android/hf-client: Add Call Held Indicator event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 android/hal-hf-client.c | 11 +++++++++++
 android/hal-msg.h       |  9 +++++++++
 2 files changed, 20 insertions(+)

diff --git a/android/hal-hf-client.c b/android/hal-hf-client.c
index ef647f1..8c03e52 100644
--- a/android/hal-hf-client.c
+++ b/android/hal-hf-client.c
@@ -127,6 +127,14 @@ static void handle_call_setup(void *buf, uint16_t len, int fd)
 		cbs->callsetup_cb(ev->call_setup);
 }
 
+static void handle_call_held(void *buf, uint16_t len, int fd)
+{
+	struct hal_ev_hf_client_call_held_indicator *ev = buf;
+
+	if (cbs->callheld_cb)
+		cbs->callheld_cb(ev->call_held);
+}
+
 /*
  * handlers will be called from notification thread context,
  * index in table equals to 'opcode - HAL_MINIMUM_EVENT'
@@ -161,6 +169,9 @@ static const struct hal_ipc_handler ev_handlers[] = {
 	/* HAL_EV_HF_CLIENT_CALL_SETUP_INDICATOR */
 	{ handle_call_setup, false,
 		sizeof(struct hal_ev_hf_client_call_setup_indicator) },
+	/* HAL_EV_HF_CLIENT_CALL_HELD_INDICATOR */
+	{ handle_call_held, false,
+			sizeof(struct hal_ev_hf_client_call_held_indicator) },
 };
 
 static bt_status_t init(bthf_client_callbacks_t *callbacks)
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 4620ce3..edf1d3e 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1773,3 +1773,12 @@ struct hal_ev_hf_client_call_indicator {
 struct hal_ev_hf_client_call_setup_indicator {
 	uint8_t call_setup;
 } __attribute__((packed));
+
+#define HF_CLIENT_CALL_HELD_IND_NONE		0x00
+#define HF_CLIENT_CALL_HELD_IND_HOLD_AND_ACTIVE	0x01
+#define HF_CLIENT_CALL_SETUP_IND_HOLD		0x02
+
+#define HAL_EV_HF_CLIENT_CALL_HELD_INDICATOR		0x8b
+struct hal_ev_hf_client_call_held_indicator {
+	uint8_t call_held;
+} __attribute__((packed));
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux