components/bt: Fix warning when disable debug logs or in release mode and improve the code structure
This commit is contained in:
parent
286202caa3
commit
bbdb236ab7
15 changed files with 54 additions and 26 deletions
|
@ -1268,7 +1268,7 @@ BOOLEAN bta_av_hdl_event(BT_HDR *p_msg)
|
||||||
** Returns char *
|
** Returns char *
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
static char *bta_av_st_code(UINT8 state)
|
UNUSED_ATTR static char *bta_av_st_code(UINT8 state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case BTA_AV_INIT_ST: return "INIT";
|
case BTA_AV_INIT_ST: return "INIT";
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "bta/bta_av_co.h"
|
#include "bta/bta_av_co.h"
|
||||||
#include "bta_av_int.h"
|
#include "bta_av_int.h"
|
||||||
|
#include "osi/osi.h"
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
** Constants and types
|
** Constants and types
|
||||||
|
@ -564,7 +565,7 @@ void bta_av_set_scb_sst_incoming (tBTA_AV_SCB *p_scb)
|
||||||
** Returns char *
|
** Returns char *
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
static char *bta_av_sst_code(UINT8 state)
|
UNUSED_ATTR static char *bta_av_sst_code(UINT8 state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case BTA_AV_INIT_SST: return "INIT";
|
case BTA_AV_INIT_SST: return "INIT";
|
||||||
|
|
|
@ -5777,6 +5777,8 @@ void bta_dm_proc_open_evt(tBTA_GATTC_OPEN *p_data)
|
||||||
((p2[0]) << 24) + ((p2[1]) << 16) + ((p2[2]) << 8) + (p2[3]),
|
((p2[0]) << 24) + ((p2[1]) << 16) + ((p2[2]) << 8) + (p2[3]),
|
||||||
((p2[4]) << 8) + p2[5]);
|
((p2[4]) << 8) + p2[5]);
|
||||||
|
|
||||||
|
UNUSED(p1);
|
||||||
|
UNUSED(p2);
|
||||||
APPL_TRACE_DEBUG("BTA_GATTC_OPEN_EVT conn_id = %d client_if=%d status = %d" ,
|
APPL_TRACE_DEBUG("BTA_GATTC_OPEN_EVT conn_id = %d client_if=%d status = %d" ,
|
||||||
p_data->conn_id,
|
p_data->conn_id,
|
||||||
p_data->client_if,
|
p_data->client_if,
|
||||||
|
|
|
@ -1159,6 +1159,7 @@ static char *bta_hf_client_skip_unknown(char *buffer)
|
||||||
buffer = tmp + 2;
|
buffer = tmp + 2;
|
||||||
|
|
||||||
APPL_TRACE_DEBUG("%s %.*s", __FUNCTION__, buffer - start - 2, start);
|
APPL_TRACE_DEBUG("%s %.*s", __FUNCTION__, buffer - start - 2, start);
|
||||||
|
UNUSED(start);
|
||||||
|
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -308,6 +308,7 @@ static void bta_hf_client_sco_disc_cback(UINT16 sco_idx)
|
||||||
#if (BTM_SCO_HCI_INCLUDED == TRUE )
|
#if (BTM_SCO_HCI_INCLUDED == TRUE )
|
||||||
tBTM_STATUS status = BTM_ConfigScoPath(BTM_SCO_ROUTE_PCM, NULL, NULL, TRUE);
|
tBTM_STATUS status = BTM_ConfigScoPath(BTM_SCO_ROUTE_PCM, NULL, NULL, TRUE);
|
||||||
APPL_TRACE_DEBUG("%s close config status = %d", __FUNCTION__, status);
|
APPL_TRACE_DEBUG("%s close config status = %d", __FUNCTION__, status);
|
||||||
|
UNUSED(status);
|
||||||
/* SCO clean up here */
|
/* SCO clean up here */
|
||||||
bta_hf_client_sco_co_close();
|
bta_hf_client_sco_co_close();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "osi/allocator.h"
|
#include "osi/allocator.h"
|
||||||
|
#include "osi/osi.h"
|
||||||
#include "stack/bt_types.h"
|
#include "stack/bt_types.h"
|
||||||
#include "bta/utl.h"
|
#include "bta/utl.h"
|
||||||
#include "bta/bta_sys.h"
|
#include "bta/bta_sys.h"
|
||||||
|
@ -137,7 +138,7 @@ UINT8 bta_jv_alloc_sec_id(void)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
static int get_sec_id_used(void)
|
UNUSED_ATTR static int get_sec_id_used(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int used = 0;
|
int used = 0;
|
||||||
|
@ -146,12 +147,13 @@ static int get_sec_id_used(void)
|
||||||
used++;
|
used++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (used == BTA_JV_NUM_SERVICE_ID)
|
if (used == BTA_JV_NUM_SERVICE_ID) {
|
||||||
APPL_TRACE_ERROR("get_sec_id_used, sec id exceeds the limit:%d",
|
APPL_TRACE_ERROR("get_sec_id_used, sec id exceeds the limit:%d",
|
||||||
BTA_JV_NUM_SERVICE_ID);
|
BTA_JV_NUM_SERVICE_ID);
|
||||||
|
}
|
||||||
return used;
|
return used;
|
||||||
}
|
}
|
||||||
static int get_rfc_cb_used(void)
|
UNUSED_ATTR static int get_rfc_cb_used(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int used = 0;
|
int used = 0;
|
||||||
|
@ -160,9 +162,10 @@ static int get_rfc_cb_used(void)
|
||||||
used++;
|
used++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (used == BTA_JV_MAX_RFC_CONN)
|
if (used == BTA_JV_MAX_RFC_CONN) {
|
||||||
APPL_TRACE_ERROR("get_sec_id_used, rfc ctrl block exceeds the limit:%d",
|
APPL_TRACE_ERROR("get_sec_id_used, rfc ctrl block exceeds the limit:%d",
|
||||||
BTA_JV_MAX_RFC_CONN);
|
BTA_JV_MAX_RFC_CONN);
|
||||||
|
}
|
||||||
return used;
|
return used;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,19 +477,21 @@ static tBTA_JV_STATUS bta_jv_free_set_pm_profile_cb(UINT32 jv_handle)
|
||||||
< BTA_JV_MAX_RFC_SR_SESSION && bta_jv_cb.rfc_cb[hi].rfc_hdl[si]) {
|
< BTA_JV_MAX_RFC_SR_SESSION && bta_jv_cb.rfc_cb[hi].rfc_hdl[si]) {
|
||||||
tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(bta_jv_cb.rfc_cb[hi].rfc_hdl[si]);
|
tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(bta_jv_cb.rfc_cb[hi].rfc_hdl[si]);
|
||||||
if (p_pcb) {
|
if (p_pcb) {
|
||||||
if (NULL == p_pcb->p_pm_cb)
|
if (NULL == p_pcb->p_pm_cb) {
|
||||||
APPL_TRACE_WARNING("%s(jv_handle:"
|
APPL_TRACE_WARNING("%s(jv_handle:"
|
||||||
" 0x%x):port_handle: 0x%x, p_pm_cb: %d: no link to "
|
" 0x%x):port_handle: 0x%x, p_pm_cb: %d: no link to "
|
||||||
"pm_cb?", __func__, jv_handle, p_pcb->port_handle, i);
|
"pm_cb?", __func__, jv_handle, p_pcb->port_handle, i);
|
||||||
|
}
|
||||||
p_cb = &p_pcb->p_pm_cb;
|
p_cb = &p_pcb->p_pm_cb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (jv_handle < BTA_JV_MAX_L2C_CONN) {
|
if (jv_handle < BTA_JV_MAX_L2C_CONN) {
|
||||||
tBTA_JV_L2C_CB *p_l2c_cb = &bta_jv_cb.l2c_cb[jv_handle];
|
tBTA_JV_L2C_CB *p_l2c_cb = &bta_jv_cb.l2c_cb[jv_handle];
|
||||||
if (NULL == p_l2c_cb->p_pm_cb)
|
if (NULL == p_l2c_cb->p_pm_cb) {
|
||||||
APPL_TRACE_WARNING("%s(jv_handle: "
|
APPL_TRACE_WARNING("%s(jv_handle: "
|
||||||
"0x%x): p_pm_cb: %d: no link to pm_cb?", __func__, jv_handle, i);
|
"0x%x): p_pm_cb: %d: no link to pm_cb?", __func__, jv_handle, i);
|
||||||
|
}
|
||||||
p_cb = &p_l2c_cb->p_pm_cb;
|
p_cb = &p_l2c_cb->p_pm_cb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -998,6 +1003,9 @@ static bool create_base_record(const uint32_t sdp_handle, const char *name, cons
|
||||||
APPL_TRACE_DEBUG("create_base_record: successfully created base service "
|
APPL_TRACE_DEBUG("create_base_record: successfully created base service "
|
||||||
"record, handle: 0x%08x, scn: %d, name: %s, with_obex: %d",
|
"record, handle: 0x%08x, scn: %d, name: %s, with_obex: %d",
|
||||||
sdp_handle, channel, name, with_obex);
|
sdp_handle, channel, name, with_obex);
|
||||||
|
|
||||||
|
UNUSED(stage);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1031,6 +1039,8 @@ static int add_spp_sdp(const char *name, const int channel) {
|
||||||
|
|
||||||
APPL_TRACE_DEBUG("add_spp_sdp: service registered successfully, "
|
APPL_TRACE_DEBUG("add_spp_sdp: service registered successfully, "
|
||||||
"service_name: %s, handle 0x%08x)", name, handle);
|
"service_name: %s, handle 0x%08x)", name, handle);
|
||||||
|
UNUSED(stage);
|
||||||
|
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1523,6 +1533,7 @@ static int bta_jv_port_data_co_cback(UINT16 port_handle, UINT8 *buf, UINT16 len,
|
||||||
tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle);
|
tBTA_JV_PCB *p_pcb = bta_jv_rfc_port_to_pcb(port_handle);
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
APPL_TRACE_DEBUG("%s, p_cb:%p, p_pcb:%p, len:%d, type:%d", __func__, p_cb, p_pcb, len, type);
|
APPL_TRACE_DEBUG("%s, p_cb:%p, p_pcb:%p, len:%d, type:%d", __func__, p_cb, p_pcb, len, type);
|
||||||
|
UNUSED(p_cb);
|
||||||
if (p_pcb != NULL) {
|
if (p_pcb != NULL) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DATA_CO_CALLBACK_TYPE_INCOMING:
|
case DATA_CO_CALLBACK_TYPE_INCOMING:
|
||||||
|
|
|
@ -615,6 +615,7 @@ static void btc_a2dp_sink_handle_decoder_reset(tBTC_MEDIA_SINK_CFG_UPDATE *p_msg
|
||||||
|
|
||||||
int frames_to_process = ((freq_multiple) / (num_blocks * num_subbands)) + 1;
|
int frames_to_process = ((freq_multiple) / (num_blocks * num_subbands)) + 1;
|
||||||
APPL_TRACE_EVENT(" Frames to be processed in 20 ms %d\n", frames_to_process);
|
APPL_TRACE_EVENT(" Frames to be processed in 20 ms %d\n", frames_to_process);
|
||||||
|
UNUSED(frames_to_process);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
|
@ -495,10 +495,11 @@ static UINT64 time_now_us()
|
||||||
static void log_tstamps_us(char *comment)
|
static void log_tstamps_us(char *comment)
|
||||||
{
|
{
|
||||||
static UINT64 prev_us = 0;
|
static UINT64 prev_us = 0;
|
||||||
const UINT64 now_us = time_now_us();
|
UINT64 now_us = time_now_us();
|
||||||
APPL_TRACE_DEBUG("[%s] ts %08llu, diff : %08llu, queue sz %d", comment, now_us, now_us - prev_us,
|
APPL_TRACE_DEBUG("[%s] ts %08llu, diff : %08llu, queue sz %d", comment, now_us, now_us - prev_us,
|
||||||
fixed_queue_length(btc_aa_src_cb.TxAaQ));
|
fixed_queue_length(btc_aa_src_cb.TxAaQ));
|
||||||
prev_us = now_us;
|
prev_us = now_us;
|
||||||
|
UNUSED(prev_us);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* when true media task discards any tx frames */
|
/* when true media task discards any tx frames */
|
||||||
|
|
|
@ -1199,10 +1199,13 @@ static void bte_av_media_callback(tBTA_AV_EVT event, tBTA_AV_MEDIA *p_data)
|
||||||
BTC_TRACE_ERROR("ERROR dump_codec_info A2D_ParsSbcInfo fail:%d\n", a2d_status);
|
BTC_TRACE_ERROR("ERROR dump_codec_info A2D_ParsSbcInfo fail:%d\n", a2d_status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
UNUSED(que_len);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void bte_av_media_callback(tBTA_AV_EVT event, tBTA_AV_MEDIA *p_data)
|
static void bte_av_media_callback(tBTA_AV_EVT event, tBTA_AV_MEDIA *p_data)
|
||||||
{
|
{
|
||||||
|
UNUSED(event);
|
||||||
|
UNUSED(p_data);
|
||||||
BTC_TRACE_WARNING("%s : event %u\n", __func__, event);
|
BTC_TRACE_WARNING("%s : event %u\n", __func__, event);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -335,6 +335,8 @@ static void handle_rc_passthrough_rsp ( tBTA_AV_REMOTE_RSP *p_remote_rsp)
|
||||||
} else {
|
} else {
|
||||||
BTC_TRACE_ERROR("%s DUT does not support AVRCP controller role", __FUNCTION__);
|
BTC_TRACE_ERROR("%s DUT does not support AVRCP controller role", __FUNCTION__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UNUSED(status);
|
||||||
#else
|
#else
|
||||||
BTC_TRACE_ERROR("%s AVRCP controller role is not enabled", __FUNCTION__);
|
BTC_TRACE_ERROR("%s AVRCP controller role is not enabled", __FUNCTION__);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -713,14 +713,14 @@ static void process_ind_evt(tBTA_HF_CLIENT_IND *ind)
|
||||||
{
|
{
|
||||||
esp_hf_client_cb_param_t param;
|
esp_hf_client_cb_param_t param;
|
||||||
memset(¶m, 0, sizeof(esp_hf_client_cb_param_t));
|
memset(¶m, 0, sizeof(esp_hf_client_cb_param_t));
|
||||||
|
|
||||||
switch (ind->type)
|
switch (ind->type)
|
||||||
{
|
{
|
||||||
case BTA_HF_CLIENT_IND_CALL:
|
case BTA_HF_CLIENT_IND_CALL:
|
||||||
param.call.status = ind->value;
|
param.call.status = ind->value;
|
||||||
btc_hf_client_cb_to_app(ESP_HF_CLIENT_CIND_CALL_EVT, ¶m);
|
btc_hf_client_cb_to_app(ESP_HF_CLIENT_CIND_CALL_EVT, ¶m);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BTA_HF_CLIENT_IND_CALLSETUP:
|
case BTA_HF_CLIENT_IND_CALLSETUP:
|
||||||
param.call_setup.status = ind->value;
|
param.call_setup.status = ind->value;
|
||||||
btc_hf_client_cb_to_app(ESP_HF_CLIENT_CIND_CALL_SETUP_EVT, ¶m);
|
btc_hf_client_cb_to_app(ESP_HF_CLIENT_CIND_CALL_SETUP_EVT, ¶m);
|
||||||
|
@ -787,6 +787,7 @@ void btc_hf_client_cb_handler(btc_msg_t *msg)
|
||||||
{
|
{
|
||||||
BTC_TRACE_WARNING("%s: HF CLient open failed, but another device connected. status=%d state=%d connected device=%s",
|
BTC_TRACE_WARNING("%s: HF CLient open failed, but another device connected. status=%d state=%d connected device=%s",
|
||||||
__FUNCTION__, p_data->open.status, btc_hf_client_cb.state, bdaddr_to_string(&btc_hf_client_cb.connected_bda, bdstr, sizeof(bdstr)));
|
__FUNCTION__, p_data->open.status, btc_hf_client_cb.state, bdaddr_to_string(&btc_hf_client_cb.connected_bda, bdstr, sizeof(bdstr)));
|
||||||
|
UNUSED(bdstr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -795,13 +796,13 @@ void btc_hf_client_cb_handler(btc_msg_t *msg)
|
||||||
param.conn_stat.state = btc_hf_client_cb.state;
|
param.conn_stat.state = btc_hf_client_cb.state;
|
||||||
param.conn_stat.peer_feat = 0;
|
param.conn_stat.peer_feat = 0;
|
||||||
param.conn_stat.chld_feat = 0;
|
param.conn_stat.chld_feat = 0;
|
||||||
|
|
||||||
memcpy(param.conn_stat.remote_bda, &btc_hf_client_cb.connected_bda,
|
memcpy(param.conn_stat.remote_bda, &btc_hf_client_cb.connected_bda,
|
||||||
sizeof(esp_bd_addr_t));
|
sizeof(esp_bd_addr_t));
|
||||||
|
|
||||||
btc_hf_client_cb_to_app(ESP_HF_CLIENT_CONNECTION_STATE_EVT, ¶m);
|
btc_hf_client_cb_to_app(ESP_HF_CLIENT_CONNECTION_STATE_EVT, ¶m);
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
if (btc_hf_client_cb.state == ESP_HF_CLIENT_CONNECTION_STATE_DISCONNECTED)
|
if (btc_hf_client_cb.state == ESP_HF_CLIENT_CONNECTION_STATE_DISCONNECTED)
|
||||||
bdsetany(btc_hf_client_cb.connected_bda.address);
|
bdsetany(btc_hf_client_cb.connected_bda.address);
|
||||||
|
|
||||||
|
@ -820,13 +821,13 @@ void btc_hf_client_cb_handler(btc_msg_t *msg)
|
||||||
param.conn_stat.state = btc_hf_client_cb.state;
|
param.conn_stat.state = btc_hf_client_cb.state;
|
||||||
param.conn_stat.peer_feat = btc_hf_client_cb.peer_feat;
|
param.conn_stat.peer_feat = btc_hf_client_cb.peer_feat;
|
||||||
param.conn_stat.chld_feat = btc_hf_client_cb.chld_feat;
|
param.conn_stat.chld_feat = btc_hf_client_cb.chld_feat;
|
||||||
|
|
||||||
memcpy(param.conn_stat.remote_bda, &btc_hf_client_cb.connected_bda,
|
memcpy(param.conn_stat.remote_bda, &btc_hf_client_cb.connected_bda,
|
||||||
sizeof(esp_bd_addr_t));
|
sizeof(esp_bd_addr_t));
|
||||||
|
|
||||||
btc_hf_client_cb_to_app(ESP_HF_CLIENT_CONNECTION_STATE_EVT, ¶m);
|
btc_hf_client_cb_to_app(ESP_HF_CLIENT_CONNECTION_STATE_EVT, ¶m);
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
/* Inform the application about in-band ringtone */
|
/* Inform the application about in-band ringtone */
|
||||||
if (btc_hf_client_cb.peer_feat & BTA_HF_CLIENT_PEER_INBAND)
|
if (btc_hf_client_cb.peer_feat & BTA_HF_CLIENT_PEER_INBAND)
|
||||||
{
|
{
|
||||||
|
@ -839,7 +840,7 @@ void btc_hf_client_cb_handler(btc_msg_t *msg)
|
||||||
|
|
||||||
btc_queue_advance();
|
btc_queue_advance();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BTA_HF_CLIENT_CLOSE_EVT:
|
case BTA_HF_CLIENT_CLOSE_EVT:
|
||||||
btc_hf_client_cb.state = ESP_HF_CLIENT_CONNECTION_STATE_DISCONNECTED;
|
btc_hf_client_cb.state = ESP_HF_CLIENT_CONNECTION_STATE_DISCONNECTED;
|
||||||
do {
|
do {
|
||||||
|
@ -847,7 +848,7 @@ void btc_hf_client_cb_handler(btc_msg_t *msg)
|
||||||
param.conn_stat.state = ESP_HF_CLIENT_CONNECTION_STATE_DISCONNECTED;
|
param.conn_stat.state = ESP_HF_CLIENT_CONNECTION_STATE_DISCONNECTED;
|
||||||
param.conn_stat.peer_feat = 0;
|
param.conn_stat.peer_feat = 0;
|
||||||
param.conn_stat.chld_feat = 0;
|
param.conn_stat.chld_feat = 0;
|
||||||
|
|
||||||
memcpy(param.conn_stat.remote_bda, &btc_hf_client_cb.connected_bda,
|
memcpy(param.conn_stat.remote_bda, &btc_hf_client_cb.connected_bda,
|
||||||
sizeof(esp_bd_addr_t));
|
sizeof(esp_bd_addr_t));
|
||||||
|
|
||||||
|
@ -980,7 +981,7 @@ void btc_hf_client_cb_handler(btc_msg_t *msg)
|
||||||
memset(¶m, 0, sizeof(esp_hf_client_cb_param_t));
|
memset(¶m, 0, sizeof(esp_hf_client_cb_param_t));
|
||||||
param.audio_stat.state = ESP_HF_CLIENT_AUDIO_STATE_CONNECTED;
|
param.audio_stat.state = ESP_HF_CLIENT_AUDIO_STATE_CONNECTED;
|
||||||
memcpy(param.audio_stat.remote_bda, &btc_hf_client_cb.connected_bda,
|
memcpy(param.audio_stat.remote_bda, &btc_hf_client_cb.connected_bda,
|
||||||
sizeof(esp_bd_addr_t));
|
sizeof(esp_bd_addr_t));
|
||||||
btc_hf_client_cb_to_app(ESP_HF_CLIENT_AUDIO_STATE_EVT, ¶m);
|
btc_hf_client_cb_to_app(ESP_HF_CLIENT_AUDIO_STATE_EVT, ¶m);
|
||||||
} while (0);
|
} while (0);
|
||||||
break;
|
break;
|
||||||
|
@ -989,7 +990,7 @@ void btc_hf_client_cb_handler(btc_msg_t *msg)
|
||||||
memset(¶m, 0, sizeof(esp_hf_client_cb_param_t));
|
memset(¶m, 0, sizeof(esp_hf_client_cb_param_t));
|
||||||
param.audio_stat.state = ESP_HF_CLIENT_AUDIO_STATE_CONNECTED_MSBC;
|
param.audio_stat.state = ESP_HF_CLIENT_AUDIO_STATE_CONNECTED_MSBC;
|
||||||
memcpy(param.audio_stat.remote_bda, &btc_hf_client_cb.connected_bda,
|
memcpy(param.audio_stat.remote_bda, &btc_hf_client_cb.connected_bda,
|
||||||
sizeof(esp_bd_addr_t));
|
sizeof(esp_bd_addr_t));
|
||||||
btc_hf_client_cb_to_app(ESP_HF_CLIENT_AUDIO_STATE_EVT, ¶m);
|
btc_hf_client_cb_to_app(ESP_HF_CLIENT_AUDIO_STATE_EVT, ¶m);
|
||||||
} while (0);
|
} while (0);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -345,8 +345,10 @@ UINT8 *avdt_scb_hdl_report(tAVDT_SCB *p_scb, UINT8 *p, UINT16 len)
|
||||||
p += 2;
|
p += 2;
|
||||||
BE_STREAM_TO_UINT32(ssrc, p);
|
BE_STREAM_TO_UINT32(ssrc, p);
|
||||||
|
|
||||||
|
UNUSED(ssrc);
|
||||||
UNUSED(o_p);
|
UNUSED(o_p);
|
||||||
UNUSED(o_v);
|
UNUSED(o_v);
|
||||||
|
UNUSED(o_cc);
|
||||||
|
|
||||||
switch (pt) {
|
switch (pt) {
|
||||||
case AVDT_RTCP_PT_SR: /* the packet type - SR (Sender Report) */
|
case AVDT_RTCP_PT_SR: /* the packet type - SR (Sender Report) */
|
||||||
|
|
|
@ -120,10 +120,11 @@ BOOLEAN avrc_is_valid_player_attrib_value(UINT8 attrib, UINT8 value)
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result)
|
if (!result) {
|
||||||
AVRC_TRACE_ERROR(
|
AVRC_TRACE_ERROR(
|
||||||
"avrc_is_valid_player_attrib_value() found not matching attrib(x%x)-value(x%x) pair!",
|
"avrc_is_valid_player_attrib_value() found not matching attrib(x%x)-value(x%x) pair!",
|
||||||
attrib, value);
|
attrib, value);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ void gatt_free_pending_ind(tGATT_TCB *p_tcb)
|
||||||
if (p_tcb->pending_ind_q == NULL) {
|
if (p_tcb->pending_ind_q == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* release all queued indications */
|
/* release all queued indications */
|
||||||
while (!fixed_queue_is_empty(p_tcb->pending_ind_q)) {
|
while (!fixed_queue_is_empty(p_tcb->pending_ind_q)) {
|
||||||
osi_free(fixed_queue_try_dequeue(p_tcb->pending_ind_q));
|
osi_free(fixed_queue_try_dequeue(p_tcb->pending_ind_q));
|
||||||
|
@ -118,7 +118,7 @@ void gatt_free_pending_enc_queue(tGATT_TCB *p_tcb)
|
||||||
if (p_tcb->pending_enc_clcb == NULL) {
|
if (p_tcb->pending_enc_clcb == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* release all queued indications */
|
/* release all queued indications */
|
||||||
while (!fixed_queue_is_empty(p_tcb->pending_enc_clcb)) {
|
while (!fixed_queue_is_empty(p_tcb->pending_enc_clcb)) {
|
||||||
osi_free(fixed_queue_try_dequeue(p_tcb->pending_enc_clcb));
|
osi_free(fixed_queue_try_dequeue(p_tcb->pending_enc_clcb));
|
||||||
|
@ -387,7 +387,7 @@ tGATT_HDL_LIST_ELEM *gatt_find_hdl_buffer_by_attr_handle(UINT16 attr_handle)
|
||||||
p_list = p_list_info->p_first;
|
p_list = p_list_info->p_first;
|
||||||
|
|
||||||
while (p_list != NULL) {
|
while (p_list != NULL) {
|
||||||
if (p_list->in_use && (p_list->asgn_range.s_handle <= attr_handle)
|
if (p_list->in_use && (p_list->asgn_range.s_handle <= attr_handle)
|
||||||
&& (p_list->asgn_range.e_handle >= attr_handle)) {
|
&& (p_list->asgn_range.e_handle >= attr_handle)) {
|
||||||
return (p_list);
|
return (p_list);
|
||||||
}
|
}
|
||||||
|
@ -2192,9 +2192,10 @@ void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_data)
|
||||||
(*p_disc_cmpl_cb)(conn_id, disc_type, status);
|
(*p_disc_cmpl_cb)(conn_id, disc_type, status);
|
||||||
} else if (p_cmpl_cb && op) {
|
} else if (p_cmpl_cb && op) {
|
||||||
(*p_cmpl_cb)(conn_id, op, status, &cb_data);
|
(*p_cmpl_cb)(conn_id, op, status, &cb_data);
|
||||||
} else
|
} else {
|
||||||
GATT_TRACE_WARNING ("gatt_end_operation not sent out op=%d p_disc_cmpl_cb:%p p_cmpl_cb:%p",
|
GATT_TRACE_WARNING ("gatt_end_operation not sent out op=%d p_disc_cmpl_cb:%p p_cmpl_cb:%p",
|
||||||
operation, p_disc_cmpl_cb, p_cmpl_cb);
|
operation, p_disc_cmpl_cb, p_cmpl_cb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
|
@ -395,7 +395,6 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
|
||||||
STREAM_TO_UINT16 (rej_mtu, p);
|
STREAM_TO_UINT16 (rej_mtu, p);
|
||||||
/* What to do with the MTU reject ? We have negotiated an MTU. For now */
|
/* What to do with the MTU reject ? We have negotiated an MTU. For now */
|
||||||
/* we will ignore it and let a higher protocol timeout take care of it */
|
/* we will ignore it and let a higher protocol timeout take care of it */
|
||||||
|
|
||||||
L2CAP_TRACE_WARNING ("L2CAP - MTU rej Handle: %d MTU: %d", p_lcb->handle, rej_mtu);
|
L2CAP_TRACE_WARNING ("L2CAP - MTU rej Handle: %d MTU: %d", p_lcb->handle, rej_mtu);
|
||||||
}
|
}
|
||||||
if (rej_reason == L2CAP_CMD_REJ_INVALID_CID) {
|
if (rej_reason == L2CAP_CMD_REJ_INVALID_CID) {
|
||||||
|
@ -758,6 +757,7 @@ static void process_l2cap_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UNUSED(rej_mtu);
|
||||||
}
|
}
|
||||||
#endif ///CLASSIC_BT_INCLUDED == TRUE
|
#endif ///CLASSIC_BT_INCLUDED == TRUE
|
||||||
|
|
||||||
|
@ -880,7 +880,7 @@ void l2c_free(void)
|
||||||
l2cb.rcv_pending_q = NULL;
|
l2cb.rcv_pending_q = NULL;
|
||||||
#if L2C_DYNAMIC_MEMORY
|
#if L2C_DYNAMIC_MEMORY
|
||||||
FREE_AND_RESET(l2c_cb_ptr);
|
FREE_AND_RESET(l2c_cb_ptr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
Loading…
Reference in a new issue