Loading system/audio_bluetooth_hw/device_port_proxy.h +16 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,8 @@ class BluetoothAudioPort { virtual bool IsA2dp() const { return false; } virtual bool IsLeAudio() const { return false; } virtual bool GetPreferredDataIntervalUs(size_t* interval_us) const { return false; }; Loading Loading @@ -165,6 +167,20 @@ class BluetoothAudioPortAidl : public BluetoothAudioPort { SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH; } bool IsLeAudio() const override { return session_type_ == SessionType::LE_AUDIO_SOFTWARE_ENCODING_DATAPATH || session_type_ == SessionType::LE_AUDIO_SOFTWARE_DECODING_DATAPATH || session_type_ == SessionType::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH || session_type_ == SessionType::LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH || session_type_ == SessionType::LE_AUDIO_BROADCAST_SOFTWARE_ENCODING_DATAPATH || session_type_ == SessionType:: LE_AUDIO_BROADCAST_HARDWARE_OFFLOAD_ENCODING_DATAPATH; } bool GetPreferredDataIntervalUs(size_t* interval_us) const override; protected: Loading system/audio_bluetooth_hw/device_port_proxy_hidl.h +11 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,17 @@ class BluetoothAudioPortHidl : public BluetoothAudioPort { SessionType_2_1::A2DP_HARDWARE_OFFLOAD_DATAPATH; } bool IsLeAudio() const override { return session_type_hidl_ == SessionType_2_1::LE_AUDIO_SOFTWARE_ENCODING_DATAPATH || session_type_hidl_ == SessionType_2_1::LE_AUDIO_SOFTWARE_DECODED_DATAPATH || session_type_hidl_ == SessionType_2_1::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH || session_type_hidl_ == SessionType_2_1::LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH; } bool GetPreferredDataIntervalUs(size_t* interval_us) const override; protected: Loading system/audio_bluetooth_hw/stream_apis.cc +25 −0 Original line number Diff line number Diff line Loading @@ -366,6 +366,31 @@ static int out_set_parameters(struct audio_stream* stream, } } if (params.find("LeAudioSuspended") != params.end() && out->bluetooth_output_->IsLeAudio()) { LOG(INFO) << __func__ << ": LeAudioSuspended found LEAudio=" << out->bluetooth_output_->IsLeAudio(); if (params["LeAudioSuspended"] == "true") { LOG(INFO) << __func__ << ": LeAudioSuspended true, state=" << out->bluetooth_output_->GetState() << " stream param standby"; if (out->bluetooth_output_->GetState() == BluetoothStreamState::STARTED) { LOG(INFO) << __func__ << ": Stream is started, suspending LE Audio"; } else if (out->bluetooth_output_->GetState() != BluetoothStreamState::DISABLED) { LOG(INFO) << __func__ << ": Stream is disabled, suspending LE Audio"; } } else { LOG(INFO) << __func__ << ": LeAudioSuspended false, state=" << out->bluetooth_output_->GetState() << " stream param standby"; if (out->bluetooth_output_->GetState() == BluetoothStreamState::DISABLED) { LOG(INFO) << __func__ << ": Stream is disabled, unsuspending LE Audio"; } } } if (params.find("closing") != params.end()) { if (params["closing"] == "true") { LOG(INFO) << __func__ << ": state=" << out->bluetooth_output_->GetState() Loading Loading
system/audio_bluetooth_hw/device_port_proxy.h +16 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,8 @@ class BluetoothAudioPort { virtual bool IsA2dp() const { return false; } virtual bool IsLeAudio() const { return false; } virtual bool GetPreferredDataIntervalUs(size_t* interval_us) const { return false; }; Loading Loading @@ -165,6 +167,20 @@ class BluetoothAudioPortAidl : public BluetoothAudioPort { SessionType::A2DP_HARDWARE_OFFLOAD_ENCODING_DATAPATH; } bool IsLeAudio() const override { return session_type_ == SessionType::LE_AUDIO_SOFTWARE_ENCODING_DATAPATH || session_type_ == SessionType::LE_AUDIO_SOFTWARE_DECODING_DATAPATH || session_type_ == SessionType::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH || session_type_ == SessionType::LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH || session_type_ == SessionType::LE_AUDIO_BROADCAST_SOFTWARE_ENCODING_DATAPATH || session_type_ == SessionType:: LE_AUDIO_BROADCAST_HARDWARE_OFFLOAD_ENCODING_DATAPATH; } bool GetPreferredDataIntervalUs(size_t* interval_us) const override; protected: Loading
system/audio_bluetooth_hw/device_port_proxy_hidl.h +11 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,17 @@ class BluetoothAudioPortHidl : public BluetoothAudioPort { SessionType_2_1::A2DP_HARDWARE_OFFLOAD_DATAPATH; } bool IsLeAudio() const override { return session_type_hidl_ == SessionType_2_1::LE_AUDIO_SOFTWARE_ENCODING_DATAPATH || session_type_hidl_ == SessionType_2_1::LE_AUDIO_SOFTWARE_DECODED_DATAPATH || session_type_hidl_ == SessionType_2_1::LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH || session_type_hidl_ == SessionType_2_1::LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH; } bool GetPreferredDataIntervalUs(size_t* interval_us) const override; protected: Loading
system/audio_bluetooth_hw/stream_apis.cc +25 −0 Original line number Diff line number Diff line Loading @@ -366,6 +366,31 @@ static int out_set_parameters(struct audio_stream* stream, } } if (params.find("LeAudioSuspended") != params.end() && out->bluetooth_output_->IsLeAudio()) { LOG(INFO) << __func__ << ": LeAudioSuspended found LEAudio=" << out->bluetooth_output_->IsLeAudio(); if (params["LeAudioSuspended"] == "true") { LOG(INFO) << __func__ << ": LeAudioSuspended true, state=" << out->bluetooth_output_->GetState() << " stream param standby"; if (out->bluetooth_output_->GetState() == BluetoothStreamState::STARTED) { LOG(INFO) << __func__ << ": Stream is started, suspending LE Audio"; } else if (out->bluetooth_output_->GetState() != BluetoothStreamState::DISABLED) { LOG(INFO) << __func__ << ": Stream is disabled, suspending LE Audio"; } } else { LOG(INFO) << __func__ << ": LeAudioSuspended false, state=" << out->bluetooth_output_->GetState() << " stream param standby"; if (out->bluetooth_output_->GetState() == BluetoothStreamState::DISABLED) { LOG(INFO) << __func__ << ": Stream is disabled, unsuspending LE Audio"; } } } if (params.find("closing") != params.end()) { if (params["closing"] == "true") { LOG(INFO) << __func__ << ": state=" << out->bluetooth_output_->GetState() Loading