Loading system/bta/le_audio/device_groups.cc +2 −1 Original line number Diff line number Diff line Loading @@ -1747,8 +1747,9 @@ bool LeAudioDeviceGroup::ConfigureAses( auto const max_required_device_cnt = NumOfAvailableForDirection(direction); auto required_device_cnt = max_required_device_cnt; uint8_t active_ase_cnt = 0; log::debug("Maximum {} device(s) required for {}", max_required_device_cnt, direction_str); uint8_t active_ase_cnt = 0; auto configuration_closure = [&](LeAudioDevice* dev) -> void { /* For the moment, we configure only connected devices and when it is * ready to stream i.e. All ASEs are discovered and dev is reported as Loading system/bta/le_audio/devices.cc +11 −5 Original line number Diff line number Diff line Loading @@ -291,16 +291,17 @@ bool LeAudioDevice::ConfigureAses(const set_configurations::AudioSetConfiguratio AudioLocations& group_audio_locations_memo, const AudioContexts& metadata_context_types, const std::vector<uint8_t>& ccid_lists, bool reuse_cis_id) { auto direction_str = (direction == types::kLeAudioDirectionSink ? "Sink" : "Source"); /* First try to use the already configured ASE */ auto ase = GetFirstActiveAseByDirection(direction); if (ase) { log::info("{}, using an already active ASE id={}", address_, ase->id); log::info("{}, using an already active {} ASE id={}", address_, direction_str, ase->id); } else { ase = GetFirstInactiveAse(direction, reuse_cis_id); } if (!ase) { log::error("{}, unable to find an ASE to configure", address_); log::error("{}, unable to find a {} ASE to configure", address_, direction_str); PrintDebugState(); return false; } Loading Loading @@ -339,6 +340,8 @@ bool LeAudioDevice::ConfigureAses(const set_configurations::AudioSetConfiguratio auto const& ase_cfg = ase_configs.at(i); if (utils::IsCodecUsingLtvFormat(ase_cfg.codec.id) && !utils::GetConfigurationSupportedPac(pacs, ase_cfg.codec)) { log::error("{}, No {} PAC found matching codec: {}. Stop the activation.", address_, direction_str, common::ToString(ase_cfg.codec)); return false; } } Loading @@ -356,12 +359,15 @@ bool LeAudioDevice::ConfigureAses(const set_configurations::AudioSetConfiguratio uint8_t max_required_ase_per_dev = ase_configs.size() / num_of_devices + (ase_configs.size() % num_of_devices); int needed_ase = std::min((int)(max_required_ase_per_dev), (int)(ase_configs.size())); log::debug("{}, {} {} ASE(s) required for this configuration.", address_, needed_ase, direction_str); for (int i = 0; i < needed_ase; ++i) { auto const& ase_cfg = ase_configs.at(i); if (utils::IsCodecUsingLtvFormat(ase_cfg.codec.id) && !utils::GetConfigurationSupportedPac(pacs, ase_cfg.codec)) { log::error("{}, no matching PAC found. Stop the activation.", address_); log::error("{}, No {} PAC found matching codec: {}. Stop the activation.", address_, direction_str, common::ToString(ase_cfg.codec)); return false; } } Loading Loading @@ -429,8 +435,8 @@ bool LeAudioDevice::ConfigureAses(const set_configurations::AudioSetConfiguratio log::debug( "device={}, activated ASE id={}, direction={}, max_sdu_size={}, " "cis_id={}, target_latency={}", address_, ase->id, direction == 1 ? "snk" : "src", ase->qos_config.max_sdu_size, ase->cis_id, ase_cfg.qos.target_latency); address_, ase->id, direction_str, ase->qos_config.max_sdu_size, ase->cis_id, ase_cfg.qos.target_latency); /* Try to use the already active ASE */ ase = GetNextActiveAseWithSameDirection(ase); Loading system/bta/le_audio/le_audio_utils.cc +1 −1 Original line number Diff line number Diff line Loading @@ -584,7 +584,7 @@ static bool IsCodecConfigSettingSupported( return false; } log::debug(": Settings for format: 0x{:#02x} ", codec_id.coding_format); log::debug("Verifying coding format: {:#02x} ", codec_id.coding_format); if (utils::IsCodecUsingLtvFormat(codec_id)) { log::assert_that(!pac.codec_spec_caps.IsEmpty(), Loading Loading
system/bta/le_audio/device_groups.cc +2 −1 Original line number Diff line number Diff line Loading @@ -1747,8 +1747,9 @@ bool LeAudioDeviceGroup::ConfigureAses( auto const max_required_device_cnt = NumOfAvailableForDirection(direction); auto required_device_cnt = max_required_device_cnt; uint8_t active_ase_cnt = 0; log::debug("Maximum {} device(s) required for {}", max_required_device_cnt, direction_str); uint8_t active_ase_cnt = 0; auto configuration_closure = [&](LeAudioDevice* dev) -> void { /* For the moment, we configure only connected devices and when it is * ready to stream i.e. All ASEs are discovered and dev is reported as Loading
system/bta/le_audio/devices.cc +11 −5 Original line number Diff line number Diff line Loading @@ -291,16 +291,17 @@ bool LeAudioDevice::ConfigureAses(const set_configurations::AudioSetConfiguratio AudioLocations& group_audio_locations_memo, const AudioContexts& metadata_context_types, const std::vector<uint8_t>& ccid_lists, bool reuse_cis_id) { auto direction_str = (direction == types::kLeAudioDirectionSink ? "Sink" : "Source"); /* First try to use the already configured ASE */ auto ase = GetFirstActiveAseByDirection(direction); if (ase) { log::info("{}, using an already active ASE id={}", address_, ase->id); log::info("{}, using an already active {} ASE id={}", address_, direction_str, ase->id); } else { ase = GetFirstInactiveAse(direction, reuse_cis_id); } if (!ase) { log::error("{}, unable to find an ASE to configure", address_); log::error("{}, unable to find a {} ASE to configure", address_, direction_str); PrintDebugState(); return false; } Loading Loading @@ -339,6 +340,8 @@ bool LeAudioDevice::ConfigureAses(const set_configurations::AudioSetConfiguratio auto const& ase_cfg = ase_configs.at(i); if (utils::IsCodecUsingLtvFormat(ase_cfg.codec.id) && !utils::GetConfigurationSupportedPac(pacs, ase_cfg.codec)) { log::error("{}, No {} PAC found matching codec: {}. Stop the activation.", address_, direction_str, common::ToString(ase_cfg.codec)); return false; } } Loading @@ -356,12 +359,15 @@ bool LeAudioDevice::ConfigureAses(const set_configurations::AudioSetConfiguratio uint8_t max_required_ase_per_dev = ase_configs.size() / num_of_devices + (ase_configs.size() % num_of_devices); int needed_ase = std::min((int)(max_required_ase_per_dev), (int)(ase_configs.size())); log::debug("{}, {} {} ASE(s) required for this configuration.", address_, needed_ase, direction_str); for (int i = 0; i < needed_ase; ++i) { auto const& ase_cfg = ase_configs.at(i); if (utils::IsCodecUsingLtvFormat(ase_cfg.codec.id) && !utils::GetConfigurationSupportedPac(pacs, ase_cfg.codec)) { log::error("{}, no matching PAC found. Stop the activation.", address_); log::error("{}, No {} PAC found matching codec: {}. Stop the activation.", address_, direction_str, common::ToString(ase_cfg.codec)); return false; } } Loading Loading @@ -429,8 +435,8 @@ bool LeAudioDevice::ConfigureAses(const set_configurations::AudioSetConfiguratio log::debug( "device={}, activated ASE id={}, direction={}, max_sdu_size={}, " "cis_id={}, target_latency={}", address_, ase->id, direction == 1 ? "snk" : "src", ase->qos_config.max_sdu_size, ase->cis_id, ase_cfg.qos.target_latency); address_, ase->id, direction_str, ase->qos_config.max_sdu_size, ase->cis_id, ase_cfg.qos.target_latency); /* Try to use the already active ASE */ ase = GetNextActiveAseWithSameDirection(ase); Loading
system/bta/le_audio/le_audio_utils.cc +1 −1 Original line number Diff line number Diff line Loading @@ -584,7 +584,7 @@ static bool IsCodecConfigSettingSupported( return false; } log::debug(": Settings for format: 0x{:#02x} ", codec_id.coding_format); log::debug("Verifying coding format: {:#02x} ", codec_id.coding_format); if (utils::IsCodecUsingLtvFormat(codec_id)) { log::assert_that(!pac.codec_spec_caps.IsEmpty(), Loading