From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 3/4] android/A2DP: Notify when audio state change to stopped
Date: Fri, 17 Jan 2014 15:33:06 +0200 [thread overview]
Message-ID: <1389965587-20066-3-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1389965587-20066-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
android/a2dp.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/android/a2dp.c b/android/a2dp.c
index 515cf17..12a8a69 100644
--- a/android/a2dp.c
+++ b/android/a2dp.c
@@ -1106,13 +1106,23 @@ static void sep_suspend_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
void *user_data)
{
struct a2dp_endpoint *endpoint = user_data;
+ struct a2dp_setup *setup;
DBG("");
- if (!err)
+ if (err) {
+ setup_remove_by_id(endpoint->id);
return;
+ }
- setup_remove_by_id(endpoint->id);
+ setup = find_setup(endpoint->id);
+ if (!setup) {
+ error("Unable to find stream setup for %u endpoint",
+ endpoint->id);
+ return;
+ }
+
+ bt_audio_notify_state(setup, HAL_AUDIO_STOPPED);
}
static void sep_close_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
--
1.8.4.2
next prev parent reply other threads:[~2014-01-17 13:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-17 13:33 [PATCH BlueZ 1/4] android/hal-msg: Add defines for each audio state Luiz Augusto von Dentz
2014-01-17 13:33 ` [PATCH BlueZ 2/4] android/A2DP: Notify when audio state change to started Luiz Augusto von Dentz
2014-01-17 13:33 ` Luiz Augusto von Dentz [this message]
2014-01-17 13:33 ` [PATCH BlueZ 4/4] android/A2DP: Notify when audio state change to suspend Luiz Augusto von Dentz
2014-01-18 22:28 ` [PATCH BlueZ 1/4] android/hal-msg: Add defines for each audio state 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=1389965587-20066-3-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