diff --git a/android/a2dp.c b/android/a2dp.c
index 581d094..c12d8f1 100644
--- a/android/a2dp.c
+++ b/android/a2dp.c
#include "utils.h"
#include "bluetooth.h"
#include "avdtp.h"
+#include "audio-msg.h"
+#include "audio-ipc.h"
#define L2CAP_PSM_AVDTP 0x19
#define SVC_HINT_CAPTURING 0x08
return record;
}
+static const struct ipc_handler audio_handlers[] = {
+};
+
bool bt_a2dp_register(const bdaddr_t *addr)
{
GError *err = NULL;
DBG("");
+ audio_ipc_init();
+
bacpy(&adapter_addr, addr);
server = bt_io_listen(connect_cb, NULL, NULL, NULL, &err,
ipc_register(HAL_SERVICE_ID_A2DP, cmd_handlers,
G_N_ELEMENTS(cmd_handlers));
+ audio_ipc_register(audio_handlers, G_N_ELEMENTS(audio_handlers));
+
return true;
fail:
g_slist_foreach(devices, a2dp_device_disconnected, NULL);
devices = NULL;
-
ipc_unregister(HAL_SERVICE_ID_A2DP);
+ audio_ipc_unregister();
+
bt_adapter_remove_record(record_id);
record_id = 0;
g_io_channel_unref(server);
server = NULL;
}
+
+ audio_ipc_cleanup();
}