From e2827b35575bab20a99a170805a0a59a32fb2c48 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 28 Aug 2007 09:54:21 +0000 Subject: Make SBC Audio Source count configurable and the default value 1 --- audio/manager.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'audio/manager.c') 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, -- cgit