diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-04 09:39:57 -0800 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-04 09:39:57 -0800 |
commit | 8569aed5570e415a2d4361c521c0b511684e3b7e (patch) | |
tree | 878d2839e2c280dc4e4fd06a1f108ca43514c3f8 /audio/control.c | |
parent | 584fe1b71eca9a98b5a0a75e08aaa4fafc4e8d83 (diff) |
Delay AVRCP connection when remote device connects A2DP
The audio profile coexistence whitepaper recommends that the initiator
of the A2DP connection also initiates the AVRCP connection. This patch
adds a two second delay before we attempt connecting AVRCP after the
remote device has connected A2DP to us.
Diffstat (limited to 'audio/control.c')
-rw-r--r-- | audio/control.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/control.c b/audio/control.c index 1a3e17b4..5cf68cdf 100644 --- a/audio/control.c +++ b/audio/control.c @@ -691,6 +691,8 @@ static void avctp_server_cb(GIOChannel *chan, int err, const bdaddr_t *src, if (!dev->control) dev->control = control_init(dev); + device_remove_control_timer(dev); + session->state = AVCTP_STATE_CONNECTING; session->sock = g_io_channel_unix_get_fd(chan); @@ -820,6 +822,8 @@ gboolean avrcp_connect(struct audio_device *dev) return FALSE; } + device_remove_control_timer(dev); + session->dev = dev; session->state = AVCTP_STATE_CONNECTING; |