From: David Stockwell <dstockwell@frequency-one.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 1/3] AVRCP: Eliminate dependency on sink for connect.
Date: Sat, 20 Aug 2011 17:49:05 -0500 [thread overview]
Message-ID: <201108201749.05948.dstockwell@frequency-one.com> (raw)
AVRCP: Eliminate dependency on sink for avrcp-connect.
Required for case where device connecting is an AVRCP-only
remote, without audio (sink) capability.
Signed-off-by: David Stockwell <dstockwell@frequency-one.com>
---
audio/manager.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/audio/manager.c b/audio/manager.c
index 6e583cf..0c69736 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -224,8 +224,21 @@ static void handle_uuid(const char *uuidstr, struct
audio_device *device)
else
device->control = control_init(device, uuid16,
enabled.media_player);
- if (device->sink && sink_is_active(device))
- avrcp_connect(device);
+
+ /* Eliminate dependency on sink if plain remote (without Sink). */
+
+ if (device->sink) {
+ if (sink_is_active(device)) {
+ DBG("Connecting to AVRCP with active sink");
+ avrcp_connect(device);
+ } else {
+ DBG("Connecting to AVRCP with inactive sink");
+ avrcp_connect(device);
+ }
+ } else {
+ DBG("Connecting to AVRCP without sink");
+ avrcp_connect(device);
+ }
break;
default:
DBG("Unrecognized UUID: 0x%04X", uuid16);
--
1.7.3.4
next reply other threads:[~2011-08-20 22:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-20 22:49 David Stockwell [this message]
2011-08-21 9:06 ` [PATCH 1/3] AVRCP: Eliminate dependency on sink for connect 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=201108201749.05948.dstockwell@frequency-one.com \
--to=dstockwell@frequency-one.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;
as well as URLs for NNTP newsgroup(s).