summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-12-27 14:31:35 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-01-07 13:37:53 +0200
commit3d2f0eeaf01a4ca1fb7a8b8b87900d9495d14036 (patch)
tree4e4e5e35cff28a35f2d4b0aa3e8e28693af7f991
parent23893fbe93dfd6ac3fb5b099d824cfbc30c0cdd0 (diff)
downloadbluez-3d2f0eeaf01a4ca1fb7a8b8b87900d9495d14036.tar.gz
android/A2DP: Add audio open command/response struct
This adds the definitions to audio open command and response.
-rw-r--r--android/a2dp.c9
-rw-r--r--android/audio-ipc-api.txt2
-rw-r--r--android/audio-msg.h18
3 files changed, 28 insertions, 1 deletions
diff --git a/android/a2dp.c b/android/a2dp.c
index c12d8f165..38384f684 100644
--- a/android/a2dp.c
+++ b/android/a2dp.c
@@ -354,7 +354,16 @@ static sdp_record_t *a2dp_record(void)
return record;
}
+static void bt_audio_open(const void *buf, uint16_t len)
+{
+ DBG("Not Implemented");
+
+ audio_ipc_send_rsp(AUDIO_OP_OPEN, AUDIO_STATUS_FAILED);
+}
+
static const struct ipc_handler audio_handlers[] = {
+ /* AUDIO_OP_OPEN */
+ { bt_audio_open, true, sizeof(struct audio_cmd_open) },
};
bool bt_a2dp_register(const bdaddr_t *addr)
diff --git a/android/audio-ipc-api.txt b/android/audio-ipc-api.txt
index 1c428009e..37a15696c 100644
--- a/android/audio-ipc-api.txt
+++ b/android/audio-ipc-api.txt
@@ -49,9 +49,9 @@ Identifier: "audio" (BT_AUDIO_ID)
Command parameters: Service UUID (16 octets)
Codec ID (1 octet)
+ Number of codec presets (1 octet)
Codec capabilities length (1 octet)
Codec capabilities (variable)
- Number of codec presets (1 octet)
Codec preset # length (1 octet)
Codec preset # configuration (variable)
...
diff --git a/android/audio-msg.h b/android/audio-msg.h
index ae8a1689b..158a2ab36 100644
--- a/android/audio-msg.h
+++ b/android/audio-msg.h
@@ -34,3 +34,21 @@ static const char BLUEZ_AUDIO_SK_PATH[] = "\0bluez_audio_socket";
struct audio_status {
uint8_t code;
} __attribute__((packed));
+
+#define AUDIO_OP_OPEN 0x01
+struct audio_preset {
+ uint8_t len;
+ uint8_t data[0];
+} __attribute__((packed));
+
+struct audio_cmd_open {
+ uint16_t uuid;
+ uint8_t codec;
+ uint8_t presets;
+ uint8_t len;
+ struct audio_preset preset[0];
+} __attribute__((packed));
+
+struct audio_rsp_open {
+ uint8_t id;
+} __attribute__((packed));