Loading system/btif/co/bta_av_co.cc +15 −0 Original line number Diff line number Diff line Loading @@ -389,6 +389,13 @@ class BtaAvCo { */ bool SetActivePeer(const RawAddress& peer_address); /** * Save the reconfig codec * * @param new_codec_config the new codec config */ void SaveCodec(const uint8_t* new_codec_config); /** * Get the encoder parameters for a peer. * Loading Loading @@ -1465,6 +1472,10 @@ bool BtaAvCo::SetActivePeer(const RawAddress& peer_address) { return true; } void BtaAvCo::SaveCodec(const uint8_t* new_codec_config) { memcpy(codec_config_, new_codec_config, sizeof(codec_config_)); } void BtaAvCo::GetPeerEncoderParameters( const RawAddress& peer_address, tA2DP_ENCODER_INIT_PEER_PARAMS* p_peer_params) { Loading Loading @@ -2241,6 +2252,10 @@ bool bta_av_co_set_active_peer(const RawAddress& peer_address) { return bta_av_co_cb.SetActivePeer(peer_address); } void bta_av_co_save_codec(const uint8_t* new_codec_config) { return bta_av_co_cb.SaveCodec(new_codec_config); } void bta_av_co_get_peer_params(const RawAddress& peer_address, tA2DP_ENCODER_INIT_PEER_PARAMS* p_peer_params) { bta_av_co_cb.GetPeerEncoderParameters(peer_address, p_peer_params); Loading system/btif/include/btif_av_co.h +2 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ // Returns true on success, otherwise false. bool bta_av_co_set_active_peer(const RawAddress& peer_addr); void bta_av_co_save_codec(const uint8_t* new_codec_config); // Gets the A2DP peer parameters that are used to initialize the encoder. // The peer address is |peer_addr|. // The parameters are stored in |p_peer_params|. Loading system/btif/src/btif_a2dp_sink.cc +3 −0 Original line number Diff line number Diff line Loading @@ -631,8 +631,11 @@ static void btif_a2dp_sink_decoder_update_event( btif_a2dp_sink_cb.rx_flush = false; APPL_TRACE_DEBUG("%s: reset to Sink role", __func__); bta_av_co_save_codec(p_buf->codec_info); btif_a2dp_sink_cb.decoder_interface = A2DP_GetDecoderInterface(p_buf->codec_info); if (btif_a2dp_sink_cb.decoder_interface == nullptr) { LOG_ERROR("%s: cannot stream audio: no source decoder interface", __func__); return; Loading Loading
system/btif/co/bta_av_co.cc +15 −0 Original line number Diff line number Diff line Loading @@ -389,6 +389,13 @@ class BtaAvCo { */ bool SetActivePeer(const RawAddress& peer_address); /** * Save the reconfig codec * * @param new_codec_config the new codec config */ void SaveCodec(const uint8_t* new_codec_config); /** * Get the encoder parameters for a peer. * Loading Loading @@ -1465,6 +1472,10 @@ bool BtaAvCo::SetActivePeer(const RawAddress& peer_address) { return true; } void BtaAvCo::SaveCodec(const uint8_t* new_codec_config) { memcpy(codec_config_, new_codec_config, sizeof(codec_config_)); } void BtaAvCo::GetPeerEncoderParameters( const RawAddress& peer_address, tA2DP_ENCODER_INIT_PEER_PARAMS* p_peer_params) { Loading Loading @@ -2241,6 +2252,10 @@ bool bta_av_co_set_active_peer(const RawAddress& peer_address) { return bta_av_co_cb.SetActivePeer(peer_address); } void bta_av_co_save_codec(const uint8_t* new_codec_config) { return bta_av_co_cb.SaveCodec(new_codec_config); } void bta_av_co_get_peer_params(const RawAddress& peer_address, tA2DP_ENCODER_INIT_PEER_PARAMS* p_peer_params) { bta_av_co_cb.GetPeerEncoderParameters(peer_address, p_peer_params); Loading
system/btif/include/btif_av_co.h +2 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ // Returns true on success, otherwise false. bool bta_av_co_set_active_peer(const RawAddress& peer_addr); void bta_av_co_save_codec(const uint8_t* new_codec_config); // Gets the A2DP peer parameters that are used to initialize the encoder. // The peer address is |peer_addr|. // The parameters are stored in |p_peer_params|. Loading
system/btif/src/btif_a2dp_sink.cc +3 −0 Original line number Diff line number Diff line Loading @@ -631,8 +631,11 @@ static void btif_a2dp_sink_decoder_update_event( btif_a2dp_sink_cb.rx_flush = false; APPL_TRACE_DEBUG("%s: reset to Sink role", __func__); bta_av_co_save_codec(p_buf->codec_info); btif_a2dp_sink_cb.decoder_interface = A2DP_GetDecoderInterface(p_buf->codec_info); if (btif_a2dp_sink_cb.decoder_interface == nullptr) { LOG_ERROR("%s: cannot stream audio: no source decoder interface", __func__); return; Loading