3 * BlueZ - Bluetooth protocol stack for Linux
5 * Copyright (C) 2013 Intel Corporation. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 static const char BLUEZ_HAL_SK_PATH[] = "\0bluez_hal_socket";
26 #define HAL_MINIMUM_EVENT 0x81
28 #define HAL_SERVICE_ID_CORE 0
29 #define HAL_SERVICE_ID_BLUETOOTH 1
30 #define HAL_SERVICE_ID_SOCKET 2
31 #define HAL_SERVICE_ID_HIDHOST 3
32 #define HAL_SERVICE_ID_PAN 4
33 #define HAL_SERVICE_ID_HANDSFREE 5
34 #define HAL_SERVICE_ID_A2DP 6
35 #define HAL_SERVICE_ID_HEALTH 7
36 #define HAL_SERVICE_ID_AVRCP 8
37 #define HAL_SERVICE_ID_GATT 9
38 #define HAL_SERVICE_ID_HANDSFREE_CLIENT 10
39 #define HAL_SERVICE_ID_MAP_CLIENT 11
40 #define HAL_SERVICE_ID_AVRCP_CTRL 12
41 #define HAL_SERVICE_ID_A2DP_SINK 13
43 #define HAL_SERVICE_ID_MAX HAL_SERVICE_ID_A2DP_SINK
47 #define HAL_STATUS_SUCCESS IPC_STATUS_SUCCESS
48 #define HAL_STATUS_FAILED 0x01
49 #define HAL_STATUS_NOT_READY 0x02
50 #define HAL_STATUS_NOMEM 0x03
51 #define HAL_STATUS_BUSY 0x04
52 #define HAL_STATUS_DONE 0x05
53 #define HAL_STATUS_UNSUPPORTED 0x06
54 #define HAL_STATUS_INVALID 0x07
55 #define HAL_STATUS_UNHANDLED 0x08
56 #define HAL_STATUS_AUTH_FAILURE 0x09
57 #define HAL_STATUS_REMOTE_DEVICE_DOWN 0x0a
59 #define HAL_OP_STATUS IPC_OP_STATUS
61 #define HAL_MODE_DEFAULT 0x00
62 #define HAL_MODE_BREDR 0x01
63 #define HAL_MODE_LE 0x02
65 #define HAL_OP_REGISTER_MODULE 0x01
66 struct hal_cmd_register_module {
70 } __attribute__((packed));
72 #define HAL_OP_UNREGISTER_MODULE 0x02
73 struct hal_cmd_unregister_module {
75 } __attribute__((packed));
77 #define HAL_CONFIG_VENDOR 0x00
78 #define HAL_CONFIG_MODEL 0x01
79 #define HAL_CONFIG_NAME 0x02
80 #define HAL_CONFIG_SERIAL_NUMBER 0x03
81 #define HAL_CONFIG_SYSTEM_ID 0x04
82 #define HAL_CONFIG_PNP_ID 0x05
83 #define HAL_CONFIG_FW_REV 0x06
84 #define HAL_CONFIG_HW_REV 0x07
86 struct hal_config_prop {
90 } __attribute__((packed));
92 #define HAL_OP_CONFIGURATION 0x03
93 struct hal_cmd_configuration {
95 struct hal_config_prop props[0];
96 } __attribute__((packed));
98 /* Bluetooth Core HAL API */
100 #define HAL_OP_ENABLE 0x01
102 #define HAL_OP_DISABLE 0x02
104 #define HAL_OP_GET_ADAPTER_PROPS 0x03
106 #define HAL_OP_GET_ADAPTER_PROP 0x04
107 struct hal_cmd_get_adapter_prop {
109 } __attribute__((packed));
111 #define HAL_MAX_NAME_LENGTH 249
113 #define HAL_PROP_ADAPTER_NAME 0x01
114 #define HAL_PROP_ADAPTER_ADDR 0x02
115 #define HAL_PROP_ADAPTER_UUIDS 0x03
116 #define HAL_PROP_ADAPTER_CLASS 0x04
117 #define HAL_PROP_ADAPTER_TYPE 0x05
118 #define HAL_PROP_ADAPTER_SERVICE_REC 0x06
119 #define HAL_PROP_ADAPTER_SCAN_MODE 0x07
120 #define HAL_PROP_ADAPTER_BONDED_DEVICES 0x08
121 #define HAL_PROP_ADAPTER_DISC_TIMEOUT 0x09
123 #define HAL_PROP_DEVICE_NAME 0x01
124 #define HAL_PROP_DEVICE_ADDR 0x02
125 #define HAL_PROP_DEVICE_UUIDS 0x03
126 #define HAL_PROP_DEVICE_CLASS 0x04
127 #define HAL_PROP_DEVICE_TYPE 0x05
128 #define HAL_PROP_DEVICE_SERVICE_REC 0x06
129 struct hal_prop_device_service_rec {
134 } __attribute__((packed));
136 #define HAL_PROP_DEVICE_FRIENDLY_NAME 0x0a
137 #define HAL_PROP_DEVICE_RSSI 0x0b
138 #define HAL_PROP_DEVICE_VERSION_INFO 0x0c
139 struct hal_prop_device_info {
141 uint16_t sub_version;
142 uint16_t manufacturer;
143 } __attribute__((packed));
145 #define HAL_PROP_ADAPTER_LOCAL_LE_FEAT 0x0d
146 #define HAL_PROP_DEVICE_TIMESTAMP 0xFF
148 #define HAL_ADAPTER_SCAN_MODE_NONE 0x00
149 #define HAL_ADAPTER_SCAN_MODE_CONN 0x01
150 #define HAL_ADAPTER_SCAN_MODE_CONN_DISC 0x02
152 #define HAL_TYPE_BREDR 0x01
153 #define HAL_TYPE_LE 0x02
154 #define HAL_TYPE_DUAL 0x03
156 #define HAL_OP_SET_ADAPTER_PROP 0x05
157 struct hal_cmd_set_adapter_prop {
161 } __attribute__((packed));
163 #define HAL_OP_GET_REMOTE_DEVICE_PROPS 0x06
164 struct hal_cmd_get_remote_device_props {
166 } __attribute__((packed));
168 #define HAL_OP_GET_REMOTE_DEVICE_PROP 0x07
169 struct hal_cmd_get_remote_device_prop {
172 } __attribute__((packed));
174 #define HAL_OP_SET_REMOTE_DEVICE_PROP 0x08
175 struct hal_cmd_set_remote_device_prop {
180 } __attribute__((packed));
182 #define HAL_OP_GET_REMOTE_SERVICE_REC 0x09
183 struct hal_cmd_get_remote_service_rec {
186 } __attribute__((packed));
188 #define HAL_OP_GET_REMOTE_SERVICES 0x0a
189 struct hal_cmd_get_remote_services {
191 } __attribute__((packed));
193 #define HAL_OP_START_DISCOVERY 0x0b
195 #define HAL_OP_CANCEL_DISCOVERY 0x0c
197 #define BT_TRANSPORT_UNKNOWN 0x00
198 #define BT_TRANSPORT_BR_EDR 0x01
199 #define BT_TRANSPORT_LE 0x02
201 #define HAL_OP_CREATE_BOND 0x0d
202 struct hal_cmd_create_bond {
205 } __attribute__((packed));
207 #define HAL_OP_REMOVE_BOND 0x0e
208 struct hal_cmd_remove_bond {
210 } __attribute__((packed));
212 #define HAL_OP_CANCEL_BOND 0x0f
213 struct hal_cmd_cancel_bond {
215 } __attribute__((packed));
217 #define HAL_OP_PIN_REPLY 0x10
218 struct hal_cmd_pin_reply {
222 uint8_t pin_code[16];
223 } __attribute__((packed));
225 #define HAL_SSP_VARIANT_CONFIRM 0x00
226 #define HAL_SSP_VARIANT_ENTRY 0x01
227 #define HAL_SSP_VARIANT_CONSENT 0x02
228 #define HAL_SSP_VARIANT_NOTIF 0x03
230 #define HAL_OP_SSP_REPLY 0x11
231 struct hal_cmd_ssp_reply {
236 } __attribute__((packed));
238 #define HAL_OP_DUT_MODE_CONF 0x12
239 struct hal_cmd_dut_mode_conf {
241 } __attribute__((packed));
243 #define HAL_OP_DUT_MODE_SEND 0x13
244 struct hal_cmd_dut_mode_send {
248 } __attribute__((packed));
250 #define HAL_OP_LE_TEST_MODE 0x14
251 struct hal_cmd_le_test_mode {
255 } __attribute__((packed));
257 #define HAL_OP_GET_CONNECTION_STATE 0x15
258 struct hal_cmd_get_connection_state {
260 } __attribute__((packed));
262 struct hal_rsp_get_connection_state {
263 int32_t connection_state;
264 } __attribute__((packed));
266 #define HAL_OP_READ_ENERGY_INFO 0x16
268 /* Bluetooth Socket HAL api */
270 #define HAL_MODE_SOCKET_DEFAULT HAL_MODE_DEFAULT
271 #define HAL_MODE_SOCKET_DYNAMIC_MAP 0x01
273 #define HAL_SOCK_RFCOMM 0x01
274 #define HAL_SOCK_SCO 0x02
275 #define HAL_SOCK_L2CAP 0x03
277 #define HAL_SOCK_FLAG_ENCRYPT 0x01
278 #define HAL_SOCK_FLAG_AUTH 0x02
280 #define HAL_OP_SOCKET_LISTEN 0x01
281 struct hal_cmd_socket_listen {
287 } __attribute__((packed));
289 #define HAL_OP_SOCKET_CONNECT 0x02
290 struct hal_cmd_socket_connect {
296 } __attribute__((packed));
298 /* Bluetooth HID Host HAL API */
300 #define HAL_OP_HIDHOST_CONNECT 0x01
301 struct hal_cmd_hidhost_connect {
303 } __attribute__((packed));
305 #define HAL_OP_HIDHOST_DISCONNECT 0x02
306 struct hal_cmd_hidhost_disconnect {
308 } __attribute__((packed));
310 #define HAL_OP_HIDHOST_VIRTUAL_UNPLUG 0x03
311 struct hal_cmd_hidhost_virtual_unplug {
313 } __attribute__((packed));
315 #define HAL_OP_HIDHOST_SET_INFO 0x04
316 struct hal_cmd_hidhost_set_info {
326 } __attribute__((packed));
328 #define HAL_HIDHOST_REPORT_PROTOCOL 0x00
329 #define HAL_HIDHOST_BOOT_PROTOCOL 0x01
330 #define HAL_HIDHOST_UNSUPPORTED_PROTOCOL 0xff
332 #define HAL_OP_HIDHOST_GET_PROTOCOL 0x05
333 struct hal_cmd_hidhost_get_protocol {
336 } __attribute__((packed));
338 #define HAL_OP_HIDHOST_SET_PROTOCOL 0x06
339 struct hal_cmd_hidhost_set_protocol {
342 } __attribute__((packed));
344 #define HAL_HIDHOST_INPUT_REPORT 0x01
345 #define HAL_HIDHOST_OUTPUT_REPORT 0x02
346 #define HAL_HIDHOST_FEATURE_REPORT 0x03
348 #define HAL_OP_HIDHOST_GET_REPORT 0x07
349 struct hal_cmd_hidhost_get_report {
354 } __attribute__((packed));
356 #define HAL_OP_HIDHOST_SET_REPORT 0x08
357 struct hal_cmd_hidhost_set_report {
362 } __attribute__((packed));
364 #define HAL_OP_HIDHOST_SEND_DATA 0x09
365 struct hal_cmd_hidhost_send_data {
369 } __attribute__((packed));
371 /* a2dp source and sink HAL API */
373 #define HAL_OP_A2DP_CONNECT 0x01
374 struct hal_cmd_a2dp_connect {
376 } __attribute__((packed));
378 #define HAL_OP_A2DP_DISCONNECT 0x02
379 struct hal_cmd_a2dp_disconnect {
381 } __attribute__((packed));
386 #define HAL_PAN_ROLE_NONE 0x00
387 #define HAL_PAN_ROLE_NAP 0x01
388 #define HAL_PAN_ROLE_PANU 0x02
390 /* PAN Control states */
391 #define HAL_PAN_CTRL_ENABLED 0x00
392 #define HAL_PAN_CTRL_DISABLED 0x01
394 /* PAN Connection states */
395 #define HAL_PAN_STATE_CONNECTED 0x00
396 #define HAL_PAN_STATE_CONNECTING 0x01
397 #define HAL_PAN_STATE_DISCONNECTED 0x02
398 #define HAL_PAN_STATE_DISCONNECTING 0x03
400 /* PAN status values */
401 #define HAL_PAN_STATUS_FAIL 0x01
402 #define HAL_PAN_STATUS_NOT_READY 0x02
403 #define HAL_PAN_STATUS_NO_MEMORY 0x03
404 #define HAL_PAN_STATUS_BUSY 0x04
405 #define HAL_PAN_STATUS_DONE 0x05
406 #define HAL_PAN_STATUS_UNSUPORTED 0x06
407 #define HAL_PAN_STATUS_INVAL 0x07
408 #define HAL_PAN_STATUS_UNHANDLED 0x08
409 #define HAL_PAN_STATUS_AUTH_FAILED 0x09
410 #define HAL_PAN_STATUS_DEVICE_DOWN 0x0A
412 #define HAL_OP_PAN_ENABLE 0x01
413 struct hal_cmd_pan_enable {
415 } __attribute__((packed));
417 #define HAL_OP_PAN_GET_ROLE 0x02
418 struct hal_rsp_pan_get_role {
420 } __attribute__((packed));
422 #define HAL_OP_PAN_CONNECT 0x03
423 struct hal_cmd_pan_connect {
427 } __attribute__((packed));
429 #define HAL_OP_PAN_DISCONNECT 0x04
430 struct hal_cmd_pan_disconnect {
432 } __attribute__((packed));
434 #define HAL_HEALTH_MDEP_ROLE_SOURCE 0x00
435 #define HAL_HEALTH_MDEP_ROLE_SINK 0x01
437 #define HAL_HEALTH_CHANNEL_TYPE_RELIABLE 0x00
438 #define HAL_HEALTH_CHANNEL_TYPE_STREAMING 0x01
439 #define HAL_HEALTH_CHANNEL_TYPE_ANY 0x02
441 #define HAL_OP_HEALTH_REG_APP 0x01
442 struct hal_cmd_health_reg_app {
444 uint16_t app_name_off;
445 uint16_t provider_name_off;
446 uint16_t service_name_off;
447 uint16_t service_descr_off;
450 } __attribute__((packed));
452 struct hal_rsp_health_reg_app {
454 } __attribute__((packed));
456 #define HAL_OP_HEALTH_MDEP 0x02
457 struct hal_cmd_health_mdep {
461 uint8_t channel_type;
464 } __attribute__((packed));
466 #define HAL_OP_HEALTH_UNREG_APP 0x03
467 struct hal_cmd_health_unreg_app {
469 } __attribute__((packed));
471 #define HAL_OP_HEALTH_CONNECT_CHANNEL 0x04
472 struct hal_cmd_health_connect_channel {
476 } __attribute__((packed));
478 struct hal_rsp_health_connect_channel {
480 } __attribute__((packed));
482 #define HAL_OP_HEALTH_DESTROY_CHANNEL 0x05
483 struct hal_cmd_health_destroy_channel {
485 } __attribute__((packed));
487 /* Handsfree HAL API */
489 #define HAL_MODE_HANDSFREE_HSP_ONLY HAL_MODE_DEFAULT
490 #define HAL_MODE_HANDSFREE_HFP 0x01
491 #define HAL_MODE_HANDSFREE_HFP_WBS 0x02
493 #define HAL_OP_HANDSFREE_CONNECT 0x01
494 struct hal_cmd_handsfree_connect {
496 } __attribute__((packed));
498 #define HAL_OP_HANDSFREE_DISCONNECT 0x02
499 struct hal_cmd_handsfree_disconnect {
501 } __attribute__((packed));
503 #define HAL_OP_HANDSFREE_CONNECT_AUDIO 0x03
504 struct hal_cmd_handsfree_connect_audio {
506 } __attribute__((packed));
508 #define HAL_OP_HANDSFREE_DISCONNECT_AUDIO 0x04
509 struct hal_cmd_handsfree_disconnect_audio {
511 } __attribute__((packed));
513 #define HAL_OP_HANDSFREE_START_VR 0x05
514 struct hal_cmd_handsfree_start_vr {
516 } __attribute__((packed));
518 #define HAL_OP_HANDSFREE_STOP_VR 0x06
519 struct hal_cmd_handsfree_stop_vr {
521 } __attribute__((packed));
523 #define HAL_HANDSFREE_VOLUME_TYPE_SPEAKER 0x00
524 #define HAL_HANDSFREE_VOLUME_TYPE_MIC 0x01
526 #define HAL_OP_HANDSFREE_VOLUME_CONTROL 0x07
527 struct hal_cmd_handsfree_volume_control {
531 } __attribute__((packed));
533 #define HAL_HANDSFREE_NETWORK_STATE_NOT_AVAILABLE 0x00
534 #define HAL_HANDSFREE_NETWORK_STATE_AVAILABLE 0x01
536 #define HAL_HANDSFREE_SERVICE_TYPE_HOME 0x00
537 #define HAL_HANDSFREE_SERVICE_TYPE_ROAMING 0x01
539 #define HAL_OP_HANDSFREE_DEVICE_STATUS_NOTIF 0x08
540 struct hal_cmd_handsfree_device_status_notif {
545 } __attribute__((packed));
547 #define HAL_OP_HANDSFREE_COPS_RESPONSE 0x09
548 struct hal_cmd_handsfree_cops_response {
552 } __attribute__((packed));
554 #define HAL_HANDSFREE_CALL_STATE_ACTIVE 0x00
555 #define HAL_HANDSFREE_CALL_STATE_HELD 0x01
556 #define HAL_HANDSFREE_CALL_STATE_DIALING 0x02
557 #define HAL_HANDSFREE_CALL_STATE_ALERTING 0x03
558 #define HAL_HANDSFREE_CALL_STATE_INCOMING 0x04
559 #define HAL_HANDSFREE_CALL_STATE_WAITING 0x05
560 #define HAL_HANDSFREE_CALL_STATE_IDLE 0x06
562 #define HAL_OP_HANDSFREE_CIND_RESPONSE 0x0A
563 struct hal_cmd_handsfree_cind_response {
572 } __attribute__((packed));
574 #define HAL_OP_HANDSFREE_FORMATTED_AT_RESPONSE 0x0B
575 struct hal_cmd_handsfree_formatted_at_response {
579 } __attribute__((packed));
581 #define HAL_HANDSFREE_AT_RESPONSE_ERROR 0x00
582 #define HAL_HANDSFREE_AT_RESPONSE_OK 0x01
584 #define HAL_OP_HANDSFREE_AT_RESPONSE 0x0C
585 struct hal_cmd_handsfree_at_response {
589 } __attribute__((packed));
591 #define HAL_HANDSFREE_CALL_DIRECTION_OUTGOING 0x00
592 #define HAL_HANDSFREE_CALL_DIRECTION_INCOMING 0x01
594 #define HAL_HANDSFREE_CALL_TYPE_VOICE 0x00
595 #define HAL_HANDSFREE_CALL_TYPE_DATA 0x01
596 #define HAL_HANDSFREE_CALL_TYPE_FAX 0x02
598 #define HAL_HANDSFREE_CALL_MPTY_TYPE_SINGLE 0x00
599 #define HAL_HANDSFREE_CALL_MPTY_TYPE_MULTI 0x01
601 #define HAL_HANDSFREE_CALL_ADDRTYPE_UNKNOWN 0x81
602 #define HAL_HANDSFREE_CALL_ADDRTYPE_INTERNATIONAL 0x91
604 #define HAL_OP_HANDSFREE_CLCC_RESPONSE 0x0D
605 struct hal_cmd_handsfree_clcc_response {
615 } __attribute__((packed));
617 #define HAL_OP_HANDSFREE_PHONE_STATE_CHANGE 0x0E
618 struct hal_cmd_handsfree_phone_state_change {
625 } __attribute__((packed));
627 #define HAL_HANDSFREE_WBS_NONE 0x00
628 #define HAL_HANDSFREE_WBS_NO 0x01
629 #define HAL_HANDSFREE_WBS_YES 0x02
631 #define HAL_OP_HANDSFREE_CONFIGURE_WBS 0x0F
632 struct hal_cmd_handsfree_configure_wbs {
635 } __attribute__((packed));
637 /* AVRCP TARGET HAL API */
639 #define HAL_AVRCP_PLAY_STATUS_STOPPED 0x00
640 #define HAL_AVRCP_PLAY_STATUS_PLAYING 0x01
641 #define HAL_AVRCP_PLAY_STATUS_PAUSED 0x02
642 #define HAL_AVRCP_PLAY_STATUS_FWD_SEEK 0x03
643 #define HAL_AVRCP_PLAY_STATUS_REV_SEEK 0x04
644 #define HAL_AVRCP_PLAY_STATUS_ERROR 0xff
646 #define HAL_OP_AVRCP_GET_PLAY_STATUS 0x01
647 struct hal_cmd_avrcp_get_play_status {
651 } __attribute__((packed));
653 #define HAL_AVRCP_PLAYER_ATTR_EQUALIZER 0x01
654 #define HAL_AVRCP_PLAYER_ATTR_REPEAT 0x02
655 #define HAL_AVRCP_PLAYER_ATTR_SHUFFLE 0x03
656 #define HAL_AVRCP_PLAYER_ATTR_SCAN 0x04
658 #define HAL_OP_AVRCP_LIST_PLAYER_ATTRS 0x02
659 struct hal_cmd_avrcp_list_player_attrs {
662 } __attribute__((packed));
664 #define HAL_OP_AVRCP_LIST_PLAYER_VALUES 0x03
665 struct hal_cmd_avrcp_list_player_values {
668 } __attribute__((packed));
670 struct hal_avrcp_player_attr_value {
673 } __attribute__((packed));
675 #define HAL_OP_AVRCP_GET_PLAYER_ATTRS 0x04
676 struct hal_cmd_avrcp_get_player_attrs {
678 struct hal_avrcp_player_attr_value attrs[0];
679 } __attribute__((packed));
681 struct hal_avrcp_player_setting_text {
685 } __attribute__((packed));
687 #define HAL_OP_AVRCP_GET_PLAYER_ATTRS_TEXT 0x05
688 struct hal_cmd_avrcp_get_player_attrs_text {
690 struct hal_avrcp_player_setting_text attrs[0];
691 } __attribute__((packed));
693 #define HAL_OP_AVRCP_GET_PLAYER_VALUES_TEXT 0x06
694 struct hal_cmd_avrcp_get_player_values_text {
696 struct hal_avrcp_player_setting_text values[0];
697 } __attribute__((packed));
699 #define HAL_AVRCP_MEDIA_ATTR_TITLE 0x01
700 #define HAL_AVRCP_MEDIA_ATTR_ARTIST 0x02
701 #define HAL_AVRCP_MEDIA_ATTR_ALBUM 0x03
702 #define HAL_AVRCP_MEDIA_ATTR_TRACK_NUM 0x04
703 #define HAL_AVRCP_MEDIA_ATTR_NUM_TRACKS 0x05
704 #define HAL_AVRCP_MEDIA_ATTR_GENRE 0x06
705 #define HAL_AVRCP_MEDIA_ATTR_DURATION 0x07
707 #define HAL_OP_AVRCP_GET_ELEMENT_ATTRS_TEXT 0x07
708 struct hal_cmd_avrcp_get_element_attrs_text {
710 struct hal_avrcp_player_setting_text values[0];
711 } __attribute__((packed));
713 #define HAL_OP_AVRCP_SET_PLAYER_ATTRS_VALUE 0x08
714 struct hal_cmd_avrcp_set_player_attrs_value {
716 } __attribute__((packed));
718 #define HAL_AVRCP_EVENT_STATUS_CHANGED 0x01
719 #define HAL_AVRCP_EVENT_TRACK_CHANGED 0x02
720 #define HAL_AVRCP_EVENT_TRACK_REACHED_END 0x03
721 #define HAL_AVRCP_EVENT_TRACK_REACHED_START 0x04
722 #define HAL_AVRCP_EVENT_POSITION_CHANGED 0x05
723 #define HAL_AVRCP_EVENT_SETTING_CHANGED 0x08
725 #define HAL_AVRCP_EVENT_TYPE_INTERIM 0x00
726 #define HAL_AVRCP_EVENT_TYPE_CHANGED 0x01
728 #define HAL_OP_AVRCP_REGISTER_NOTIFICATION 0x09
729 struct hal_cmd_avrcp_register_notification {
734 } __attribute__((packed));
736 #define HAL_OP_AVRCP_SET_VOLUME 0x0a
737 struct hal_cmd_avrcp_set_volume {
739 } __attribute__((packed));
741 /* AVRCP CTRL HAL API */
743 #define HAL_OP_AVRCP_CTRL_SEND_PASSTHROUGH 0x01
744 struct hal_cmd_avrcp_ctrl_send_passthrough {
748 } __attribute__((packed));
752 #define HAL_OP_GATT_CLIENT_REGISTER 0x01
753 struct hal_cmd_gatt_client_register {
755 } __attribute__((packed));
757 #define HAL_OP_GATT_CLIENT_UNREGISTER 0x02
758 struct hal_cmd_gatt_client_unregister {
760 } __attribute__((packed));
762 #define HAL_OP_GATT_CLIENT_SCAN 0x03
763 struct hal_cmd_gatt_client_scan {
766 } __attribute__((packed));
768 #define HAL_OP_GATT_CLIENT_CONNECT 0x04
769 struct hal_cmd_gatt_client_connect {
774 } __attribute__((packed));
776 #define HAL_OP_GATT_CLIENT_DISCONNECT 0x05
777 struct hal_cmd_gatt_client_disconnect {
781 } __attribute__((packed));
783 #define HAL_OP_GATT_CLIENT_LISTEN 0x06
784 struct hal_cmd_gatt_client_listen {
787 } __attribute__((packed));
789 #define HAL_OP_GATT_CLIENT_REFRESH 0x07
790 struct hal_cmd_gatt_client_refresh {
793 } __attribute__((packed));
795 #define HAL_OP_GATT_CLIENT_SEARCH_SERVICE 0x08
796 struct hal_cmd_gatt_client_search_service {
799 uint8_t filter_uuid[0];
800 } __attribute__((packed));
802 #define HAL_OP_GATT_CLIENT_GET_INCLUDED_SERVICE 0x09
803 struct hal_gatt_srvc_id {
807 } __attribute__((packed));
809 struct hal_cmd_gatt_client_get_included_service {
811 struct hal_gatt_srvc_id srvc_id;
812 uint8_t continuation;
813 struct hal_gatt_srvc_id incl_srvc_id[0];
814 } __attribute__((packed));
816 #define HAL_OP_GATT_CLIENT_GET_CHARACTERISTIC 0x0a
817 struct hal_gatt_gatt_id {
820 } __attribute__((packed));
822 struct hal_cmd_gatt_client_get_characteristic {
824 struct hal_gatt_srvc_id srvc_id;
825 uint8_t continuation;
826 struct hal_gatt_gatt_id char_id[0];
827 } __attribute__((packed));
829 #define HAL_OP_GATT_CLIENT_GET_DESCRIPTOR 0x0b
830 struct hal_cmd_gatt_client_get_descriptor {
832 struct hal_gatt_srvc_id srvc_id;
833 struct hal_gatt_gatt_id char_id;
834 uint8_t continuation;
835 struct hal_gatt_gatt_id descr_id[0];
836 } __attribute__((packed));
838 #define HAL_OP_GATT_CLIENT_READ_CHARACTERISTIC 0x0c
839 struct hal_cmd_gatt_client_read_characteristic {
841 struct hal_gatt_srvc_id srvc_id;
842 struct hal_gatt_gatt_id char_id;
844 } __attribute__((packed));
846 #define GATT_WRITE_TYPE_NO_RESPONSE 0x01
847 #define GATT_WRITE_TYPE_DEFAULT 0x02
848 #define GATT_WRITE_TYPE_PREPARE 0x03
849 #define GATT_WRITE_TYPE_SIGNED 0x04
851 #define HAL_OP_GATT_CLIENT_WRITE_CHARACTERISTIC 0x0d
852 struct hal_cmd_gatt_client_write_characteristic {
854 struct hal_gatt_srvc_id srvc_id;
855 struct hal_gatt_gatt_id char_id;
860 } __attribute__((packed));
862 #define HAL_OP_GATT_CLIENT_READ_DESCRIPTOR 0x0e
863 struct hal_cmd_gatt_client_read_descriptor {
865 struct hal_gatt_srvc_id srvc_id;
866 struct hal_gatt_gatt_id char_id;
867 struct hal_gatt_gatt_id descr_id;
869 } __attribute__((packed));
871 #define HAL_OP_GATT_CLIENT_WRITE_DESCRIPTOR 0x0f
872 struct hal_cmd_gatt_client_write_descriptor {
874 struct hal_gatt_srvc_id srvc_id;
875 struct hal_gatt_gatt_id char_id;
876 struct hal_gatt_gatt_id descr_id;
881 } __attribute__((packed));
883 #define HAL_OP_GATT_CLIENT_EXECUTE_WRITE 0x10
884 struct hal_cmd_gatt_client_execute_write {
887 } __attribute__((packed));
889 #define HAL_OP_GATT_CLIENT_REGISTER_FOR_NOTIFICATION 0x11
890 struct hal_cmd_gatt_client_register_for_notification {
893 struct hal_gatt_srvc_id srvc_id;
894 struct hal_gatt_gatt_id char_id;
895 } __attribute__((packed));
897 #define HAL_OP_GATT_CLIENT_DEREGISTER_FOR_NOTIFICATION 0x12
898 struct hal_cmd_gatt_client_deregister_for_notification {
901 struct hal_gatt_srvc_id srvc_id;
902 struct hal_gatt_gatt_id char_id;
903 } __attribute__((packed));
905 #define HAL_OP_GATT_CLIENT_READ_REMOTE_RSSI 0x13
906 struct hal_cmd_gatt_client_read_remote_rssi {
909 } __attribute__((packed));
911 #define HAL_OP_GATT_CLIENT_GET_DEVICE_TYPE 0x14
912 struct hal_cmd_gatt_client_get_device_type {
914 } __attribute__((packed));
916 struct hal_rsp_gatt_client_get_device_type {
918 } __attribute__((packed));
920 #define HAL_OP_GATT_CLIENT_SET_ADV_DATA 0x015
921 struct hal_cmd_gatt_client_set_adv_data {
923 uint8_t set_scan_rsp;
924 uint8_t include_name;
925 uint8_t include_txpower;
926 int32_t min_interval;
927 int32_t max_interval;
929 uint16_t manufacturer_len;
930 uint16_t service_data_len;
931 uint16_t service_uuid_len;
933 } __attribute__((packed));
935 #define GATT_CLIENT_TEST_CMD_ENABLE 0x01
936 #define GATT_CLIENT_TEST_CMD_CONNECT 0x02
937 #define GATT_CLIENT_TEST_CMD_DISCONNECT 0x03
938 #define GATT_CLIENT_TEST_CMD_DISCOVER 0x04
939 #define GATT_CLIENT_TEST_CMD_READ 0xe0
940 #define GATT_CLIENT_TEST_CMD_WRITE 0xe1
941 #define GATT_CLIENT_TEST_CMD_INCREASE_SECURITY 0xe2
942 #define GATT_CLIENT_TEST_CMD_PAIRING_CONFIG 0xf0
944 #define HAL_OP_GATT_CLIENT_TEST_COMMAND 0x16
945 struct hal_cmd_gatt_client_test_command {
954 } __attribute__((packed));
956 #define HAL_OP_GATT_SERVER_REGISTER 0x17
957 struct hal_cmd_gatt_server_register {
959 } __attribute__((packed));
961 #define HAL_OP_GATT_SERVER_UNREGISTER 0x18
962 struct hal_cmd_gatt_server_unregister {
964 } __attribute__((packed));
966 #define HAL_OP_GATT_SERVER_CONNECT 0x19
967 struct hal_cmd_gatt_server_connect {
972 } __attribute__((packed));
974 #define HAL_OP_GATT_SERVER_DISCONNECT 0x1a
975 struct hal_cmd_gatt_server_disconnect {
979 } __attribute__((packed));
981 #define HAL_OP_GATT_SERVER_ADD_SERVICE 0x1b
982 struct hal_cmd_gatt_server_add_service {
984 struct hal_gatt_srvc_id srvc_id;
986 } __attribute__((packed));
988 #define HAL_OP_GATT_SERVER_ADD_INC_SERVICE 0x1c
989 struct hal_cmd_gatt_server_add_inc_service {
991 int32_t service_handle;
992 int32_t included_handle;
993 } __attribute__((packed));
995 #define HAL_OP_GATT_SERVER_ADD_CHARACTERISTIC 0x1d
996 struct hal_cmd_gatt_server_add_characteristic {
998 int32_t service_handle;
1001 int32_t permissions;
1002 } __attribute__((packed));
1004 #define HAL_OP_GATT_SERVER_ADD_DESCRIPTOR 0x1e
1005 struct hal_cmd_gatt_server_add_descriptor {
1007 int32_t service_handle;
1009 int32_t permissions;
1010 } __attribute__((packed));
1012 #define GATT_SERVER_TRANSPORT_LE_BIT 0x01
1013 #define GATT_SERVER_TRANSPORT_BREDR_BIT 0x02
1015 #define HAL_OP_GATT_SERVER_START_SERVICE 0x1f
1016 struct hal_cmd_gatt_server_start_service {
1018 int32_t service_handle;
1020 } __attribute__((packed));
1022 #define HAL_OP_GATT_SERVER_STOP_SERVICE 0x20
1023 struct hal_cmd_gatt_server_stop_service {
1025 int32_t service_handle;
1026 } __attribute__((packed));
1028 #define HAL_OP_GATT_SERVER_DELETE_SERVICE 0x21
1029 struct hal_cmd_gatt_server_delete_service {
1031 int32_t service_handle;
1032 } __attribute__((packed));
1034 #define HAL_OP_GATT_SERVER_SEND_INDICATION 0x22
1035 struct hal_cmd_gatt_server_send_indication {
1037 int32_t attribute_handle;
1042 } __attribute__((packed));
1044 #define HAL_OP_GATT_SERVER_SEND_RESPONSE 0x23
1045 struct hal_cmd_gatt_server_send_response {
1054 } __attribute__((packed));
1056 #define HAL_OP_GATT_CLIENT_SCAN_FILTER_SETUP 0x024
1057 struct hal_cmd_gatt_client_scan_filter_setup {
1060 int32_t filter_index;
1063 int32_t filter_type;
1066 int32_t delivery_mode;
1067 int32_t found_timeout;
1068 int32_t lost_timeout;
1069 int32_t found_timeout_cnt;
1070 } __attribute__((packed));
1072 #define HAL_OP_GATT_CLIENT_SCAN_FILTER_ADD_REMOVE 0x025
1073 struct hal_cmd_gatt_client_scan_filter_add_remove {
1076 int32_t filter_type;
1077 int32_t filter_index;
1079 int32_t company_id_mask;
1081 uint8_t uuid_mask[16];
1083 uint8_t address_type;
1086 uint8_t data_mask[0]; /* common buffer for data and mask */
1087 } __attribute__((packed));
1089 #define HAL_OP_GATT_CLIENT_SCAN_FILTER_CLEAR 0x26
1090 struct hal_cmd_gatt_client_scan_filter_clear {
1093 } __attribute__((packed));
1095 #define HAL_OP_GATT_CLIENT_SCAN_FILTER_ENABLE 0x27
1096 struct hal_cmd_gatt_client_scan_filter_enable {
1099 } __attribute__((packed));
1101 #define HAL_OP_GATT_CLIENT_CONFIGURE_MTU 0x28
1102 struct hal_cmd_gatt_client_configure_mtu {
1105 } __attribute__((packed));
1107 #define HAL_OP_GATT_CLIENT_CONN_PARAM_UPDATE 0x29
1108 struct hal_cmd_gatt_client_conn_param_update {
1110 int32_t min_interval;
1111 int32_t max_interval;
1114 } __attribute__((packed));
1116 #define HAL_OP_GATT_CLIENT_SET_SCAN_PARAM 0x2a
1117 struct hal_cmd_gatt_client_set_scan_param {
1120 } __attribute__((packed));
1122 #define HAL_OP_GATT_CLIENT_SETUP_MULTI_ADV 0x2b
1123 struct hal_cmd_gatt_client_setup_multi_adv {
1125 int32_t min_interval;
1126 int32_t max_interval;
1128 int32_t channel_map;
1131 } __attribute__((packed));
1133 #define HAL_OP_GATT_CLIENT_UPDATE_MULTI_ADV 0x2c
1134 struct hal_cmd_gatt_client_update_multi_adv {
1136 int32_t min_interval;
1137 int32_t max_interval;
1139 int32_t channel_map;
1142 } __attribute__((packed));
1144 #define HAL_OP_GATT_CLIENT_SETUP_MULTI_ADV_INST 0x2d
1145 struct hal_cmd_gatt_client_setup_multi_adv_inst {
1147 uint8_t set_scan_rsp;
1148 uint8_t include_name;
1149 uint8_t include_tx_power;
1151 int32_t manufacturer_data_len;
1152 int32_t service_data_len;
1153 int32_t service_uuid_len;
1154 uint8_t data_service_uuid[0];
1155 } __attribute__((packed));
1157 #define HAL_OP_GATT_CLIENT_DISABLE_MULTI_ADV_INST 0x2e
1158 struct hal_cmd_gatt_client_disable_multi_adv_inst {
1160 } __attribute__((packed));
1162 #define HAL_OP_GATT_CLIENT_CONFIGURE_BATCHSCAN 0x2f
1163 struct hal_cmd_gatt_client_configure_batchscan {
1167 int32_t notify_threshold;
1168 } __attribute__((packed));
1170 #define HAL_OP_GATT_CLIENT_ENABLE_BATCHSCAN 0x30
1171 struct hal_cmd_gatt_client_enable_batchscan {
1176 int32_t address_type;
1177 int32_t discard_rule;
1178 } __attribute__((packed));
1180 #define HAL_OP_GATT_CLIENT_DISABLE_BATCHSCAN 0x31
1181 struct hal_cmd_gatt_client_disable_batchscan {
1183 } __attribute__((packed));
1185 #define HAL_OP_GATT_CLIENT_READ_BATCHSCAN_REPORTS 0x32
1186 struct hal_cmd_gatt_client_read_batchscan_reports {
1189 } __attribute__((packed));
1191 /* Handsfree client HAL API */
1193 #define HAL_OP_HF_CLIENT_CONNECT 0x01
1194 struct hal_cmd_hf_client_connect {
1196 } __attribute__((packed));
1198 #define HAL_OP_HF_CLIENT_DISCONNECT 0x02
1199 struct hal_cmd_hf_client_disconnect {
1201 } __attribute__((packed));
1203 #define HAL_OP_HF_CLIENT_CONNECT_AUDIO 0x03
1204 struct hal_cmd_hf_client_connect_audio {
1206 } __attribute__((packed));
1208 #define HAL_OP_HF_CLIENT_DISCONNECT_AUDIO 0x04
1209 struct hal_cmd_hf_client_disconnect_audio {
1211 } __attribute__((packed));
1213 #define HAL_OP_HF_CLIENT_START_VR 0x05
1214 #define HAL_OP_HF_CLIENT_STOP_VR 0x06
1216 #define HF_CLIENT_VOLUME_TYPE_SPEAKER 0x00
1217 #define HF_CLIENT_VOLUME_TYPE_MIC 0x01
1219 #define HAL_OP_HF_CLIENT_VOLUME_CONTROL 0x07
1220 struct hal_cmd_hf_client_volume_control {
1223 } __attribute__((packed));
1225 #define HAL_OP_HF_CLIENT_DIAL 0x08
1226 struct hal_cmd_hf_client_dial {
1227 uint16_t number_len;
1229 } __attribute__((packed));
1231 #define HAL_OP_HF_CLIENT_DIAL_MEMORY 0x09
1232 struct hal_cmd_hf_client_dial_memory {
1234 } __attribute__((packed));
1236 #define HAL_HF_CLIENT_ACTION_CHLD_0 0x00
1237 #define HAL_HF_CLIENT_ACTION_CHLD_1 0x01
1238 #define HAL_HF_CLIENT_ACTION_CHLD_2 0x02
1239 #define HAL_HF_CLIENT_ACTION_CHLD_3 0x03
1240 #define HAL_HF_CLIENT_ACTION_CHLD_4 0x04
1241 #define HAL_HF_CLIENT_ACTION_CHLD_1x 0x05
1242 #define HAL_HF_CLIENT_ACTION_CHLD_2x 0x06
1243 #define HAL_HF_CLIENT_ACTION_ATA 0x07
1244 #define HAL_HF_CLIENT_ACTION_CHUP 0x08
1245 #define HAL_HF_CLIENT_ACTION_BRTH_0 0x09
1246 #define HAL_HF_CLIENT_ACTION_BRTH_1 0x0a
1247 #define HAL_HF_CLIENT_ACTION_BRTH_2 0x0b
1249 #define HAL_OP_HF_CLIENT_CALL_ACTION 0x0a
1250 struct hal_cmd_hf_client_call_action {
1253 } __attribute__((packed));
1255 #define HAL_OP_HF_CLIENT_QUERY_CURRENT_CALLS 0x0b
1256 #define HAL_OP_HF_CLIENT_QUERY_OPERATOR_NAME 0x0c
1257 #define HAL_OP_HF_CLIENT_RETRIEVE_SUBSCR_INFO 0x0d
1259 #define HAL_OP_HF_CLIENT_SEND_DTMF 0x0e
1260 struct hal_cmd_hf_client_send_dtmf {
1262 } __attribute__((packed));
1264 #define HAL_OP_HF_CLIENT_GET_LAST_VOICE_TAG_NUM 0x0f
1266 /* MAP CLIENT HAL API */
1268 #define HAL_OP_MAP_CLIENT_GET_INSTANCES 0x01
1269 struct hal_cmd_map_client_get_instances {
1271 } __attribute__((packed));
1273 /* Notifications and confirmations */
1275 #define HAL_POWER_OFF 0x00
1276 #define HAL_POWER_ON 0x01
1278 #define HAL_EV_ADAPTER_STATE_CHANGED 0x81
1279 struct hal_ev_adapter_state_changed {
1281 } __attribute__((packed));
1283 #define HAL_EV_ADAPTER_PROPS_CHANGED 0x82
1284 struct hal_property {
1288 } __attribute__((packed));
1289 struct hal_ev_adapter_props_changed {
1292 struct hal_property props[0];
1293 } __attribute__((packed));
1295 #define HAL_EV_REMOTE_DEVICE_PROPS 0x83
1296 struct hal_ev_remote_device_props {
1300 struct hal_property props[0];
1301 } __attribute__((packed));
1303 #define HAL_EV_DEVICE_FOUND 0x84
1304 struct hal_ev_device_found {
1306 struct hal_property props[0];
1307 } __attribute__((packed));
1309 #define HAL_DISCOVERY_STATE_STOPPED 0x00
1310 #define HAL_DISCOVERY_STATE_STARTED 0x01
1312 #define HAL_EV_DISCOVERY_STATE_CHANGED 0x85
1313 struct hal_ev_discovery_state_changed {
1315 } __attribute__((packed));
1317 #define HAL_EV_PIN_REQUEST 0x86
1318 struct hal_ev_pin_request {
1321 uint32_t class_of_dev;
1322 } __attribute__((packed));
1324 #define HAL_EV_SSP_REQUEST 0x87
1325 struct hal_ev_ssp_request {
1328 uint32_t class_of_dev;
1329 uint8_t pairing_variant;
1331 } __attribute__((packed));
1333 #define HAL_BOND_STATE_NONE 0
1334 #define HAL_BOND_STATE_BONDING 1
1335 #define HAL_BOND_STATE_BONDED 2
1337 #define HAL_EV_BOND_STATE_CHANGED 0x88
1338 struct hal_ev_bond_state_changed {
1342 } __attribute__((packed));
1344 #define HAL_ACL_STATE_CONNECTED 0x00
1345 #define HAL_ACL_STATE_DISCONNECTED 0x01
1347 #define HAL_EV_ACL_STATE_CHANGED 0x89
1348 struct hal_ev_acl_state_changed {
1352 } __attribute__((packed));
1354 #define HAL_EV_DUT_MODE_RECEIVE 0x8a
1355 struct hal_ev_dut_mode_receive {
1359 } __attribute__((packed));
1361 #define HAL_EV_LE_TEST_MODE 0x8b
1362 struct hal_ev_le_test_mode {
1364 uint16_t num_packets;
1365 } __attribute__((packed));
1367 #define HAL_EV_ENERGY_INFO 0x8c
1368 struct hal_ev_energy_info {
1374 uint64_t energy_used;
1375 } __attribute__((packed));
1377 #define HAL_HIDHOST_STATE_CONNECTED 0x00
1378 #define HAL_HIDHOST_STATE_CONNECTING 0x01
1379 #define HAL_HIDHOST_STATE_DISCONNECTED 0x02
1380 #define HAL_HIDHOST_STATE_DISCONNECTING 0x03
1381 #define HAL_HIDHOST_STATE_NO_HID 0x07
1382 #define HAL_HIDHOST_STATE_FAILED 0x08
1383 #define HAL_HIDHOST_STATE_UNKNOWN 0x09
1385 #define HAL_EV_HIDHOST_CONN_STATE 0x81
1386 struct hal_ev_hidhost_conn_state {
1389 } __attribute__((packed));
1391 #define HAL_HIDHOST_STATUS_OK 0x00
1393 #define HAL_HIDHOST_HS_NOT_READY 0x01
1394 #define HAL_HIDHOST_HS_INVALID_RAPORT_ID 0x02
1395 #define HAL_HIDHOST_HS_TRANS_NOT_SUPPORTED 0x03
1396 #define HAL_HIDHOST_HS_INVALID_PARAM 0x04
1397 #define HAL_HIDHOST_HS_ERROR 0x05
1399 #define HAL_HIDHOST_GENERAL_ERROR 0x06
1400 #define HAL_HIDHOST_SDP_ERROR 0x07
1401 #define HAL_HIDHOST_PROTOCOL_ERROR 0x08
1402 #define HAL_HIDHOST_DB_ERROR 0x09
1403 #define HAL_HIDHOST_TOD_UNSUPPORTED_ERROR 0x0a
1404 #define HAL_HIDHOST_NO_RESOURCES_ERROR 0x0b
1405 #define HAL_HIDHOST_AUTH_FAILED_ERROR 0x0c
1406 #define HAL_HIDHOST_HDL_ERROR 0x0d
1408 #define HAL_EV_HIDHOST_INFO 0x82
1409 struct hal_ev_hidhost_info {
1420 } __attribute__((packed));
1422 #define HAL_EV_HIDHOST_PROTO_MODE 0x83
1423 struct hal_ev_hidhost_proto_mode {
1427 } __attribute__((packed));
1429 #define HAL_EV_HIDHOST_IDLE_TIME 0x84
1430 struct hal_ev_hidhost_idle_time {
1434 } __attribute__((packed));
1436 #define HAL_EV_HIDHOST_GET_REPORT 0x85
1437 struct hal_ev_hidhost_get_report {
1442 } __attribute__((packed));
1444 #define HAL_EV_HIDHOST_VIRTUAL_UNPLUG 0x86
1445 struct hal_ev_hidhost_virtual_unplug {
1448 } __attribute__((packed));
1450 #define HAL_EV_HIDHOST_HANDSHAKE 0x87
1451 struct hal_ev_hidhost_handshake {
1454 } __attribute__((packed));
1456 #define HAL_EV_PAN_CTRL_STATE 0x81
1457 struct hal_ev_pan_ctrl_state {
1462 } __attribute__((packed));
1464 #define HAL_EV_PAN_CONN_STATE 0x82
1465 struct hal_ev_pan_conn_state {
1470 uint8_t remote_role;
1471 } __attribute__((packed));
1473 #define HAL_HEALTH_APP_REG_SUCCESS 0x00
1474 #define HAL_HEALTH_APP_REG_FAILED 0x01
1475 #define HAL_HEALTH_APP_DEREG_SUCCESS 0x02
1476 #define HAL_HEALTH_APP_DEREG_FAILED 0x03
1478 #define HAL_HEALTH_CHANNEL_CONNECTING 0x00
1479 #define HAL_HEALTH_CHANNEL_CONNECTED 0x01
1480 #define HAL_HEALTH_CHANNEL_DISCONNECTING 0x02
1481 #define HAL_HEALTH_CHANNEL_DISCONNECTED 0x03
1482 #define HAL_HEALTH_CHANNEL_DESTROYED 0x04
1484 #define HAL_EV_HEALTH_APP_REG_STATE 0x81
1485 struct hal_ev_health_app_reg_state {
1488 } __attribute__((packed));
1490 #define HAL_EV_HEALTH_CHANNEL_STATE 0x82
1491 struct hal_ev_health_channel_state {
1495 uint16_t channel_id;
1496 uint8_t channel_state;
1497 } __attribute__((packed));
1499 #define HAL_A2DP_STATE_DISCONNECTED 0x00
1500 #define HAL_A2DP_STATE_CONNECTING 0x01
1501 #define HAL_A2DP_STATE_CONNECTED 0x02
1502 #define HAL_A2DP_STATE_DISCONNECTING 0x03
1504 #define HAL_EV_A2DP_CONN_STATE 0x81
1505 struct hal_ev_a2dp_conn_state {
1508 } __attribute__((packed));
1510 #define HAL_AUDIO_SUSPEND 0x00
1511 #define HAL_AUDIO_STOPPED 0x01
1512 #define HAL_AUDIO_STARTED 0x02
1514 #define HAL_EV_A2DP_AUDIO_STATE 0x82
1515 struct hal_ev_a2dp_audio_state {
1518 } __attribute__((packed));
1520 #define HAL_EV_A2DP_AUDIO_CONFIG 0x83
1521 struct hal_ev_a2dp_audio_config {
1523 uint32_t sample_rate;
1524 uint8_t channel_count;
1525 } __attribute__((packed));
1527 #define HAL_EV_HANDSFREE_CONN_STATE_DISCONNECTED 0x00
1528 #define HAL_EV_HANDSFREE_CONN_STATE_CONNECTING 0x01
1529 #define HAL_EV_HANDSFREE_CONN_STATE_CONNECTED 0x02
1530 #define HAL_EV_HANDSFREE_CONN_STATE_SLC_CONNECTED 0x03
1531 #define HAL_EV_HANDSFREE_CONN_STATE_DISCONNECTING 0x04
1533 #define HAL_EV_HANDSFREE_CONN_STATE 0x81
1534 struct hal_ev_handsfree_conn_state {
1537 } __attribute__((packed));
1539 #define HAL_EV_HANDSFREE_AUDIO_STATE_DISCONNECTED 0x00
1540 #define HAL_EV_HANDSFREE_AUDIO_STATE_CONNECTING 0x01
1541 #define HAL_EV_HANDSFREE_AUDIO_STATE_CONNECTED 0x02
1542 #define HAL_EV_HANDSFREE_AUDIO_STATE_DISCONNECTING 0x03
1544 #define HAL_EV_HANDSFREE_AUDIO_STATE 0x82
1545 struct hal_ev_handsfree_audio_state {
1548 } __attribute__((packed));
1550 #define HAL_HANDSFREE_VR_STOPPED 0x00
1551 #define HAL_HANDSFREE_VR_STARTED 0x01
1553 #define HAL_EV_HANDSFREE_VR 0x83
1554 struct hal_ev_handsfree_vr_state {
1557 } __attribute__((packed));
1559 #define HAL_EV_HANDSFREE_ANSWER 0x84
1560 struct hal_ev_handsfree_answer {
1562 } __attribute__((packed));
1564 #define HAL_EV_HANDSFREE_HANGUP 0x85
1565 struct hal_ev_handsfree_hangup {
1567 } __attribute__((packed));
1569 #define HAL_EV_HANDSFREE_VOLUME 0x86
1570 struct hal_ev_handsfree_volume {
1574 } __attribute__((packed));
1576 #define HAL_EV_HANDSFREE_DIAL 0x87
1577 struct hal_ev_handsfree_dial {
1579 uint16_t number_len;
1581 } __attribute__((packed));
1583 #define HAL_EV_HANDSFREE_DTMF 0x88
1584 struct hal_ev_handsfree_dtmf {
1587 } __attribute__((packed));
1589 #define HAL_HANDSFREE_NREC_STOP 0x00
1590 #define HAL_HANDSFREE_NREC_START 0x01
1592 #define HAL_EV_HANDSFREE_NREC 0x89
1593 struct hal_ev_handsfree_nrec {
1596 } __attribute__((packed));
1598 #define HAL_HANDSFREE_CHLD_TYPE_RELEASEHELD 0x00
1599 #define HAL_HANDSFREE_CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD 0x01
1600 #define HAL_HANDSFREE_CHLD_TYPE_HOLDACTIVE_ACCEPTHELD 0x02
1601 #define HAL_HANDSFREE_CHLD_TYPE_ADDHELDTOCONF 0x03
1603 #define HAL_EV_HANDSFREE_CHLD 0x8A
1604 struct hal_ev_handsfree_chld {
1607 } __attribute__((packed));
1609 #define HAL_EV_HANDSFREE_CNUM 0x8B
1610 struct hal_ev_handsfree_cnum {
1612 } __attribute__((packed));
1614 #define HAL_EV_HANDSFREE_CIND 0x8C
1615 struct hal_ev_handsfree_cind {
1617 } __attribute__((packed));
1619 #define HAL_EV_HANDSFREE_COPS 0x8D
1620 struct hal_ev_handsfree_cops {
1622 } __attribute__((packed));
1624 #define HAL_EV_HANDSFREE_CLCC 0x8E
1625 struct hal_ev_handsfree_clcc {
1627 } __attribute__((packed));
1629 #define HAL_EV_HANDSFREE_UNKNOWN_AT 0x8F
1630 struct hal_ev_handsfree_unknown_at {
1634 } __attribute__((packed));
1636 #define HAL_EV_HANDSFREE_HSP_KEY_PRESS 0x90
1637 struct hal_ev_handsfree_hsp_key_press {
1639 } __attribute__((packed));
1641 #define HAL_EV_HANDSFREE_WBS 0x91
1642 struct hal_ev_handsfree_wbs {
1645 } __attribute__((packed));
1647 #define HAL_AVRCP_FEATURE_NONE 0x00
1648 #define HAL_AVRCP_FEATURE_METADATA 0x01
1649 #define HAL_AVRCP_FEATURE_ABSOLUTE_VOLUME 0x02
1650 #define HAL_AVRCP_FEATURE_BROWSE 0x04
1652 #define HAL_EV_AVRCP_REMOTE_FEATURES 0x81
1653 struct hal_ev_avrcp_remote_features {
1656 } __attribute__((packed));
1658 #define HAL_EV_AVRCP_GET_PLAY_STATUS 0x82
1659 #define HAL_EV_AVRCP_LIST_PLAYER_ATTRS 0x83
1661 #define HAL_EV_AVRCP_LIST_PLAYER_VALUES 0x84
1662 struct hal_ev_avrcp_list_player_values {
1664 } __attribute__((packed));
1666 #define HAL_EV_AVRCP_GET_PLAYER_VALUES 0x85
1667 struct hal_ev_avrcp_get_player_values {
1670 } __attribute__((packed));
1672 #define HAL_EV_AVRCP_GET_PLAYER_ATTRS_TEXT 0x86
1673 struct hal_ev_avrcp_get_player_attrs_text {
1676 } __attribute__((packed));
1678 #define HAL_EV_AVRCP_GET_PLAYER_VALUES_TEXT 0x87
1679 struct hal_ev_avrcp_get_player_values_text {
1683 } __attribute__((packed));
1685 #define HAL_EV_AVRCP_SET_PLAYER_VALUES 0x88
1686 struct hal_ev_avrcp_set_player_values {
1688 struct hal_avrcp_player_attr_value attrs[0];
1689 } __attribute__((packed));
1691 #define HAL_EV_AVRCP_GET_ELEMENT_ATTRS 0x89
1692 struct hal_ev_avrcp_get_element_attrs {
1695 } __attribute__((packed));
1697 #define HAL_EV_AVRCP_REGISTER_NOTIFICATION 0x8a
1698 struct hal_ev_avrcp_register_notification {
1701 } __attribute__((packed));
1703 #define HAL_EV_AVRCP_VOLUME_CHANGED 0x8b
1704 struct hal_ev_avrcp_volume_changed {
1707 } __attribute__((packed));
1709 #define HAL_EV_AVRCP_PASSTHROUGH_CMD 0x8c
1710 struct hal_ev_avrcp_passthrough_cmd {
1713 } __attribute__((packed));
1715 #define HAL_EV_AVRCP_CTRL_CONN_STATE 0x81
1716 struct hal_ev_avrcp_ctrl_conn_state {
1719 } __attribute__((packed));
1721 #define HAL_EV_AVRCP_CTRL_PASSTHROUGH_RSP 0x82
1722 struct hal_ev_avrcp_ctrl_passthrough_rsp {
1725 } __attribute__((packed));
1727 #define HAL_EV_GATT_CLIENT_REGISTER_CLIENT 0x81
1728 struct hal_ev_gatt_client_register_client {
1731 uint8_t app_uuid[16];
1732 } __attribute__((packed));
1734 #define HAL_EV_GATT_CLIENT_SCAN_RESULT 0x82
1735 struct hal_ev_gatt_client_scan_result {
1739 uint8_t adv_data[0];
1740 } __attribute__((packed));
1742 #define HAL_EV_GATT_CLIENT_CONNECT 0x83
1743 struct hal_ev_gatt_client_connect {
1748 } __attribute__((packed));
1750 #define HAL_EV_GATT_CLIENT_DISCONNECT 0x84
1751 struct hal_ev_gatt_client_disconnect {
1756 } __attribute__((packed));
1758 #define HAL_EV_GATT_CLIENT_SEARCH_COMPLETE 0x85
1759 struct hal_ev_gatt_client_search_complete {
1762 } __attribute__((packed));
1764 #define HAL_EV_GATT_CLIENT_SEARCH_RESULT 0x86
1765 struct hal_ev_gatt_client_search_result {
1767 struct hal_gatt_srvc_id srvc_id;
1768 } __attribute__((packed));
1770 #define HAL_EV_GATT_CLIENT_GET_CHARACTERISTIC 0x87
1771 struct hal_ev_gatt_client_get_characteristic {
1774 struct hal_gatt_srvc_id srvc_id;
1775 struct hal_gatt_gatt_id char_id;
1777 } __attribute__((packed));
1779 #define HAL_EV_GATT_CLIENT_GET_DESCRIPTOR 0x88
1780 struct hal_ev_gatt_client_get_descriptor {
1783 struct hal_gatt_srvc_id srvc_id;
1784 struct hal_gatt_gatt_id char_id;
1785 struct hal_gatt_gatt_id descr_id;
1786 } __attribute__((packed));
1788 #define HAL_EV_GATT_CLIENT_GET_INC_SERVICE 0X89
1789 struct hal_ev_gatt_client_get_inc_service {
1792 struct hal_gatt_srvc_id srvc_id;
1793 struct hal_gatt_srvc_id incl_srvc_id;
1794 } __attribute__((packed));
1796 #define HAL_EV_GATT_CLIENT_REGISTER_FOR_NOTIF 0x8a
1797 struct hal_ev_gatt_client_reg_for_notif {
1801 struct hal_gatt_srvc_id srvc_id;
1802 struct hal_gatt_gatt_id char_id;
1803 } __attribute__((packed));
1805 #define HAL_EV_GATT_CLIENT_NOTIFY 0x8b
1806 struct hal_ev_gatt_client_notify {
1809 struct hal_gatt_srvc_id srvc_id;
1810 struct hal_gatt_gatt_id char_id;
1814 } __attribute__((packed));
1816 #define HAL_EV_GATT_CLIENT_READ_CHARACTERISTIC 0x8c
1817 struct hal_gatt_read_params {
1818 struct hal_gatt_srvc_id srvc_id;
1819 struct hal_gatt_gatt_id char_id;
1820 struct hal_gatt_gatt_id descr_id;
1822 uint16_t value_type;
1825 } __attribute__((packed));
1827 struct hal_ev_gatt_client_read_characteristic {
1830 struct hal_gatt_read_params data;
1831 } __attribute__((packed));
1833 #define HAL_EV_GATT_CLIENT_WRITE_CHARACTERISTIC 0x8d
1834 struct hal_gatt_write_params {
1835 struct hal_gatt_srvc_id srvc_id;
1836 struct hal_gatt_gatt_id char_id;
1837 struct hal_gatt_gatt_id descr_id;
1839 } __attribute__((packed));
1841 struct hal_ev_gatt_client_write_characteristic {
1844 struct hal_gatt_write_params data;
1845 } __attribute__((packed));
1847 #define HAL_EV_GATT_CLIENT_READ_DESCRIPTOR 0x8e
1848 struct hal_ev_gatt_client_read_descriptor {
1851 struct hal_gatt_read_params data;
1852 } __attribute__((packed));
1854 #define HAL_EV_GATT_CLIENT_WRITE_DESCRIPTOR 0x8f
1855 struct hal_ev_gatt_client_write_descriptor {
1858 struct hal_gatt_write_params data;
1859 } __attribute__((packed));
1861 #define HAL_EV_GATT_CLIENT_EXEC_WRITE 0x90
1862 struct hal_ev_gatt_client_exec_write {
1865 } __attribute__((packed));
1867 #define HAL_EV_GATT_CLIENT_READ_REMOTE_RSSI 0x91
1868 struct hal_ev_gatt_client_read_remote_rssi {
1873 } __attribute__((packed));
1875 #define HAL_EV_GATT_CLIENT_LISTEN 0x92
1876 struct hal_ev_gatt_client_listen {
1879 } __attribute__((packed));
1881 #define HAL_EV_GATT_SERVER_REGISTER 0x93
1882 struct hal_ev_gatt_server_register {
1886 } __attribute__((packed));
1888 #define HAL_EV_GATT_SERVER_CONNECTION 0x94
1889 struct hal_ev_gatt_server_connection {
1894 } __attribute__((packed));
1896 #define HAL_EV_GATT_SERVER_SERVICE_ADDED 0x95
1897 struct hal_ev_gatt_server_service_added {
1900 struct hal_gatt_srvc_id srvc_id;
1901 int32_t srvc_handle;
1902 } __attribute__((packed));
1904 #define HAL_EV_GATT_SERVER_INC_SRVC_ADDED 0x96
1905 struct hal_ev_gatt_server_inc_srvc_added {
1908 int32_t srvc_handle;
1909 int32_t incl_srvc_handle;
1910 } __attribute__((packed));
1912 #define HAL_EV_GATT_SERVER_CHAR_ADDED 0x97
1913 struct hal_ev_gatt_server_characteristic_added {
1917 int32_t srvc_handle;
1918 int32_t char_handle;
1919 } __attribute__((packed));
1921 #define HAL_EV_GATT_SERVER_DESCRIPTOR_ADDED 0x98
1922 struct hal_ev_gatt_server_descriptor_added {
1926 int32_t srvc_handle;
1927 int32_t descr_handle;
1928 } __attribute__((packed));
1930 #define HAL_EV_GATT_SERVER_SERVICE_STARTED 0x99
1931 struct hal_ev_gatt_server_service_started {
1934 int32_t srvc_handle;
1935 } __attribute__((packed));
1937 #define HAL_EV_GATT_SERVER_SERVICE_STOPPED 0x9a
1938 struct hal_ev_gatt_server_service_stopped {
1941 int32_t srvc_handle;
1942 } __attribute__((packed));
1944 #define HAL_EV_GATT_SERVER_SERVICE_DELETED 0x9b
1945 struct hal_ev_gatt_server_service_deleted {
1948 int32_t srvc_handle;
1949 } __attribute__((packed));
1951 #define HAL_EV_GATT_SERVER_REQUEST_READ 0x9c
1952 struct hal_ev_gatt_server_request_read {
1956 int32_t attr_handle;
1959 } __attribute__((packed));
1961 #define HAL_EV_GATT_SERVER_REQUEST_WRITE 0x9d
1962 struct hal_ev_gatt_server_request_write {
1966 int32_t attr_handle;
1972 } __attribute__((packed));
1974 #define HAL_EV_GATT_SERVER_REQUEST_EXEC_WRITE 0x9e
1975 struct hal_ev_gatt_server_request_exec_write {
1980 } __attribute__((packed));
1982 #define HAL_EV_GATT_SERVER_RSP_CONFIRMATION 0x9f
1983 struct hal_ev_gatt_server_rsp_confirmation {
1986 } __attribute__((packed));
1988 #define HAL_EV_GATT_CLIENT_CONFIGURE_MTU 0xa0
1989 struct hal_ev_gatt_client_configure_mtu {
1993 } __attribute__((packed));
1995 #define HAL_EV_GATT_CLIENT_FILTER_CONFIG 0xa1
1996 struct hal_ev_gatt_client_filter_config {
2002 } __attribute__((packed));
2004 #define HAL_EV_GATT_CLIENT_FILTER_PARAMS 0xa2
2005 struct hal_ev_gatt_client_filter_params {
2010 } __attribute__((packed));
2012 #define HAL_EV_GATT_CLIENT_FILTER_STATUS 0xa3
2013 struct hal_ev_gatt_client_filter_status {
2017 } __attribute__((packed));
2019 #define HAL_EV_GATT_CLIENT_MULTI_ADV_ENABLE 0xa4
2020 struct hal_ev_gatt_client_multi_adv_enable {
2023 } __attribute__((packed));
2026 #define HAL_EV_GATT_CLIENT_MULTI_ADV_UPDATE 0xa5
2027 struct hal_ev_gatt_client_multi_adv_update {
2030 } __attribute__((packed));
2033 #define HAL_EV_GATT_CLIENT_MULTI_ADV_DATA 0xa6
2034 struct hal_ev_gatt_client_multi_adv_data {
2037 } __attribute__((packed));
2040 #define HAL_EV_GATT_CLIENT_MULTI_ADV_DISABLE 0xa7
2041 struct hal_ev_gatt_client_multi_adv_disable {
2044 } __attribute__((packed));
2046 #define HAL_EV_GATT_CLIENT_CONGESTION 0xa8
2047 struct hal_ev_gatt_client_congestion {
2050 } __attribute__((packed));
2052 #define HAL_EV_GATT_CLIENT_CONFIG_BATCHSCAN 0xa9
2053 struct hal_ev_gatt_client_config_batchscan {
2056 } __attribute__((packed));
2058 #define HAL_EV_GATT_CLIENT_ENABLE_BATCHSCAN 0xaa
2059 struct hal_ev_gatt_client_enable_batchscan {
2063 } __attribute__((packed));
2065 #define HAL_EV_GATT_CLIENT_BATCHSCAN_REPORTS 0xab
2066 struct hal_ev_gatt_client_batchscan_reports {
2073 } __attribute__((packed));
2075 #define HAL_EV_GATT_CLIENT_BATCHSCAN_THRESHOLD 0xac
2076 struct hal_ev_gatt_client_batchscan_threshold {
2078 } __attribute__((packed));
2080 #define HAL_EV_GATT_CLIENT_TRACK_ADV 0xad
2081 struct hal_ev_gatt_client_track_adv {
2083 int32_t filetr_index;
2084 int32_t address_type;
2087 } __attribute__((packed));
2089 #define HAL_EV_GATT_SERVER_INDICATION_SENT 0xae
2090 struct hal_ev_gatt_server_indication_sent {
2093 } __attribute__((packed));
2095 #define HAL_EV_GATT_SERVER_CONGESTION 0xaf
2096 struct hal_ev_gatt_server_congestion {
2099 } __attribute__((packed));
2101 #define HAL_EV_GATT_SERVER_MTU_CHANGED 0xb0
2102 struct hal_ev_gatt_server_mtu_changed {
2105 } __attribute__((packed));
2107 #define HAL_GATT_PERMISSION_READ 0x0001
2108 #define HAL_GATT_PERMISSION_READ_ENCRYPTED 0x0002
2109 #define HAL_GATT_PERMISSION_READ_ENCRYPTED_MITM 0x0004
2110 #define HAL_GATT_PERMISSION_WRITE 0x0010
2111 #define HAL_GATT_PERMISSION_WRITE_ENCRYPTED 0x0020
2112 #define HAL_GATT_PERMISSION_WRITE_ENCRYPTED_MITM 0x0040
2113 #define HAL_GATT_PERMISSION_WRITE_SIGNED 0x0080
2114 #define HAL_GATT_PERMISSION_WRITE_SIGNED_MITM 0x0100
2116 #define HAL_GATT_AUTHENTICATION_NONE 0
2117 #define HAL_GATT_AUTHENTICATION_NO_MITM 1
2118 #define HAL_GATT_AUTHENTICATION_MITM 2
2120 #define HAL_HF_CLIENT_CONN_STATE_DISCONNECTED 0x00
2121 #define HAL_HF_CLIENT_CONN_STATE_CONNECTING 0x01
2122 #define HAL_HF_CLIENT_CONN_STATE_CONNECTED 0x02
2123 #define HAL_HF_CLIENT_CONN_STATE_SLC_CONNECTED 0x03
2124 #define HAL_HF_CLIENT_CONN_STATE_DISCONNECTING 0x04
2126 #define HAL_HF_CLIENT_PEER_FEAT_3WAY 0x00000001
2127 #define HAL_HF_CLIENT_PEER_FEAT_ECNR 0x00000002
2128 #define HAL_HF_CLIENT_PEER_FEAT_VREC 0x00000004
2129 #define HAL_HF_CLIENT_PEER_FEAT_INBAND 0x00000008
2130 #define HAL_HF_CLIENT_PEER_FEAT_VTAG 0x00000010
2131 #define HAL_HF_CLIENT_PEER_FEAT_REJECT 0x00000020
2132 #define HAL_HF_CLIENT_PEER_FEAT_ECS 0x00000040
2133 #define HAL_HF_CLIENT_PEER_FEAT_ECC 0x00000080
2134 #define HAL_HF_CLIENT_PEER_FEAT_EXTERR 0x00000100
2135 #define HAL_HF_CLIENT_PEER_FEAT_CODEC 0x00000200
2137 #define HAL_HF_CLIENT_CHLD_FEAT_REL 0x00000001
2138 #define HAL_HF_CLIENT_CHLD_FEAT_REL_ACC 0x00000002
2139 #define HAL_HF_CLIENT_CHLD_FEAT_REL_X 0x00000004
2140 #define HAL_HF_CLIENT_CHLD_FEAT_HOLD_ACC 0x00000008
2141 #define HAL_HF_CLIENT_CHLD_FEAT_PRIV_X 0x00000010
2142 #define HAL_HF_CLIENT_CHLD_FEAT_MERGE 0x00000020
2143 #define HAL_HF_CLIENT_CHLD_FEAT_MERGE_DETACH 0x00000040
2145 #define HAL_EV_HF_CLIENT_CONN_STATE 0x81
2146 struct hal_ev_hf_client_conn_state {
2151 } __attribute__((packed));
2153 #define HAL_HF_CLIENT_AUDIO_STATE_DISCONNECTED 0x00
2154 #define HAL_HF_CLIENT_AUDIO_STATE_CONNECTING 0x01
2155 #define HAL_HF_CLIENT_AUDIO_STATE_CONNECTED 0x02
2156 #define HAL_HF_CLIENT_AUDIO_STATE_CONNECTED_MSBC 0x03
2158 #define HAL_EV_HF_CLIENT_AUDIO_STATE 0x82
2159 struct hal_ev_hf_client_audio_state {
2162 } __attribute__((packed));
2164 #define HAL_HF_CLIENT_VR_STOPPED 0x00
2165 #define HAL_HF_CLIENT_VR_STARTED 0x01
2167 #define HAL_EV_HF_CLIENT_VR_STATE 0x83
2168 struct hal_ev_hf_client_vr_state {
2170 } __attribute__((packed));
2172 #define HAL_HF_CLIENT_NET_NOT_AVAILABLE 0x00
2173 #define HAL_HF_CLIENT_NET_AVAILABLE 0x01
2175 #define HAL_EV_HF_CLIENT_NET_STATE 0x84
2176 struct hal_ev_hf_client_net_state {
2178 } __attribute__((packed));
2180 #define HAL_HF_CLIENT_NET_ROAMING_TYPE_HOME 0x00
2181 #define HAL_HF_CLIENT_NET_ROAMING_TYPE_ROAMING 0x01
2183 #define HAL_EV_HF_CLIENT_NET_ROAMING_TYPE 0x85
2184 struct hal_ev_hf_client_net_roaming_type {
2186 } __attribute__((packed));
2188 #define HAL_EV_HF_CLIENT_NET_SIGNAL_STRENGTH 0x86
2189 struct hal_ev_hf_client_net_signal_strength {
2190 uint8_t signal_strength;
2191 } __attribute__((packed));
2193 #define HAL_EV_HF_CLIENT_BATTERY_LEVEL 0x87
2194 struct hal_ev_hf_client_battery_level {
2195 uint8_t battery_level;
2196 } __attribute__((packed));
2198 #define HAL_EV_HF_CLIENT_OPERATOR_NAME 0x88
2199 struct hal_ev_hf_client_operator_name {
2202 } __attribute__((packed));
2204 #define HAL_HF_CLIENT_CALL_IND_NO_CALL_IN_PROGERSS 0x00
2205 #define HAL_HF_CLIENT_CALL_IND_CALL_IN_PROGERSS 0x01
2207 #define HAL_EV_HF_CLIENT_CALL_INDICATOR 0x89
2208 struct hal_ev_hf_client_call_indicator {
2210 } __attribute__((packed));
2212 #define HAL_HF_CLIENT_CALL_SETUP_NONE 0x00
2213 #define HAL_HF_CLIENT_CALL_SETUP_INCOMING 0x01
2214 #define HAL_HF_CLIENT_CALL_SETUP_OUTGOING 0x02
2215 #define HAL_HF_CLIENT_CALL_SETUP_ALERTING 0x03
2217 #define HAL_EV_HF_CLIENT_CALL_SETUP_INDICATOR 0x8a
2218 struct hal_ev_hf_client_call_setup_indicator {
2220 } __attribute__((packed));
2222 #define HAL_HF_CLIENT_CALL_HELD_IND_NONE 0x00
2223 #define HAL_HF_CLIENT_CALL_HELD_IND_HOLD_AND_ACTIVE 0x01
2224 #define HAL_HF_CLIENT_CALL_SETUP_IND_HOLD 0x02
2226 #define HAL_EV_HF_CLIENT_CALL_HELD_INDICATOR 0x8b
2227 struct hal_ev_hf_client_call_held_indicator {
2229 } __attribute__((packed));
2231 #define HAL_HF_CLIENT_RESP_AND_HOLD_STATUS_HELD 0x00
2232 #define HAL_HF_CLIENT_RESP_AND_HOLD_STATUS_ACCEPT 0x01
2233 #define HAL_HF_CLIENT_RESP_AND_HOLD_STATUS_REJECT 0x02
2235 #define HAL_EV_HF_CLIENT_RESPONSE_AND_HOLD_STATUS 0x8c
2236 struct hal_ev_hf_client_response_and_hold_status {
2238 } __attribute__((packed));
2240 #define HAL_EV_HF_CLIENT_CALLING_LINE_IDENT 0x8d
2241 struct hal_ev_hf_client_calling_line_ident {
2242 uint16_t number_len;
2244 } __attribute__((packed));
2246 #define HAL_EV_HF_CLIENT_CALL_WAITING 0x8e
2247 struct hal_ev_hf_client_call_waiting {
2248 uint16_t number_len;
2250 } __attribute__((packed));
2252 #define HAL_HF_CLIENT_DIRECTION_OUTGOING 0x00
2253 #define HAL_HF_CLIENT_DIRECTION_INCOMING 0x01
2255 #define HAL_HF_CLIENT_CALL_STATE_ACTIVE 0x00
2256 #define HAL_HF_CLIENT_CALL_STATE_HELD 0x01
2257 #define HAL_HF_CLIENT_CALL_STATE_DIALING 0x02
2258 #define HAL_HF_CLIENT_CALL_STATE_ALERTING 0x03
2259 #define HAL_HF_CLIENT_CALL_STATE_INCOMING 0x04
2260 #define HAL_HF_CLIENT_CALL_STATE_WAITING 0x05
2261 #define HAL_HF_CLIENT_CALL_STATE_HELD_BY_RESP_AND_HOLD 0x06
2263 #define HAL_EV_HF_CLIENT_CURRENT_CALL 0x8f
2264 struct hal_ev_hf_client_current_call {
2269 uint16_t number_len;
2271 } __attribute__((packed));
2273 #define HAL_EV_CLIENT_VOLUME_CHANGED 0x90
2274 struct hal_ev_hf_client_volume_changed {
2277 } __attribute__((packed));
2279 #define HAL_HF_CLIENT_CMD_COMP_OK 0x00
2280 #define HAL_HF_CLIENT_CMD_COMP_ERR 0x01
2281 #define HAL_HF_CLIENT_CMD_COMP_ERR_NO_CARRIER 0x02
2282 #define HAL_HF_CLIENT_CMD_COMP_ERR_BUSY 0x03
2283 #define HAL_HF_CLIENT_CMD_COMP_ERR_NO_ANSWER 0x04
2284 #define HAL_HF_CLIENT_CMD_COMP_ERR_DELAYED 0x05
2285 #define HAL_HF_CLIENT_CMD_COMP_ERR_BACKLISTED 0x06
2286 #define HAL_HF_CLIENT_CMD_COMP_ERR_CME 0x07
2288 #define HAL_EV_CLIENT_COMMAND_COMPLETE 0x91
2289 struct hal_ev_hf_client_command_complete {
2292 } __attribute__((packed));
2294 #define HAL_HF_CLIENT_SUBSCR_TYPE_UNKNOWN 0x00
2295 #define HAL_HF_CLIENT_SUBSCR_TYPE_VOICE 0x01
2296 #define HAL_HF_CLIENT_SUBSCR_TYPE_FAX 0x02
2298 #define HAL_EV_CLIENT_SUBSCRIBER_SERVICE_INFO 0x92
2299 struct hal_ev_hf_client_subscriber_service_info {
2303 } __attribute__((packed));
2305 #define HAL_HF_CLIENT_INBAND_RINGTONE_NOT_PROVIDED 0x00
2306 #define HAL_HF_CLIENT_INBAND_RINGTONE_PROVIDED 0x01
2308 #define HAL_EV_CLIENT_INBAND_SETTINGS 0x93
2309 struct hal_ev_hf_client_inband_settings {
2311 } __attribute__((packed));
2313 #define HAL_EV_CLIENT_LAST_VOICE_CALL_TAG_NUM 0x94
2314 struct hal_ev_hf_client_last_void_call_tag_num {
2315 uint16_t number_len;
2317 } __attribute__((packed));
2319 #define HAL_EV_CLIENT_RING_INDICATION 0x95
2321 #define HAL_EV_MAP_CLIENT_REMOTE_MAS_INSTANCES 0x81
2322 struct hal_map_client_mas_instance {
2328 } __attribute__((packed));
2330 struct hal_ev_map_client_remote_mas_instances {
2333 int32_t num_instances;
2334 struct hal_map_client_mas_instance instances[0];
2335 } __attribute__((packed));