summaryrefslogtreecommitdiff
path: root/android/a2dp.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-01-17 15:14:20 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-01-18 23:32:37 +0200
commit5ab13f553970e86e71a57813a457f0aae9be4f56 (patch)
tree939f6c45bdc36f434c3e1a3bb486117448bcdf83 /android/a2dp.c
parent786f12c0579e73687239b2cf252dd2854e8be999 (diff)
downloadbluez-5ab13f553970e86e71a57813a457f0aae9be4f56.tar.gz
android/A2DP: Notify when audio state change to stopped
Diffstat (limited to 'android/a2dp.c')
-rw-r--r--android/a2dp.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/android/a2dp.c b/android/a2dp.c
index 515cf175e..12a8a6931 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,