summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-06-08 21:13:23 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-06-08 21:13:23 +0000
commit6a87d1b7e5ad1046abfcc2e89cc924b6e1d0db67 (patch)
tree567a8f026296b638373836915dd693bd88c4075a /audio
parentb8b8e6b88f04c18b851884341ecfbbc132bed583 (diff)
Have the audio plugin register headset and sink drivers
Diffstat (limited to 'audio')
-rw-r--r--audio/main.c51
1 files changed, 32 insertions, 19 deletions
diff --git a/audio/main.c b/audio/main.c
index 06a2a046..9b780aa0 100644
--- a/audio/main.c
+++ b/audio/main.c
@@ -42,33 +42,42 @@
static DBusConnection *conn;
-static int audio_probe(const char *path)
+static int headset_probe(const char *path)
{
DBG("path %s", path);
return 0;
}
-static void audio_remove(const char *path)
+static void headset_remove(const char *path)
{
DBG("path %s", path);
}
-static struct btd_device_driver audio_driver = {
- .name = "audio",
- .uuids = BTD_UUIDS(
- GENERIC_AUDIO_UUID,
- HSP_HS_UUID,
- HSP_AG_UUID,
- HFP_HS_UUID,
- HFP_AG_UUID,
- ADVANCED_AUDIO_UUID,
- A2DP_SOURCE_UUID,
- A2DP_SINK_UUID,
- AVRCP_REMOTE_UUID,
- AVRCP_TARGET_UUID),
- .probe = audio_probe,
- .remove = audio_remove,
+static struct btd_device_driver headset_driver = {
+ .name = "headset",
+ .uuids = BTD_UUIDS(HSP_HS_UUID, HFP_HS_UUID),
+ .probe = headset_probe,
+ .remove = headset_remove,
+};
+
+static int a2dp_probe(const char *path)
+{
+ DBG("path %s", path);
+
+ return 0;
+}
+
+static void a2dp_remove(const char *path)
+{
+ DBG("path %s", path);
+}
+
+static struct btd_device_driver a2dp_driver = {
+ .name = "sink",
+ .uuids = BTD_UUIDS(A2DP_SINK_UUID),
+ .probe = a2dp_probe,
+ .remove = a2dp_remove,
};
static GKeyFile *load_config_file(const char *file)
@@ -111,14 +120,18 @@ static int audio_init(void)
if (config)
g_key_file_free(config);
- btd_register_device_driver(&audio_driver);
+ btd_register_device_driver(&headset_driver);
+
+ btd_register_device_driver(&a2dp_driver);
return 0;
}
static void audio_exit(void)
{
- btd_unregister_device_driver(&audio_driver);
+ btd_unregister_device_driver(&a2dp_driver);
+
+ btd_unregister_device_driver(&headset_driver);
audio_manager_exit();