From c1d42542b9537ffd6330c2add727456c3f21a8cb Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 25 Jun 2012 12:06:18 +0300 Subject: [PATCH] audio: Remove local A2DP endpoints options The local endpoints are no use without the internal IPC. --- audio/a2dp.c | 72 +----------------------------------------------- audio/audio.conf | 5 ---- 2 files changed, 1 insertion(+), 76 deletions(-) diff --git a/audio/a2dp.c b/audio/a2dp.c index 89cb229cc..db4bb1398 100644 --- a/audio/a2dp.c +++ b/audio/a2dp.c @@ -1438,13 +1438,10 @@ static struct a2dp_server *find_server(GSList *list, const bdaddr_t *src) int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config) { - int sbc_srcs = 0, sbc_sinks = 0; - int mpeg12_srcs = 0, mpeg12_sinks = 0; - gboolean source = TRUE, sink = FALSE, socket = FALSE; + gboolean source = TRUE, sink = FALSE; gboolean delay_reporting = FALSE; char *str; GError *err = NULL; - int i; struct a2dp_server *server; if (!config) @@ -1460,8 +1457,6 @@ int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config) source = TRUE; if (strstr(str, "Source")) sink = TRUE; - if (strstr(str, "Socket")) - socket = TRUE; g_free(str); } @@ -1475,50 +1470,6 @@ int a2dp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config) source = FALSE; if (strstr(str, "Source")) sink = FALSE; - if (strstr(str, "Socket")) - socket = FALSE; - g_free(str); - } - - /* Don't register any local sep if Socket is disabled */ - if (socket == FALSE) - goto proceed; - - str = g_key_file_get_string(config, "A2DP", "SBCSources", &err); - if (err) { - DBG("audio.conf: %s", err->message); - g_clear_error(&err); - sbc_srcs = 1; - } else { - sbc_srcs = atoi(str); - g_free(str); - } - - str = g_key_file_get_string(config, "A2DP", "MPEG12Sources", &err); - if (err) { - DBG("audio.conf: %s", err->message); - g_clear_error(&err); - } else { - mpeg12_srcs = atoi(str); - g_free(str); - } - - str = g_key_file_get_string(config, "A2DP", "SBCSinks", &err); - if (err) { - DBG("audio.conf: %s", err->message); - g_clear_error(&err); - sbc_sinks = 1; - } else { - sbc_sinks = atoi(str); - g_free(str); - } - - str = g_key_file_get_string(config, "A2DP", "MPEG12Sinks", &err); - if (err) { - DBG("audio.conf: %s", err->message); - g_clear_error(&err); - } else { - mpeg12_sinks = atoi(str); g_free(str); } @@ -1552,29 +1503,8 @@ proceed: server->version = 0x0102; server->source_enabled = source; - if (source) { - for (i = 0; i < sbc_srcs; i++) - a2dp_add_sep(src, AVDTP_SEP_TYPE_SOURCE, - A2DP_CODEC_SBC, delay_reporting, - NULL, NULL, NULL, NULL); - for (i = 0; i < mpeg12_srcs; i++) - a2dp_add_sep(src, AVDTP_SEP_TYPE_SOURCE, - A2DP_CODEC_MPEG12, delay_reporting, - NULL, NULL, NULL, NULL); - } server->sink_enabled = sink; - if (sink) { - for (i = 0; i < sbc_sinks; i++) - a2dp_add_sep(src, AVDTP_SEP_TYPE_SINK, - A2DP_CODEC_SBC, delay_reporting, - NULL, NULL, NULL, NULL); - - for (i = 0; i < mpeg12_sinks; i++) - a2dp_add_sep(src, AVDTP_SEP_TYPE_SINK, - A2DP_CODEC_MPEG12, delay_reporting, - NULL, NULL, NULL, NULL); - } return 0; } diff --git a/audio/audio.conf b/audio/audio.conf index b6e55075a..9414c0732 100644 --- a/audio/audio.conf +++ b/audio/audio.conf @@ -38,8 +38,3 @@ MaxConnected=1 # scan type changed to interlaced. Such allows faster connection initiated # by a headset. FastConnectable=false - -# Just an example of potential config options for the other interfaces -#[A2DP] -#SBCSources=1 -#MPEG12Sources=0 -- 2.47.3