Diff between 31993b0a0e47423796f77dc6d263b9ea9a40ba5e and 712aae3add088a2f80d82654e1759ada00c6d482

Changed Files

File Additions Deletions Status
android/a2dp.c +22 -1 modified

Full Patch

diff --git a/android/a2dp.c b/android/a2dp.c
index ece5e47..fee8b81 100644
--- a/android/a2dp.c
+++ b/android/a2dp.c
@@ -780,8 +780,29 @@ failed:
 
 static void bt_stream_resume(const void *buf, uint16_t len)
 {
-	DBG("Not Implemented");
+	const struct audio_cmd_resume_stream *cmd = buf;
+	struct a2dp_setup *setup;
+	int err;
+
+	DBG("");
 
+	setup = find_setup(cmd->id);
+	if (!setup) {
+		error("Unable to find stream for endpoint %u", cmd->id);
+		goto failed;
+	}
+
+	err = avdtp_start(setup->dev->session, setup->stream);
+	if (err < 0) {
+		error("avdtp_start: %s", strerror(-err));
+		goto failed;
+	}
+
+	audio_ipc_send_rsp(AUDIO_OP_RESUME_STREAM, AUDIO_STATUS_SUCCESS);
+
+	return;
+
+failed:
 	audio_ipc_send_rsp(AUDIO_OP_RESUME_STREAM, AUDIO_STATUS_FAILED);
 }