Loading system/bta/av/bta_av_main.cc +11 −0 Original line number Diff line number Diff line Loading @@ -1370,6 +1370,8 @@ const char* bta_av_evt_code(uint16_t evt_code) { } void bta_debug_av_dump(int fd) { if (appl_trace_level < BT_TRACE_LEVEL_DEBUG) return; dprintf(fd, "\nBTA AV State:\n"); dprintf(fd, " State Machine State: %s\n", bta_av_st_code(bta_av_cb.state)); dprintf(fd, " Link signalling timer: %s\n", Loading Loading @@ -1398,6 +1400,9 @@ void bta_debug_av_dump(int fd) { for (size_t i = 0; i < sizeof(bta_av_cb.lcb) / sizeof(bta_av_cb.lcb[0]); i++) { const tBTA_AV_LCB& lcb = bta_av_cb.lcb[i]; if (lcb.addr.IsEmpty()) { continue; } dprintf(fd, "\n Link control block: %zu peer: %s\n", i, lcb.addr.ToString().c_str()); dprintf(fd, " Connected stream handle mask: 0x%x\n", lcb.conn_msk); Loading @@ -1408,12 +1413,18 @@ void bta_debug_av_dump(int fd) { if (p_scb == nullptr) { continue; } if (p_scb->PeerAddress().IsEmpty()) { continue; } dprintf(fd, "\n BTA ID: %zu peer: %s\n", i, p_scb->PeerAddress().ToString().c_str()); dprintf(fd, " SDP discovery started: %s\n", p_scb->sdp_discovery_started ? "true" : "false"); for (size_t j = 0; j < BTAV_A2DP_CODEC_INDEX_MAX; j++) { const tBTA_AV_SEP& sep = p_scb->seps[j]; if (sep.av_handle == 0) { continue; } dprintf(fd, " SEP ID: %zu\n", j); dprintf(fd, " SEP AVDTP handle: %d\n", sep.av_handle); dprintf(fd, " Local SEP type: %d\n", sep.tsep); Loading system/btif/co/bta_av_co.cc +17 −11 Original line number Diff line number Diff line Loading @@ -1626,16 +1626,32 @@ bool BtaAvCo::ReportSinkCodecState(BtaAvCoPeer* p_peer) { // Nothing to do (for now) return true; } void BtaAvCo::DebugDump(int fd) { std::lock_guard<std::recursive_mutex> lock(codec_lock_); dprintf(fd, "\nA2DP Codecs and Peers State:\n"); // // Active peer codec-specific stats // if (active_peer_ != nullptr) { A2dpCodecs* a2dp_codecs = active_peer_->GetCodecs(); if (a2dp_codecs != nullptr) { a2dp_codecs->debug_codec_dump(fd); } } if (appl_trace_level < BT_TRACE_LEVEL_DEBUG) return; dprintf(fd, "\nA2DP Peers State:\n"); dprintf(fd, " Active peer: %s\n", (active_peer_ != nullptr) ? active_peer_->addr.ToString().c_str() : "null"); for (size_t i = 0; i < BTA_AV_CO_NUM_ELEMENTS(peers_); i++) { const BtaAvCoPeer& peer = peers_[i]; if (peer.addr.IsEmpty()) { continue; } dprintf(fd, " Peer: %s\n", peer.addr.ToString().c_str()); dprintf(fd, " Number of sinks: %u\n", peer.num_sinks); dprintf(fd, " Number of sources: %u\n", peer.num_sources); Loading @@ -1652,16 +1668,6 @@ void BtaAvCo::DebugDump(int fd) { dprintf(fd, " UUID to connect: 0x%x\n", peer.uuid_to_connect); dprintf(fd, " BTA AV handle: %u\n", peer.BtaAvHandle()); } // // Active peer codec-specific stats // if (active_peer_ != nullptr) { A2dpCodecs* a2dp_codecs = active_peer_->GetCodecs(); if (a2dp_codecs != nullptr) { a2dp_codecs->debug_codec_dump(fd); } } } bool BtaAvCo::ContentProtectIsScmst(const uint8_t* p_protect_info) { Loading system/stack/avdt/avdt_api.cc +8 −0 Original line number Diff line number Diff line Loading @@ -1212,6 +1212,8 @@ uint8_t AVDT_SetTraceLevel(uint8_t new_level) { } void stack_debug_avdtp_api_dump(int fd) { if (appl_trace_level < BT_TRACE_LEVEL_DEBUG) return; dprintf(fd, "\nAVDTP Stack State:\n"); dprintf(fd, " AVDTP signalling L2CAP channel MTU: %d\n", avdtp_cb.rcb.ctrl_mtu); Loading @@ -1219,6 +1221,9 @@ void stack_debug_avdtp_api_dump(int fd) { for (size_t i = 0; i < AVDT_NUM_LINKS; i++) { const AvdtpCcb& ccb = avdtp_cb.ccb[i]; if (ccb.peer_addr.IsEmpty()) { continue; } dprintf(fd, "\n Channel control block: %zu peer: %s\n", i, ccb.peer_addr.ToString().c_str()); dprintf(fd, " Allocated: %s\n", ccb.allocated ? "true" : "false"); Loading @@ -1235,6 +1240,9 @@ void stack_debug_avdtp_api_dump(int fd) { for (size_t i = 0; i < AVDT_NUM_SEPS; i++) { const AvdtpScb& scb = ccb.scb[i]; if (!scb.in_use) { continue; } dprintf(fd, "\n Stream control block: %zu\n", i); dprintf(fd, " SEP codec: %s\n", A2DP_CodecName(scb.stream_config.cfg.codec_info)); Loading Loading
system/bta/av/bta_av_main.cc +11 −0 Original line number Diff line number Diff line Loading @@ -1370,6 +1370,8 @@ const char* bta_av_evt_code(uint16_t evt_code) { } void bta_debug_av_dump(int fd) { if (appl_trace_level < BT_TRACE_LEVEL_DEBUG) return; dprintf(fd, "\nBTA AV State:\n"); dprintf(fd, " State Machine State: %s\n", bta_av_st_code(bta_av_cb.state)); dprintf(fd, " Link signalling timer: %s\n", Loading Loading @@ -1398,6 +1400,9 @@ void bta_debug_av_dump(int fd) { for (size_t i = 0; i < sizeof(bta_av_cb.lcb) / sizeof(bta_av_cb.lcb[0]); i++) { const tBTA_AV_LCB& lcb = bta_av_cb.lcb[i]; if (lcb.addr.IsEmpty()) { continue; } dprintf(fd, "\n Link control block: %zu peer: %s\n", i, lcb.addr.ToString().c_str()); dprintf(fd, " Connected stream handle mask: 0x%x\n", lcb.conn_msk); Loading @@ -1408,12 +1413,18 @@ void bta_debug_av_dump(int fd) { if (p_scb == nullptr) { continue; } if (p_scb->PeerAddress().IsEmpty()) { continue; } dprintf(fd, "\n BTA ID: %zu peer: %s\n", i, p_scb->PeerAddress().ToString().c_str()); dprintf(fd, " SDP discovery started: %s\n", p_scb->sdp_discovery_started ? "true" : "false"); for (size_t j = 0; j < BTAV_A2DP_CODEC_INDEX_MAX; j++) { const tBTA_AV_SEP& sep = p_scb->seps[j]; if (sep.av_handle == 0) { continue; } dprintf(fd, " SEP ID: %zu\n", j); dprintf(fd, " SEP AVDTP handle: %d\n", sep.av_handle); dprintf(fd, " Local SEP type: %d\n", sep.tsep); Loading
system/btif/co/bta_av_co.cc +17 −11 Original line number Diff line number Diff line Loading @@ -1626,16 +1626,32 @@ bool BtaAvCo::ReportSinkCodecState(BtaAvCoPeer* p_peer) { // Nothing to do (for now) return true; } void BtaAvCo::DebugDump(int fd) { std::lock_guard<std::recursive_mutex> lock(codec_lock_); dprintf(fd, "\nA2DP Codecs and Peers State:\n"); // // Active peer codec-specific stats // if (active_peer_ != nullptr) { A2dpCodecs* a2dp_codecs = active_peer_->GetCodecs(); if (a2dp_codecs != nullptr) { a2dp_codecs->debug_codec_dump(fd); } } if (appl_trace_level < BT_TRACE_LEVEL_DEBUG) return; dprintf(fd, "\nA2DP Peers State:\n"); dprintf(fd, " Active peer: %s\n", (active_peer_ != nullptr) ? active_peer_->addr.ToString().c_str() : "null"); for (size_t i = 0; i < BTA_AV_CO_NUM_ELEMENTS(peers_); i++) { const BtaAvCoPeer& peer = peers_[i]; if (peer.addr.IsEmpty()) { continue; } dprintf(fd, " Peer: %s\n", peer.addr.ToString().c_str()); dprintf(fd, " Number of sinks: %u\n", peer.num_sinks); dprintf(fd, " Number of sources: %u\n", peer.num_sources); Loading @@ -1652,16 +1668,6 @@ void BtaAvCo::DebugDump(int fd) { dprintf(fd, " UUID to connect: 0x%x\n", peer.uuid_to_connect); dprintf(fd, " BTA AV handle: %u\n", peer.BtaAvHandle()); } // // Active peer codec-specific stats // if (active_peer_ != nullptr) { A2dpCodecs* a2dp_codecs = active_peer_->GetCodecs(); if (a2dp_codecs != nullptr) { a2dp_codecs->debug_codec_dump(fd); } } } bool BtaAvCo::ContentProtectIsScmst(const uint8_t* p_protect_info) { Loading
system/stack/avdt/avdt_api.cc +8 −0 Original line number Diff line number Diff line Loading @@ -1212,6 +1212,8 @@ uint8_t AVDT_SetTraceLevel(uint8_t new_level) { } void stack_debug_avdtp_api_dump(int fd) { if (appl_trace_level < BT_TRACE_LEVEL_DEBUG) return; dprintf(fd, "\nAVDTP Stack State:\n"); dprintf(fd, " AVDTP signalling L2CAP channel MTU: %d\n", avdtp_cb.rcb.ctrl_mtu); Loading @@ -1219,6 +1221,9 @@ void stack_debug_avdtp_api_dump(int fd) { for (size_t i = 0; i < AVDT_NUM_LINKS; i++) { const AvdtpCcb& ccb = avdtp_cb.ccb[i]; if (ccb.peer_addr.IsEmpty()) { continue; } dprintf(fd, "\n Channel control block: %zu peer: %s\n", i, ccb.peer_addr.ToString().c_str()); dprintf(fd, " Allocated: %s\n", ccb.allocated ? "true" : "false"); Loading @@ -1235,6 +1240,9 @@ void stack_debug_avdtp_api_dump(int fd) { for (size_t i = 0; i < AVDT_NUM_SEPS; i++) { const AvdtpScb& scb = ccb.scb[i]; if (!scb.in_use) { continue; } dprintf(fd, "\n Stream control block: %zu\n", i); dprintf(fd, " SEP codec: %s\n", A2DP_CodecName(scb.stream_config.cfg.codec_info)); Loading