From 7558cca5c0bd954dc3db559c0d58ae6e497b13c0 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 8 Apr 2007 23:13:18 +0000 Subject: Add generic audio service init --- audio/headset.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 audio/headset.h (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h new file mode 100644 index 00000000..a87be7e3 --- /dev/null +++ b/audio/headset.h @@ -0,0 +1,25 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2004-2007 Marcel Holtmann + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +int headset_init(DBusConnection *conn); +void headset_exit(void); -- cgit From 35f12dee95378056a2ed7c0d325b2c3b68022da8 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 10 Apr 2007 11:44:10 +0000 Subject: Audio service refactoring: move all manager functions to manager.c --- audio/headset.h | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index a87be7e3..3027a9c1 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -20,6 +20,40 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ +#ifndef __AUDIO_HEADSET_H +#define __AUDIO_HEADSET_H -int headset_init(DBusConnection *conn); -void headset_exit(void); +#include + +#include + +struct headset; + +#include "manager.h" + +#define BUF_SIZE 1024 + +struct headset *audio_headset_new(DBusConnection *conn, const bdaddr_t *bda); + +void audio_headset_unref(struct headset *hs); + +uint32_t headset_add_ag_record(DBusConnection *conn, uint8_t channel); + +int headset_remove_ag_record(DBusConnection *conn, uint32_t rec_id); + +gboolean headset_server_io_cb(GIOChannel *chan, GIOCondition cond, + struct manager *manager); + +gint headset_bda_cmp(gconstpointer headset, gconstpointer bda); + +const char *audio_headset_get_path(struct headset *hs); + +gboolean audio_headset_close_output(struct headset *hs); + +gboolean audio_headset_open_output(struct headset *hs, const char *output); + +gboolean audio_headset_close_input(struct headset *hs); + +gboolean audio_headset_open_input(struct headset *hs, const char *input); + +#endif /* __AUDIO_HEADSET_H_ */ -- cgit From 2a209d402e7cc324d03fb7172ac892626068d00b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 10 Apr 2007 12:23:44 +0000 Subject: Rename functions for consistency --- audio/headset.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 3027a9c1..9f1c1232 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -33,9 +33,9 @@ struct headset; #define BUF_SIZE 1024 -struct headset *audio_headset_new(DBusConnection *conn, const bdaddr_t *bda); +struct headset *headset_new(DBusConnection *conn, const bdaddr_t *bda); -void audio_headset_unref(struct headset *hs); +void headset_unref(struct headset *hs); uint32_t headset_add_ag_record(DBusConnection *conn, uint8_t channel); @@ -46,14 +46,14 @@ gboolean headset_server_io_cb(GIOChannel *chan, GIOCondition cond, gint headset_bda_cmp(gconstpointer headset, gconstpointer bda); -const char *audio_headset_get_path(struct headset *hs); +const char *headset_get_path(struct headset *hs); -gboolean audio_headset_close_output(struct headset *hs); +gboolean headset_close_output(struct headset *hs); -gboolean audio_headset_open_output(struct headset *hs, const char *output); +gboolean headset_open_output(struct headset *hs, const char *output); -gboolean audio_headset_close_input(struct headset *hs); +gboolean headset_close_input(struct headset *hs); -gboolean audio_headset_open_input(struct headset *hs, const char *input); +gboolean headset_open_input(struct headset *hs, const char *input); #endif /* __AUDIO_HEADSET_H_ */ -- cgit From 993e7c747c360fb05b98e316b7ec760d2fb70365 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 11 Apr 2007 08:56:50 +0000 Subject: Implement ChangeDefaultHeadset and RemoveHeadset methods --- audio/headset.h | 1 + 1 file changed, 1 insertion(+) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 9f1c1232..7c85b9bb 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -44,6 +44,7 @@ int headset_remove_ag_record(DBusConnection *conn, uint32_t rec_id); gboolean headset_server_io_cb(GIOChannel *chan, GIOCondition cond, struct manager *manager); +gint headset_path_cmp(gconstpointer headset, gconstpointer path); gint headset_bda_cmp(gconstpointer headset, gconstpointer bda); const char *headset_get_path(struct headset *hs); -- cgit From 1f6bcd79a30ce899eec1245956c48876831439eb Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 11 Apr 2007 22:46:22 +0000 Subject: Let the manager use global variables --- audio/headset.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 7c85b9bb..13532cb7 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -29,8 +29,6 @@ struct headset; -#include "manager.h" - #define BUF_SIZE 1024 struct headset *headset_new(DBusConnection *conn, const bdaddr_t *bda); @@ -41,8 +39,7 @@ uint32_t headset_add_ag_record(DBusConnection *conn, uint8_t channel); int headset_remove_ag_record(DBusConnection *conn, uint32_t rec_id); -gboolean headset_server_io_cb(GIOChannel *chan, GIOCondition cond, - struct manager *manager); +gboolean headset_server_io_cb(GIOChannel *chan, GIOCondition cond, void *data); gint headset_path_cmp(gconstpointer headset, gconstpointer path); gint headset_bda_cmp(gconstpointer headset, gconstpointer bda); -- cgit From e5aff3f6f7c43f4ddf8d83358d6a49ad2f81e750 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 12 Apr 2007 12:06:33 +0000 Subject: Redo the manager-headset splitup by using object paths as public identifiers for headsets --- audio/headset.h | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 13532cb7..b8582cef 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -27,31 +27,19 @@ #include -struct headset; - #define BUF_SIZE 1024 -struct headset *headset_new(DBusConnection *conn, const bdaddr_t *bda); +char *headset_add(const bdaddr_t *bda); -void headset_unref(struct headset *hs); +void headset_remove(char *path); -uint32_t headset_add_ag_record(DBusConnection *conn, uint8_t channel); +uint32_t headset_add_ag_record(uint8_t channel); -int headset_remove_ag_record(DBusConnection *conn, uint32_t rec_id); +int headset_remove_ag_record(uint32_t rec_id); gboolean headset_server_io_cb(GIOChannel *chan, GIOCondition cond, void *data); -gint headset_path_cmp(gconstpointer headset, gconstpointer path); -gint headset_bda_cmp(gconstpointer headset, gconstpointer bda); - -const char *headset_get_path(struct headset *hs); - -gboolean headset_close_output(struct headset *hs); - -gboolean headset_open_output(struct headset *hs, const char *output); - -gboolean headset_close_input(struct headset *hs); - -gboolean headset_open_input(struct headset *hs, const char *input); +void headset_init(DBusConnection *conn); +void headset_exit(void); #endif /* __AUDIO_HEADSET_H_ */ -- cgit From a07ea139e52ab9733f6d1e9f0ab2e0bf232059ef Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 12 Apr 2007 14:26:55 +0000 Subject: A little more refactoring --- audio/headset.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index b8582cef..888b53fe 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -33,13 +33,8 @@ char *headset_add(const bdaddr_t *bda); void headset_remove(char *path); -uint32_t headset_add_ag_record(uint8_t channel); +int headset_init(DBusConnection *conn); -int headset_remove_ag_record(uint32_t rec_id); - -gboolean headset_server_io_cb(GIOChannel *chan, GIOCondition cond, void *data); - -void headset_init(DBusConnection *conn); void headset_exit(void); #endif /* __AUDIO_HEADSET_H_ */ -- cgit From 260b175f47f5006b34a8eceda9914f67ef0caa12 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 13 Apr 2007 11:51:00 +0000 Subject: Cleanup and small fixes --- audio/headset.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 888b53fe..e51236ad 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -29,9 +29,11 @@ #define BUF_SIZE 1024 -char *headset_add(const bdaddr_t *bda); +const char *headset_get(const bdaddr_t *bda); -void headset_remove(char *path); +const char *headset_add(const bdaddr_t *bda); + +void headset_remove(const char *path); int headset_init(DBusConnection *conn); -- cgit From bbbc61a634179156b2a64d95f0ddd25fd164eaaf Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 9 May 2007 15:51:02 +0000 Subject: Convert to using generic dbus message dispatching --- audio/headset.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index e51236ad..ae5119fc 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -27,6 +27,8 @@ #include +#define AUDIO_HEADSET_INTERFACE "org.bluez.audio.Headset" + #define BUF_SIZE 1024 const char *headset_get(const bdaddr_t *bda); -- cgit From 2f9928fa78e9b4c767a5f584d068fb44b43856cd Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 15 May 2007 12:45:35 +0000 Subject: Refactoring to allow adding support for more profiles --- audio/headset.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index ae5119fc..de8e8a38 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -31,13 +31,15 @@ #define BUF_SIZE 1024 +typedef struct headset headset_t; + const char *headset_get(const bdaddr_t *bda); const char *headset_add(const bdaddr_t *bda); -void headset_remove(const char *path); +headset_t *headset_init(const char *path); -int headset_init(DBusConnection *conn); +int headset_server_init(DBusConnection *conn); void headset_exit(void); -- cgit From 6023817d9880a2d71516416b010555f041ec187d Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 15 May 2007 12:50:13 +0000 Subject: Remove unused functions and defines from the header file --- audio/headset.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index de8e8a38..b06f1c60 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -29,14 +29,8 @@ #define AUDIO_HEADSET_INTERFACE "org.bluez.audio.Headset" -#define BUF_SIZE 1024 - typedef struct headset headset_t; -const char *headset_get(const bdaddr_t *bda); - -const char *headset_add(const bdaddr_t *bda); - headset_t *headset_init(const char *path); int headset_server_init(DBusConnection *conn); -- cgit From fb1612c37310e09e8503a113c0114c0ba9584c99 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 18 May 2007 18:26:56 +0000 Subject: Update code to match more closely to API description --- audio/headset.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index b06f1c60..06ee8483 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -33,6 +33,8 @@ typedef struct headset headset_t; headset_t *headset_init(const char *path); +gboolean headset_is_connected(headset_t *headset); + int headset_server_init(DBusConnection *conn); void headset_exit(void); -- cgit From 723fde49c5c473d01a739b116cb674623ed5a40e Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sat, 19 May 2007 01:18:39 +0000 Subject: Implement CreateDevice, associated SDP discovery and other necessary changes --- audio/headset.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 06ee8483..3ccbf8b2 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -24,6 +24,8 @@ #define __AUDIO_HEADSET_H #include +#include +#include #include @@ -31,7 +33,7 @@ typedef struct headset headset_t; -headset_t *headset_init(const char *path); +headset_t *headset_init(const char *object_path, sdp_record_t *record); gboolean headset_is_connected(headset_t *headset); -- cgit From 04efa14f48878cd1c1a31afc106f782fc97277a0 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 31 May 2007 09:23:17 +0000 Subject: Bring the audio code up-to-date with the current API spec --- audio/headset.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 3ccbf8b2..c02f36a3 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -33,11 +33,16 @@ typedef struct headset headset_t; -headset_t *headset_init(const char *object_path, sdp_record_t *record); +headset_t *headset_init(const char *object_path, sdp_record_t *record, + uint16_t svc); + +void headset_free(const char *object_path); + +void headset_update(headset_t *headset, sdp_record_t *record, uint16_t svc); gboolean headset_is_connected(headset_t *headset); -int headset_server_init(DBusConnection *conn); +int headset_server_init(DBusConnection *conn, gboolean disable_hfp); void headset_exit(void); -- cgit From 814aed96a2c0afa4218cc4384425934fd30faa68 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 31 May 2007 12:51:49 +0000 Subject: Add support for configuration file --- audio/headset.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index c02f36a3..0325e755 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -42,7 +42,8 @@ void headset_update(headset_t *headset, sdp_record_t *record, uint16_t svc); gboolean headset_is_connected(headset_t *headset); -int headset_server_init(DBusConnection *conn, gboolean disable_hfp); +int headset_server_init(DBusConnection *conn, gboolean disable_hfp, + gboolean sco_hci); void headset_exit(void); -- cgit From f1a8e719f5687bb32f2f5ed59f26a3203ad43efb Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 6 Jun 2007 17:58:19 +0000 Subject: Some fixes for audio code prototype. --- audio/headset.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 0325e755..6780e7a9 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -29,6 +29,8 @@ #include +#include "ipc.h" + #define AUDIO_HEADSET_INTERFACE "org.bluez.audio.Headset" typedef struct headset headset_t; @@ -47,4 +49,6 @@ int headset_server_init(DBusConnection *conn, gboolean disable_hfp, void headset_exit(void); +int headset_get_config(headset_t *headset, struct ipc_data_cfg *cfg); + #endif /* __AUDIO_HEADSET_H_ */ -- cgit From eb0899c1c7137ece8c0e5e5ec031cb2b9b4262e3 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 18 Jun 2007 21:08:35 +0000 Subject: Make deprecated headset methods to rely on new device methods. --- audio/headset.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 6780e7a9..b420860e 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -29,7 +29,7 @@ #include -#include "ipc.h" +#include "unix.h" #define AUDIO_HEADSET_INTERFACE "org.bluez.audio.Headset" @@ -49,6 +49,6 @@ int headset_server_init(DBusConnection *conn, gboolean disable_hfp, void headset_exit(void); -int headset_get_config(headset_t *headset, struct ipc_data_cfg *cfg); +int headset_get_config(headset_t *headset, int sock, struct ipc_data_cfg *cfg); #endif /* __AUDIO_HEADSET_H_ */ -- cgit From 22dd53fe6ef9783c3357a6da1ecedd3b01bb7003 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 22 Jun 2007 20:58:12 +0000 Subject: Update build to make use of newly create files. --- audio/headset.h | 49 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index b420860e..470fddc8 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -20,10 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ -#ifndef __AUDIO_HEADSET_H -#define __AUDIO_HEADSET_H - -#include #include #include @@ -33,22 +29,45 @@ #define AUDIO_HEADSET_INTERFACE "org.bluez.audio.Headset" -typedef struct headset headset_t; +#define DEFAULT_HS_AG_CHANNEL 12 +#define DEFAULT_HF_AG_CHANNEL 13 -headset_t *headset_init(const char *object_path, sdp_record_t *record, - uint16_t svc); +typedef enum { + HEADSET_EVENT_KEYPRESS, + HEADSET_EVENT_GAIN, + HEADSET_EVENT_UNKNOWN, + HEADSET_EVENT_INVALID +} headset_event_t; + +typedef enum { + HEADSET_STATE_DISCONNECTED = 0, + HEADSET_STATE_CONNECT_IN_PROGRESS, + HEADSET_STATE_CONNECTED, + HEADSET_STATE_PLAY_IN_PROGRESS, + HEADSET_STATE_PLAYING, +} headset_state_t; -void headset_free(const char *object_path); +typedef enum { + SVC_HEADSET, + SVC_HANDSFREE +} headset_type_t; + +struct headset; + +struct headset *headset_init(void *device, sdp_record_t *record, + uint16_t svc); -void headset_update(headset_t *headset, sdp_record_t *record, uint16_t svc); +void headset_free(void *device); -gboolean headset_is_connected(headset_t *headset); +void headset_update(void *device, sdp_record_t *record, uint16_t svc); -int headset_server_init(DBusConnection *conn, gboolean disable_hfp, - gboolean sco_hci); +int headset_get_config(void *device, int sock, struct ipc_packet *pkt); -void headset_exit(void); +headset_type_t headset_get_type(void *device); +void headset_set_type(void *device, headset_type_t type); -int headset_get_config(headset_t *headset, int sock, struct ipc_data_cfg *cfg); +int headset_connect_rfcomm(void *device, int sock); +int headset_close_rfcomm(void *device); -#endif /* __AUDIO_HEADSET_H_ */ +headset_state_t headset_get_state(void *device); +void headset_set_state(void *device, headset_state_t state); -- cgit From c205cc889023e733e56365e82dfbaad2d2b46942 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 27 Jun 2007 16:58:19 +0000 Subject: Make headset also connect rfcomm when it demands, remove asserts and some code cleanups. --- audio/headset.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 470fddc8..8ef08249 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -55,7 +55,7 @@ typedef enum { struct headset; struct headset *headset_init(void *device, sdp_record_t *record, - uint16_t svc); + uint16_t svc, int channel); void headset_free(void *device); @@ -71,3 +71,5 @@ int headset_close_rfcomm(void *device); headset_state_t headset_get_state(void *device); void headset_set_state(void *device, headset_state_t state); + +int headset_get_channel(void *device); -- cgit From 389d6a32fa14abefec394b9ebfa3b2deb51489c7 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 27 Jun 2007 18:31:08 +0000 Subject: Revert changes on storage, rfcomm might change over time. --- audio/headset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 8ef08249..c858d206 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -55,7 +55,7 @@ typedef enum { struct headset; struct headset *headset_init(void *device, sdp_record_t *record, - uint16_t svc, int channel); + uint16_t svc); void headset_free(void *device); -- cgit From 66d48b0ac25c85de354f26782a377d0ad91bd322 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 10 Jul 2007 13:34:57 +0000 Subject: Code cleanup. --- audio/headset.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index c858d206..d3fd86d9 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -40,11 +40,11 @@ typedef enum { } headset_event_t; typedef enum { - HEADSET_STATE_DISCONNECTED = 0, - HEADSET_STATE_CONNECT_IN_PROGRESS, - HEADSET_STATE_CONNECTED, - HEADSET_STATE_PLAY_IN_PROGRESS, - HEADSET_STATE_PLAYING, + HEADSET_STATE_DISCONNECTED = STATE_DISCONNECTED, + HEADSET_STATE_CONNECT_IN_PROGRESS = STATE_CONNECTING, + HEADSET_STATE_CONNECTED = STATE_CONNECTED, + HEADSET_STATE_PLAY_IN_PROGRESS = STATE_STREAM_STARTING, + HEADSET_STATE_PLAYING = STATE_STREAMING, } headset_state_t; typedef enum { -- cgit From 6763ebb3c231740c66a235f94d56e8d8cc213d90 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sat, 11 Aug 2007 11:05:24 +0000 Subject: Integrate A2DP work from Johan's and Luiz's GIT trees --- audio/headset.h | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index d3fd86d9..530bdea8 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -20,12 +20,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ +#ifndef __AUDIO_HEADSET_H__ +#define __AUDIO_HEADSET_H__ + #include #include #include -#include "unix.h" +#include "ipc.h" #define AUDIO_HEADSET_INTERFACE "org.bluez.audio.Headset" @@ -40,11 +43,11 @@ typedef enum { } headset_event_t; typedef enum { - HEADSET_STATE_DISCONNECTED = STATE_DISCONNECTED, - HEADSET_STATE_CONNECT_IN_PROGRESS = STATE_CONNECTING, - HEADSET_STATE_CONNECTED = STATE_CONNECTED, - HEADSET_STATE_PLAY_IN_PROGRESS = STATE_STREAM_STARTING, - HEADSET_STATE_PLAYING = STATE_STREAMING, + HEADSET_STATE_DISCONNECTED, + HEADSET_STATE_CONNECT_IN_PROGRESS, + HEADSET_STATE_CONNECTED, + HEADSET_STATE_PLAY_IN_PROGRESS, + HEADSET_STATE_PLAYING } headset_state_t; typedef enum { @@ -55,13 +58,14 @@ typedef enum { struct headset; struct headset *headset_init(void *device, sdp_record_t *record, - uint16_t svc); + uint16_t svc); void headset_free(void *device); void headset_update(void *device, sdp_record_t *record, uint16_t svc); -int headset_get_config(void *device, int sock, struct ipc_packet *pkt); +int headset_get_config(void *device, int sock, struct ipc_packet *pkt, + int pkt_len, struct ipc_data_cfg **rsp); headset_type_t headset_get_type(void *device); void headset_set_type(void *device, headset_type_t type); @@ -73,3 +77,7 @@ headset_state_t headset_get_state(void *device); void headset_set_state(void *device, headset_state_t state); int headset_get_channel(void *device); + +gboolean headset_is_active(void *device); + +#endif -- cgit From 9494c146cec1df466c2f331957748beeac8d745a Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sat, 11 Aug 2007 15:52:27 +0000 Subject: Remove redundant stream fd from config response --- audio/headset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 530bdea8..db1fef65 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -65,7 +65,7 @@ void headset_free(void *device); void headset_update(void *device, sdp_record_t *record, uint16_t svc); int headset_get_config(void *device, int sock, struct ipc_packet *pkt, - int pkt_len, struct ipc_data_cfg **rsp); + int pkt_len, struct ipc_data_cfg **rsp, int *fd); headset_type_t headset_get_type(void *device); void headset_set_type(void *device, headset_type_t type); -- cgit From d013a1eaa7beebbb49c1fe0015c70ad81566d97c Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sun, 12 Aug 2007 23:58:15 +0000 Subject: Clean up mess with header files --- audio/headset.h | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index db1fef65..ec57f1d8 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -20,15 +20,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ -#ifndef __AUDIO_HEADSET_H__ -#define __AUDIO_HEADSET_H__ - #include #include #include #include "ipc.h" +#include "device.h" #define AUDIO_HEADSET_INTERFACE "org.bluez.audio.Headset" @@ -55,29 +53,25 @@ typedef enum { SVC_HANDSFREE } headset_type_t; -struct headset; - -struct headset *headset_init(void *device, sdp_record_t *record, +struct headset *headset_init(struct device *dev, sdp_record_t *record, uint16_t svc); -void headset_free(void *device); +void headset_free(struct device *dev); -void headset_update(void *device, sdp_record_t *record, uint16_t svc); +void headset_update(struct device *dev, sdp_record_t *record, uint16_t svc); -int headset_get_config(void *device, int sock, struct ipc_packet *pkt, +int headset_get_config(struct device *dev, int sock, struct ipc_packet *pkt, int pkt_len, struct ipc_data_cfg **rsp, int *fd); -headset_type_t headset_get_type(void *device); -void headset_set_type(void *device, headset_type_t type); - -int headset_connect_rfcomm(void *device, int sock); -int headset_close_rfcomm(void *device); +headset_type_t headset_get_type(struct device *dev); +void headset_set_type(struct device *dev, headset_type_t type); -headset_state_t headset_get_state(void *device); -void headset_set_state(void *device, headset_state_t state); +int headset_connect_rfcomm(struct device *dev, int sock); +int headset_close_rfcomm(struct device *dev); -int headset_get_channel(void *device); +headset_state_t headset_get_state(struct device *dev); +void headset_set_state(struct device *dev, headset_state_t state); -gboolean headset_is_active(void *device); +int headset_get_channel(struct device *dev); -#endif +gboolean headset_is_active(struct device *dev); -- cgit From c2833e263d6cfc4cf82f4bfdcc59640a4071aeae Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 13 Aug 2007 08:14:22 +0000 Subject: Remove ifndef protections and includes from .h files --- audio/headset.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index ec57f1d8..2a65d136 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -20,13 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ -#include -#include - -#include - -#include "ipc.h" -#include "device.h" #define AUDIO_HEADSET_INTERFACE "org.bluez.audio.Headset" -- cgit From cdd9e2e17ad674e5fc1a5ed19643880ef61d28c7 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 16 Aug 2007 15:42:10 +0000 Subject: Rework interfacing with the avdtp state machine --- audio/headset.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 2a65d136..29e2e496 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -68,3 +68,8 @@ void headset_set_state(struct device *dev, headset_state_t state); int headset_get_channel(struct device *dev); gboolean headset_is_active(struct device *dev); + +gboolean headset_lock(struct device *dev, void *data); +gboolean headset_unlock(struct device *dev, void *data); +gboolean headset_suspend(struct device *dev, void *data); +gboolean headset_play(struct device *dev, void *data); -- cgit From e1bfc91de96a38616100cc31db7bdb69f2cfbea6 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 27 Aug 2007 11:31:01 +0000 Subject: Convert alsa initiated headset connections to similar callback system that A2DP is already using --- audio/headset.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 29e2e496..31486834 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -46,6 +46,8 @@ typedef enum { SVC_HANDSFREE } headset_type_t; +typedef void (*headset_stream_cb_t) (struct device *dev, void *user_data); + struct headset *headset_init(struct device *dev, sdp_record_t *record, uint16_t svc); @@ -53,8 +55,8 @@ void headset_free(struct device *dev); void headset_update(struct device *dev, sdp_record_t *record, uint16_t svc); -int headset_get_config(struct device *dev, int sock, struct ipc_packet *pkt, - int pkt_len, struct ipc_data_cfg **rsp, int *fd); +unsigned int headset_request_stream(struct device *dev, headset_stream_cb_t cb, + void *user_data); headset_type_t headset_get_type(struct device *dev); void headset_set_type(struct device *dev, headset_type_t type); @@ -67,6 +69,8 @@ void headset_set_state(struct device *dev, headset_state_t state); int headset_get_channel(struct device *dev); +int headset_get_sco_fd(struct device *dev); + gboolean headset_is_active(struct device *dev); gboolean headset_lock(struct device *dev, void *data); -- cgit From d1fb0b25a9882016de70f102408f10101b348e57 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 28 Aug 2007 12:22:29 +0000 Subject: Fix unix client disconnects before headset has been successfully connected --- audio/headset.h | 1 + 1 file changed, 1 insertion(+) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 31486834..3f762815 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -57,6 +57,7 @@ void headset_update(struct device *dev, sdp_record_t *record, uint16_t svc); unsigned int headset_request_stream(struct device *dev, headset_stream_cb_t cb, void *user_data); +gboolean headset_cancel_stream(struct device *dev, unsigned int id); headset_type_t headset_get_type(struct device *dev); void headset_set_type(struct device *dev, headset_type_t type); -- cgit From fc0d501d82773718d0f2d040f786136332c39813 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 31 Aug 2007 10:25:18 +0000 Subject: Cleanup and fixes of stream handling --- audio/headset.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 3f762815..6824e0ce 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -74,7 +74,7 @@ int headset_get_sco_fd(struct device *dev); gboolean headset_is_active(struct device *dev); -gboolean headset_lock(struct device *dev, void *data); -gboolean headset_unlock(struct device *dev, void *data); +gboolean headset_lock(struct device *dev); +gboolean headset_unlock(struct device *dev); gboolean headset_suspend(struct device *dev, void *data); gboolean headset_play(struct device *dev, void *data); -- cgit From ec384afacde8614306abe32cf40c55b795783f0e Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 31 Aug 2007 11:51:43 +0000 Subject: Implement proper locking for headsets --- audio/headset.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'audio/headset.h') 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); -- cgit From de72271829f6bfd21aa6550a2ac6d81e35b53cad Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 23 Oct 2007 17:17:47 +0000 Subject: Update copyright information --- audio/headset.h | 1 + 1 file changed, 1 insertion(+) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 32bf701b..5e19cd9a 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -2,6 +2,7 @@ * * BlueZ - Bluetooth protocol stack for Linux * + * Copyright (C) 2006-2007 Nokia Corporation * Copyright (C) 2004-2007 Marcel Holtmann * * -- cgit From d3a05810c6855dbd8664b29a984726d80f42d3dd Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 11 Dec 2007 14:39:30 +0000 Subject: Fix connecting to hfp headset. (Patch from fdalleau) --- audio/headset.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 5e19cd9a..b151dbd9 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -54,8 +54,8 @@ typedef enum { typedef void (*headset_stream_cb_t) (struct device *dev, void *user_data); -struct headset *headset_init(struct device *dev, sdp_record_t *record, - uint16_t svc); +struct headset *headset_init(struct device *dev, int enable_hfp, + sdp_record_t *record, uint16_t svc); void headset_free(struct device *dev); -- cgit From e83ac56743aa266dbb05b7f8102ae0c73bd1bddf Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 12 Dec 2007 21:05:31 +0000 Subject: Add initial mechanism to handle headset commands. --- audio/headset.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index b151dbd9..179c8a4a 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -27,13 +27,6 @@ #define DEFAULT_HS_AG_CHANNEL 12 #define DEFAULT_HF_AG_CHANNEL 13 -typedef enum { - HEADSET_EVENT_KEYPRESS, - HEADSET_EVENT_GAIN, - HEADSET_EVENT_UNKNOWN, - HEADSET_EVENT_INVALID -} headset_event_t; - typedef enum { HEADSET_STATE_DISCONNECTED, HEADSET_STATE_CONNECT_IN_PROGRESS, @@ -84,3 +77,4 @@ 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); + -- cgit From 4a69d2fface8b45c22050d989ff77e818b6ceca8 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 8 Jan 2008 08:58:14 +0000 Subject: Improve HFP/HSP discovery and connection state tracking --- audio/headset.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 179c8a4a..4869bb36 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -35,11 +35,6 @@ typedef enum { HEADSET_STATE_PLAYING } headset_state_t; -typedef enum { - SVC_HEADSET, - SVC_HANDSFREE -} headset_type_t; - typedef enum { HEADSET_LOCK_READ = 1, HEADSET_LOCK_WRITE = 1 << 1, @@ -47,8 +42,8 @@ typedef enum { typedef void (*headset_stream_cb_t) (struct device *dev, void *user_data); -struct headset *headset_init(struct device *dev, int enable_hfp, - sdp_record_t *record, uint16_t svc); +struct headset *headset_init(struct device *dev, sdp_record_t *record, + uint16_t svc); void headset_free(struct device *dev); @@ -58,8 +53,8 @@ unsigned int headset_request_stream(struct device *dev, headset_stream_cb_t cb, void *user_data); gboolean headset_cancel_stream(struct device *dev, unsigned int id); -headset_type_t headset_get_type(struct device *dev); -void headset_set_type(struct device *dev, headset_type_t type); +gboolean get_hfp_active(struct device *dev); +void set_hfp_active(struct device *dev, gboolean active); int headset_connect_rfcomm(struct device *dev, int sock); int headset_close_rfcomm(struct device *dev); @@ -77,4 +72,3 @@ 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); - -- cgit From 3eb854122f31b55fc4ba56b5ce555c380947f710 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 16 Jan 2008 09:08:26 +0000 Subject: Reorganize audio.conf parsing in a more modular manner --- audio/headset.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 4869bb36..a70ad973 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -47,6 +47,8 @@ struct headset *headset_init(struct device *dev, sdp_record_t *record, void headset_free(struct device *dev); +int headset_config_init(GKeyFile *config); + void headset_update(struct device *dev, sdp_record_t *record, uint16_t svc); unsigned int headset_request_stream(struct device *dev, headset_stream_cb_t cb, -- cgit From 4f47f8ab1c25fb08b37bafe97a88def3e749098c Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 22 Jan 2008 18:01:19 +0000 Subject: Initialize HFP supported features properly --- audio/headset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index a70ad973..67155f73 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -47,7 +47,7 @@ struct headset *headset_init(struct device *dev, sdp_record_t *record, void headset_free(struct device *dev); -int headset_config_init(GKeyFile *config); +uint32_t headset_config_init(GKeyFile *config); void headset_update(struct device *dev, sdp_record_t *record, uint16_t svc); -- cgit From e823c15e43a6f924779e466d434c51157002d9ee Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 2 Feb 2008 03:37:05 +0000 Subject: Update copyright information --- audio/headset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 67155f73..5a61bd56 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -3,7 +3,7 @@ * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2006-2007 Nokia Corporation - * Copyright (C) 2004-2007 Marcel Holtmann + * Copyright (C) 2004-2008 Marcel Holtmann * * * This program is free software; you can redistribute it and/or modify -- cgit From b3f285d83c7dfe446bd7f2460e6f795e22a72d32 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 19 Feb 2008 08:20:22 +0000 Subject: Implement proper HFP SLC handling --- audio/headset.h | 1 + 1 file changed, 1 insertion(+) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 5a61bd56..b218b46e 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -58,6 +58,7 @@ gboolean headset_cancel_stream(struct device *dev, unsigned int id); gboolean get_hfp_active(struct device *dev); void set_hfp_active(struct device *dev, gboolean active); +void headset_set_authorized(struct device *dev); int headset_connect_rfcomm(struct device *dev, int sock); int headset_close_rfcomm(struct device *dev); -- cgit From c30643b049e0d6215f49c77e38092832b5b74179 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 15 May 2008 20:37:45 +0000 Subject: Make audio service to use of bt_*_listen helpers. --- audio/headset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index b218b46e..188971a5 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -59,7 +59,7 @@ gboolean get_hfp_active(struct device *dev); void set_hfp_active(struct device *dev, gboolean active); void headset_set_authorized(struct device *dev); -int headset_connect_rfcomm(struct device *dev, int sock); +int headset_connect_rfcomm(struct device *dev, GIOChannel *chan); int headset_close_rfcomm(struct device *dev); headset_state_t headset_get_state(struct device *dev); -- cgit From caf9fdd6d0183afc3b21d1cd82eb637773c131de Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 29 May 2008 08:05:16 +0000 Subject: Replace struct device with struct audio_device --- audio/headset.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index 188971a5..b61a1015 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -40,38 +40,38 @@ typedef enum { HEADSET_LOCK_WRITE = 1 << 1, } headset_lock_t; -typedef void (*headset_stream_cb_t) (struct device *dev, void *user_data); +typedef void (*headset_stream_cb_t) (struct audio_device *dev, void *user_data); -struct headset *headset_init(struct device *dev, sdp_record_t *record, +struct headset *headset_init(struct audio_device *dev, sdp_record_t *record, uint16_t svc); -void headset_free(struct device *dev); +void headset_free(struct audio_device *dev); uint32_t headset_config_init(GKeyFile *config); -void headset_update(struct device *dev, sdp_record_t *record, uint16_t svc); +void headset_update(struct audio_device *dev, sdp_record_t *record, uint16_t svc); -unsigned int headset_request_stream(struct device *dev, headset_stream_cb_t cb, - void *user_data); -gboolean headset_cancel_stream(struct device *dev, unsigned int id); +unsigned int headset_request_stream(struct audio_device *dev, + headset_stream_cb_t cb, void *user_data); +gboolean headset_cancel_stream(struct audio_device *dev, unsigned int id); -gboolean get_hfp_active(struct device *dev); -void set_hfp_active(struct device *dev, gboolean active); +gboolean get_hfp_active(struct audio_device *dev); +void set_hfp_active(struct audio_device *dev, gboolean active); -void headset_set_authorized(struct device *dev); -int headset_connect_rfcomm(struct device *dev, GIOChannel *chan); -int headset_close_rfcomm(struct device *dev); +void headset_set_authorized(struct audio_device *dev); +int headset_connect_rfcomm(struct audio_device *dev, GIOChannel *chan); +int headset_close_rfcomm(struct audio_device *dev); -headset_state_t headset_get_state(struct device *dev); -void headset_set_state(struct device *dev, headset_state_t state); +headset_state_t headset_get_state(struct audio_device *dev); +void headset_set_state(struct audio_device *dev, headset_state_t state); -int headset_get_channel(struct device *dev); +int headset_get_channel(struct audio_device *dev); -int headset_get_sco_fd(struct device *dev); +int headset_get_sco_fd(struct audio_device *dev); -gboolean headset_is_active(struct device *dev); +gboolean headset_is_active(struct audio_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); +gboolean headset_lock(struct audio_device *dev, headset_lock_t lock); +gboolean headset_unlock(struct audio_device *dev, headset_lock_t lock); +gboolean headset_suspend(struct audio_device *dev, void *data); +gboolean headset_play(struct audio_device *dev, void *data); -- cgit