summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/headset.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/headset.c b/audio/headset.c
index bcaa4912..0ccd9d2e 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -1589,7 +1589,8 @@ gboolean headset_unlock(struct device *dev, void *data)
hs->locked = FALSE;
- headset_set_state(dev, HEADSET_STATE_DISCONNECTED);
+ if (hs->state > HEADSET_STATE_DISCONNECTED)
+ headset_set_state(dev, HEADSET_STATE_DISCONNECTED);
return TRUE;
}