Linux bluetooth development
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 5/7] audio/AVRCP: Connect browsing channel in case of GetCapabilities response
Date: Mon, 29 Jul 2013 17:04:37 +0300	[thread overview]
Message-ID: <1375106679-14645-5-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1375106679-14645-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If the remote stack respond to GetCapabilities before connecting to
browsing channel connect it immediatelly as some events might depend on
it to work properly.

The spec actually recommends the browsing channel to be connected
immediatelly after the control channel:

AVRCP 1.5 - Page 23

"4.1.1 Connection establishment
...
If a browsing channel is supported by both devices it shall be
established after control channel establishment. It is recommended that
the browsing channel is established immediately after the control
channel is established and released immediately before the control
channel is released to avoid unsatisfactory latency when a browsing
command is sent."
---
 profiles/audio/avrcp.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 8c39d96..9f164e4 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -3195,6 +3195,13 @@ static gboolean avrcp_get_capabilities_resp(struct avctp *conn,
 	if (pdu == NULL || pdu->params[0] != CAP_EVENTS_SUPPORTED)
 		return FALSE;
 
+	/* Connect browsing if pending */
+	if (session->browsing_timer > 0) {
+		g_source_remove(session->browsing_timer);
+		session->browsing_timer = 0;
+		avctp_connect_browsing(session->conn);
+	}
+
 	count = pdu->params[1];
 
 	for (; count > 0; count--) {
-- 
1.8.3.1


  parent reply	other threads:[~2013-07-29 14:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 14:04 [PATCH BlueZ 1/7] audio/AVRCP: Fix memory leaks Luiz Augusto von Dentz
2013-07-29 14:04 ` [PATCH BlueZ 2/7] audio/AVRCP: Fix not connecting Browsing channel when supported Luiz Augusto von Dentz
2013-07-29 14:04 ` [PATCH BlueZ 3/7] audio/AVRCP: Fix not setting browsing feature in CT record Luiz Augusto von Dentz
2013-07-29 14:04 ` [PATCH BlueZ 4/7] audio/AVRCP: Connect browsing channel when accepting the connection Luiz Augusto von Dentz
2013-07-29 14:04 ` Luiz Augusto von Dentz [this message]
2013-07-29 14:04 ` [PATCH BlueZ 6/7] audio/AVCTP: Fix connecting browsing channel multiple times Luiz Augusto von Dentz
2013-07-29 14:04 ` [PATCH BlueZ 7/7] audio/AVCTP: Do not process browsing queue until connection completes Luiz Augusto von Dentz
2013-07-30  9:54 ` [PATCH BlueZ 1/7] audio/AVRCP: Fix memory leaks Johan Hedberg

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=1375106679-14645-5-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