From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 4/5] audio: Remove local A2DP endpoints options
Date: Thu, 14 Jun 2012 16:41:09 +0300 [thread overview]
Message-ID: <1339681270-24425-4-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1339681270-24425-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
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 96137e4..094476e 100644
--- a/audio/a2dp.c
+++ b/audio/a2dp.c
@@ -1436,13 +1436,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)
@@ -1458,8 +1455,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);
}
@@ -1473,50 +1468,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 df47418..290c36f 100644
--- a/audio/audio.conf
+++ b/audio/audio.conf
@@ -43,8 +43,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
--
1.7.10.2
next prev parent reply other threads:[~2012-06-14 13:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-14 13:41 [PATCH BlueZ 1/5] audio: Remove unix socket support Luiz Augusto von Dentz
2012-06-14 13:41 ` [PATCH BlueZ 2/5] audio: Remove ALSA support Luiz Augusto von Dentz
2012-06-14 13:41 ` =?y?q?=5BPATCH=20BlueZ=203/5=5D=20audio=3A=20Remove=20internal=20audio=20IPC?= Luiz Augusto von Dentz
2012-06-14 13:41 ` Luiz Augusto von Dentz [this message]
2012-06-14 13:47 ` [PATCH BlueZ 4/5] audio: Remove local A2DP endpoints options Gustavo Padovan
2012-06-14 13:48 ` Gustavo Padovan
2012-06-14 13:48 ` Luiz Augusto von Dentz
2012-06-14 13:41 ` [PATCH BlueZ 5/5] audio: Remove remaining references to Socket Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339681270-24425-4-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox