linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mikel Astiz <mikel.astiz.oss@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [RFC 19/20] audio/sink: Fix not notifying service about connection state
Date: Thu, 4 Jul 2013 09:05:57 +0200	[thread overview]
Message-ID: <CANT-zCWU3-BJB18DXs1bgKwioZru-8=73H3fQ9J4zK0A1cL0ew@mail.gmail.com> (raw)
In-Reply-To: <1372864541-10763-20-git-send-email-luiz.dentz@gmail.com>

Hi Luiz,

On Wed, Jul 3, 2013 at 5:15 PM, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> btd_service_connecting_complete should be called whenever the service
> is connected otherwise the service state will not be consistent.
> ---
>  profiles/audio/sink.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c
> index bb9ab21..5206920 100644
> --- a/profiles/audio/sink.c
> +++ b/profiles/audio/sink.c
> @@ -164,6 +164,7 @@ static void stream_state_changed(struct avdtp_stream *stream,
>                 sink->cb_id = 0;
>                 break;
>         case AVDTP_STATE_OPEN:
> +               btd_service_connecting_complete(sink->service, 0);
>                 sink_set_state(sink, SINK_STATE_CONNECTED);
>                 break;
>         case AVDTP_STATE_STREAMING:
> @@ -212,11 +213,8 @@ static void stream_setup_complete(struct avdtp *session, struct a2dp_sep *sep,
>
>         sink->connect_id = 0;
>
> -       if (stream) {
> -               DBG("Stream successfully created");
> -               btd_service_connecting_complete(sink->service, 0);
> +       if (stream)
>                 return;
> -       }
>
>         avdtp_unref(sink->session);
>         sink->session = NULL;
> --

If this is a fix, it'd be good to document the steps to reproduce and
point out the commit that broke this.

In particular, I'm interested in knowing whether this was introduced
during the transition to btd_service. If you look at
10620c1c0fbb211455fde597a1d2e5e47806f25d, you'll see that the previous
approach also missed the state notification in stream_state_changed().

If this is indeed an issue introduced by btd_service, other profiles
might need to be double-checked.

Cheers,
Mikel

  reply	other threads:[~2013-07-04  7:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 15:15 [RFC 00/20] Remove audio_device and introduce policy plugin Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 01/20] audio/sink: Use service user_data for private data Luiz Augusto von Dentz
2013-07-04  6:36   ` Mikel Astiz
2013-07-04  6:49     ` Luiz Augusto von Dentz
2013-07-04 14:28   ` Vinicius Costa Gomes
2013-07-05  6:38     ` Mikel Astiz
2013-07-08 10:00       ` Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 02/20] audio/source: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 03/20] audio/control: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 04/20] audio/sink: Reduce dependency on struct audio_device Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 05/20] audio/source: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 06/20] audio/control: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 07/20] audio/AVCTP: Remove " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 08/20] audio/AVDTP: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 09/20] audio/AVRCP: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 10/20] audio/control: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 11/20] audio/A2DP: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 12/20] audio/sink: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 13/20] audio/source: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 14/20] audio/media: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 15/20] audio/transport: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 16/20] audio/manager: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 17/20] audio/main: " Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 18/20] plugins/policy: Reword audio policy code in a simple plugin Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 19/20] audio/sink: Fix not notifying service about connection state Luiz Augusto von Dentz
2013-07-04  7:05   ` Mikel Astiz [this message]
2013-07-04  7:17     ` Luiz Augusto von Dentz
2013-07-03 15:15 ` [RFC 20/20] audio/source: " 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='CANT-zCWU3-BJB18DXs1bgKwioZru-8=73H3fQ9J4zK0A1cL0ew@mail.gmail.com' \
    --to=mikel.astiz.oss@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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).