Loading system/audio_hal_interface/aidl/audio_aidl_interfaces.h +1 −4 Original line number Original line Diff line number Diff line Loading @@ -37,7 +37,6 @@ #include <aidl/android/hardware/bluetooth/audio/AudioConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/AudioConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/AudioLocation.h> #include <aidl/android/hardware/bluetooth/audio/AudioLocation.h> #include <aidl/android/hardware/bluetooth/audio/BluetoothAudioStatus.h> #include <aidl/android/hardware/bluetooth/audio/BluetoothAudioStatus.h> #include <aidl/android/hardware/bluetooth/audio/BroadcastConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/ChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/ChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/CodecCapabilities.h> #include <aidl/android/hardware/bluetooth/audio/CodecCapabilities.h> #include <aidl/android/hardware/bluetooth/audio/CodecConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/CodecConfiguration.h> Loading @@ -52,10 +51,10 @@ #include <aidl/android/hardware/bluetooth/audio/LdacChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/LdacChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/LdacConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LdacConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LdacQualityIndex.h> #include <aidl/android/hardware/bluetooth/audio/LdacQualityIndex.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioBroadcastConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioMode.h> #include <aidl/android/hardware/bluetooth/audio/PcmCapabilities.h> #include <aidl/android/hardware/bluetooth/audio/PcmCapabilities.h> #include <aidl/android/hardware/bluetooth/audio/PcmConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/PcmConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/PresentationPosition.h> #include <aidl/android/hardware/bluetooth/audio/PresentationPosition.h> Loading @@ -64,8 +63,6 @@ #include <aidl/android/hardware/bluetooth/audio/SbcChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/SbcChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/SbcConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/SbcConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/SessionType.h> #include <aidl/android/hardware/bluetooth/audio/SessionType.h> #include <aidl/android/hardware/bluetooth/audio/UnicastConfiguration.h> #ifdef LOG_INFO #ifdef LOG_INFO Loading system/audio_hal_interface/aidl/le_audio_software.cc +3 −9 Original line number Original line Diff line number Diff line Loading @@ -36,9 +36,7 @@ using ::aidl::android::hardware::bluetooth::audio::ChannelMode; using ::aidl::android::hardware::bluetooth::audio::CodecType; using ::aidl::android::hardware::bluetooth::audio::CodecType; using ::aidl::android::hardware::bluetooth::audio::Lc3Configuration; using ::aidl::android::hardware::bluetooth::audio::Lc3Configuration; using ::aidl::android::hardware::bluetooth::audio::LeAudioCodecConfiguration; using ::aidl::android::hardware::bluetooth::audio::LeAudioCodecConfiguration; using ::aidl::android::hardware::bluetooth::audio::LeAudioMode; using ::aidl::android::hardware::bluetooth::audio::PcmConfiguration; using ::aidl::android::hardware::bluetooth::audio::PcmConfiguration; using ::aidl::android::hardware::bluetooth::audio::UnicastConfiguration; using ::bluetooth::audio::aidl::AudioConfiguration; using ::bluetooth::audio::aidl::AudioConfiguration; using ::bluetooth::audio::aidl::BluetoothAudioCtrlAck; using ::bluetooth::audio::aidl::BluetoothAudioCtrlAck; using ::bluetooth::audio::le_audio::LeAudioClientInterface; using ::bluetooth::audio::le_audio::LeAudioClientInterface; Loading Loading @@ -472,8 +470,8 @@ AudioConfiguration offload_config_to_hal_audio_config( .octetsPerFrame = static_cast<int32_t>(offload_config.octets_per_frame), .octetsPerFrame = static_cast<int32_t>(offload_config.octets_per_frame), .blocksPerSdu = static_cast<int8_t>(offload_config.blocks_per_sdu), .blocksPerSdu = static_cast<int8_t>(offload_config.blocks_per_sdu), }; }; UnicastConfiguration ucast_config = { LeAudioConfiguration ucast_config = { .peerDelay = static_cast<int32_t>(offload_config.peer_delay), .peerDelayUs = static_cast<int32_t>(offload_config.peer_delay_ms * 1000), .leAudioCodecConfig = LeAudioCodecConfiguration(lc3_config)}; .leAudioCodecConfig = LeAudioCodecConfiguration(lc3_config)}; for (auto& [handle, location] : offload_config.stream_map) { for (auto& [handle, location] : offload_config.stream_map) { Loading @@ -483,11 +481,7 @@ AudioConfiguration offload_config_to_hal_audio_config( }); }); } } LeAudioConfiguration le_audio_config{ return AudioConfiguration(ucast_config); .mode = LeAudioMode::UNICAST, .modeConfig = LeAudioConfiguration::LeAudioModeConfig(ucast_config), }; return AudioConfiguration(le_audio_config); } } } // namespace le_audio } // namespace le_audio Loading system/audio_hal_interface/aidl/transport_instance.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -59,6 +59,9 @@ class IBluetoothTransportInstance { audio_config_.set<AudioConfiguration::leAudioConfig>( audio_config_.set<AudioConfiguration::leAudioConfig>( audio_config.get<AudioConfiguration::leAudioConfig>()); audio_config.get<AudioConfiguration::leAudioConfig>()); break; break; case AudioConfiguration::leAudioBroadcastConfig: audio_config_.set<AudioConfiguration::leAudioBroadcastConfig>( audio_config.get<AudioConfiguration::leAudioBroadcastConfig>()); } } } } Loading system/audio_hal_interface/hidl/le_audio_software_hidl.cc +1 −1 Original line number Original line Diff line number Diff line Loading @@ -129,7 +129,7 @@ AudioConfiguration_2_2 offload_config_to_hal_audio_config( le_audio_config.mode = LeAudioMode::UNICAST; le_audio_config.mode = LeAudioMode::UNICAST; le_audio_config.config.unicastConfig() = { le_audio_config.config.unicastConfig() = { .streamMap = std::move(hal_map), .streamMap = std::move(hal_map), .peerDelay = offload_config.peer_delay, .peerDelay = offload_config.peer_delay_ms, .lc3Config = {.pcmBitDepth = le_audio_bits_per_sample2audio_hal( .lc3Config = {.pcmBitDepth = le_audio_bits_per_sample2audio_hal( offload_config.bits_per_sample), offload_config.bits_per_sample), .samplingFrequency = le_audio_sample_rate2audio_hal( .samplingFrequency = le_audio_sample_rate2audio_hal( Loading system/bta/le_audio/codec_manager.cc +8 −8 Original line number Original line Diff line number Diff line Loading @@ -83,7 +83,7 @@ struct codec_manager_impl { CodecLocation GetCodecLocation(void) const { return codec_location_; } CodecLocation GetCodecLocation(void) const { return codec_location_; } void UpdateActiveSourceAudioConfig( void UpdateActiveSourceAudioConfig( const le_audio::stream_configuration& stream_conf, uint16_t delay) { const le_audio::stream_configuration& stream_conf, uint16_t delay_ms) { if (stream_conf.sink_streams.empty()) return; if (stream_conf.sink_streams.empty()) return; sink_config.stream_map = std::move(stream_conf.sink_streams); sink_config.stream_map = std::move(stream_conf.sink_streams); Loading @@ -96,12 +96,12 @@ struct codec_manager_impl { // TODO: set the default value 1 for now, would change it if we need more // TODO: set the default value 1 for now, would change it if we need more // configuration // configuration sink_config.blocks_per_sdu = 1; sink_config.blocks_per_sdu = 1; sink_config.peer_delay = delay; sink_config.peer_delay_ms = delay_ms; LeAudioClientAudioSource::UpdateAudioConfigToHal(sink_config); LeAudioClientAudioSource::UpdateAudioConfigToHal(sink_config); } } void UpdateActiveSinkAudioConfig( void UpdateActiveSinkAudioConfig( const le_audio::stream_configuration& stream_conf, uint16_t delay) { const le_audio::stream_configuration& stream_conf, uint16_t delay_ms) { if (stream_conf.source_streams.empty()) return; if (stream_conf.source_streams.empty()) return; source_config.stream_map = std::move(stream_conf.source_streams); source_config.stream_map = std::move(stream_conf.source_streams); Loading @@ -114,7 +114,7 @@ struct codec_manager_impl { // TODO: set the default value 1 for now, would change it if we need more // TODO: set the default value 1 for now, would change it if we need more // configuration // configuration source_config.blocks_per_sdu = 1; source_config.blocks_per_sdu = 1; source_config.peer_delay = delay; source_config.peer_delay_ms = delay_ms; LeAudioClientAudioSink::UpdateAudioConfigToHal(source_config); LeAudioClientAudioSink::UpdateAudioConfigToHal(source_config); } } Loading Loading @@ -306,17 +306,17 @@ types::CodecLocation CodecManager::GetCodecLocation(void) const { } } void CodecManager::UpdateActiveSourceAudioConfig( void CodecManager::UpdateActiveSourceAudioConfig( const stream_configuration& stream_conf, uint16_t delay) { const stream_configuration& stream_conf, uint16_t delay_ms) { if (pimpl_->IsRunning()) if (pimpl_->IsRunning()) pimpl_->codec_manager_impl_->UpdateActiveSourceAudioConfig(stream_conf, pimpl_->codec_manager_impl_->UpdateActiveSourceAudioConfig(stream_conf, delay); delay_ms); } } void CodecManager::UpdateActiveSinkAudioConfig( void CodecManager::UpdateActiveSinkAudioConfig( const stream_configuration& stream_conf, uint16_t delay) { const stream_configuration& stream_conf, uint16_t delay_ms) { if (pimpl_->IsRunning()) if (pimpl_->IsRunning()) pimpl_->codec_manager_impl_->UpdateActiveSinkAudioConfig(stream_conf, pimpl_->codec_manager_impl_->UpdateActiveSinkAudioConfig(stream_conf, delay); delay_ms); } } const AudioSetConfigurations* CodecManager::GetOffloadCodecConfig( const AudioSetConfigurations* CodecManager::GetOffloadCodecConfig( Loading Loading
system/audio_hal_interface/aidl/audio_aidl_interfaces.h +1 −4 Original line number Original line Diff line number Diff line Loading @@ -37,7 +37,6 @@ #include <aidl/android/hardware/bluetooth/audio/AudioConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/AudioConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/AudioLocation.h> #include <aidl/android/hardware/bluetooth/audio/AudioLocation.h> #include <aidl/android/hardware/bluetooth/audio/BluetoothAudioStatus.h> #include <aidl/android/hardware/bluetooth/audio/BluetoothAudioStatus.h> #include <aidl/android/hardware/bluetooth/audio/BroadcastConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/ChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/ChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/CodecCapabilities.h> #include <aidl/android/hardware/bluetooth/audio/CodecCapabilities.h> #include <aidl/android/hardware/bluetooth/audio/CodecConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/CodecConfiguration.h> Loading @@ -52,10 +51,10 @@ #include <aidl/android/hardware/bluetooth/audio/LdacChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/LdacChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/LdacConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LdacConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LdacQualityIndex.h> #include <aidl/android/hardware/bluetooth/audio/LdacQualityIndex.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioBroadcastConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioCodecCapabilitiesSetting.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioCodecConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/LeAudioMode.h> #include <aidl/android/hardware/bluetooth/audio/PcmCapabilities.h> #include <aidl/android/hardware/bluetooth/audio/PcmCapabilities.h> #include <aidl/android/hardware/bluetooth/audio/PcmConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/PcmConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/PresentationPosition.h> #include <aidl/android/hardware/bluetooth/audio/PresentationPosition.h> Loading @@ -64,8 +63,6 @@ #include <aidl/android/hardware/bluetooth/audio/SbcChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/SbcChannelMode.h> #include <aidl/android/hardware/bluetooth/audio/SbcConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/SbcConfiguration.h> #include <aidl/android/hardware/bluetooth/audio/SessionType.h> #include <aidl/android/hardware/bluetooth/audio/SessionType.h> #include <aidl/android/hardware/bluetooth/audio/UnicastConfiguration.h> #ifdef LOG_INFO #ifdef LOG_INFO Loading
system/audio_hal_interface/aidl/le_audio_software.cc +3 −9 Original line number Original line Diff line number Diff line Loading @@ -36,9 +36,7 @@ using ::aidl::android::hardware::bluetooth::audio::ChannelMode; using ::aidl::android::hardware::bluetooth::audio::CodecType; using ::aidl::android::hardware::bluetooth::audio::CodecType; using ::aidl::android::hardware::bluetooth::audio::Lc3Configuration; using ::aidl::android::hardware::bluetooth::audio::Lc3Configuration; using ::aidl::android::hardware::bluetooth::audio::LeAudioCodecConfiguration; using ::aidl::android::hardware::bluetooth::audio::LeAudioCodecConfiguration; using ::aidl::android::hardware::bluetooth::audio::LeAudioMode; using ::aidl::android::hardware::bluetooth::audio::PcmConfiguration; using ::aidl::android::hardware::bluetooth::audio::PcmConfiguration; using ::aidl::android::hardware::bluetooth::audio::UnicastConfiguration; using ::bluetooth::audio::aidl::AudioConfiguration; using ::bluetooth::audio::aidl::AudioConfiguration; using ::bluetooth::audio::aidl::BluetoothAudioCtrlAck; using ::bluetooth::audio::aidl::BluetoothAudioCtrlAck; using ::bluetooth::audio::le_audio::LeAudioClientInterface; using ::bluetooth::audio::le_audio::LeAudioClientInterface; Loading Loading @@ -472,8 +470,8 @@ AudioConfiguration offload_config_to_hal_audio_config( .octetsPerFrame = static_cast<int32_t>(offload_config.octets_per_frame), .octetsPerFrame = static_cast<int32_t>(offload_config.octets_per_frame), .blocksPerSdu = static_cast<int8_t>(offload_config.blocks_per_sdu), .blocksPerSdu = static_cast<int8_t>(offload_config.blocks_per_sdu), }; }; UnicastConfiguration ucast_config = { LeAudioConfiguration ucast_config = { .peerDelay = static_cast<int32_t>(offload_config.peer_delay), .peerDelayUs = static_cast<int32_t>(offload_config.peer_delay_ms * 1000), .leAudioCodecConfig = LeAudioCodecConfiguration(lc3_config)}; .leAudioCodecConfig = LeAudioCodecConfiguration(lc3_config)}; for (auto& [handle, location] : offload_config.stream_map) { for (auto& [handle, location] : offload_config.stream_map) { Loading @@ -483,11 +481,7 @@ AudioConfiguration offload_config_to_hal_audio_config( }); }); } } LeAudioConfiguration le_audio_config{ return AudioConfiguration(ucast_config); .mode = LeAudioMode::UNICAST, .modeConfig = LeAudioConfiguration::LeAudioModeConfig(ucast_config), }; return AudioConfiguration(le_audio_config); } } } // namespace le_audio } // namespace le_audio Loading
system/audio_hal_interface/aidl/transport_instance.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -59,6 +59,9 @@ class IBluetoothTransportInstance { audio_config_.set<AudioConfiguration::leAudioConfig>( audio_config_.set<AudioConfiguration::leAudioConfig>( audio_config.get<AudioConfiguration::leAudioConfig>()); audio_config.get<AudioConfiguration::leAudioConfig>()); break; break; case AudioConfiguration::leAudioBroadcastConfig: audio_config_.set<AudioConfiguration::leAudioBroadcastConfig>( audio_config.get<AudioConfiguration::leAudioBroadcastConfig>()); } } } } Loading
system/audio_hal_interface/hidl/le_audio_software_hidl.cc +1 −1 Original line number Original line Diff line number Diff line Loading @@ -129,7 +129,7 @@ AudioConfiguration_2_2 offload_config_to_hal_audio_config( le_audio_config.mode = LeAudioMode::UNICAST; le_audio_config.mode = LeAudioMode::UNICAST; le_audio_config.config.unicastConfig() = { le_audio_config.config.unicastConfig() = { .streamMap = std::move(hal_map), .streamMap = std::move(hal_map), .peerDelay = offload_config.peer_delay, .peerDelay = offload_config.peer_delay_ms, .lc3Config = {.pcmBitDepth = le_audio_bits_per_sample2audio_hal( .lc3Config = {.pcmBitDepth = le_audio_bits_per_sample2audio_hal( offload_config.bits_per_sample), offload_config.bits_per_sample), .samplingFrequency = le_audio_sample_rate2audio_hal( .samplingFrequency = le_audio_sample_rate2audio_hal( Loading
system/bta/le_audio/codec_manager.cc +8 −8 Original line number Original line Diff line number Diff line Loading @@ -83,7 +83,7 @@ struct codec_manager_impl { CodecLocation GetCodecLocation(void) const { return codec_location_; } CodecLocation GetCodecLocation(void) const { return codec_location_; } void UpdateActiveSourceAudioConfig( void UpdateActiveSourceAudioConfig( const le_audio::stream_configuration& stream_conf, uint16_t delay) { const le_audio::stream_configuration& stream_conf, uint16_t delay_ms) { if (stream_conf.sink_streams.empty()) return; if (stream_conf.sink_streams.empty()) return; sink_config.stream_map = std::move(stream_conf.sink_streams); sink_config.stream_map = std::move(stream_conf.sink_streams); Loading @@ -96,12 +96,12 @@ struct codec_manager_impl { // TODO: set the default value 1 for now, would change it if we need more // TODO: set the default value 1 for now, would change it if we need more // configuration // configuration sink_config.blocks_per_sdu = 1; sink_config.blocks_per_sdu = 1; sink_config.peer_delay = delay; sink_config.peer_delay_ms = delay_ms; LeAudioClientAudioSource::UpdateAudioConfigToHal(sink_config); LeAudioClientAudioSource::UpdateAudioConfigToHal(sink_config); } } void UpdateActiveSinkAudioConfig( void UpdateActiveSinkAudioConfig( const le_audio::stream_configuration& stream_conf, uint16_t delay) { const le_audio::stream_configuration& stream_conf, uint16_t delay_ms) { if (stream_conf.source_streams.empty()) return; if (stream_conf.source_streams.empty()) return; source_config.stream_map = std::move(stream_conf.source_streams); source_config.stream_map = std::move(stream_conf.source_streams); Loading @@ -114,7 +114,7 @@ struct codec_manager_impl { // TODO: set the default value 1 for now, would change it if we need more // TODO: set the default value 1 for now, would change it if we need more // configuration // configuration source_config.blocks_per_sdu = 1; source_config.blocks_per_sdu = 1; source_config.peer_delay = delay; source_config.peer_delay_ms = delay_ms; LeAudioClientAudioSink::UpdateAudioConfigToHal(source_config); LeAudioClientAudioSink::UpdateAudioConfigToHal(source_config); } } Loading Loading @@ -306,17 +306,17 @@ types::CodecLocation CodecManager::GetCodecLocation(void) const { } } void CodecManager::UpdateActiveSourceAudioConfig( void CodecManager::UpdateActiveSourceAudioConfig( const stream_configuration& stream_conf, uint16_t delay) { const stream_configuration& stream_conf, uint16_t delay_ms) { if (pimpl_->IsRunning()) if (pimpl_->IsRunning()) pimpl_->codec_manager_impl_->UpdateActiveSourceAudioConfig(stream_conf, pimpl_->codec_manager_impl_->UpdateActiveSourceAudioConfig(stream_conf, delay); delay_ms); } } void CodecManager::UpdateActiveSinkAudioConfig( void CodecManager::UpdateActiveSinkAudioConfig( const stream_configuration& stream_conf, uint16_t delay) { const stream_configuration& stream_conf, uint16_t delay_ms) { if (pimpl_->IsRunning()) if (pimpl_->IsRunning()) pimpl_->codec_manager_impl_->UpdateActiveSinkAudioConfig(stream_conf, pimpl_->codec_manager_impl_->UpdateActiveSinkAudioConfig(stream_conf, delay); delay_ms); } } const AudioSetConfigurations* CodecManager::GetOffloadCodecConfig( const AudioSetConfigurations* CodecManager::GetOffloadCodecConfig( Loading