summaryrefslogtreecommitdiff
path: root/android/hal-msg.h
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>2014-11-21 16:13:53 +0100
committerSzymon Janc <szymon.janc@gmail.com>2014-11-25 20:56:56 +0100
commit52336869851c28aa388ea6a08769bf4944fef974 (patch)
tree829916dcb7b55b979acb5d5d0209227378d9f829 /android/hal-msg.h
parentf18597cad496fc7279d4f4ff107e275e1732ed7e (diff)
downloadbluez-52336869851c28aa388ea6a08769bf4944fef974.tar.gz
android/hal: Add HAL for A2DP Sink role
This role was introduced with some devices in Android 5. The same set of IPC structs and defines is used as in Sink as it uses the same HAL API as Source does, but just yet another instance of HAL.
Diffstat (limited to 'android/hal-msg.h')
-rw-r--r--android/hal-msg.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/android/hal-msg.h b/android/hal-msg.h
index c1791d65d..33b53c51d 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -38,8 +38,9 @@ static const char BLUEZ_HAL_SK_PATH[] = "\0bluez_hal_socket";
#define HAL_SERVICE_ID_HANDSFREE_CLIENT 10
#define HAL_SERVICE_ID_MAP_CLIENT 11
#define HAL_SERVICE_ID_AVRCP_CTRL 12
+#define HAL_SERVICE_ID_A2DP_SINK 13
-#define HAL_SERVICE_ID_MAX HAL_SERVICE_ID_AVRCP_CTRL
+#define HAL_SERVICE_ID_MAX HAL_SERVICE_ID_A2DP_SINK
/* Core Service */
@@ -363,7 +364,7 @@ struct hal_cmd_hidhost_send_data {
uint8_t data[0];
} __attribute__((packed));
-/* a2dp HAL API */
+/* a2dp source and sink HAL API */
#define HAL_OP_A2DP_CONNECT 0x01
struct hal_cmd_a2dp_connect {
@@ -1502,6 +1503,13 @@ struct hal_ev_a2dp_audio_state {
uint8_t bdaddr[6];
} __attribute__((packed));
+#define HAL_EV_A2DP_AUDIO_CONFIG 0x83
+struct hal_ev_a2dp_audio_config {
+ uint8_t bdaddr[6];
+ uint32_t sample_rate;
+ uint8_t channel_count;
+} __attribute__((packed));
+
#define HAL_EV_HANDSFREE_CONN_STATE_DISCONNECTED 0x00
#define HAL_EV_HANDSFREE_CONN_STATE_CONNECTING 0x01
#define HAL_EV_HANDSFREE_CONN_STATE_CONNECTED 0x02