* [PATCH] Configure HFP/HSP endpoints if headset interface is already connected
@ 2010-12-21 15:43 Luiz Augusto von Dentz
2010-12-21 22:20 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2010-12-21 15:43 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
HFP/HSP can be connected when registering an endpoint which is different
than on a2dp where the sep cannot be configured already since it wasn't
available before.
---
audio/media.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/audio/media.c b/audio/media.c
index b28bb33..97a60a1 100644
--- a/audio/media.c
+++ b/audio/media.c
@@ -42,6 +42,7 @@
#include "transport.h"
#include "a2dp.h"
#include "headset.h"
+#include "manager.h"
#ifndef DBUS_TYPE_UNIX_FD
#define DBUS_TYPE_UNIX_FD -1
@@ -200,10 +201,18 @@ static struct media_endpoint *media_endpoint_create(struct media_adapter *adapte
if (endpoint->sep == NULL)
goto failed;
} else if (strcasecmp(uuid, HFP_AG_UUID) == 0 ||
- g_strcmp0(uuid, HSP_AG_UUID) == 0)
+ g_strcmp0(uuid, HSP_AG_UUID) == 0) {
+ struct audio_device *dev;
+
endpoint->hs_watch = headset_add_state_cb(headset_state_changed,
endpoint);
- else
+ dev = manager_find_device(NULL, &adapter->src, BDADDR_ANY,
+ AUDIO_HEADSET_INTERFACE, TRUE);
+ if (dev)
+ media_endpoint_set_configuration(endpoint, dev, NULL,
+ 0, headset_setconf_cb,
+ dev);
+ } else
goto failed;
endpoint->watch = g_dbus_add_disconnect_watch(adapter->conn, sender,
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Configure HFP/HSP endpoints if headset interface is already connected
2010-12-21 15:43 [PATCH] Configure HFP/HSP endpoints if headset interface is already connected Luiz Augusto von Dentz
@ 2010-12-21 22:20 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2010-12-21 22:20 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hi Luiz,
On Tue, Dec 21, 2010, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
>
> HFP/HSP can be connected when registering an endpoint which is different
> than on a2dp where the sep cannot be configured already since it wasn't
> available before.
> ---
> audio/media.c | 13 +++++++++++--
> 1 files changed, 11 insertions(+), 2 deletions(-)
The patch has been pushed upstream. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-21 22:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-21 15:43 [PATCH] Configure HFP/HSP endpoints if headset interface is already connected Luiz Augusto von Dentz
2010-12-21 22:20 ` Johan Hedberg
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).