summaryrefslogtreecommitdiffstats
path: root/audio/manager.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-01-23 13:27:30 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-01-23 13:27:30 +0000
commit5b601136563565049e0dc726b67860bc636e03bd (patch)
treea94d2dae627d3beb78ab0f8c7b3e8e7ec324f367 /audio/manager.c
parentf978653b315bc6d9d029dae1206085ba579fced4 (diff)
Add config options for each source.
Diffstat (limited to 'audio/manager.c')
-rw-r--r--audio/manager.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/audio/manager.c b/audio/manager.c
index 931af069..1c8970d1 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -1634,7 +1634,6 @@ static void server_exit(void)
int audio_init(DBusConnection *conn, GKeyFile *config)
{
- int sinks, sources;
char *str;
GError *err = NULL;
@@ -1693,29 +1692,10 @@ int audio_init(DBusConnection *conn, GKeyFile *config)
goto failed;
}
- if (enabled.sink) {
- if (config) {
- str = g_key_file_get_string(config, "A2DP",
- "SourceCount", &err);
- if (err) {
- debug("audio.conf: %s", err->message);
- g_error_free(err);
- err = NULL;
- } else {
- sources = atoi(str);
- g_free(str);
- }
- }
- } else
- sources = 0;
-
- if (enabled.source)
- sinks = 1;
- else
- sinks = 0;
-
- if (a2dp_init(conn, sources, sinks) < 0)
- goto failed;
+ if (enabled.source || enabled.sink) {
+ if (a2dp_init(conn, config) < 0)
+ goto failed;
+ }
if (enabled.control && avrcp_init(conn) < 0)
goto failed;