Loading system/audio_bluetooth_hw/stream_apis.h +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ constexpr audio_format_t kBluetoothDefaultAudioFormatBitsPerSample = constexpr unsigned int kBluetoothDefaultInputBufferMs = 20; constexpr unsigned int kBluetoothDefaultInputStateTimeoutMs = 20; constexpr unsigned int kBluetoothDefaultOutputBufferMs = 2; constexpr unsigned int kBluetoothDefaultOutputBufferMs = 10; constexpr unsigned int kBluetoothSpatializerOutputBufferMs = 10; constexpr audio_channel_mask_t kBluetoothDefaultOutputChannelModeMask = Loading system/bta/le_audio/client_parser.cc +37 −8 Original line number Diff line number Diff line Loading @@ -31,8 +31,11 @@ #include "bta_le_audio_api.h" #include "gap_api.h" #include "gatt_api.h" #include "gd/common/strings.h" #include "le_audio_types.h" #include "osi/include/allocator.h" #include "osi/include/log.h" using le_audio::types::acs_ac_record; Loading Loading @@ -379,11 +382,24 @@ bool PrepareAseCtpEnable(const std::vector<struct ctp_enable>& confs, std::vector<uint8_t>& value) { if (confs.size() == 0) return false; if (confs.size() > UINT8_MAX) { LOG_ERROR(" To many ASEs to update metadata"); return false; } uint16_t msg_len = confs.size() * kCtpEnableMinLen + kAseNumSize + kCtpOpSize; std::for_each(confs.begin(), confs.end(), [&msg_len](const struct ctp_enable& conf) { for (auto& conf : confs) { if (msg_len > GATT_MAX_ATTR_LEN) { LOG_ERROR(" Message length above GATT maximum"); return false; } if (conf.metadata.size() > UINT8_MAX) { LOG_ERROR(" ase[%d] metadata length is invalid", conf.ase_id); return false; } msg_len += conf.metadata.size(); }); } value.resize(msg_len); uint8_t* msg = value.data(); Loading Loading @@ -466,12 +482,25 @@ bool PrepareAseCtpUpdateMetadata( std::vector<uint8_t>& value) { if (confs.size() == 0) return false; if (confs.size() > UINT8_MAX) { LOG_ERROR(" To many ASEs to update metadata"); return false; } uint16_t msg_len = confs.size() * kCtpUpdateMetadataMinLen + kAseNumSize + kCtpOpSize; std::for_each(confs.begin(), confs.end(), [&msg_len](const struct ctp_update_metadata& conf) { for (auto& conf : confs) { if (msg_len > GATT_MAX_ATTR_LEN) { LOG_ERROR(" Message length above GATT maximum"); return false; } if (conf.metadata.size() > UINT8_MAX) { LOG_ERROR(" ase[%d] metadata length is invalid", conf.ase_id); return false; } msg_len += conf.metadata.size(); }); } value.resize(msg_len); uint8_t* msg = value.data(); Loading system/stack/rfcomm/port_api.cc +1 −1 Original line number Diff line number Diff line Loading @@ -516,7 +516,7 @@ bool PORT_IsOpening(RawAddress* bd_addr) { } LOG_INFO("RFC_MX_STATE_CONNECTED, found_port=%d, tRFC_PORT_STATE=%d", found_port, p_port->rfc.state); found_port, p_port != nullptr ? p_port->rfc.state : 0); if ((!found_port) || (found_port && (p_port->rfc.state < RFC_STATE_OPENED))) { /* Port is not established yet. */ Loading system/stack/smp/smp_act.cc +0 −9 Original line number Diff line number Diff line Loading @@ -902,15 +902,6 @@ void smp_br_check_authorization_request(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { } SMP_TRACE_DEBUG("%s: use h7 = %d", __func__, p_cb->key_derivation_h7_used); /* SMP over BR/EDR should always be used with CTKD, so derive LTK from * LK before receiving keys */ if ((p_cb->role == HCI_ROLE_CENTRAL && (p_cb->local_i_key & SMP_SEC_KEY_TYPE_ENC)) || (p_cb->role == HCI_ROLE_PERIPHERAL && (p_cb->local_r_key & SMP_SEC_KEY_TYPE_ENC))) { smp_generate_ltk(p_cb, p_data); } SMP_TRACE_DEBUG( "%s rcvs upgrades: i_keys=0x%x r_keys=0x%x (i-initiator r-responder)", __func__, p_cb->local_i_key, p_cb->local_r_key); Loading system/stack/smp/smp_keys.cc +1 −1 Original line number Diff line number Diff line Loading @@ -533,7 +533,7 @@ static void smp_generate_ltk_cont(uint16_t div, tSMP_CB* p_cb) { void smp_generate_ltk(tSMP_CB* p_cb, UNUSED_ATTR tSMP_INT_DATA* p_data) { SMP_TRACE_DEBUG("%s", __func__); if (p_cb->smp_over_br) { if (smp_get_br_state() == SMP_BR_STATE_BOND_PENDING) { smp_br_process_link_key(p_cb, NULL); return; } else if (p_cb->le_secure_connections_mode_is_used) { Loading Loading
system/audio_bluetooth_hw/stream_apis.h +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ constexpr audio_format_t kBluetoothDefaultAudioFormatBitsPerSample = constexpr unsigned int kBluetoothDefaultInputBufferMs = 20; constexpr unsigned int kBluetoothDefaultInputStateTimeoutMs = 20; constexpr unsigned int kBluetoothDefaultOutputBufferMs = 2; constexpr unsigned int kBluetoothDefaultOutputBufferMs = 10; constexpr unsigned int kBluetoothSpatializerOutputBufferMs = 10; constexpr audio_channel_mask_t kBluetoothDefaultOutputChannelModeMask = Loading
system/bta/le_audio/client_parser.cc +37 −8 Original line number Diff line number Diff line Loading @@ -31,8 +31,11 @@ #include "bta_le_audio_api.h" #include "gap_api.h" #include "gatt_api.h" #include "gd/common/strings.h" #include "le_audio_types.h" #include "osi/include/allocator.h" #include "osi/include/log.h" using le_audio::types::acs_ac_record; Loading Loading @@ -379,11 +382,24 @@ bool PrepareAseCtpEnable(const std::vector<struct ctp_enable>& confs, std::vector<uint8_t>& value) { if (confs.size() == 0) return false; if (confs.size() > UINT8_MAX) { LOG_ERROR(" To many ASEs to update metadata"); return false; } uint16_t msg_len = confs.size() * kCtpEnableMinLen + kAseNumSize + kCtpOpSize; std::for_each(confs.begin(), confs.end(), [&msg_len](const struct ctp_enable& conf) { for (auto& conf : confs) { if (msg_len > GATT_MAX_ATTR_LEN) { LOG_ERROR(" Message length above GATT maximum"); return false; } if (conf.metadata.size() > UINT8_MAX) { LOG_ERROR(" ase[%d] metadata length is invalid", conf.ase_id); return false; } msg_len += conf.metadata.size(); }); } value.resize(msg_len); uint8_t* msg = value.data(); Loading Loading @@ -466,12 +482,25 @@ bool PrepareAseCtpUpdateMetadata( std::vector<uint8_t>& value) { if (confs.size() == 0) return false; if (confs.size() > UINT8_MAX) { LOG_ERROR(" To many ASEs to update metadata"); return false; } uint16_t msg_len = confs.size() * kCtpUpdateMetadataMinLen + kAseNumSize + kCtpOpSize; std::for_each(confs.begin(), confs.end(), [&msg_len](const struct ctp_update_metadata& conf) { for (auto& conf : confs) { if (msg_len > GATT_MAX_ATTR_LEN) { LOG_ERROR(" Message length above GATT maximum"); return false; } if (conf.metadata.size() > UINT8_MAX) { LOG_ERROR(" ase[%d] metadata length is invalid", conf.ase_id); return false; } msg_len += conf.metadata.size(); }); } value.resize(msg_len); uint8_t* msg = value.data(); Loading
system/stack/rfcomm/port_api.cc +1 −1 Original line number Diff line number Diff line Loading @@ -516,7 +516,7 @@ bool PORT_IsOpening(RawAddress* bd_addr) { } LOG_INFO("RFC_MX_STATE_CONNECTED, found_port=%d, tRFC_PORT_STATE=%d", found_port, p_port->rfc.state); found_port, p_port != nullptr ? p_port->rfc.state : 0); if ((!found_port) || (found_port && (p_port->rfc.state < RFC_STATE_OPENED))) { /* Port is not established yet. */ Loading
system/stack/smp/smp_act.cc +0 −9 Original line number Diff line number Diff line Loading @@ -902,15 +902,6 @@ void smp_br_check_authorization_request(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) { } SMP_TRACE_DEBUG("%s: use h7 = %d", __func__, p_cb->key_derivation_h7_used); /* SMP over BR/EDR should always be used with CTKD, so derive LTK from * LK before receiving keys */ if ((p_cb->role == HCI_ROLE_CENTRAL && (p_cb->local_i_key & SMP_SEC_KEY_TYPE_ENC)) || (p_cb->role == HCI_ROLE_PERIPHERAL && (p_cb->local_r_key & SMP_SEC_KEY_TYPE_ENC))) { smp_generate_ltk(p_cb, p_data); } SMP_TRACE_DEBUG( "%s rcvs upgrades: i_keys=0x%x r_keys=0x%x (i-initiator r-responder)", __func__, p_cb->local_i_key, p_cb->local_r_key); Loading
system/stack/smp/smp_keys.cc +1 −1 Original line number Diff line number Diff line Loading @@ -533,7 +533,7 @@ static void smp_generate_ltk_cont(uint16_t div, tSMP_CB* p_cb) { void smp_generate_ltk(tSMP_CB* p_cb, UNUSED_ATTR tSMP_INT_DATA* p_data) { SMP_TRACE_DEBUG("%s", __func__); if (p_cb->smp_over_br) { if (smp_get_br_state() == SMP_BR_STATE_BOND_PENDING) { smp_br_process_link_key(p_cb, NULL); return; } else if (p_cb->le_secure_connections_mode_is_used) { Loading