From 839a47467fb33fdb8df098e86028e6fa9ce7f101 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 25 Nov 2008 19:27:18 -0300 Subject: Lock headset on stream start rather than stream configuration. --- audio/unix.c | 10 +++++----- 1 file 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; -- cgit