summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio_a2dp_hw/audio_a2dp_hw.c24
-rw-r--r--conf/bt_stack.conf20
-rwxr-xr-x[-rw-r--r--]hci/src/bt_hci_bdroid.c2
-rwxr-xr-x[-rw-r--r--]hci/src/userial.c2
4 files changed, 26 insertions, 22 deletions
diff --git a/audio_a2dp_hw/audio_a2dp_hw.c b/audio_a2dp_hw/audio_a2dp_hw.c
index fcbe718..9f29313 100644
--- a/audio_a2dp_hw/audio_a2dp_hw.c
+++ b/audio_a2dp_hw/audio_a2dp_hw.c
@@ -74,7 +74,7 @@
#include "audio_a2dp_hw.h"
#define LOG_TAG "audio_a2dp_hw"
-#define LOG_NDEBUG 0
+/* #define LOG_NDEBUG 0 */
#include <cutils/log.h>
/*****************************************************************************
@@ -226,7 +226,7 @@ static int skt_connect(struct a2dp_stream_out *out, char *path)
if(socket_local_client_connect(skt_fd, path,
ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM) < 0)
{
- DEBUG("failed to connect (%s)", strerror(errno));
+ ALOGE("failed to connect (%s)", strerror(errno));
close(skt_fd);
return -1;
}
@@ -236,7 +236,7 @@ static int skt_connect(struct a2dp_stream_out *out, char *path)
/* only issue warning if failed */
if (ret < 0)
- DEBUG("setsockopt failed (%s)", strerror(errno));
+ ALOGE("setsockopt failed (%s)", strerror(errno));
DEBUG("connected to stack fd = %d", skt_fd);
@@ -263,7 +263,7 @@ static int skt_write(int fd, const void *p, size_t len)
if ((sent = send(fd, p, len, MSG_NOSIGNAL)) == -1)
{
- DEBUG("write failed with errno=%d\n", errno);
+ ALOGE("write failed with errno=%d\n", errno);
return -1;
}
@@ -448,7 +448,7 @@ static int check_a2dp_ready(struct a2dp_stream_out *out)
if (a2dp_command(out, A2DP_CTRL_CMD_CHECK_READY) < 0)
{
- DEBUG("check a2dp ready failed");
+ ALOGE("check a2dp ready failed");
return -1;
}
return 0;
@@ -467,7 +467,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream;
int sent;
- DEBUG("write %d bytes (fd %d)", bytes, out->audio_fd);
+ ALOGV("write %d bytes (fd %d)", bytes, out->audio_fd);
if (out->state == AUDIO_A2DP_STATE_SUSPENDED)
{
@@ -499,7 +499,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
}
else if (out->state != AUDIO_A2DP_STATE_STARTED)
{
- DEBUG("stream not in stopped or standby");
+ ALOGE("stream not in stopped or standby");
return -1;
}
@@ -512,7 +512,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
out->state = AUDIO_A2DP_STATE_STOPPED;
}
- DEBUG("wrote %d bytes out of %d bytes", sent, bytes);
+ ALOGV("wrote %d bytes out of %d bytes", sent, bytes);
return sent;
}
@@ -871,7 +871,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
if (check_a2dp_ready(out) == 0)
break;
- DEBUG("error : a2dp not ready, wait 250 ms and retry");
+ ALOGE("error : a2dp not ready, wait 250 ms and retry");
usleep(250000);
skt_disconnect(out->ctrl_fd);
}
@@ -882,7 +882,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
if (out->ctrl_fd == AUDIO_SKT_DISCONNECTED)
{
- DEBUG("ctrl socket failed to connect (%s)", strerror(errno));
+ ALOGE("ctrl socket failed to connect (%s)", strerror(errno));
ret = -1;
goto err_open;
}
@@ -893,7 +893,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
err_open:
free(out);
*stream_out = NULL;
- DEBUG("failed");
+ ALOGE("failed");
return ret;
}
@@ -1080,7 +1080,7 @@ static int adev_open(const hw_module_t* module, const char* name,
if (strcmp(name, AUDIO_HARDWARE_INTERFACE) != 0)
{
- DEBUG("interface %s not matching [%s]", name, AUDIO_HARDWARE_INTERFACE);
+ ALOGE("interface %s not matching [%s]", name, AUDIO_HARDWARE_INTERFACE);
return -EINVAL;
}
diff --git a/conf/bt_stack.conf b/conf/bt_stack.conf
index 0b16be4..90becc3 100644
--- a/conf/bt_stack.conf
+++ b/conf/bt_stack.conf
@@ -18,16 +18,16 @@ TraceConf=true
# BT_TRACE_LEVEL_DEBUG 5 ( Full debug messages )
TRC_BTM=5
TRC_HCI=5
-TRC_L2CAP=5
-TRC_RFCOMM=5
-TRC_OBEX=5
-TRC_AVCT=5
-TRC_AVDT=5
-TRC_AVRC=5
-TRC_AVDT_SCB=5
-TRC_AVDT_CCB=5
-TRC_A2D=5
+TRC_L2CAP=2
+TRC_RFCOMM=3
+TRC_OBEX=3
+TRC_AVCT=3
+TRC_AVDT=3
+TRC_AVRC=3
+TRC_AVDT_SCB=2
+TRC_AVDT_CCB=2
+TRC_A2D=3
TRC_SDP=5
TRC_GATT=5
TRC_SMP=5
-TRC_BTAPP=5
+TRC_BTAPP=4
diff --git a/hci/src/bt_hci_bdroid.c b/hci/src/bt_hci_bdroid.c
index a655650..19610e5 100644..100755
--- a/hci/src/bt_hci_bdroid.c
+++ b/hci/src/bt_hci_bdroid.c
@@ -63,6 +63,7 @@
#include "utils.h"
#include "hci.h"
#include "userial.h"
+#include <sys/prctl.h>
#ifndef BTHC_DBG
#define BTHC_DBG FALSE
@@ -369,6 +370,7 @@ static void *bt_hc_worker_thread(void *arg)
HC_BT_HDR *p_msg, *p_next_msg;
ALOGI("bt_hc_worker_thread started");
+ prctl(PR_SET_NAME, (unsigned long)"bt_hc_worker", 0, 0, 0);
tx_cmd_pkts_pending = FALSE;
while (lib_running)
diff --git a/hci/src/userial.c b/hci/src/userial.c
index 71f5ae8..2d468b7 100644..100755
--- a/hci/src/userial.c
+++ b/hci/src/userial.c
@@ -65,6 +65,7 @@
#include "userial.h"
#include "utils.h"
#include "bt_vendor_lib.h"
+#include <sys/prctl.h>
/******************************************************************************
** Constants & Macros
@@ -242,6 +243,7 @@ static void *userial_read_thread(void *arg)
uint8_t *p;
USERIALDBG("Entering userial_read_thread()");
+ prctl(PR_SET_NAME, (unsigned long)"userial_read", 0, 0, 0);
rx_flow_on = TRUE;
userial_running = 1;