linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: roystonr@codeaurora.org, linux-bluetooth@vger.kernel.org,
	skrovvid@codeaurora.org, rshaffer@codeaurora.org
Subject: Re: A2DP reconfigure with BMW Carkit (supporting multi streams) timeouts.
Date: Fri, 10 Dec 2010 12:32:42 +0200	[thread overview]
Message-ID: <20101210103242.GA21860@jh-x301> (raw)
In-Reply-To: <AANLkTik78DiC7TgWtR0q=xPs+ZZq470_md-gJWv8tB8f@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

Hi Luiz,

On Fri, Dec 10, 2010, Luiz Augusto von Dentz wrote:
> I guess it would be better to have the call to
> avdtp_stream_get_remote_sep on close_cfm, it is probably safer to do
> there and less code too, but the fix is probably right.

Good point. Attach is a patch which does this. Could we now please get
some feedback from the reporter if this really helps? :)

Johan

[-- Attachment #2: acp_sep_selection.patch --]
[-- Type: text/x-diff, Size: 1420 bytes --]

diff --git a/audio/a2dp.c b/audio/a2dp.c
index b1e94d9..b46cef1 100644
--- a/audio/a2dp.c
+++ b/audio/a2dp.c
@@ -1097,6 +1097,9 @@ static void close_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
 		return;
 	}
 
+	if (!setup->rsep)
+		setup->rsep = avdtp_stream_get_remote_sep(stream);
+
 	if (setup->reconfigure)
 		g_timeout_add(RECONFIGURE_TIMEOUT, a2dp_reconfigure, setup);
 }
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 1683e7c..33178c3 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -3133,6 +3133,12 @@ gboolean avdtp_stream_has_capabilities(struct avdtp_stream *stream,
 	return TRUE;
 }
 
+struct avdtp_remote_sep *avdtp_stream_get_remote_sep(
+						struct avdtp_stream *stream)
+{
+	return avdtp_get_remote_sep(stream->session, stream->rseid);
+}
+
 gboolean avdtp_stream_get_transport(struct avdtp_stream *stream, int *sock,
 					uint16_t *imtu, uint16_t *omtu,
 					GSList **caps)
diff --git a/audio/avdtp.h b/audio/avdtp.h
index 9406fa7..5f37dc3 100644
--- a/audio/avdtp.h
+++ b/audio/avdtp.h
@@ -257,6 +257,8 @@ gboolean avdtp_stream_has_capability(struct avdtp_stream *stream,
 				struct avdtp_service_capability *cap);
 gboolean avdtp_stream_has_capabilities(struct avdtp_stream *stream,
 					GSList *caps);
+struct avdtp_remote_sep *avdtp_stream_get_remote_sep(
+						struct avdtp_stream *stream);
 
 unsigned int avdtp_add_state_cb(avdtp_session_state_cb cb, void *user_data);
 

  reply	other threads:[~2010-12-10 10:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 13:54 A2DP reconfigure with BMW Carkit (supporting multi streams) timeouts roystonr
2010-12-09 14:41 ` Johan Hedberg
2010-12-10  9:51   ` Luiz Augusto von Dentz
2010-12-10 10:32     ` Johan Hedberg [this message]
     [not found]       ` <c2cb901974d908ed9f808324e4b4f6fb.squirrel@www.codeaurora.org>
2010-12-10 12:19         ` roystonr
2011-02-01 14:16           ` Lukasz Rymanowski
2011-02-08 14:59             ` Höglind, Henrik
2011-02-08 19:06               ` 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=20101210103242.GA21860@jh-x301 \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=roystonr@codeaurora.org \
    --cc=rshaffer@codeaurora.org \
    --cc=skrovvid@codeaurora.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;
as well as URLs for NNTP newsgroup(s).