Loading system/bta/av/bta_av_aact.cc +10 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ #include "avdt_api.h" #include "bt_utils.h" #include "bta_av_int.h" #include "btif/include/btif_av_co.h" #include "l2c_api.h" #include "l2cdefs.h" #include "osi/include/osi.h" Loading Loading @@ -1024,6 +1025,7 @@ void bta_av_cleanup(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) { /* if de-registering shut everything down */ msg.hdr.layer_specific = p_scb->hndl; p_scb->started = false; p_scb->current_codec = nullptr; p_scb->cong = false; p_scb->role = role; p_scb->cur_psc_mask = 0; Loading Loading @@ -1454,6 +1456,7 @@ void bta_av_do_close(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) { /* close stream */ p_scb->started = false; p_scb->current_codec = nullptr; /* drop the buffers queued in L2CAP */ L2CA_FlushChannel(p_scb->l2c_cid, L2CAP_FLUSH_CHANS_ALL); Loading Loading @@ -2095,11 +2098,15 @@ void bta_av_data_path(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) { BT_HDR* p_buf = NULL; uint32_t timestamp; bool new_buf = false; uint8_t m_pt = AVDT_MARKER_SET | 0x60; uint8_t m_pt = 0x60; tAVDT_DATA_OPT_MASK opt; if (p_scb->cong) return; if (p_scb->current_codec->useRtpHeaderMarkerBit()) { m_pt |= AVDT_MARKER_SET; } // Always get the current number of bufs que'd up p_scb->l2c_bufs = (uint8_t)L2CA_FlushChannel(p_scb->l2c_cid, L2CAP_FLUSH_CHANS_GET); Loading Loading @@ -2225,6 +2232,8 @@ void bta_av_start_ok(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { p_scb->role); p_scb->started = true; p_scb->current_codec = bta_av_get_a2dp_current_codec(); if (p_scb->sco_suspend) { p_scb->sco_suspend = false; } Loading system/bta/av/bta_av_int.h +1 −0 Original line number Diff line number Diff line Loading @@ -482,6 +482,7 @@ typedef struct { uint8_t rc_handle; /* connected AVRCP handle */ bool use_rc; /* true if AVRCP is allowed */ bool started; /* true if stream started */ A2dpCodecConfig* current_codec; /* The current A2DP codec */ uint8_t co_started; /* non-zero, if stream started from call-out perspective */ bool recfg_sup; /* true if the first attempt to reconfigure the stream was Loading system/stack/a2dp/a2dp_aac.cc +2 −0 Original line number Diff line number Diff line Loading @@ -706,6 +706,8 @@ bool A2dpCodecConfigAac::init() { return true; } bool A2dpCodecConfigAac::useRtpHeaderMarkerBit() const { return true; } // // Selects the best sample rate from |sampleRate|. // The result is stored in |p_result| and |p_codec_config|. Loading system/stack/a2dp/a2dp_sbc.cc +7 −0 Original line number Diff line number Diff line Loading @@ -1056,6 +1056,8 @@ bool A2dpCodecConfigSbc::init() { return true; } bool A2dpCodecConfigSbc::useRtpHeaderMarkerBit() const { return false; } // // Selects the best sample rate from |samp_freq|. // The result is stored in |p_result| and |p_codec_config|. Loading Loading @@ -1610,6 +1612,11 @@ bool A2dpCodecConfigSbcSink::init() { return true; } bool A2dpCodecConfigSbcSink::useRtpHeaderMarkerBit() const { // TODO: This method applies only to Source codecs return false; } bool A2dpCodecConfigSbcSink::setCodecConfig( UNUSED_ATTR const uint8_t* p_peer_codec_info, UNUSED_ATTR bool is_capability, Loading system/stack/a2dp/a2dp_vendor_aptx.cc +2 −0 Original line number Diff line number Diff line Loading @@ -436,6 +436,8 @@ bool A2dpCodecConfigAptx::init() { return true; } bool A2dpCodecConfigAptx::useRtpHeaderMarkerBit() const { return false; } // // Selects the best sample rate from |sampleRate|. // The result is stored in |p_result| and p_codec_config|. Loading Loading
system/bta/av/bta_av_aact.cc +10 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ #include "avdt_api.h" #include "bt_utils.h" #include "bta_av_int.h" #include "btif/include/btif_av_co.h" #include "l2c_api.h" #include "l2cdefs.h" #include "osi/include/osi.h" Loading Loading @@ -1024,6 +1025,7 @@ void bta_av_cleanup(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) { /* if de-registering shut everything down */ msg.hdr.layer_specific = p_scb->hndl; p_scb->started = false; p_scb->current_codec = nullptr; p_scb->cong = false; p_scb->role = role; p_scb->cur_psc_mask = 0; Loading Loading @@ -1454,6 +1456,7 @@ void bta_av_do_close(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) { /* close stream */ p_scb->started = false; p_scb->current_codec = nullptr; /* drop the buffers queued in L2CAP */ L2CA_FlushChannel(p_scb->l2c_cid, L2CAP_FLUSH_CHANS_ALL); Loading Loading @@ -2095,11 +2098,15 @@ void bta_av_data_path(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) { BT_HDR* p_buf = NULL; uint32_t timestamp; bool new_buf = false; uint8_t m_pt = AVDT_MARKER_SET | 0x60; uint8_t m_pt = 0x60; tAVDT_DATA_OPT_MASK opt; if (p_scb->cong) return; if (p_scb->current_codec->useRtpHeaderMarkerBit()) { m_pt |= AVDT_MARKER_SET; } // Always get the current number of bufs que'd up p_scb->l2c_bufs = (uint8_t)L2CA_FlushChannel(p_scb->l2c_cid, L2CAP_FLUSH_CHANS_GET); Loading Loading @@ -2225,6 +2232,8 @@ void bta_av_start_ok(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { p_scb->role); p_scb->started = true; p_scb->current_codec = bta_av_get_a2dp_current_codec(); if (p_scb->sco_suspend) { p_scb->sco_suspend = false; } Loading
system/bta/av/bta_av_int.h +1 −0 Original line number Diff line number Diff line Loading @@ -482,6 +482,7 @@ typedef struct { uint8_t rc_handle; /* connected AVRCP handle */ bool use_rc; /* true if AVRCP is allowed */ bool started; /* true if stream started */ A2dpCodecConfig* current_codec; /* The current A2DP codec */ uint8_t co_started; /* non-zero, if stream started from call-out perspective */ bool recfg_sup; /* true if the first attempt to reconfigure the stream was Loading
system/stack/a2dp/a2dp_aac.cc +2 −0 Original line number Diff line number Diff line Loading @@ -706,6 +706,8 @@ bool A2dpCodecConfigAac::init() { return true; } bool A2dpCodecConfigAac::useRtpHeaderMarkerBit() const { return true; } // // Selects the best sample rate from |sampleRate|. // The result is stored in |p_result| and |p_codec_config|. Loading
system/stack/a2dp/a2dp_sbc.cc +7 −0 Original line number Diff line number Diff line Loading @@ -1056,6 +1056,8 @@ bool A2dpCodecConfigSbc::init() { return true; } bool A2dpCodecConfigSbc::useRtpHeaderMarkerBit() const { return false; } // // Selects the best sample rate from |samp_freq|. // The result is stored in |p_result| and |p_codec_config|. Loading Loading @@ -1610,6 +1612,11 @@ bool A2dpCodecConfigSbcSink::init() { return true; } bool A2dpCodecConfigSbcSink::useRtpHeaderMarkerBit() const { // TODO: This method applies only to Source codecs return false; } bool A2dpCodecConfigSbcSink::setCodecConfig( UNUSED_ATTR const uint8_t* p_peer_codec_info, UNUSED_ATTR bool is_capability, Loading
system/stack/a2dp/a2dp_vendor_aptx.cc +2 −0 Original line number Diff line number Diff line Loading @@ -436,6 +436,8 @@ bool A2dpCodecConfigAptx::init() { return true; } bool A2dpCodecConfigAptx::useRtpHeaderMarkerBit() const { return false; } // // Selects the best sample rate from |sampleRate|. // The result is stored in |p_result| and p_codec_config|. Loading