local_sep = bta_av_get_scb_sep_type(p_scb, p_msg->handle);
p_scb->avdt_label = p_data->str_msg.msg.hdr.label;
+
+ APPL_TRACE_DEBUG("%s: local_sep = %d", __func__, local_sep);
+ A2DP_DumpCodecInfo(p_evt_cfg->codec_info);
+
memcpy(p_scb->cfg.codec_info, p_evt_cfg->codec_info, AVDT_CODEC_SIZE);
bta_av_save_addr(p_scb, p_data->str_msg.bd_addr);
*
******************************************************************************/
void bta_av_do_close(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) {
+ APPL_TRACE_DEBUG("%s: p_scb->co_started=%d", __func__, p_scb->co_started);
+
/* stop stream if started */
if (p_scb->co_started) {
bta_av_str_stopped(p_scb, NULL);
APPL_TRACE_DEBUG("%s: num_seps:%d sep_info_idx:%d wait:x%x", __func__,
p_scb->num_seps, p_scb->sep_info_idx, p_scb->wait);
+ A2DP_DumpCodecInfo(p_scb->p_cap->codec_info);
+
memcpy(&cfg, p_scb->p_cap, sizeof(tAVDT_CFG));
/* let application know the capability of the SNK */
p_scb->p_cos->getcfg(p_scb->hndl, cfg.codec_info, &p_scb->sep_info_idx,
p_info->seid, &cfg.num_protect, cfg.protect_info);
p_scb->sep_info_idx++;
+ APPL_TRACE_DEBUG("%s: result: sep_info_idx:%d", __func__,
+ p_scb->sep_info_idx);
+ A2DP_DumpCodecInfo(cfg.codec_info);
+
if (p_scb->num_seps > p_scb->sep_info_idx) {
/* Some devices have seps at the end of the discover list, which is not */
/* matching media type(video not audio). */
getcap_done = true;
if (getcap_done) {
- /* we are done getting capabilities. restore the p_cb->sep_info_idx */
- p_scb->sep_info_idx = 0;
+ APPL_TRACE_DEBUG("%s: getcap_done: num_seps:%d sep_info_idx:%d wait:x%x",
+ __func__, p_scb->num_seps, p_scb->sep_info_idx,
+ p_scb->wait);
p_scb->wait &= ~(BTA_AV_WAIT_ACP_CAPS_ON | BTA_AV_WAIT_ACP_CAPS_STARTED);
if (old_wait & BTA_AV_WAIT_ACP_CAPS_STARTED) {
bta_av_start_ok(p_scb, NULL);
APPL_TRACE_DEBUG("%s: num_codec %d", __func__, p_scb->p_cap->num_codec);
APPL_TRACE_DEBUG("%s: media type x%x, x%x", __func__, media_type,
p_scb->media_type);
+ A2DP_DumpCodecInfo(p_scb->cfg.codec_info);
/* if codec present and we get a codec configuration */
if ((p_scb->p_cap->num_codec != 0) && (media_type == p_scb->media_type) &&
/* save copy of codec configuration */
memcpy(&p_scb->cfg, &cfg, sizeof(tAVDT_CFG));
+ APPL_TRACE_DEBUG("%s: result: sep_info_idx=%d", __func__,
+ p_scb->sep_info_idx);
+ A2DP_DumpCodecInfo(p_scb->cfg.codec_info);
+
uuid_int = p_scb->uuid_int;
APPL_TRACE_DEBUG("%s: initiator UUID = 0x%x", __func__, uuid_int);
if (uuid_int == UUID_SERVCLASS_AUDIO_SOURCE)
/* store the new configuration in control block */
if (p_scb->p_cap == NULL)
p_scb->p_cap = (tAVDT_CFG*)osi_malloc(sizeof(tAVDT_CFG));
- p_cfg = p_scb->p_cap;
+ p_cfg = &p_scb->cfg;
alarm_cancel(p_scb->avrc_ct_timer);
- memcpy(p_cfg, &p_scb->cfg, sizeof(tAVDT_CFG));
+ APPL_TRACE_DEBUG(
+ "%s: p_scb->sep_info_idx=%d p_scb->rcfg_idx=%d p_rcfg->sep_info_idx=%d",
+ __func__, p_scb->sep_info_idx, p_scb->rcfg_idx, p_rcfg->sep_info_idx);
+ A2DP_DumpCodecInfo(p_scb->p_cap->codec_info);
+ A2DP_DumpCodecInfo(p_scb->cfg.codec_info);
+ A2DP_DumpCodecInfo(p_rcfg->codec_info);
+
p_cfg->num_protect = p_rcfg->num_protect;
memcpy(p_cfg->codec_info, p_rcfg->codec_info, AVDT_CODEC_SIZE);
memcpy(p_cfg->protect_info, p_rcfg->p_protect_info, p_rcfg->num_protect);
p_scb->rcfg_idx = p_rcfg->sep_info_idx;
- p_scb->p_cap->psc_mask = p_scb->cur_psc_mask;
+ p_cfg->psc_mask = p_scb->cur_psc_mask;
// If the requested SEP index is same as the current one, then we
// can Suspend->Reconfigure->Start.
} else {
// Reconfigure
APPL_TRACE_DEBUG("%s: reconfig", __func__);
- AVDT_ReconfigReq(p_scb->avdt_handle, p_scb->p_cap);
- p_scb->p_cap->psc_mask = p_scb->cur_psc_mask;
+ A2DP_DumpCodecInfo(p_scb->cfg.codec_info);
+ AVDT_ReconfigReq(p_scb->avdt_handle, &p_scb->cfg);
+ p_scb->cfg.psc_mask = p_scb->cur_psc_mask;
}
} else {
// Close the stream first, and then Configure it
APPL_TRACE_DEBUG("%s: calling AVDT_ReconfigReq", __func__);
/* reconfig the stream */
- AVDT_ReconfigReq(p_scb->avdt_handle, p_scb->p_cap);
- p_scb->p_cap->psc_mask = p_scb->cur_psc_mask;
+ A2DP_DumpCodecInfo(p_scb->cfg.codec_info);
+ AVDT_ReconfigReq(p_scb->avdt_handle, &p_scb->cfg);
+ p_scb->cfg.psc_mask = p_scb->cur_psc_mask;
}
}
AVDT_DiscoverReq(p_scb->peer_addr, p_scb->sep_info, BTA_AV_NUM_SEPS,
bta_av_dt_cback[p_scb->hdi]);
} else {
- memcpy(p_scb->cfg.codec_info, p_scb->p_cap->codec_info, AVDT_CODEC_SIZE);
+ APPL_TRACE_DEBUG("%s: calling AVDT_OpenReq()", __func__);
+ A2DP_DumpCodecInfo(p_scb->cfg.codec_info);
+
/* we may choose to use a different SEP at reconfig.
* adjust the sep_idx now */
bta_av_adjust_seps_idx(p_scb, bta_av_get_scb_handle(p_scb, AVDT_TSEP_SRC));
/* open the stream with the new config */
p_scb->sep_info_idx = p_scb->rcfg_idx;
AVDT_OpenReq(p_scb->avdt_handle, p_scb->peer_addr,
- p_scb->sep_info[p_scb->sep_info_idx].seid, p_scb->p_cap);
+ p_scb->sep_info[p_scb->sep_info_idx].seid, &p_scb->cfg);
}
}
tBTA_AV_CO_PEER* p_peer;
APPL_TRACE_DEBUG("%s", __func__);
+ A2DP_DumpCodecInfo(p_codec_info);
/* Retrieve the peer info */
p_peer = bta_av_co_get_peer(hndl);
APPL_TRACE_DEBUG("num_protect:0x%02x protect_info:0x%02x%02x%02x",
num_protect, p_protect_info[0], p_protect_info[1],
p_protect_info[2]);
+ A2DP_DumpCodecInfo(p_codec_info);
/* Retrieve the peer info */
p_peer = bta_av_co_get_peer(hndl);
const uint8_t* new_codec_config,
uint8_t num_protect,
const uint8_t* p_protect_info) {
+ APPL_TRACE_DEBUG("%s", __func__);
+ A2DP_DumpCodecInfo(new_codec_config);
+
// Protect access to bta_av_co_cb.codec_config
mutex_global_lock();
success = false;
goto done;
}
+ // Don't call BTA_AvReconfig() prior to retrieving all peer's capabilities
+ if ((p_peer->num_rx_sinks != p_peer->num_sinks) &&
+ (p_peer->num_sup_sinks != BTA_AV_CO_NUM_ELEMENTS(p_peer->sinks))) {
+ APPL_TRACE_WARNING("%s: not all peer's capabilities have been retrieved",
+ __func__);
+ success = false;
+ goto done;
+ }
+
APPL_TRACE_DEBUG("%s: call BTA_AvReconfig(x%x)", __func__, p_peer->handle);
BTA_AvReconfig(p_peer->handle, true, p_sink->sep_info_idx,
p_peer->codec_config, num_protect, bta_av_co_cp_scmst);
bool restart_output = false;
bool config_updated = false;
+ APPL_TRACE_DEBUG("%s", __func__);
+ A2DP_DumpCodecInfo(p_ota_codec_config);
+
*p_restart_output = false;
// Find the peer SEP codec to use
}
if (restart_output) {
+ APPL_TRACE_DEBUG("%s: restart output", __func__);
+ A2DP_DumpCodecInfo(result_codec_config);
+
*p_restart_output = true;
p_peer->p_sink = p_sink;
bta_av_co_save_new_codec_config(p_peer, result_codec_config, num_protect,
bta_av_co_save_new_codec_config(p_peer, result_codec_config,
p_sink->num_protect, p_sink->protect_info);
- APPL_TRACE_DEBUG("%s: call BTA_AvReconfig(x%x)", __func__, p_peer->handle);
- BTA_AvReconfig(p_peer->handle, true, p_sink->sep_info_idx,
- p_peer->codec_config, num_protect, bta_av_co_cp_scmst);
+ // Don't call BTA_AvReconfig() prior to retrieving all peer's capabilities
+ if ((p_peer->num_rx_sinks != p_peer->num_sinks) &&
+ (p_peer->num_sup_sinks != BTA_AV_CO_NUM_ELEMENTS(p_peer->sinks))) {
+ APPL_TRACE_WARNING("%s: not all peer's capabilities have been retrieved",
+ __func__);
+ } else {
+ APPL_TRACE_DEBUG("%s: call BTA_AvReconfig(x%x)", __func__,
+ p_peer->handle);
+ BTA_AvReconfig(p_peer->handle, true, p_sink->sep_info_idx,
+ p_peer->codec_config, num_protect, bta_av_co_cp_scmst);
+ }
}
if (config_updated) {
#include "btm_api.h"
#include "btu.h"
#include "l2c_api.h"
+#include "stack/include/a2dp_codec_api.h"
/* Control block for AVDT */
tAVDT_CB avdt_cb;
}
void AVDT_AbortReq(uint8_t handle) {
- AVDT_TRACE_ERROR("%s", __func__);
+ AVDT_TRACE_WARNING("%s: handle=%d", __func__, handle);
tAVDT_SCB* p_scb = avdt_scb_by_hdl(handle);
if (p_scb != NULL) {
uint16_t result = AVDT_SUCCESS;
tAVDT_SCB* p_scb;
+ AVDT_TRACE_DEBUG("%s", __func__);
+
/* Verify parameters; if invalid, return failure */
if (((p_cs->cfg.psc_mask & (~AVDT_PSC)) != 0) ||
(p_cs->p_ctrl_cback == NULL)) {
*p_handle = avdt_scb_to_hdl(p_scb);
}
}
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t result = AVDT_SUCCESS;
tAVDT_SCB* p_scb;
+ AVDT_TRACE_DEBUG("%s: handle=%d", __func__, handle);
+
/* look up scb */
p_scb = avdt_scb_by_hdl(handle);
if (p_scb == NULL) {
/* send remove event to scb */
avdt_scb_event(p_scb, AVDT_SCB_API_REMOVE_EVT, NULL);
}
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t result = AVDT_SUCCESS;
tAVDT_CCB_EVT evt;
+ AVDT_TRACE_DEBUG("%s", __func__);
+
/* find channel control block for this bd addr; if none, allocate one */
p_ccb = avdt_ccb_by_bd(bd_addr);
if (p_ccb == NULL) {
avdt_ccb_event(p_ccb, AVDT_CCB_API_DISCOVER_REQ_EVT, &evt);
}
}
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
tAVDT_CCB* p_ccb = NULL;
uint16_t result = AVDT_SUCCESS;
+ AVDT_TRACE_DEBUG("%s", __func__);
+
/* verify SEID */
if ((p_evt->single.seid < AVDT_SEID_MIN) ||
(p_evt->single.seid > AVDT_SEID_MAX)) {
avdt_ccb_event(p_ccb, AVDT_CCB_API_GETCAP_REQ_EVT, (tAVDT_CCB_EVT*)p_evt);
}
}
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t AVDT_GetCapReq(BD_ADDR bd_addr, uint8_t seid, tAVDT_CFG* p_cfg,
tAVDT_CTRL_CBACK* p_cback) {
tAVDT_CCB_API_GETCAP getcap;
+ uint16_t result = AVDT_SUCCESS;
+
+ AVDT_TRACE_DEBUG("%s", __func__);
getcap.single.seid = seid;
getcap.single.sig_id = AVDT_SIG_GETCAP;
getcap.p_cfg = p_cfg;
getcap.p_cback = p_cback;
- return avdt_get_cap_req(bd_addr, &getcap);
+ result = avdt_get_cap_req(bd_addr, &getcap);
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
+ return result;
}
/*******************************************************************************
uint16_t AVDT_GetAllCapReq(BD_ADDR bd_addr, uint8_t seid, tAVDT_CFG* p_cfg,
tAVDT_CTRL_CBACK* p_cback) {
tAVDT_CCB_API_GETCAP getcap;
+ uint16_t result = AVDT_SUCCESS;
+
+ AVDT_TRACE_DEBUG("%s", __func__);
getcap.single.seid = seid;
getcap.single.sig_id = AVDT_SIG_GET_ALLCAP;
getcap.p_cfg = p_cfg;
getcap.p_cback = p_cback;
- return avdt_get_cap_req(bd_addr, &getcap);
+ result = avdt_get_cap_req(bd_addr, &getcap);
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
+ return result;
}
/*******************************************************************************
uint16_t result = AVDT_SUCCESS;
tAVDT_SCB_EVT evt;
+ AVDT_TRACE_DEBUG("%s: handle=%d ceid=%d delay=%d", __func__, handle, seid,
+ delay);
+
/* map handle to scb */
p_scb = avdt_scb_by_hdl(handle);
if (p_scb == NULL) {
avdt_scb_event(p_scb, AVDT_SCB_API_DELAY_RPT_REQ_EVT, &evt);
}
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t result = AVDT_SUCCESS;
tAVDT_SCB_EVT evt;
+ AVDT_TRACE_DEBUG("%s: handle=%d seid=%d", __func__, handle, seid);
+
/* verify SEID */
if ((seid < AVDT_SEID_MIN) || (seid > AVDT_SEID_MAX)) {
result = AVDT_BAD_PARAMS;
/* send event to scb */
if (result == AVDT_SUCCESS) {
+ A2DP_DumpCodecInfo(p_cfg->codec_info);
+
evt.msg.config_cmd.hdr.seid = seid;
evt.msg.config_cmd.hdr.ccb_idx = avdt_ccb_to_idx(p_ccb);
evt.msg.config_cmd.int_seid = handle;
evt.msg.config_cmd.p_cfg = p_cfg;
avdt_scb_event(p_scb, AVDT_SCB_API_SETCONFIG_REQ_EVT, &evt);
}
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t result = AVDT_SUCCESS;
uint8_t event_code;
+ AVDT_TRACE_DEBUG("%s: handle=%d label=%d error_code=%d category=%d", __func__,
+ handle, label, error_code, category);
+
/* map handle to scb */
p_scb = avdt_scb_by_hdl(handle);
if (p_scb == NULL) {
avdt_scb_event(p_scb, event_code, &evt);
}
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t result = AVDT_SUCCESS;
int i;
+ AVDT_TRACE_DEBUG("%s: num_handles=%d", __func__, num_handles);
+
if ((num_handles == 0) || (num_handles > AVDT_NUM_SEPS)) {
result = AVDT_BAD_PARAMS;
} else {
avdt_ccb_event(p_scb->p_ccb, AVDT_CCB_API_START_REQ_EVT, &evt);
}
}
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t result = AVDT_SUCCESS;
int i;
+ AVDT_TRACE_DEBUG("%s: num_handles=%d", __func__, num_handles);
+
if ((num_handles == 0) || (num_handles > AVDT_NUM_SEPS)) {
result = AVDT_BAD_PARAMS;
} else {
}
}
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
tAVDT_SCB* p_scb;
uint16_t result = AVDT_SUCCESS;
+ AVDT_TRACE_DEBUG("%s: handle=%d", __func__, handle);
+
/* map handle to scb */
p_scb = avdt_scb_by_hdl(handle);
if (p_scb == NULL) {
avdt_scb_event(p_scb, AVDT_SCB_API_CLOSE_REQ_EVT, NULL);
}
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t result = AVDT_SUCCESS;
tAVDT_SCB_EVT evt;
+ AVDT_TRACE_DEBUG("%s: handle=%d", __func__, handle);
+
/* map handle to scb */
p_scb = avdt_scb_by_hdl(handle);
if (p_scb == NULL) {
else {
/* force psc_mask to zero */
p_cfg->psc_mask = 0;
-
evt.msg.reconfig_cmd.p_cfg = p_cfg;
avdt_scb_event(p_scb, AVDT_SCB_API_RECONFIG_REQ_EVT, &evt);
}
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
tAVDT_SCB_EVT evt;
uint16_t result = AVDT_SUCCESS;
+ AVDT_TRACE_DEBUG("%s: handle=%d label=%d error_code=%d category=%d", __func__,
+ handle, label, error_code, category);
+
/* map handle to scb */
p_scb = avdt_scb_by_hdl(handle);
if (p_scb == NULL) {
avdt_scb_event(p_scb, AVDT_SCB_API_RECONFIG_RSP_EVT, &evt);
}
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t result = AVDT_SUCCESS;
tAVDT_SCB_EVT evt;
+ AVDT_TRACE_DEBUG("%s: handle=%d len=%d", __func__, handle, len);
+
/* map handle to scb */
p_scb = avdt_scb_by_hdl(handle);
if (p_scb == NULL) {
evt.msg.security_rsp.len = len;
avdt_scb_event(p_scb, AVDT_SCB_API_SECURITY_REQ_EVT, &evt);
}
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t result = AVDT_SUCCESS;
tAVDT_SCB_EVT evt;
+ AVDT_TRACE_DEBUG("%s: handle=%d label=%d error_code=%d len=%d", __func__,
+ handle, label, error_code, len);
+
/* map handle to scb */
p_scb = avdt_scb_by_hdl(handle);
if (p_scb == NULL) {
evt.msg.security_rsp.len = len;
avdt_scb_event(p_scb, AVDT_SCB_API_SECURITY_RSP_EVT, &evt);
}
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
tAVDT_SCB_EVT evt;
uint16_t result = AVDT_SUCCESS;
+ AVDT_TRACE_DEBUG("%s: handle=%d timestamp=%d m_pt=0x%x opt=0x%x", __func__,
+ handle, time_stamp, m_pt, opt);
+
/* map handle to scb */
p_scb = avdt_scb_by_hdl(handle);
if (p_scb == NULL) {
avdt_scb_event(p_scb, AVDT_SCB_API_WRITE_REQ_EVT, &evt);
}
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t result = AVDT_SUCCESS;
tAVDT_CCB_EVT evt;
+ AVDT_TRACE_DEBUG("%s: sec_mask=0x%x", __func__, sec_mask);
+
/* find channel control block for this bd addr; if none, allocate one */
p_ccb = avdt_ccb_by_bd(bd_addr);
if (p_ccb == NULL) {
evt.connect.sec_mask = sec_mask;
avdt_ccb_event(p_ccb, AVDT_CCB_API_CONNECT_REQ_EVT, &evt);
}
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint16_t result = AVDT_SUCCESS;
tAVDT_CCB_EVT evt;
+ AVDT_TRACE_DEBUG("%s", __func__);
+
/* find channel control block for this bd addr; if none, error */
p_ccb = avdt_ccb_by_bd(bd_addr);
if (p_ccb == NULL) {
evt.disconnect.p_cback = p_cback;
avdt_ccb_event(p_ccb, AVDT_CCB_API_DISCONNECT_REQ_EVT, &evt);
}
+
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
uint32_t ssrc;
uint16_t len;
+ AVDT_TRACE_DEBUG("%s: handle=%d type=%d", __func__, handle, type);
+
/* map handle to scb && verify parameters */
if (((p_scb = avdt_scb_by_hdl(handle)) != NULL) && (p_scb->p_ccb != NULL) &&
(((type == AVDT_RTCP_PT_SR) && (p_scb->cs.tsep == AVDT_TSEP_SRC)) ||
}
}
+ AVDT_TRACE_DEBUG("%s: result=%d", __func__, result);
+
return result;
}
#endif
/*****************************************************************************
* state machine constants and types
****************************************************************************/
-#if (AVDT_DEBUG == TRUE)
/* verbose state strings for trace */
const char* const avdt_ccb_st_str[] = {"CCB_IDLE_ST", "CCB_OPENING_ST",
"UL_CLOSE_EVT", "LL_OPEN_EVT",
"LL_CLOSE_EVT", "LL_CONG_EVT"};
-#endif
-
/* action function list */
const tAVDT_CCB_ACTION avdt_ccb_action[] = {
avdt_ccb_chan_open, avdt_ccb_chan_close,
/* execute action functions */
for (i = 0; i < AVDT_CCB_ACTIONS; i++) {
action = state_table[event][i];
+ AVDT_TRACE_DEBUG("%s: event=%s state=%s action=%d", __func__,
+ avdt_ccb_evt_str[event], avdt_ccb_st_str[p_ccb->state],
+ action);
if (action != AVDT_CCB_IGNORE) {
(*avdt_cb.p_ccb_act[action])(p_ccb, p_data);
} else {
tAVDT_MSG avdt_msg;
uint8_t seid_list[AVDT_NUM_SEPS];
+ AVDT_TRACE_DEBUG("%s", __func__);
+
/* make copy of our seid list */
memcpy(seid_list, p_data->msg.multi.seid_list, p_data->msg.multi.num_seps);
avdt_scb_verify(p_ccb, AVDT_VERIFY_OPEN, p_data->msg.multi.seid_list,
p_data->msg.multi.num_seps, &avdt_msg.hdr.err_code);
if (avdt_msg.hdr.err_param == 0) {
+ AVDT_TRACE_DEBUG("%s: AVDT_SIG_START", __func__);
+
/* set peer seid list in messsage */
avdt_scb_peer_seid_list(&p_data->msg.multi);
for (i = 0; i < p_data->msg.multi.num_seps; i++) {
p_scb = avdt_scb_by_hdl(seid_list[i]);
if (p_scb != NULL) {
+ AVDT_TRACE_DEBUG("%s: AVDT_SCB_MSG_START_REJ_EVT: i=%d", __func__, i);
avdt_scb_event(p_scb, AVDT_SCB_MSG_START_REJ_EVT,
(tAVDT_SCB_EVT*)&avdt_msg.hdr);
}
void avdt_scb_hdl_setconfig_cmd(tAVDT_SCB* p_scb, tAVDT_SCB_EVT* p_data) {
tAVDT_CFG* p_cfg;
+ AVDT_TRACE_DEBUG("%s: p_scb->in_use=%d", __func__, p_scb->in_use);
+
if (!p_scb->in_use) {
+ A2DP_DumpCodecInfo(p_scb->cs.cfg.codec_info);
+ A2DP_DumpCodecInfo(p_data->msg.config_cmd.p_cfg->codec_info);
p_cfg = p_data->msg.config_cmd.p_cfg;
if (A2DP_GetCodecType(p_scb->cs.cfg.codec_info) ==
A2DP_GetCodecType(p_cfg->codec_info)) {
p_data->msg.hdr.sig_id, &p_data->msg);
}
} else {
+ AVDT_TRACE_DEBUG("%s: calling avdt_scb_rej_in_use()", __func__);
avdt_scb_rej_in_use(p_scb, p_data);
}
}
UNUSED_ATTR tAVDT_SCB_EVT* p_data) {
tAVDT_EVT_HDR hdr;
+ AVDT_TRACE_DEBUG("%s: p_scb->p_ccb=%p", __func__, p_scb->p_ccb);
+
if (p_scb->p_ccb != NULL) {
p_scb->role = AVDT_CLOSE_INT;
*
******************************************************************************/
void avdt_scb_snd_reconfig_req(tAVDT_SCB* p_scb, tAVDT_SCB_EVT* p_data) {
+ AVDT_TRACE_DEBUG("%s: p_scb->peer_seid=%d p_data->msg.hdr.seid=%d", __func__,
+ p_scb->peer_seid, p_data->msg.hdr.seid);
+ A2DP_DumpCodecInfo(p_data->msg.config_cmd.p_cfg->codec_info);
+
memcpy(&p_scb->req_cfg, p_data->msg.config_cmd.p_cfg, sizeof(tAVDT_CFG));
p_data->msg.hdr.seid = p_scb->peer_seid;
avdt_msg_send_cmd(p_scb->p_ccb, p_scb, AVDT_SIG_RECONFIG, &p_data->msg);
void avdt_scb_snd_setconfig_req(tAVDT_SCB* p_scb, tAVDT_SCB_EVT* p_data) {
tAVDT_CFG *p_req, *p_cfg;
+ AVDT_TRACE_DEBUG("%s", __func__);
+ A2DP_DumpCodecInfo(p_data->msg.config_cmd.p_cfg->codec_info);
+
/* copy API parameters to scb, set scb as in use */
p_scb->in_use = true;
p_scb->p_ccb = avdt_ccb_by_idx(p_data->msg.config_cmd.hdr.ccb_idx);