summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-11-25 19:27:18 -0300
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-11-25 19:27:18 -0300
commit839a47467fb33fdb8df098e86028e6fa9ce7f101 (patch)
treefbb7569f0b16d04ee5fb15a78aa71394060e0d73
parentd63872f77146dbe3bd005409ba21abc8aa07dd74 (diff)
Lock headset on stream start rather than stream configuration.
-rw-r--r--audio/unix.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/audio/unix.c b/audio/unix.c
index c6187ac8..cdb536fe 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -258,11 +258,6 @@ static void headset_setup_complete(struct audio_device *dev, void *user_data)
if (!dev)
goto failed;
- if (!headset_lock(dev, hs->lock)) {
- error("Unable to lock headset");
- goto failed;
- }
-
memset(buf, 0, sizeof(buf));
rsp->rsp_h.msg_h.msg_type = BT_SETCONFIGURATION_RSP;
@@ -294,6 +289,11 @@ static void headset_resume_complete(struct audio_device *dev, void *user_data)
if (!dev)
goto failed;
+ if (!headset_lock(dev, hs->lock)) {
+ error("Unable to lock headset");
+ goto failed;
+ }
+
memset(buf, 0, sizeof(buf));
rsp->rsp_h.msg_h.msg_type = BT_STREAMSTART_RSP;