Loading system/bta/le_audio/client.cc +10 −6 Original line number Original line Diff line number Diff line Loading @@ -3413,7 +3413,7 @@ class LeAudioClientImpl : public LeAudioClient { audio_receiver_state_ = AudioState::STARTED; audio_receiver_state_ = AudioState::STARTED; } } bool StartSendingAudio(int group_id) { void StartSendingAudio(int group_id) { LOG(INFO) << __func__; LOG(INFO) << __func__; LeAudioDeviceGroup* group = aseGroups_.FindById(group_id); LeAudioDeviceGroup* group = aseGroups_.FindById(group_id); Loading @@ -3425,7 +3425,8 @@ class LeAudioClientImpl : public LeAudioClient { auto* stream_conf = GetStreamSinkConfiguration(group); auto* stream_conf = GetStreamSinkConfiguration(group); if (stream_conf == nullptr) { if (stream_conf == nullptr) { LOG(ERROR) << __func__ << " could not get sink configuration"; LOG(ERROR) << __func__ << " could not get sink configuration"; return false; groupStateMachine_->StopStream(group); return; } } LOG_DEBUG("Sink stream config (#%d):\n", LOG_DEBUG("Sink stream config (#%d):\n", Loading Loading @@ -3457,7 +3458,8 @@ class LeAudioClientImpl : public LeAudioClient { audio_framework_source_config, current_source_codec_config); audio_framework_source_config, current_source_codec_config); if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { LOG_ERROR("Left channel codec setup failed with err: %d", codec_status); LOG_ERROR("Left channel codec setup failed with err: %d", codec_status); return false; groupStateMachine_->StopStream(group); return; } } sw_enc_right = sw_enc_right = Loading @@ -3467,7 +3469,8 @@ class LeAudioClientImpl : public LeAudioClient { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { LOG_ERROR("Right channel codec setup failed with err: %d", LOG_ERROR("Right channel codec setup failed with err: %d", codec_status); codec_status); return false; groupStateMachine_->StopStream(group); return; } } } } Loading @@ -3487,8 +3490,6 @@ class LeAudioClientImpl : public LeAudioClient { weak_factory_.GetWeakPtr(), std::placeholders::_1, weak_factory_.GetWeakPtr(), std::placeholders::_1, std::placeholders::_2)); std::placeholders::_2)); } } return true; } } const struct le_audio::stream_configuration* GetStreamSourceConfiguration( const struct le_audio::stream_configuration* GetStreamSourceConfiguration( Loading @@ -3511,6 +3512,7 @@ class LeAudioClientImpl : public LeAudioClient { if (!stream_conf) { if (!stream_conf) { LOG(WARNING) << " Could not get source configuration for group " LOG(WARNING) << " Could not get source configuration for group " << active_group_id_ << " probably microphone not configured"; << active_group_id_ << " probably microphone not configured"; groupStateMachine_->StopStream(group); return; return; } } Loading @@ -3531,6 +3533,7 @@ class LeAudioClientImpl : public LeAudioClient { audio_framework_sink_config); audio_framework_sink_config); if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { LOG_ERROR("Left channel codec setup failed with err: %d", codec_status); LOG_ERROR("Left channel codec setup failed with err: %d", codec_status); groupStateMachine_->StopStream(group); return; return; } } Loading @@ -3541,6 +3544,7 @@ class LeAudioClientImpl : public LeAudioClient { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { LOG_ERROR("Right channel codec setup failed with err: %d", LOG_ERROR("Right channel codec setup failed with err: %d", codec_status); codec_status); groupStateMachine_->StopStream(group); return; return; } } } } Loading Loading
system/bta/le_audio/client.cc +10 −6 Original line number Original line Diff line number Diff line Loading @@ -3413,7 +3413,7 @@ class LeAudioClientImpl : public LeAudioClient { audio_receiver_state_ = AudioState::STARTED; audio_receiver_state_ = AudioState::STARTED; } } bool StartSendingAudio(int group_id) { void StartSendingAudio(int group_id) { LOG(INFO) << __func__; LOG(INFO) << __func__; LeAudioDeviceGroup* group = aseGroups_.FindById(group_id); LeAudioDeviceGroup* group = aseGroups_.FindById(group_id); Loading @@ -3425,7 +3425,8 @@ class LeAudioClientImpl : public LeAudioClient { auto* stream_conf = GetStreamSinkConfiguration(group); auto* stream_conf = GetStreamSinkConfiguration(group); if (stream_conf == nullptr) { if (stream_conf == nullptr) { LOG(ERROR) << __func__ << " could not get sink configuration"; LOG(ERROR) << __func__ << " could not get sink configuration"; return false; groupStateMachine_->StopStream(group); return; } } LOG_DEBUG("Sink stream config (#%d):\n", LOG_DEBUG("Sink stream config (#%d):\n", Loading Loading @@ -3457,7 +3458,8 @@ class LeAudioClientImpl : public LeAudioClient { audio_framework_source_config, current_source_codec_config); audio_framework_source_config, current_source_codec_config); if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { LOG_ERROR("Left channel codec setup failed with err: %d", codec_status); LOG_ERROR("Left channel codec setup failed with err: %d", codec_status); return false; groupStateMachine_->StopStream(group); return; } } sw_enc_right = sw_enc_right = Loading @@ -3467,7 +3469,8 @@ class LeAudioClientImpl : public LeAudioClient { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { LOG_ERROR("Right channel codec setup failed with err: %d", LOG_ERROR("Right channel codec setup failed with err: %d", codec_status); codec_status); return false; groupStateMachine_->StopStream(group); return; } } } } Loading @@ -3487,8 +3490,6 @@ class LeAudioClientImpl : public LeAudioClient { weak_factory_.GetWeakPtr(), std::placeholders::_1, weak_factory_.GetWeakPtr(), std::placeholders::_1, std::placeholders::_2)); std::placeholders::_2)); } } return true; } } const struct le_audio::stream_configuration* GetStreamSourceConfiguration( const struct le_audio::stream_configuration* GetStreamSourceConfiguration( Loading @@ -3511,6 +3512,7 @@ class LeAudioClientImpl : public LeAudioClient { if (!stream_conf) { if (!stream_conf) { LOG(WARNING) << " Could not get source configuration for group " LOG(WARNING) << " Could not get source configuration for group " << active_group_id_ << " probably microphone not configured"; << active_group_id_ << " probably microphone not configured"; groupStateMachine_->StopStream(group); return; return; } } Loading @@ -3531,6 +3533,7 @@ class LeAudioClientImpl : public LeAudioClient { audio_framework_sink_config); audio_framework_sink_config); if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { LOG_ERROR("Left channel codec setup failed with err: %d", codec_status); LOG_ERROR("Left channel codec setup failed with err: %d", codec_status); groupStateMachine_->StopStream(group); return; return; } } Loading @@ -3541,6 +3544,7 @@ class LeAudioClientImpl : public LeAudioClient { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { if (codec_status != le_audio::CodecInterface::Status::STATUS_OK) { LOG_ERROR("Right channel codec setup failed with err: %d", LOG_ERROR("Right channel codec setup failed with err: %d", codec_status); codec_status); groupStateMachine_->StopStream(group); return; return; } } } } Loading