From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [BlueZ v4 5/6] audio/A2DP: Add implemention of audio Resume Stream command
Date: Mon, 13 Jan 2014 14:10:03 +0200 [thread overview]
Message-ID: <1389615004-32612-5-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1389615004-32612-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 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);
}
--
1.8.4.2
next prev parent reply other threads:[~2014-01-13 12:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 12:09 [BlueZ v4 1/6] audio/A2DP: Add implemention of audio Open command Luiz Augusto von Dentz
2014-01-13 12:10 ` [BlueZ v4 2/6] audio/A2DP: Add implemention of audio Close command Luiz Augusto von Dentz
2014-01-13 12:10 ` [BlueZ v4 3/6] audio/A2DP: Add implemention of audio Open Stream command Luiz Augusto von Dentz
2014-01-13 12:10 ` [BlueZ v4 4/6] audio/A2DP: Add implemention of audio Close " Luiz Augusto von Dentz
2014-01-13 12:10 ` Luiz Augusto von Dentz [this message]
2014-01-13 12:10 ` [BlueZ v4 6/6] audio/A2DP: Add implemention of audio Suspend " Luiz Augusto von Dentz
2014-01-13 12:35 ` [BlueZ v4 1/6] audio/A2DP: Add implemention of audio Open command 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=1389615004-32612-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