linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Gix <bgix@codeaurora.org>
To: Arun Raghavan <arun.raghavan@collabora.co.uk>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Always reset the remote SEP when reconfiguring A2DP
Date: Tue, 15 Mar 2011 09:30:08 -0700	[thread overview]
Message-ID: <4D7F9410.5020609@codeaurora.org> (raw)
In-Reply-To: <1300199261-27481-2-git-send-email-arun.raghavan@collabora.co.uk>

This patch violates the AVDTP specification, as indicated in other 
email. SEID may not be changed by RECONFIGURE.

On 3/15/2011 7:27 AM, Arun Raghavan wrote:
> This forces the remote SEP to be recalculated when reconfiguring an A2DP
> stream. This is required, for example, when reconfiguring the sink to
> accept MPEG audio instead of SBC (and thus the remote SEID changes).
> ---
>   audio/a2dp.c |    5 ++---
>   1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/audio/a2dp.c b/audio/a2dp.c
> index 3407d6f..27759b8 100644
> --- a/audio/a2dp.c
> +++ b/audio/a2dp.c
> @@ -1101,9 +1101,6 @@ 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);
>   }
> @@ -2048,6 +2045,7 @@ unsigned int a2dp_config(struct avdtp *session, struct a2dp_sep *sep,
>   			if (a2dp_sep_get_lock(tmp))
>   				goto failed;
>   			setup->reconfigure = TRUE;
> +			setup->rsep = NULL;
>   			if (avdtp_close(session, tmp->stream, FALSE)<  0) {
>   				error("avdtp_close failed");
>   				goto failed;
> @@ -2077,6 +2075,7 @@ unsigned int a2dp_config(struct avdtp *session, struct a2dp_sep *sep,
>   			g_idle_add((GSourceFunc) finalize_config, setup);
>   		} else if (!setup->reconfigure) {
>   			setup->reconfigure = TRUE;
> +			setup->rsep = NULL;
>   			if (avdtp_close(session, sep->stream, FALSE)<  0) {
>   				error("avdtp_close failed");
>   				goto failed;


-- 
Brian Gix
bgix@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum

  reply	other threads:[~2011-03-15 16:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15 14:27 Switching between SBC and MPEG audio on headsets Arun Raghavan
2011-03-15 14:27 ` [PATCH] Always reset the remote SEP when reconfiguring A2DP Arun Raghavan
2011-03-15 16:30   ` Brian Gix [this message]
2011-03-15 17:08     ` Johan Hedberg
2011-03-15 17:11       ` Brian Gix
2011-03-15 16:22 ` Switching between SBC and MPEG audio on headsets Brian Gix
2011-03-15 19:51   ` Arun Raghavan
2011-03-15 20:43     ` Brian Gix
2011-03-16 18:19       ` Arun Raghavan
2011-03-16 20:05         ` [PATCH] Recalculate remote SEP if the codec type changes Arun Raghavan
2011-03-18  9:43           ` Johan Hedberg
2011-03-15 17:01 ` Switching between SBC and MPEG audio on headsets Johan Hedberg
2011-03-15 19:29   ` Luiz Augusto von Dentz
2011-03-15 19:41     ` Brian Gix
2011-03-15 20:21       ` Luiz Augusto von Dentz
2011-03-15 20:50         ` Brian Gix
2011-03-16 22:38     ` Peter Dons Tychsen
2011-03-16 23:09       ` Brian Gix
2011-03-17  9:35         ` Peter Dons Tychsen
2011-03-17 16:19           ` Brian Gix
2011-03-17 21:33             ` Peter Dons Tychsen

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=4D7F9410.5020609@codeaurora.org \
    --to=bgix@codeaurora.org \
    --cc=arun.raghavan@collabora.co.uk \
    --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;
as well as URLs for NNTP newsgroup(s).