Loading system/audio_hal_interface/aidl/le_audio_utils.cc +7 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ #include "le_audio_utils.h" #include <com_android_bluetooth_flags.h> #include <optional> #include "hardware/bt_le_audio.h" Loading Loading @@ -490,6 +492,11 @@ GetCodecConfigSettingFromAidl( if (!ase_config->codecConfiguration.empty()) { stack_config.params = GetStackLeAudioLtvMapFromAidlFormat(ase_config->codecConfiguration); auto cfg = stack_config.params.GetAsCoreCodecConfig(); if (cfg.audio_channel_allocation.has_value()) { stack_config.channel_count_per_iso_stream = std::bitset<32>(cfg.audio_channel_allocation.value()).count(); } } } Loading system/audio_hal_interface/aidl/le_audio_utils_unittest.cc +4 −2 Original line number Diff line number Diff line Loading @@ -394,8 +394,10 @@ PrepareReferenceAseDirectionConfigLc3(bool is_left, bool is_right, auto [aidl_metadata, _] = PrepareReferenceMetadata(); aidl_ase_config.aseConfiguration.metadata = aidl_metadata; // FIXME: Seems redundant if audio allocations in .codec.params is mandatory // stack_ase_config.codec.channel_count_per_iso_stream = ? auto stack_codec_params = stack_params.GetAsCoreCodecConfig(); stack_ase_config.codec.channel_count_per_iso_stream = std::bitset<32>(stack_codec_params.audio_channel_allocation.value_or(1)) .count(); /* QoS configuration */ if (has_qos) { Loading Loading
system/audio_hal_interface/aidl/le_audio_utils.cc +7 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ #include "le_audio_utils.h" #include <com_android_bluetooth_flags.h> #include <optional> #include "hardware/bt_le_audio.h" Loading Loading @@ -490,6 +492,11 @@ GetCodecConfigSettingFromAidl( if (!ase_config->codecConfiguration.empty()) { stack_config.params = GetStackLeAudioLtvMapFromAidlFormat(ase_config->codecConfiguration); auto cfg = stack_config.params.GetAsCoreCodecConfig(); if (cfg.audio_channel_allocation.has_value()) { stack_config.channel_count_per_iso_stream = std::bitset<32>(cfg.audio_channel_allocation.value()).count(); } } } Loading
system/audio_hal_interface/aidl/le_audio_utils_unittest.cc +4 −2 Original line number Diff line number Diff line Loading @@ -394,8 +394,10 @@ PrepareReferenceAseDirectionConfigLc3(bool is_left, bool is_right, auto [aidl_metadata, _] = PrepareReferenceMetadata(); aidl_ase_config.aseConfiguration.metadata = aidl_metadata; // FIXME: Seems redundant if audio allocations in .codec.params is mandatory // stack_ase_config.codec.channel_count_per_iso_stream = ? auto stack_codec_params = stack_params.GetAsCoreCodecConfig(); stack_ase_config.codec.channel_count_per_iso_stream = std::bitset<32>(stack_codec_params.audio_channel_allocation.value_or(1)) .count(); /* QoS configuration */ if (has_qos) { Loading