summaryrefslogtreecommitdiffstats
path: root/src/modules/bluetooth/module-bluetooth-discover.c
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@gmail.com>2009-07-24 21:44:36 -0300
committerJoão Paulo Rechi Vita <jprvita@gmail.com>2009-08-23 22:46:56 -0300
commit2772521698caa4ffe7c0c2de174e9d901d7752fd (patch)
tree817154b06b16a5c343602f3bbf2060e756adf36f /src/modules/bluetooth/module-bluetooth-discover.c
parent65c3e6576c635c06103fe44a4987b36de81db7a9 (diff)
bluetooth: add discover of bluetooth sources
Diffstat (limited to 'src/modules/bluetooth/module-bluetooth-discover.c')
-rw-r--r--src/modules/bluetooth/module-bluetooth-discover.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c
index 788fee00..7571e48a 100644
--- a/src/modules/bluetooth/module-bluetooth-discover.c
+++ b/src/modules/bluetooth/module-bluetooth-discover.c
@@ -1,7 +1,7 @@
/***
This file is part of PulseAudio.
- Copyright 2008 Joao Paulo Rechi Vita
+ Copyright 2008-2009 Joao Paulo Rechi Vita
PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -83,8 +83,9 @@ static pa_hook_result_t load_module_for_device(pa_bluetooth_discovery *y, const
mi = pa_hashmap_get(u->hashmap, d->path);
+ pa_log("dead: %d, device_connected: %d, audio_state: %d, audio_source_state: %d", d->dead, d->device_connected, d->audio_state, d->audio_source_state);
if (!d->dead &&
- d->device_connected > 0 && d->audio_state >= PA_BT_AUDIO_STATE_CONNECTED) {
+ d->device_connected > 0 && (d->audio_state >= PA_BT_AUDIO_STATE_CONNECTED || d->audio_source_state >= PA_BT_AUDIO_STATE_CONNECTED)) {
if (!mi) {
pa_module *m = NULL;
@@ -116,6 +117,9 @@ static pa_hook_result_t load_module_for_device(pa_bluetooth_discovery *y, const
}
#endif
+ if (d->audio_source_state >= PA_BT_AUDIO_STATE_CONNECTED)
+ args = pa_sprintf_malloc("%s profile=\"a2dp_source\"", args);
+
pa_log_debug("Loading module-bluetooth-device %s", args);
m = pa_module_load(u->module->core, "module-bluetooth-device", args);
pa_xfree(args);