[PATCH 37/39] android/hf-client: Add RING notification event

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

 



---
 android/hal-hf-client.c | 8 ++++++++
 android/hal-msg.h       | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/android/hal-hf-client.c b/android/hal-hf-client.c
index ff3c050..1dea263 100644
--- a/android/hal-hf-client.c
+++ b/android/hal-hf-client.c
@@ -263,6 +263,12 @@ static void handle_last_voice_tag_number(void *buf, uint16_t len, int fd)
 		cbs->last_voice_tag_number_callback(number);
 }
 
+static void handle_ring_indication(void *buf, uint16_t len, int fd)
+{
+	if (cbs->ring_indication_cb)
+		cbs->ring_indication_cb();
+}
+
 /*
  * handlers will be called from notification thread context,
  * index in table equals to 'opcode - HAL_MINIMUM_EVENT'
@@ -327,6 +333,8 @@ static const struct hal_ipc_handler ev_handlers[] = {
 	/* HAL_EV_CLIENT_LAST_VOICE_CALL_TAG_NUM */
 	{ handle_last_voice_tag_number, true,
 		sizeof(struct hal_ev_hf_client_last_void_call_tag_num) },
+	/* HAL_EV_CLIENT_RING_INDICATION */
+	{ handle_ring_indication, false, 0 },
 };
 
 static bt_status_t init(bthf_client_callbacks_t *callbacks)
diff --git a/android/hal-msg.h b/android/hal-msg.h
index f09dcf0..16a341d 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -1870,3 +1870,5 @@ struct hal_ev_hf_client_last_void_call_tag_num {
 	uint16_t number_len;
 	uint8_t number[0];
 } __attribute__((packed));
+
+#define HAL_EV_CLIENT_RING_INDICATION			0x95
-- 
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