Loading bluetooth/audio/utils/session/BluetoothAudioSessionControl_2_1.h +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ class BluetoothAudioSessionControl_2_1 { std::shared_ptr<BluetoothAudioSession_2_1> session_ptr = BluetoothAudioSessionInstance_2_1::GetSessionInstance(session_type); if (session_ptr != nullptr) { return session_ptr->GetAudioSession()->IsSessionReady(); return session_ptr->IsSessionReady(); } return false; } Loading bluetooth/audio/utils/session/BluetoothAudioSession_2_1.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -60,6 +60,18 @@ BluetoothAudioSession_2_1::BluetoothAudioSession_2_1( } } bool BluetoothAudioSession_2_1::IsSessionReady() { LOG(WARNING) << __func__ << " session_type: " << toString(session_type_2_1_); if (session_type_2_1_ != SessionType_2_1::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH) { return audio_session->IsSessionReady(); } std::lock_guard<std::recursive_mutex> guard(audio_session->mutex_); return audio_session->stack_iface_ != nullptr; } std::shared_ptr<BluetoothAudioSession> BluetoothAudioSession_2_1::GetAudioSession() { return audio_session; Loading @@ -70,7 +82,7 @@ BluetoothAudioSession_2_1::GetAudioSession() { const ::android::hardware::bluetooth::audio::V2_1::AudioConfiguration BluetoothAudioSession_2_1::GetAudioConfig() { std::lock_guard<std::recursive_mutex> guard(audio_session->mutex_); if (audio_session->IsSessionReady()) { if (IsSessionReady()) { // If session is unknown it means it should be 2.0 type if (session_type_2_1_ != SessionType_2_1::UNKNOWN) return audio_config_2_1_; Loading bluetooth/audio/utils/session/BluetoothAudioSession_2_1.h +4 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,10 @@ class BluetoothAudioSession_2_1 { const ::android::hardware::bluetooth::audio::V2_1::SessionType& session_type); // The function helps to check if this session is ready or not // @return: true if the Bluetooth stack has started the specified session bool IsSessionReady(); std::shared_ptr<BluetoothAudioSession> GetAudioSession(); // The report function is used to report that the Bluetooth stack has started Loading Loading
bluetooth/audio/utils/session/BluetoothAudioSessionControl_2_1.h +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ class BluetoothAudioSessionControl_2_1 { std::shared_ptr<BluetoothAudioSession_2_1> session_ptr = BluetoothAudioSessionInstance_2_1::GetSessionInstance(session_type); if (session_ptr != nullptr) { return session_ptr->GetAudioSession()->IsSessionReady(); return session_ptr->IsSessionReady(); } return false; } Loading
bluetooth/audio/utils/session/BluetoothAudioSession_2_1.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -60,6 +60,18 @@ BluetoothAudioSession_2_1::BluetoothAudioSession_2_1( } } bool BluetoothAudioSession_2_1::IsSessionReady() { LOG(WARNING) << __func__ << " session_type: " << toString(session_type_2_1_); if (session_type_2_1_ != SessionType_2_1::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH) { return audio_session->IsSessionReady(); } std::lock_guard<std::recursive_mutex> guard(audio_session->mutex_); return audio_session->stack_iface_ != nullptr; } std::shared_ptr<BluetoothAudioSession> BluetoothAudioSession_2_1::GetAudioSession() { return audio_session; Loading @@ -70,7 +82,7 @@ BluetoothAudioSession_2_1::GetAudioSession() { const ::android::hardware::bluetooth::audio::V2_1::AudioConfiguration BluetoothAudioSession_2_1::GetAudioConfig() { std::lock_guard<std::recursive_mutex> guard(audio_session->mutex_); if (audio_session->IsSessionReady()) { if (IsSessionReady()) { // If session is unknown it means it should be 2.0 type if (session_type_2_1_ != SessionType_2_1::UNKNOWN) return audio_config_2_1_; Loading
bluetooth/audio/utils/session/BluetoothAudioSession_2_1.h +4 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,10 @@ class BluetoothAudioSession_2_1 { const ::android::hardware::bluetooth::audio::V2_1::SessionType& session_type); // The function helps to check if this session is ready or not // @return: true if the Bluetooth stack has started the specified session bool IsSessionReady(); std::shared_ptr<BluetoothAudioSession> GetAudioSession(); // The report function is used to report that the Bluetooth stack has started Loading