Diff between 99020ec3f6946934819e7fd4674f4e618f36fb4a and fed8f328c62d5f8d3566f040de9c53c6ac9ba2e7

Changed Files

File Additions Deletions Status
android/Makefile.am +1 -0 modified
android/sco-ipc-api.txt +37 -0 added
android/sco-msg.h +36 -0 added

Full Patch

diff --git a/android/Makefile.am b/android/Makefile.am
index fb3dcbb..a34b288 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
@@ -18,6 +18,7 @@ android_bluetoothd_SOURCES = android/main.c \
 				src/log.c \
 				android/hal-msg.h \
 				android/audio-msg.h \
+				android/sco-msg.h \
 				android/utils.h \
 				src/sdpd-database.c src/sdpd-server.c \
 				src/sdpd-service.c src/sdpd-request.c \
diff --git a/android/sco-ipc-api.txt b/android/sco-ipc-api.txt
new file mode 100644
index 0000000..05848d2
--- /dev/null
+++ b/android/sco-ipc-api.txt
@@ -0,0 +1,37 @@
+Bluetooth SCO Audio Plugin
+==========================
+
+The SCO Audio Plugin communicate through abstract socket name
+"\0bluez_sco_socket".
+
+	.----SCO----.                             .--Android--.
+	|   Plugin  |                             |   Daemon  |
+	|           |          Command            |           |
+	|           | --------------------------> |           |
+	|           |                             |           |
+	|           | <-------------------------- |           |
+	|           |          Response           |           |
+	|           |                             |           |
+	|           |                             |           |
+	|           |                             |           |
+	'-----------'                             '-----------'
+
+
+	SCO HAL                               Daemon
+	----------------------------------------------------
+
+	call connect_sco()                    --> create SCO socket
+	return connect_sco()                  <-- return socket fd and mtu
+
+SCO Audio Service (ID 0)
+========================
+
+	Opcode 0x00 - Error response
+
+		Response parameters: Status (1 octet)
+
+	Opcode 0x01 - Connect SCO command
+
+		Command parameters: <none>
+		Response parameters: MTU (2 octets)
+				     File descriptor (inline)
diff --git a/android/sco-msg.h b/android/sco-msg.h
new file mode 100644
index 0000000..df0d858
--- /dev/null
+++ b/android/sco-msg.h
@@ -0,0 +1,36 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2014  Intel Corporation. All rights reserved.
+ *
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+static const char BLUEZ_SCO_SK_PATH[] = "\0bluez_sco_socket";
+
+#define SCO_SERVICE_ID			0
+
+#define SCO_STATUS_SUCCESS		IPC_STATUS_SUCCESS
+#define SCO_STATUS_FAILED		0x01
+
+#define SCO_OP_STATUS			IPC_OP_STATUS
+
+#define SCO_OP_CONNECT			0x01
+struct sco_rsp_connect {
+	uint16_t mtu;
+} __attribute__((packed));