From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 1/2] android/avrcp: Add remote features notification
Date: Wed, 5 Mar 2014 15:03:55 +0200 [thread overview]
Message-ID: <1394024636-20620-1-git-send-email-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
android/avrcp.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/android/avrcp.c b/android/avrcp.c
index cb46dcc..8795951 100644
--- a/android/avrcp.c
+++ b/android/avrcp.c
@@ -43,6 +43,7 @@
#include "ipc.h"
#include "bluetooth.h"
#include "avrcp.h"
+#include "utils.h"
#define L2CAP_PSM_AVCTP 0x17
@@ -699,6 +700,7 @@ static const struct avrcp_control_handler control_handlers[] = {
static int avrcp_device_add_session(struct avrcp_device *dev, int fd,
uint16_t imtu, uint16_t omtu)
{
+ struct hal_ev_avrcp_remote_features ev;
char address[18];
dev->session = avrcp_new(fd, imtu, omtu, dev->version);
@@ -717,6 +719,18 @@ static int avrcp_device_add_session(struct avrcp_device *dev, int fd,
/* FIXME: get the real name of the device */
avrcp_init_uinput(dev->session, "bluetooth", address);
+ bdaddr2android(&dev->dst, ev.bdaddr);
+
+ if (dev->version < 0x0103)
+ goto done;
+
+ ev.features = HAL_AVRCP_FEATURE_METADATA;
+
+done:
+ ipc_send_notif(hal_ipc, HAL_SERVICE_ID_AVRCP,
+ HAL_EV_AVRCP_REMOTE_FEATURES,
+ sizeof(ev), &ev);
+
return 0;
}
--
1.8.5.3
next reply other threads:[~2014-03-05 13:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-05 13:03 Luiz Augusto von Dentz [this message]
2014-03-05 13:03 ` [PATCH BlueZ 2/2] android/client: Add AVRCP remote_features_cb support Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394024636-20620-1-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox