From 595bced8e7c280e37a75b9bf9c1f36263434041c Mon Sep 17 00:00:00 2001 From: Matthew Xie Date: Sat, 7 Apr 2012 04:41:39 -0700 Subject: replace logx with alogx Conflicts: btif/src/btif_core.c btif/src/btif_dm.c btif/src/btif_hh.c btif/src/btif_sock.c gki/ulinux/gki_ulinux.c hci/include/bt_hci_bdroid.h hci/src/bt_hci_bdroid.c hci/src/btsnoop.c hci/src/hci_h4.c hci/src/userial.c vendor/libvendor/src/hardware.c vendor/libvendor/src/upio.c --- audio_a2dp_hw/audio_a2dp_hw.c | 6 +++--- bta/jv/bta_jv_act.c | 10 +++++----- btif/co/bta_pan_co.c | 40 ++++++++++++++++++++-------------------- btif/include/btif_common.h | 4 ++-- btif/include/btif_sock_util.h | 4 ++-- btif/src/bluetooth.c | 6 +++--- btif/src/btif_av.c | 2 +- btif/src/btif_core.c | 2 +- btif/src/btif_dm.c | 6 +++--- btif/src/btif_hh.c | 16 ++++++++-------- btif/src/btif_hl.c | 4 ++-- btif/src/btif_pan.c | 14 +++++++------- btif/src/btif_rc.c | 2 +- btif/src/btif_sock.c | 8 ++++---- btif/src/btif_sock_rfc.c | 12 ++++++------ btif/src/btif_sock_sdp.c | 8 ++++---- btif/src/btif_sock_thread.c | 8 ++++---- btif/src/btif_sock_util.c | 12 ++++++------ btif/src/btif_storage.c | 6 +++--- gki/ulinux/gki_ulinux.c | 8 ++++---- hci/include/bt_hci_bdroid.h | 1 - hci/src/bt_hci_bdroid.c | 14 +++++++------- hci/src/bt_hw.c | 2 +- hci/src/btsnoop.c | 26 +++++++++++++------------- hci/src/hci_h4.c | 12 ++++++------ hci/src/lpm.c | 12 ++++++------ hci/src/userial.c | 33 ++++++++++++++++----------------- main/bte_conf.c | 16 ++++++++-------- main/bte_logmsg.c | 4 ++-- stack/btu/btu_hcif.c | 10 +++++----- stack/rfcomm/port_api.c | 8 ++++---- stack/rfcomm/port_utils.c | 8 ++++---- udrv/ulinux/unv_linux.c | 6 +++--- 33 files changed, 164 insertions(+), 166 deletions(-) diff --git a/audio_a2dp_hw/audio_a2dp_hw.c b/audio_a2dp_hw/audio_a2dp_hw.c index f253663..fcbf0ae 100755 --- a/audio_a2dp_hw/audio_a2dp_hw.c +++ b/audio_a2dp_hw/audio_a2dp_hw.c @@ -86,8 +86,8 @@ #define CASE_RETURN_STR(const) case const: return #const; -#define FNLOG() LOGV("%s", __FUNCTION__); -#define DEBUG(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define FNLOG() ALOGV("%s", __FUNCTION__); +#define DEBUG(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) #define ASSERTC(cond, msg, val) if (!(cond)) {LOGE("### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);} @@ -528,7 +528,7 @@ static int out_set_sample_rate(struct audio_stream *stream, uint32_t rate) if (rate != AUDIO_STREAM_DEFAULT_RATE) { - LOGE("only rate %d supported", AUDIO_STREAM_DEFAULT_RATE); + ALOGE("only rate %d supported", AUDIO_STREAM_DEFAULT_RATE); return -1; } diff --git a/bta/jv/bta_jv_act.c b/bta/jv/bta_jv_act.c index 795c4db..5f77edb 100644 --- a/bta/jv/bta_jv_act.c +++ b/bta/jv/bta_jv_act.c @@ -33,10 +33,10 @@ #include -#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) -#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) +#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) +#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) @@ -51,7 +51,7 @@ static inline void logu(const char* title, const uint8_t * p_uuid) { char uuids[128]; uuid_to_string((bt_uuid_t*)p_uuid, uuids); - LOGD("%s: %s", title, uuids); + ALOGD("%s: %s", title, uuids); } diff --git a/btif/co/bta_pan_co.c b/btif/co/bta_pan_co.c index 1b6da4f..63f7c6c 100644 --- a/btif/co/bta_pan_co.c +++ b/btif/co/bta_pan_co.c @@ -68,11 +68,11 @@ #include -#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define warn(fmt, ...) LOGW ("## WARNING : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) -#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) -#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) +#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define warn(fmt, ...) ALOGW ("## WARNING : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) +#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) +#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) @@ -90,7 +90,7 @@ UINT8 bta_pan_co_init(UINT8 *q_level) { - LOGD("bta_pan_co_init"); + ALOGD("bta_pan_co_init"); /* set the q_level to 30 buffers */ *q_level = 30; @@ -118,14 +118,14 @@ UINT8 bta_pan_co_init(UINT8 *q_level) void bta_pan_co_open(UINT16 handle, UINT8 app_id, tBTA_PAN_ROLE local_role, tBTA_PAN_ROLE peer_role, BD_ADDR peer_addr) { - LOGD("bta_pan_co_open:app_id:%d, local_role:%d, peer_role:%d, handle:%d", + ALOGD("bta_pan_co_open:app_id:%d, local_role:%d, peer_role:%d, handle:%d", app_id, local_role, peer_role, handle); btpan_conn_t* conn = btpan_find_conn_addr(peer_addr); if(conn == NULL) conn = btpan_new_conn(handle, peer_addr, local_role, peer_role); if(conn) { - LOGD("bta_pan_co_open:tap_fd:%d, open_count:%d, conn->handle:%d should = handle:%d, local_role:%d, remote_role:%d", + ALOGD("bta_pan_co_open:tap_fd:%d, open_count:%d, conn->handle:%d should = handle:%d, local_role:%d, remote_role:%d", btpan_cb.tap_fd, btpan_cb.open_count, conn->handle, handle, conn->local_role, conn->remote_role); //refresh the role & bt address @@ -160,11 +160,11 @@ void bta_pan_co_open(UINT16 handle, UINT8 app_id, tBTA_PAN_ROLE local_role, tBTA *******************************************************************************/ void bta_pan_co_close(UINT16 handle, UINT8 app_id) { - LOGD("bta_pan_co_close:app_id:%d, handle:%d", app_id, handle); + ALOGD("bta_pan_co_close:app_id:%d, handle:%d", app_id, handle); btpan_conn_t* conn = btpan_find_conn_handle(handle); if(conn && conn->state == PAN_STATE_OPEN) { - LOGD("bta_pan_co_close"); + ALOGD("bta_pan_co_close"); // let bta close event reset this handle as it needs // the handle to find the connection upon CLOSE @@ -211,12 +211,12 @@ void bta_pan_co_tx_path(UINT16 handle, UINT8 app_id) BOOLEAN ext; BOOLEAN forward; - LOGD("bta_pan_co_tx_path, handle:%d, app_id:%d", handle, app_id); + ALOGD("bta_pan_co_tx_path, handle:%d, app_id:%d", handle, app_id); btpan_conn_t* conn = btpan_find_conn_handle(handle); if(conn && conn->state != PAN_STATE_OPEN) { - LOGE("bta_pan_co_tx_path: cannot find pan connction or conn is not opened, conn:%p, conn->state:%d", conn, conn->state); + ALOGE("bta_pan_co_tx_path: cannot find pan connction or conn is not opened, conn:%p, conn->state:%d", conn, conn->state); return; } do @@ -226,10 +226,10 @@ void bta_pan_co_tx_path(UINT16 handle, UINT8 app_id) if ((p_buf = bta_pan_ci_readbuf(handle, src, dst, &protocol, &ext, &forward))) { - LOGD("bta_pan_co_tx_path, calling btapp_tap_send, p_buf->len:%d, offset:%d", p_buf->len, p_buf->offset); + ALOGD("bta_pan_co_tx_path, calling btapp_tap_send, p_buf->len:%d, offset:%d", p_buf->len, p_buf->offset); if(is_empty_eth_addr(conn->eth_addr) && is_valid_bt_eth_addr(src)) { - LOGD("pan bt peer addr: %02x:%02x:%02x:%02x:%02x:%02x, update its ethernet addr: %02x:%02x:%02x:%02x:%02x:%02x", + ALOGD("pan bt peer addr: %02x:%02x:%02x:%02x:%02x:%02x, update its ethernet addr: %02x:%02x:%02x:%02x:%02x:%02x", conn->peer[0], conn->peer[1], conn->peer[2], conn->peer[3],conn->peer[4], conn->peer[5], src[0], src[1], src[2], src[3],src[4], src[5]); memcpy(conn->eth_addr, src, sizeof(conn->eth_addr)); @@ -261,7 +261,7 @@ void bta_pan_co_rx_path(UINT16 handle, UINT8 app_id) UINT8 i; - LOGD("bta_pan_co_rx_path not used"); + ALOGD("bta_pan_co_rx_path not used"); } @@ -282,7 +282,7 @@ void bta_pan_co_rx_path(UINT16 handle, UINT8 app_id) void bta_pan_co_tx_write(UINT16 handle, UINT8 app_id, BD_ADDR src, BD_ADDR dst, UINT16 protocol, UINT8 *p_data, UINT16 len, BOOLEAN ext, BOOLEAN forward) { - LOGD("bta_pan_co_tx_write not used"); + ALOGD("bta_pan_co_tx_write not used"); } @@ -303,7 +303,7 @@ void bta_pan_co_tx_writebuf(UINT16 handle, UINT8 app_id, BD_ADDR src, BD_ADDR d BOOLEAN ext, BOOLEAN forward) { - LOGD("bta_pan_co_tx_writebuf not used"); + ALOGD("bta_pan_co_tx_writebuf not used"); } @@ -325,7 +325,7 @@ void bta_pan_co_tx_writebuf(UINT16 handle, UINT8 app_id, BD_ADDR src, BD_ADDR d void bta_pan_co_rx_flow(UINT16 handle, UINT8 app_id, BOOLEAN enable) { - LOGD("bta_pan_co_rx_flow, enabled:%d, not used", enable); + ALOGD("bta_pan_co_rx_flow, enabled:%d, not used", enable); } @@ -342,7 +342,7 @@ void bta_pan_co_rx_flow(UINT16 handle, UINT8 app_id, BOOLEAN enable) void bta_pan_co_pfilt_ind(UINT16 handle, BOOLEAN indication, tBTA_PAN_STATUS result, UINT16 len, UINT8 *p_filters) { - LOGD("bta_pan_co_pfilt_ind"); + ALOGD("bta_pan_co_pfilt_ind"); } /******************************************************************************* @@ -358,6 +358,6 @@ void bta_pan_co_mfilt_ind(UINT16 handle, BOOLEAN indication, tBTA_PAN_STATUS res UINT16 len, UINT8 *p_filters) { - LOGD("bta_pan_co_mfilt_ind"); + ALOGD("bta_pan_co_mfilt_ind"); } diff --git a/btif/include/btif_common.h b/btif/include/btif_common.h index 5613004..8e5c275 100644 --- a/btif/include/btif_common.h +++ b/btif/include/btif_common.h @@ -70,7 +70,7 @@ ** Constants & Macros ************************************************************************************/ -#define ASSERTC(cond, msg, val) if (!(cond)) {LOGE("### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);} +#define ASSERTC(cond, msg, val) if (!(cond)) {ALOGE("### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);} /* Calculate start of event enumeration; id is top 8 bits of event */ #define BTIF_SIG_START(id) ((id) << 8) @@ -90,7 +90,7 @@ extern bt_callbacks_t *bt_hal_cbacks; #define HAL_CBACK(P_CB, P_CBACK, ...)\ if (P_CB && P_CB->P_CBACK) { \ - LOGD("HAL %s->%s", #P_CB, #P_CBACK); \ + ALOGD("HAL %s->%s", #P_CB, #P_CBACK); \ P_CB->P_CBACK(__VA_ARGS__); \ } \ else { \ diff --git a/btif/include/btif_sock_util.h b/btif/include/btif_sock_util.h index b76bb6f..7a7cff3 100644 --- a/btif/include/btif_sock_util.h +++ b/btif/include/btif_sock_util.h @@ -70,13 +70,13 @@ static inline void lock_slot(pthread_mutex_t* mutex) { if(mutex->value) pthread_mutex_lock(mutex); - else LOGE("mutex: %p is not initialized", mutex); + else ALOGE("mutex: %p is not initialized", mutex); } static inline void unlock_slot(pthread_mutex_t* mutex) { if(mutex->value) pthread_mutex_unlock(mutex); - else LOGE("mutex: %p is not initialized", mutex); + else ALOGE("mutex: %p is not initialized", mutex); } void dump_bin(const char* title, const char* data, int size); int sock_send_fd(int sock_fd, const uint8_t* buffer, int len, int send_fd); diff --git a/btif/src/bluetooth.c b/btif/src/bluetooth.c index 8e4ed0e..b6cbc39 100644 --- a/btif/src/bluetooth.c +++ b/btif/src/bluetooth.c @@ -131,7 +131,7 @@ static uint8_t interface_ready(void) static int init(bt_callbacks_t* callbacks ) { - LOGI("init"); + ALOGI("init"); /* sanity check */ if (interface_ready() == TRUE) @@ -150,7 +150,7 @@ static int init(bt_callbacks_t* callbacks ) static int enable( void ) { - LOGI("enable"); + ALOGI("enable"); /* sanity check */ if (interface_ready() == FALSE) @@ -320,7 +320,7 @@ static int ssp_reply(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t variant, static const void* get_profile_interface (const char *profile_id) { - LOGI("get_profile_interface %s", profile_id); + ALOGI("get_profile_interface %s", profile_id); /* sanity check */ if (interface_ready() == FALSE) diff --git a/btif/src/btif_av.c b/btif/src/btif_av.c index 512ae61..80bee96 100755 --- a/btif/src/btif_av.c +++ b/btif/src/btif_av.c @@ -176,7 +176,7 @@ const char *dump_av_sm_state_name(btif_av_state_t state) const char *dump_av_sm_event_name(btif_av_sm_event_t event) { - switch(event) + switch((int)event) { CASE_RETURN_STR(BTA_AV_ENABLE_EVT) CASE_RETURN_STR(BTA_AV_REGISTER_EVT) diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c index 42caf95..0b0734e 100755 --- a/btif/src/btif_core.c +++ b/btif/src/btif_core.c @@ -489,7 +489,7 @@ bt_status_t btif_enable_bluetooth(void) if (btif_core_state != BTIF_CORE_STATE_DISABLED) { - LOGD("not disabled\n"); + ALOGD("not disabled\n"); return BT_STATUS_DONE; } diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index 818085f..265a834 100755 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -671,7 +671,7 @@ static void btif_dm_ssp_cfm_req_evt(tBTA_DM_SP_CFM_REQ *p_ssp_cfm_req) cod = devclass2uint(p_ssp_cfm_req->dev_class); if ( cod == 0) { - LOGD("cod is 0, set as unclassified"); + ALOGD("cod is 0, set as unclassified"); cod = COD_UNCLASSIFIED; } @@ -700,7 +700,7 @@ static void btif_dm_ssp_key_notif_evt(tBTA_DM_SP_KEY_NOTIF *p_ssp_key_notif) cod = devclass2uint(p_ssp_key_notif->dev_class); if ( cod == 0) { - LOGD("cod is 0, set as unclassified"); + ALOGD("cod is 0, set as unclassified"); cod = COD_UNCLASSIFIED; } @@ -865,7 +865,7 @@ static void btif_dm_search_devices_evt (UINT16 event, char *p_param) cod = devclass2uint (p_search_data->inq_res.dev_class); if ( cod == 0) { - LOGD("cod is 0, set as unclassified"); + ALOGD("cod is 0, set as unclassified"); cod = COD_UNCLASSIFIED; } diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c index 7ee7215..c6fd378 100755 --- a/btif/src/btif_hh.c +++ b/btif/src/btif_hh.c @@ -317,7 +317,7 @@ void btif_hh_remove_device(bt_bdaddr_t bd_addr) btif_hh_device_t *p_dev; btif_hh_added_device_t *p_added_dev; - LOGI("%s: bda = %02x:%02x:%02x:%02x:%02x:%02x", __FUNCTION__, + ALOGI("%s: bda = %02x:%02x:%02x:%02x:%02x:%02x", __FUNCTION__, bd_addr.address[0], bd_addr.address[1], bd_addr.address[2], bd_addr.address[3], bd_addr.address[4], bd_addr.address[5]); for (i = 0; i < BTIF_HH_MAX_ADDED_DEV; i++) { @@ -687,7 +687,7 @@ static void btif_hh_upstreams_evt(UINT16 event, char* p_param) return; } if (p_dev->fd < 0) { - LOGE("BTA_HH_GET_DSCP_EVT: Error, failed to find the bthid driver..."); + ALOGE("BTA_HH_GET_DSCP_EVT: Error, failed to find the bthid driver..."); return; } { @@ -791,7 +791,7 @@ static void btif_hh_upstreams_evt(UINT16 event, char* p_param) break; case BTA_HH_API_ERR_EVT : - LOGI("BTA_HH API_ERR"); + ALOGI("BTA_HH API_ERR"); break; @@ -1044,7 +1044,7 @@ static bt_status_t set_info (bt_bdaddr_t *bd_addr, bthh_hid_info_t hid_info ) dscp_info.descriptor.dsc_list = (UINT8 *) GKI_getbuf(dscp_info.descriptor.dl_len); if (dscp_info.descriptor.dsc_list == NULL) { - LOGE("%s: Failed to allocate DSCP for CB", __FUNCTION__); + ALOGE("%s: Failed to allocate DSCP for CB", __FUNCTION__); return BT_STATUS_FAIL; } memcpy(dscp_info.descriptor.dsc_list, &(hid_info.dsc_list), hid_info.dl_len); @@ -1237,7 +1237,7 @@ static bt_status_t get_report (bt_bdaddr_t *bd_addr, bthh_report_type_t reportTy (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]); return BT_STATUS_FAIL; } - else if (reportType <= BTA_HH_RPTT_RESRV || reportType > BTA_HH_RPTT_FEATURE) { + else if ( ((int) reportType) <= BTA_HH_RPTT_RESRV || ((int) reportType) > BTA_HH_RPTT_FEATURE) { BTIF_TRACE_ERROR6(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.", (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]); return BT_STATUS_FAIL; @@ -1282,7 +1282,7 @@ static bt_status_t set_report (bt_bdaddr_t *bd_addr, bthh_report_type_t reportTy (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]); return BT_STATUS_FAIL; } - else if (reportType <= BTA_HH_RPTT_RESRV || reportType > BTA_HH_RPTT_FEATURE) { + else if ( ( (int) reportType) <= BTA_HH_RPTT_RESRV || ( (int) reportType) > BTA_HH_RPTT_FEATURE) { BTIF_TRACE_ERROR6(" Error, device %02X:%02X:%02X:%02X:%02X:%02X not opened.", (*bda)[0], (*bda)[1], (*bda)[2], (*bda)[3], (*bda)[4], (*bda)[5]); return BT_STATUS_FAIL; @@ -1308,7 +1308,7 @@ static bt_status_t set_report (bt_bdaddr_t *bd_addr, bthh_report_type_t reportTy memset(hexbuf, 0, 200); //TODO hex_bytes_filled = ascii_2_hex(report, len, hexbuf); - LOGI("Hex bytes filled, hex value: %d", hex_bytes_filled); + ALOGI("Hex bytes filled, hex value: %d", hex_bytes_filled); if (hex_bytes_filled) { UINT8* pbuf_data; @@ -1410,7 +1410,7 @@ static void cleanup( void ) btif_hh_cb.status = BTIF_HH_DISABLING; for (i = 0; i < BTIF_HH_MAX_HID; i++) { p_dev = &btif_hh_cb.devices[i]; - if (p_dev->dev_status != BTIF_HH_DEV_UNKNOWN && p_dev->fd >= 0) { + if (p_dev->dev_status != BTHH_CONN_STATE_UNKNOWN && p_dev->fd >= 0) { BTIF_TRACE_DEBUG2("%s: Closing bthid.ko fd = %d", __FUNCTION__, p_dev->fd); close(p_dev->fd); p_dev->fd = -1; diff --git a/btif/src/btif_hl.c b/btif/src/btif_hl.c index 2b2ed14..5c3ed84 100755 --- a/btif/src/btif_hl.c +++ b/btif/src/btif_hl.c @@ -1989,7 +1989,7 @@ static void btif_hl_proc_dereg_cfm(tBTA_HL *p_data) { btif_hl_app_cb_t *p_acb; UINT8 app_idx; - int app_id; + int app_id = 0; bthl_app_reg_state_t state = BTHL_APP_REG_STATE_DEREG_SUCCESS; BTIF_TRACE_DEBUG3("%s de-reg status=%d app_handle=%d", __FUNCTION__, p_data->dereg_cfm.status, p_data->dereg_cfm.app_handle); @@ -2401,7 +2401,7 @@ static BOOLEAN btif_hl_proc_sdp_query_cfm(tBTA_HL *p_data){ btif_hl_mcl_cb_t *p_mcb; tBTA_HL_SDP *p_sdp; tBTA_HL_CCH_OPEN_PARAM open_param; - UINT8 app_idx, mcl_idx, sdp_idx; + UINT8 app_idx, mcl_idx, sdp_idx = 0; UINT8 num_recs, i, num_mdeps, j; btif_hl_cch_op_t old_cch_oper; BOOLEAN status =FALSE; diff --git a/btif/src/btif_pan.c b/btif/src/btif_pan.c index 1aa882b..8484bb8 100644 --- a/btif/src/btif_pan.c +++ b/btif/src/btif_pan.c @@ -101,11 +101,11 @@ #include -#define info(fmt, ...) LOGI ("btif_pan: %s(L%d): " fmt,__FUNCTION__, __LINE__, ## __VA_ARGS__) -#define debug(fmt, ...) LOGD ("btif_pan: %s(L%d): " fmt,__FUNCTION__, __LINE__, ## __VA_ARGS__) -#define warn(fmt, ...) LOGW ("btif_pan: ## WARNING : %s(L%d): " fmt "##",__FUNCTION__, __LINE__, ## __VA_ARGS__) -#define error(fmt, ...) LOGE ("btif_pan: ## ERROR : %s(L%d): " fmt "##",__FUNCTION__, __LINE__, ## __VA_ARGS__) -#define asrt(s) if(!(s)) LOGE ("btif_pan: ## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) +#define info(fmt, ...) ALOGI ("btif_pan: %s(L%d): " fmt,__FUNCTION__, __LINE__, ## __VA_ARGS__) +#define debug(fmt, ...) ALOGD ("btif_pan: %s(L%d): " fmt,__FUNCTION__, __LINE__, ## __VA_ARGS__) +#define warn(fmt, ...) ALOGW ("btif_pan: ## WARNING : %s(L%d): " fmt "##",__FUNCTION__, __LINE__, ## __VA_ARGS__) +#define error(fmt, ...) ALOGE ("btif_pan: ## ERROR : %s(L%d): " fmt "##",__FUNCTION__, __LINE__, ## __VA_ARGS__) +#define asrt(s) if(!(s)) ALOGE ("btif_pan: ## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) @@ -463,7 +463,7 @@ int btpan_tap_send(int tap_fd, const BD_ADDR src, const BD_ADDR dst, UINT16 prot memcpy(packet, ð_hdr, sizeof(tETH_HDR)); if(len > 2000) { - LOGE("btpan_tap_send eth packet size:%d is exceeded limit!", len); + ALOGE("btpan_tap_send eth packet size:%d is exceeded limit!", len); return -1; } memcpy(packet + sizeof(tETH_HDR), buf, len); @@ -639,7 +639,7 @@ static void bta_pan_callback_transfer(UINT16 event, char *p_param) { btpan_conn_t* conn = btpan_find_conn_handle(p_data->close.handle); - LOGI("%s: event = BTA_PAN_CLOSE_EVT handle %d", __FUNCTION__, p_data->close.handle); + ALOGI("%s: event = BTA_PAN_CLOSE_EVT handle %d", __FUNCTION__, p_data->close.handle); if(conn && conn->handle >= 0) { diff --git a/btif/src/btif_rc.c b/btif/src/btif_rc.c index a3f631a..248696a 100755 --- a/btif/src/btif_rc.c +++ b/btif/src/btif_rc.c @@ -486,7 +486,7 @@ BOOLEAN btif_rc_get_connected_peer(BD_ADDR peer_addr) /* clear the queued PLAY command. if bSend is TRUE, forward to app */ void btif_rc_check_handle_pending_play (BD_ADDR peer_addr, BOOLEAN bSendToApp) { - LOGV("btapp_rc_check_handle_pending_play: bSendToApp=%d", bSendToApp); + ALOGV("btapp_rc_check_handle_pending_play: bSendToApp=%d", bSendToApp); if (btif_rc_cb.rc_pending_play) { if (bSendToApp) diff --git a/btif/src/btif_sock.c b/btif/src/btif_sock.c index 816d4e3..a687553 100644 --- a/btif/src/btif_sock.c +++ b/btif/src/btif_sock.c @@ -68,10 +68,10 @@ #include "btif_sock_thread.h" #include "btif_sock_rfc.h" #include -#define info(fmt, ...) LOGI ("btif_sock: %s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define debug(fmt, ...) LOGD ("btif_sock: %s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define error(fmt, ...) LOGE ("btif_sock: ## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) -#define asrt(s) if(!(s)) LOGE ("btif_sock: ## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) +#define info(fmt, ...) ALOGI ("btif_sock: %s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define debug(fmt, ...) ALOGD ("btif_sock: %s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define error(fmt, ...) ALOGE ("btif_sock: ## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) +#define asrt(s) if(!(s)) ALOGE ("btif_sock: ## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) static bt_status_t btsock_listen(btsock_type_t type, const char* service_name, const uint8_t* uuid, int channel, int* sock_fd, int flags); diff --git a/btif/src/btif_sock_rfc.c b/btif/src/btif_sock_rfc.c index b921f90..92f59df 100644 --- a/btif/src/btif_sock_rfc.c +++ b/btif/src/btif_sock_rfc.c @@ -85,11 +85,11 @@ #include #include -#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define warn(fmt, ...) LOGW ("## WARNING : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) -#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) -#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) +#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define warn(fmt, ...) ALOGW ("## WARNING : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) +#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) +#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) extern void uuid_to_string(bt_uuid_t *p_uuid, char *str); @@ -97,7 +97,7 @@ static inline void logu(const char* title, const uint8_t * p_uuid) { char uuids[128]; uuid_to_string((bt_uuid_t*)p_uuid, uuids); - LOGD("%s: %s", title, uuids); + ALOGD("%s: %s", title, uuids); } diff --git a/btif/src/btif_sock_sdp.c b/btif/src/btif_sock_sdp.c index b2553e0..5fb6c34 100644 --- a/btif/src/btif_sock_sdp.c +++ b/btif/src/btif_sock_sdp.c @@ -81,10 +81,10 @@ #include "../bta/pb/bta_pbs_int.h" #include "../include/bta_op_api.h" #include -#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) -#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) +#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) +#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) diff --git a/btif/src/btif_sock_thread.c b/btif/src/btif_sock_thread.c index 4229f04..85690c3 100644 --- a/btif/src/btif_sock_thread.c +++ b/btif/src/btif_sock_thread.c @@ -88,10 +88,10 @@ #include "btif_sock_util.h" #include -#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) -#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) +#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) +#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) #define print_events(events) do { \ debug("print poll event:%x", events); \ if (events & POLLIN) debug( " POLLIN "); \ diff --git a/btif/src/btif_sock_util.c b/btif/src/btif_sock_util.c index e16cf9a..7ca30b6 100644 --- a/btif/src/btif_sock_util.c +++ b/btif/src/btif_sock_util.c @@ -97,10 +97,10 @@ #include -#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) -#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) +#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) +#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) int sock_send_all(int sock_fd, const uint8_t* buf, int len) @@ -222,7 +222,7 @@ void dump_bin(const char* title, const char* data, int size) char *line; int i, j, addr; const int width = 16; - LOGD("%s, size:%d, dump started {", title, size); + ALOGD("%s, size:%d, dump started {", title, size); if(size <= 0) return; //write offset @@ -290,6 +290,6 @@ void dump_bin(const char* title, const char* data, int size) //output the line PRINT(line_buff); } - LOGD("%s, size:%d, dump ended }", title, size); + ALOGD("%s, size:%d, dump ended }", title, size); } diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c index ea233b1..e20db60 100755 --- a/btif/src/btif_storage.c +++ b/btif/src/btif_storage.c @@ -722,7 +722,7 @@ int btif_in_load_hid_info_iter_cb(char *key, char *value, void *userdata) dscp_info.descriptor.dsc_list = (UINT8 *) GKI_getbuf(dscp_info.descriptor.dl_len); if (dscp_info.descriptor.dsc_list == NULL) { - LOGE("%s: Failed to allocate DSCP for CB", __FUNCTION__); + ALOGE("%s: Failed to allocate DSCP for CB", __FUNCTION__); return BT_STATUS_FAIL; } for (i = 0; i < dscp_info.descriptor.dl_len; i++) @@ -1744,14 +1744,14 @@ bt_status_t btif_storage_load_autopair_device_list() if (ret < 0) { - LOGE("%s: Failed to create dynamic auto pair blacklist", __FUNCTION__); + ALOGE("%s: Failed to create dynamic auto pair blacklist", __FUNCTION__); return BT_STATUS_FAIL; } fp = fopen (BTIF_AUTO_PAIR_CONF_FILE, "r"); if (fp == NULL) { - LOGE("%s: Failed to open auto pair blacklist conf file at %s", __FUNCTION__,BTIF_AUTO_PAIR_CONF_FILE ); + ALOGE("%s: Failed to open auto pair blacklist conf file at %s", __FUNCTION__,BTIF_AUTO_PAIR_CONF_FILE ); return BT_STATUS_FAIL; } diff --git a/gki/ulinux/gki_ulinux.c b/gki/ulinux/gki_ulinux.c index 8263d2b..98e6f84 100644 --- a/gki/ulinux/gki_ulinux.c +++ b/gki/ulinux/gki_ulinux.c @@ -75,13 +75,13 @@ #define GKI_TICK_TIMER_DEBUG FALSE #endif -#define GKI_INFO(fmt, ...) LOGI ("%s: " fmt, __FUNCTION__, ## __VA_ARGS__) +#define GKI_INFO(fmt, ...) ALOGI ("%s: " fmt, __FUNCTION__, ## __VA_ARGS__) /* always log errors */ -#define GKI_ERROR_LOG(fmt, ...) LOGE ("##### ERROR : %s: " fmt "#####", __FUNCTION__, ## __VA_ARGS__) +#define GKI_ERROR_LOG(fmt, ...) ALOGE ("##### ERROR : %s: " fmt "#####", __FUNCTION__, ## __VA_ARGS__) #if defined (GKI_TICK_TIMER_DEBUG) && (GKI_TICK_TIMER_DEBUG == TRUE) -#define GKI_TIMER_TRACE(fmt, ...) LOGI ("%s: " fmt, __FUNCTION__, ## __VA_ARGS__) +#define GKI_TIMER_TRACE(fmt, ...) ALOGI ("%s: " fmt, __FUNCTION__, ## __VA_ARGS__) #else #define GKI_TIMER_TRACE(fmt, ...) #endif @@ -520,7 +520,7 @@ void GKI_shutdown(void) if ( result < 0 ) { - LOGE( "pthread_join() FAILED: result: %d", result ); + ALOGE( "pthread_join() FAILED: result: %d", result ); } #endif // GKI_ERROR_LOG( "GKI_shutdown(): task %s dead\n", gki_cb.com.OSTName[task_id]); diff --git a/hci/include/bt_hci_bdroid.h b/hci/include/bt_hci_bdroid.h index 2345e74..76d438c 100644 --- a/hci/include/bt_hci_bdroid.h +++ b/hci/include/bt_hci_bdroid.h @@ -179,4 +179,3 @@ extern bt_hc_callbacks_t *bt_hc_cbacks; extern void bthc_signal_event(uint16_t event); #endif /* BT_HCI_BDROID_H */ - diff --git a/hci/src/bt_hci_bdroid.c b/hci/src/bt_hci_bdroid.c index 7e075cb..2450ed5 100644 --- a/hci/src/bt_hci_bdroid.c +++ b/hci/src/bt_hci_bdroid.c @@ -68,7 +68,7 @@ #endif #if (BTHC_DBG == TRUE) -#define BTHCDBG(param, ...) {LOGD(param, ## __VA_ARGS__);} +#define BTHCDBG(param, ...) {ALOGD(param, ## __VA_ARGS__);} #else #define BTHCDBG(param, ...) {} #endif @@ -154,11 +154,11 @@ static int init(const bt_hc_callbacks_t* p_cb, unsigned char *local_bdaddr) struct sched_param param; int policy, result; - LOGI("init"); + ALOGI("init"); if (p_cb == NULL) { - LOGE("init failed with no user callbacks!"); + ALOGE("init failed with no user callbacks!"); return BT_HC_STATUS_FAIL; } @@ -176,7 +176,7 @@ static int init(const bt_hc_callbacks_t* p_cb, unsigned char *local_bdaddr) if (lib_running) { - LOGW("init has been called repeatedly without calling cleanup ?"); + ALOGW("init has been called repeatedly without calling cleanup ?"); } lib_running = 1; @@ -188,7 +188,7 @@ static int init(const bt_hc_callbacks_t* p_cb, unsigned char *local_bdaddr) if (pthread_create(&hc_cb.worker_thread, &thread_attr, \ bt_hc_worker_thread, NULL) != 0) { - LOGE("pthread_create failed!"); + ALOGE("pthread_create failed!"); lib_running = 0; return BT_HC_STATUS_FAIL; } @@ -202,7 +202,7 @@ static int init(const bt_hc_callbacks_t* p_cb, unsigned char *local_bdaddr) result = pthread_setschedparam(hc_cb.worker_thread, policy, ¶m); if (result != 0) { - LOGW("libbt-hci init: pthread_setschedparam failed (%s)", \ + ALOGW("libbt-hci init: pthread_setschedparam failed (%s)", \ strerror(result)); } } @@ -224,7 +224,7 @@ static void set_power(bt_hc_chip_power_state_t state) if (bt_vnd_if) bt_vnd_if->op(BT_VND_OP_POWER_CTRL, &pwr_state); else - LOGE("vendor lib is missing!"); + ALOGE("vendor lib is missing!"); } diff --git a/hci/src/bt_hw.c b/hci/src/bt_hw.c index 1c4a20f..89afa51 100644 --- a/hci/src/bt_hw.c +++ b/hci/src/bt_hw.c @@ -244,7 +244,7 @@ void init_vnd_if(unsigned char *local_bdaddr) } else { - LOGE("!!! Failed to get BtVendorInterface !!!"); + ALOGE("!!! Failed to get BtVendorInterface !!!"); } } diff --git a/hci/src/btsnoop.c b/hci/src/btsnoop.c index 8160963..9b829dc 100644 --- a/hci/src/btsnoop.c +++ b/hci/src/btsnoop.c @@ -90,7 +90,7 @@ #endif #if (BTSNOOP_DBG == TRUE) -#define SNOOPDBG(param, ...) {LOGD(param, ## __VA_ARGS__);} +#define SNOOPDBG(param, ...) {ALOGD(param, ## __VA_ARGS__);} #else #define SNOOPDBG(param, ...) {} #endif @@ -485,13 +485,13 @@ int ext_parser_accept(int port) int size_n; int result = 0; - LOGD("waiting for connection on port %d", port); + ALOGD("waiting for connection on port %d", port); s_listen = socket(AF_INET, SOCK_STREAM, 0); if (s_listen < 0) { - LOGE("listener not created: listen fd %d", s_listen); + ALOGE("listener not created: listen fd %d", s_listen); return -1; } @@ -530,7 +530,7 @@ int ext_parser_accept(int port) return -1; } - LOGD("connected (%d)", s); + ALOGD("connected (%d)", s); return s; } @@ -557,7 +557,7 @@ static int send_ext_parser(char *p, int len) static void ext_parser_detached(void) { - LOGD("ext parser detached"); + ALOGD("ext parser detached"); if (ext_parser_fd>0) close(ext_parser_fd); @@ -571,7 +571,7 @@ static void ext_parser_detached(void) static void interruptFn (int sig) { - LOGD("interruptFn"); + ALOGD("interruptFn"); pthread_exit(0); } @@ -583,7 +583,7 @@ static void ext_parser_thread(void* param) sigemptyset (&sigSet); sigaddset (&sigSet, sig); - LOGD("ext_parser_thread"); + ALOGD("ext_parser_thread"); prctl(PR_SET_NAME, (unsigned long)"BtsnoopExtParser", 0, 0, 0); @@ -599,19 +599,19 @@ static void ext_parser_thread(void* param) ext_parser_fd = fd; - LOGD("ext parser attached on fd %d\n", ext_parser_fd); + ALOGD("ext parser attached on fd %d\n", ext_parser_fd); } while (1); } void btsnoop_stop_listener(void) { - LOGD("btsnoop_init"); + ALOGD("btsnoop_init"); ext_parser_detached(); } void btsnoop_init(void) { - LOGD("btsnoop_init"); + ALOGD("btsnoop_init"); /* always setup ext listener port */ if (pthread_create(&thread_id, NULL, @@ -622,7 +622,7 @@ void btsnoop_init(void) void btsnoop_open(char *p_path) { #if defined(BTSNOOPDISP_INCLUDED) && (BTSNOOPDISP_INCLUDED == TRUE) - LOGD("btsnoop_open"); + ALOGD("btsnoop_open"); btsnoop_log_open(p_path); #endif // BTSNOOPDISP_INCLUDED } @@ -630,14 +630,14 @@ void btsnoop_open(char *p_path) void btsnoop_close(void) { #if defined(BTSNOOPDISP_INCLUDED) && (BTSNOOPDISP_INCLUDED == TRUE) - LOGD("btsnoop_close"); + ALOGD("btsnoop_close"); btsnoop_log_close(); #endif } void btsnoop_cleanup (void) { - LOGD("btsnoop_cleanup"); + ALOGD("btsnoop_cleanup"); pthread_kill(thread_id, SIGUSR2); pthread_join(thread_id, NULL); ext_parser_detached(); diff --git a/hci/src/hci_h4.c b/hci/src/hci_h4.c index e18ee6a..b10d173 100644 --- a/hci/src/hci_h4.c +++ b/hci/src/hci_h4.c @@ -259,7 +259,7 @@ void get_acl_data_length_cback(void *p_mem) if (bt_hc_cbacks) { bt_hc_cbacks->dealloc((TRANSAC) p_buf, (char *) (p_buf + 1)); - LOGE("vendor lib postload completed"); + ALOGE("vendor lib postload completed"); bt_hc_cbacks->postload_cb(NULL, BT_HC_POSTLOAD_SUCCESS); } } @@ -389,7 +389,7 @@ static HC_BT_HDR *acl_rx_frame_buffer_alloc (void) * Drop it. */ if (p_return_buf) { - LOGW("H4 - dropping incomplete ACL frame"); + ALOGW("H4 - dropping incomplete ACL frame"); utils_remove_from_queue(&(p_cb->acl_rx_q), p_return_buf); @@ -788,7 +788,7 @@ uint16_t hci_h4_receive_msg(void) { /* Unknown HCI message type */ /* Drop this byte */ - LOGE("[h4] Unknown HCI message type drop this byte 0x%x", byte); + ALOGE("[h4] Unknown HCI message type drop this byte 0x%x", byte); break; } @@ -871,7 +871,7 @@ uint16_t hci_h4_receive_msg(void) if (p_cb->p_rcv_msg == NULL) { /* Unable to acquire message buffer. */ - LOGE( \ + ALOGE( \ "H4: Unable to acquire buffer for incoming HCI message." \ ); @@ -1003,7 +1003,7 @@ uint8_t hci_h4_send_int_cmd(uint16_t opcode, HC_BT_HDR *p_buf, \ { if (h4_cb.int_cmd_rsp_pending > INT_CMD_PKT_MAX_COUNT) { - LOGE( \ + ALOGE( \ "Allow only %d outstanding internal commands at a time [Reject 0x%04X]"\ , INT_CMD_PKT_MAX_COUNT, opcode); return FALSE; @@ -1067,7 +1067,7 @@ void hci_h4_get_acl_data_length(void) if (bt_hc_cbacks) { - LOGE("vendor lib postload aborted"); + ALOGE("vendor lib postload aborted"); bt_hc_cbacks->postload_cb(NULL, BT_HC_POSTLOAD_FAIL); } } diff --git a/hci/src/lpm.c b/hci/src/lpm.c index c07b37c..74d0809 100644 --- a/hci/src/lpm.c +++ b/hci/src/lpm.c @@ -70,7 +70,7 @@ #endif #if (BTLPM_DBG == TRUE) -#define BTLPMDBG(param, ...) {LOGD(param, ## __VA_ARGS__);} +#define BTLPMDBG(param, ...) {ALOGD(param, ## __VA_ARGS__);} #else #define BTLPMDBG(param, ...) {} #endif @@ -187,7 +187,7 @@ static void lpm_start_transport_idle_timer(void) status = timer_settime(bt_lpm_cb.timer_id, 0, &ts, 0); if (status == -1) - LOGE("[START] Failed to set LPM idle timeout"); + ALOGE("[START] Failed to set LPM idle timeout"); } } @@ -214,7 +214,7 @@ static void lpm_stop_transport_idle_timer(void) status = timer_settime(bt_lpm_cb.timer_id, 0, &ts, 0); if (status == -1) - LOGE("[STOP] Failed to set LPM idle timeout"); + ALOGE("[STOP] Failed to set LPM idle timeout"); } } @@ -316,19 +316,19 @@ void lpm_enable(uint8_t turn_on) { if ((bt_lpm_cb.state!=LPM_DISABLED) && (bt_lpm_cb.state!=LPM_ENABLED)) { - LOGW("Still busy on processing prior LPM enable/disable request..."); + ALOGW("Still busy on processing prior LPM enable/disable request..."); return; } if ((turn_on == TRUE) && (bt_lpm_cb.state == LPM_ENABLED)) { - LOGI("LPM is already on!!!"); + ALOGI("LPM is already on!!!"); if (bt_hc_cbacks) bt_hc_cbacks->lpm_cb(BT_HC_LPM_ENABLED); } else if ((turn_on == FALSE) && (bt_lpm_cb.state == LPM_DISABLED)) { - LOGI("LPM is already off!!!"); + ALOGI("LPM is already off!!!"); if (bt_hc_cbacks) bt_hc_cbacks->lpm_cb(BT_HC_LPM_DISABLED); } diff --git a/hci/src/userial.c b/hci/src/userial.c index 7385480..988f2f8 100644 --- a/hci/src/userial.c +++ b/hci/src/userial.c @@ -75,7 +75,7 @@ #endif #if (USERIAL_DBG == TRUE) -#define USERIALDBG(param, ...) {LOGD(param, ## __VA_ARGS__);} +#define USERIALDBG(param, ...) {ALOGD(param, ## __VA_ARGS__);} #else #define USERIALDBG(param, ...) {} #endif @@ -154,7 +154,7 @@ static inline int create_signal_fds(fd_set* set) { if(signal_fds[0]==0 && socketpair(AF_UNIX, SOCK_STREAM, 0, signal_fds)<0) { - LOGE("create_signal_sockets:socketpair failed, errno: %d", errno); + ALOGE("create_signal_sockets:socketpair failed, errno: %d", errno); return -1; } FD_SET(signal_fds[0], set); @@ -233,15 +233,15 @@ static int select_read(int fd, uint8_t *pbuf, int len) { ret = read(fd, pbuf, (size_t)len); if (0 == ret) - LOGW( "read() returned 0!" ); + ALOGW( "read() returned 0!" ); return ret; } } else if (n < 0) - LOGW( "select() Failed"); + ALOGW( "select() Failed"); else if (n == 0) - LOGW( "Got a select() TIMEOUT"); + ALOGW( "Got a select() TIMEOUT"); } @@ -290,7 +290,7 @@ static void *userial_read_thread(void *arg) { rx_length = 0; utils_delay(100); - LOGW("userial_read_thread() failed to gain buffers"); + ALOGW("userial_read_thread() failed to gain buffers"); continue; } @@ -303,7 +303,7 @@ static void *userial_read_thread(void *arg) } else /* either 0 or < 0 */ { - LOGW("select_read return size <=0:%d, exiting userial_read_thread",\ + ALOGW("select_read return size <=0:%d, exiting userial_read_thread",\ rx_length); /* if we get here, we should have a buffer */ bt_hc_cbacks->dealloc((TRANSAC) p_buf, (char *) (p_buf + 1)); @@ -369,7 +369,7 @@ uint8_t userial_open(uint8_t port, tUSERIAL_CFG *p_cfg) if (port >= MAX_SERIAL_PORT) { - LOGE("Port > MAX_SERIAL_PORT"); + ALOGE("Port > MAX_SERIAL_PORT"); return FALSE; } @@ -380,18 +380,17 @@ uint8_t userial_open(uint8_t port, tUSERIAL_CFG *p_cfg) } else { - LOGE("userial_open: missing vendor lib interface !!!"); - LOGE("userial_open: unable to open UART port"); + ALOGE("userial_open: missing vendor lib interface !!!"); + ALOGE("userial_open: unable to open UART port"); return FALSE; } if (userial_cb.sock == -1) { - LOGE("userial_open: failed to open UART port"); + ALOGE("userial_open: failed to open UART port"); return FALSE; } - USERIALDBG( "sock = %d", userial_cb.sock); userial_cb.port = port; @@ -402,7 +401,7 @@ uint8_t userial_open(uint8_t port, tUSERIAL_CFG *p_cfg) if (pthread_create(&(userial_cb.read_thread), &thread_attr, \ userial_read_thread, NULL) != 0 ) { - LOGE("pthread_create failed!"); + ALOGE("pthread_create failed!"); return FALSE; } @@ -415,7 +414,7 @@ uint8_t userial_open(uint8_t port, tUSERIAL_CFG *p_cfg) result = pthread_setschedparam(userial_cb.read_thread, policy, ¶m); if (result != 0) { - LOGW("userial_open: pthread_setschedparam failed (%s)", \ + ALOGW("userial_open: pthread_setschedparam failed (%s)", \ strerror(result)); } } @@ -521,14 +520,14 @@ void userial_close(void) send_wakeup_signal(USERIAL_RX_EXIT); if ((result=pthread_join(userial_cb.read_thread, NULL)) < 0) - LOGE( "pthread_join() FAILED result:%d", result); + ALOGE( "pthread_join() FAILED result:%d", result); /* Calling vendor-specific part */ if (bt_vnd_if) bt_vnd_if->op(BT_VND_OP_USERIAL_CLOSE, NULL); if ((result=close(userial_cb.sock)) < 0) - LOGE( "close(sock:%d) FAILED result:%d", userial_cb.sock, result); + ALOGE( "close(sock:%d) FAILED result:%d", userial_cb.sock, result); userial_cb.sock = -1; @@ -560,7 +559,7 @@ void userial_change_baud(uint8_t baud) /* change baud rate in settings - leave everything else the same */ userial_cb.cfg.baud = baud; - LOGI("userial_change_rate: Attempting to reopen the UART Port at %i", \ + ALOGI("userial_change_rate: Attempting to reopen the UART Port at %i", \ (unsigned int)userial_baud_tbl[baud]); userial_open(userial_cb.port, &userial_cb.cfg); diff --git a/main/bte_conf.c b/main/bte_conf.c index 662593a..9bd783e 100644 --- a/main/bte_conf.c +++ b/main/bte_conf.c @@ -85,9 +85,9 @@ DEV_CLASS local_device_default_class = {0x40, 0x02, 0x0C}; ** Local type definitions ******************************************************************************/ #define CONF_DBG 0 -#define info(format, ...) LOGI (format, ## __VA_ARGS__) -#define debug(format, ...) if (CONF_DBG) LOGD (format, ## __VA_ARGS__) -#define error(format, ...) LOGE (format, ## __VA_ARGS__) +#define info(format, ...) ALOGI (format, ## __VA_ARGS__) +#define debug(format, ...) if (CONF_DBG) ALOGD (format, ## __VA_ARGS__) +#define error(format, ...) ALOGE (format, ## __VA_ARGS__) #define CONF_KEY_LEN 32 #define CONF_VALUE_LEN 96 @@ -225,7 +225,7 @@ void bte_load_conf(const char *p_path) char line[CONF_MAX_LINE_LEN+1]; /* add 1 for \0 char */ BOOLEAN name_matched; - LOGI("Attempt to load stack conf from %s", p_path); + ALOGI("Attempt to load stack conf from %s", p_path); if ((p_file = fopen(p_path, "r")) != NULL) { @@ -246,7 +246,7 @@ void bte_load_conf(const char *p_path) if (NULL == p_value) { - LOGW("bte_load_conf: missing value for name: %s", p_name); + ALOGW("bte_load_conf: missing value for name: %s", p_name); continue; } @@ -277,7 +277,7 @@ void bte_load_conf(const char *p_path) } else { - LOGI( "bte_load_conf file >%s< not found", p_path); + ALOGI( "bte_load_conf file >%s< not found", p_path); } } @@ -301,7 +301,7 @@ static BOOLEAN bte_parse_did_conf (const char *p_path, UINT32 num, char *p; char line[CONF_MAX_LINE_LEN+1]; /* add 1 for \0 char */ - LOGI("Attempt to load did conf from %s", p_path); + ALOGI("Attempt to load did conf from %s", p_path); if ((p_file = fopen(p_path, "r")) != NULL) { @@ -361,7 +361,7 @@ static BOOLEAN bte_parse_did_conf (const char *p_path, UINT32 num, } else { - LOGI( "bte_parse_did_conf file >%s< not found", p_path); + ALOGI( "bte_parse_did_conf file >%s< not found", p_path); } if (!end_count) end_count = count; diff --git a/main/bte_logmsg.c b/main/bte_logmsg.c index d8121a2..f6a08d2 100644 --- a/main/bte_logmsg.c +++ b/main/bte_logmsg.c @@ -432,7 +432,7 @@ BT_API void BTE_InitTraceLevels( void ) while (p_f_map->trc_name != NULL) { - LOGI("BTE_InitTraceLevels -- %s", p_f_map->trc_name); + ALOGI("BTE_InitTraceLevels -- %s", p_f_map->trc_name); if (p_f_map->p_f) p_f_map->p_f(p_f_map->trace_level); @@ -442,7 +442,7 @@ BT_API void BTE_InitTraceLevels( void ) } else { - LOGI("[bttrc] using compile default trace settings"); + ALOGI("[bttrc] using compile default trace settings"); } #endif } diff --git a/stack/btu/btu_hcif.c b/stack/btu/btu_hcif.c index a4b1888..ebacf93 100644 --- a/stack/btu/btu_hcif.c +++ b/stack/btu/btu_hcif.c @@ -1515,11 +1515,11 @@ void btu_hcif_cmd_timeout (UINT8 controller_id) // btla-specific ++ #if (defined(ANDROID_APP_INCLUDED) && (ANDROID_APP_INCLUDED == TRUE)) - LOGE("######################################################################"); - LOGE("#"); - LOGE("# WARNING : BTU HCI(id=%d) command timeout. opcode=0x%x", controller_id, opcode); - LOGE("#"); - LOGE("######################################################################"); + ALOGE("######################################################################"); + ALOGE("#"); + ALOGE("# WARNING : BTU HCI(id=%d) command timeout. opcode=0x%x", controller_id, opcode); + ALOGE("#"); + ALOGE("######################################################################"); #else BT_TRACE_2 (TRACE_LAYER_HCI, TRACE_TYPE_WARNING, "BTU HCI(id=%d) command timeout. opcode=0x%x", controller_id, opcode); #endif diff --git a/stack/rfcomm/port_api.c b/stack/rfcomm/port_api.c index 50da558..1290ff9 100644 --- a/stack/rfcomm/port_api.c +++ b/stack/rfcomm/port_api.c @@ -25,10 +25,10 @@ #define PORT_BREAK_DURATION 1 #include -#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) -#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) +#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) +#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) /******************************************************************************* ** diff --git a/stack/rfcomm/port_utils.c b/stack/rfcomm/port_utils.c index 6800b46..3de9ec0 100644 --- a/stack/rfcomm/port_utils.c +++ b/stack/rfcomm/port_utils.c @@ -21,10 +21,10 @@ #include "btu.h" #include -#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define error(fmt, ...) LOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) -#define asrt(s) if(!(s)) LOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) +#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define error(fmt, ...) ALOGE ("## ERROR : %s: " fmt "##",__FUNCTION__, ## __VA_ARGS__) +#define asrt(s) if(!(s)) ALOGE ("## %s assert %s failed at line:%d ##",__FUNCTION__, #s, __LINE__) static const tPORT_STATE default_port_pars = diff --git a/udrv/ulinux/unv_linux.c b/udrv/ulinux/unv_linux.c index 75e61c1..773bbe6 100755 --- a/udrv/ulinux/unv_linux.c +++ b/udrv/ulinux/unv_linux.c @@ -77,10 +77,10 @@ ** Constants & Macros ************************************************************************************/ -#define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) -#define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define info(fmt, ...) ALOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) +#define debug(fmt, ...) ALOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) #define verbose(fmt, ...) //LOGD ("%s: " fmt, __FUNCTION__, ## __VA_ARGS__) -#define error(fmt, ...) LOGE ("##### ERROR : %s: " fmt "#####", __FUNCTION__, ## __VA_ARGS__) +#define error(fmt, ...) ALOGE ("##### ERROR : %s: " fmt "#####", __FUNCTION__, ## __VA_ARGS__) #define UNV_DELIM "\r\n" -- cgit v1.1