Linux bluetooth development
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [BlueZ v2 5/6] audio/A2DP: Add implemention of audio Resume Stream command
Date: Mon, 13 Jan 2014 09:52:04 +0200	[thread overview]
Message-ID: <1389599525-6353-5-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1389599525-6353-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 android/a2dp.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/android/a2dp.c b/android/a2dp.c
index 48ca00b..0598d4d 100644
--- a/android/a2dp.c
+++ b/android/a2dp.c
@@ -779,8 +779,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);
 }
 
-- 
1.8.4.2


  parent reply	other threads:[~2014-01-13  7:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13  7:52 [BlueZ v2 1/6] audio/A2DP: Add implemention of audio Open command Luiz Augusto von Dentz
2014-01-13  7:52 ` [BlueZ v2 2/6] audio/A2DP: Add implemention of audio Close command Luiz Augusto von Dentz
2014-01-13  7:52 ` [BlueZ v2 3/6] audio/A2DP: Add implemention of audio Open Stream command Luiz Augusto von Dentz
2014-01-13  7:52 ` [BlueZ v2 4/6] audio/A2DP: Add implemention of audio Close " Luiz Augusto von Dentz
2014-01-13  7:52 ` Luiz Augusto von Dentz [this message]
2014-01-13  7:52 ` [BlueZ v2 6/6] audio/A2DP: Add implemention of audio Suspend " 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=1389599525-6353-5-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