From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] Fix not calling SetConfiguration on hfp/hsp endpoints before connected
Date: Thu, 16 Dec 2010 16:13:20 +0200 [thread overview]
Message-ID: <1292508801-15581-1-git-send-email-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
This cause some clients like PulseAudio to fail to find a proper
transport since connected state is send before transport configuration
is set.
To fix this now SetConfiguration is called early on when headset is still
in connecting phase, this matches sink/source where SetConfiguration is
also called before connected.
---
audio/media.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/audio/media.c b/audio/media.c
index 0e6ccc9..b28bb33 100644
--- a/audio/media.c
+++ b/audio/media.c
@@ -151,16 +151,13 @@ static void headset_state_changed(struct audio_device *dev,
switch (new_state) {
case HEADSET_STATE_DISCONNECTED:
- if (old_state != HEADSET_STATE_CONNECTING)
- media_endpoint_clear_configuration(endpoint);
+ media_endpoint_clear_configuration(endpoint);
+ break;
case HEADSET_STATE_CONNECTING:
+ media_endpoint_set_configuration(endpoint, dev, NULL, 0,
+ headset_setconf_cb, dev);
break;
case HEADSET_STATE_CONNECTED:
- if (old_state != HEADSET_STATE_PLAY_IN_PROGRESS &&
- old_state != HEADSET_STATE_PLAYING)
- media_endpoint_set_configuration(endpoint, dev, NULL,
- 0, headset_setconf_cb,
- dev);
break;
case HEADSET_STATE_PLAY_IN_PROGRESS:
break;
--
1.7.1
next reply other threads:[~2010-12-16 14:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 14:13 Luiz Augusto von Dentz [this message]
2010-12-16 14:13 ` [PATCH] Fix sending duplicate speaker/microphone gains to the headset Luiz Augusto von Dentz
2010-12-16 14:33 ` Johan Hedberg
2010-12-16 14:32 ` [PATCH] Fix not calling SetConfiguration on hfp/hsp endpoints before connected Johan Hedberg
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=1292508801-15581-1-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