diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-28 09:54:21 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-28 09:54:21 +0000 |
commit | e2827b35575bab20a99a170805a0a59a32fb2c48 (patch) | |
tree | edb190807b7b969177647edd311e83187cedf5bb /audio/manager.c | |
parent | b72f1302fa22e420431356a61a80f5f045f75c97 (diff) |
Make SBC Audio Source count configurable and the default value 1
Diffstat (limited to 'audio/manager.c')
-rw-r--r-- | audio/manager.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/audio/manager.c b/audio/manager.c index 1228b2cc..54b95538 100644 --- a/audio/manager.c +++ b/audio/manager.c @@ -1567,8 +1567,10 @@ static void server_exit(void) } int audio_init(DBusConnection *conn, struct enabled_interfaces *enable, - gboolean no_hfp, gboolean sco_hci) + gboolean no_hfp, gboolean sco_hci, int source_count) { + int sinks, sources; + connection = dbus_connection_ref(conn); enabled = enable; @@ -1582,7 +1584,17 @@ int audio_init(DBusConnection *conn, struct enabled_interfaces *enable, if (headset_server_init(conn, no_hfp) < 0) goto failed; - if (a2dp_init(conn, enable->sink, enable->source) < 0) + if (enable->sink) + sources = source_count; + else + sources = 0; + + if (enable->source) + sinks = 1; + else + sinks = 0; + + if (a2dp_init(conn, sources, sinks) < 0) goto failed; if (!dbus_connection_register_interface(conn, AUDIO_MANAGER_PATH, |