diff --git a/android/Android.mk b/android/Android.mk
index 507b23b..e341349 100644
--- a/android/Android.mk
+++ b/android/Android.mk
bluez/android/avdtp.c \
bluez/android/a2dp.c \
bluez/android/avctp.c \
+ bluez/android/avrcp.c \
bluez/android/pan.c \
bluez/src/log.c \
bluez/src/shared/mgmt.c \
diff --git a/android/Makefile.am b/android/Makefile.am
index 88fe667..d4a76bb 100644
--- a/android/Makefile.am
+++ b/android/Makefile.am
android/avdtp.h android/avdtp.c \
android/a2dp.h android/a2dp.c \
android/avctp.h android/avctp.c \
+ android/avrcp.h android/avrcp.c \
android/socket.h android/socket.c \
android/pan.h android/pan.c \
btio/btio.h btio/btio.c \
diff --git a/android/avrcp.c b/android/avrcp.c
new file mode 100644
index 0000000..a6fb5f5
--- /dev/null
+++ b/android/avrcp.c
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2014 Intel Corporation. All rights reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdbool.h>
+#include <glib.h>
+
+#include "lib/bluetooth.h"
+#include "src/log.h"
+#include "avrcp.h"
+#include "hal-msg.h"
+#include "ipc.h"
+
+static bdaddr_t adapter_addr;
+
+static const struct ipc_handler cmd_handlers[] = {
+};
+
+bool bt_avrcp_register(const bdaddr_t *addr)
+{
+ DBG("");
+
+ bacpy(&adapter_addr, addr);
+
+ ipc_register(HAL_SERVICE_ID_AVRCP, cmd_handlers,
+ G_N_ELEMENTS(cmd_handlers));
+
+ return true;
+}
+
+void bt_avrcp_unregister(void)
+{
+ DBG("");
+
+ ipc_unregister(HAL_SERVICE_ID_AVRCP);
+}
diff --git a/android/avrcp.h b/android/avrcp.h
new file mode 100644
index 0000000..6fe7fbf
--- /dev/null
+++ b/android/avrcp.h
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2014 Intel Corporation. All rights reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+bool bt_avrcp_register(const bdaddr_t *addr);
+void bt_avrcp_unregister(void);
diff --git a/android/main.c b/android/main.c
index cdeb420..c6ada62 100644
--- a/android/main.c
+++ b/android/main.c
#include "ipc.h"
#include "a2dp.h"
#include "pan.h"
+#include "avrcp.h"
#define STARTUP_GRACE_SECONDS 5
#define SHUTDOWN_GRACE_SECONDS 10
}
break;
+ case HAL_SERVICE_ID_AVRCP:
+ if (!bt_avrcp_register(&adapter_bdaddr)) {
+ status = HAL_STATUS_FAILED;
+ goto failed;
+ }
+
+ break;
default:
DBG("service %u not supported", m->service_id);
status = HAL_STATUS_FAILED;
case HAL_SERVICE_ID_PAN:
bt_pan_unregister();
break;
+ case HAL_SERVICE_ID_AVRCP:
+ bt_avrcp_unregister();
+ break;
default:
/* This would indicate bug in HAL, as unregister should not be
* called in init failed */