summaryrefslogtreecommitdiffstats
path: root/audio/headset.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-08-31 11:51:43 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-08-31 11:51:43 +0000
commitec384afacde8614306abe32cf40c55b795783f0e (patch)
tree64becc3deee3b735acddd15157fa428ccfbf2b22 /audio/headset.h
parentfc0d501d82773718d0f2d040f786136332c39813 (diff)
Implement proper locking for headsets
Diffstat (limited to 'audio/headset.h')
-rw-r--r--audio/headset.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/audio/headset.h b/audio/headset.h
index 6824e0ce..32bf701b 100644
--- a/audio/headset.h
+++ b/audio/headset.h
@@ -46,6 +46,11 @@ typedef enum {
SVC_HANDSFREE
} headset_type_t;
+typedef enum {
+ HEADSET_LOCK_READ = 1,
+ HEADSET_LOCK_WRITE = 1 << 1,
+} headset_lock_t;
+
typedef void (*headset_stream_cb_t) (struct device *dev, void *user_data);
struct headset *headset_init(struct device *dev, sdp_record_t *record,
@@ -74,7 +79,7 @@ int headset_get_sco_fd(struct device *dev);
gboolean headset_is_active(struct device *dev);
-gboolean headset_lock(struct device *dev);
-gboolean headset_unlock(struct device *dev);
+gboolean headset_lock(struct device *dev, headset_lock_t lock);
+gboolean headset_unlock(struct device *dev, headset_lock_t lock);
gboolean headset_suspend(struct device *dev, void *data);
gboolean headset_play(struct device *dev, void *data);