* [PATCH 1/3] AVRCP: Eliminate dependency on sink for connect.
@ 2011-08-20 22:49 David Stockwell
2011-08-21 9:06 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 2+ messages in thread
From: David Stockwell @ 2011-08-20 22:49 UTC (permalink / raw)
To: linux-bluetooth
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] AVRCP: Eliminate dependency on sink for connect.
2011-08-20 22:49 [PATCH 1/3] AVRCP: Eliminate dependency on sink for connect David Stockwell
@ 2011-08-21 9:06 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2011-08-21 9:06 UTC (permalink / raw)
To: David Stockwell; +Cc: linux-bluetooth
Hi David,
On Sun, Aug 21, 2011 at 1:49 AM, David Stockwell
<dstockwell@frequency-one.com> wrote:
> 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
IMO we should only auto connect avrcp if AutoConnect is set in
audio.conf, but note that there is a specific sequence recommended
simultaneous audio profiles white paper. In fact I would suggest not
changing this at all but instead implement Control.Connect which would
be used to manually trigger AVRCP connection.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-21 9:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-20 22:49 [PATCH 1/3] AVRCP: Eliminate dependency on sink for connect David Stockwell
2011-08-21 9:06 ` Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox